New version of ProjMan

This commit is contained in:
svkalinin
2022-07-21 10:56:46 +03:00
parent faf594ce9b
commit e68aeddbd5
2595 changed files with 14193 additions and 12688 deletions

38
lib/notebook.tcl Normal file
View File

@@ -0,0 +1,38 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
#
# Operation with NoteBook widget module
#
######################################################
namespace eval NB {
proc InsertItem {nb item type} {
switch $type {
file {
regsub -all {\.|/|\\|\s} $item "_" itemName
if [winfo exists $nb.$itemName] {
set fm $nb.$itemName
} else {
set fm [ttk::frame $nb.$itemName]
pack $fm -side top -expand true -fill both
$nb add $fm -text [file tail $item];# -image close_12x12 -compound right
$nb select $fm
}
}
}
puts "NB item - $fm"
return $fm
}
proc CloseTab {w x y} {
if {[$w identify $x $y] == "close_button"} {
puts "Hurrah! Close tab [$w index @$x,$y] plz."
FileOper::Close
}
}
}