arcadia 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README +19 -15
- data/bin/arc +0 -0
- data/conf/LC/en-UK.LANG +1 -1
- data/conf/LC/ru-RU.LANG +272 -0
- data/conf/theme-dark.conf +3 -3
- data/ext/ae-dir-projects/ae-dir-projects.rb +5 -5
- data/ext/ae-editor/ae-editor.rb +302 -178
- data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +2 -2
- data/ext/ae-term/ae-term.rb +11 -2
- data/lib/a-commons.rb +49 -19
- data/lib/a-contracts.rb +13 -0
- data/lib/a-core.rb +139 -36
- data/lib/a-tkcommons.rb +23 -8
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ArrowButton.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/BWidget.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Button.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ButtonBox.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ComboBox.html +8 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Dialog.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/DragSite.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/DropSite.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/DynamicHelp.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Entry.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Label.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/LabelEntry.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/LabelFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ListBox.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/MainFrame.html +28 -23
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/MessageDlg.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/NoteBook.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PagesManager.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PanedWindow.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PanelFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/PasswdDlg.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ProgressBar.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ProgressDlg.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ScrollView.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ScrollableFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/ScrolledWindow.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/SelectColor.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/SelectFont.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Separator.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/SpinBox.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/StatusBar.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/TitleFrame.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Tree.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/Widget.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/contents.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/index.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/navtree.html +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/BWman/options.htm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/CHANGES.txt +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/ChangeLog +59 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/LICENSE.txt +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/README.txt +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/arrow.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/bitmap.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/button.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/buttonbox.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/color.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/combobox.tcl +8 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/basic.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/bwidget.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/demo.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/dnd.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/manager.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/select.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/tmpldlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/tree.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/demo/x1.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dialog.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dragsite.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dropsite.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/dynhelp.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/entry.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/font.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/bold.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/copy.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/cut.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/dragfile.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/dragicon.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/error.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/file.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/folder.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/hourglass.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/info.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/italic.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/minus.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/new.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/opcopy.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/open.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/openfold.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/oplink.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/opmove.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/overstrike.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/palette.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/passwd.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/paste.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/plus.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/print.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/question.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/redo.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/save.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/target.xbm +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/underline.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/undo.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/images/warning.gif +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/init.tcl +9 -8
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/label.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/labelentry.tcl +4 -1
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/labelframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/da.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/de.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/en.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/es.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/fr.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/hu.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/nl.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/no.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/lang/pl.rc +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/listbox.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/mainframe.tcl +110 -22
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/messagedlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/notebook.tcl +13 -3
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/pagesmgr.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/panedw.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/panelframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/passwddlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/pkgIndex.tcl +2 -3
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/progressbar.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/progressdlg.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/scrollframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/scrollview.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/scrollw.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/separator.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/spinbox.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/statusbar.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/tests/entry.test +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/titleframe.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/tree.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/utils.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/widget.tcl +15 -2
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/wizard.tcl +0 -0
- data/tcl/{bwidget-1.9.6 → bwidget-1.9.7}/xpm2image.tcl +90 -28
- metadata +146 -196
- data/tcl/fsdialog/de.msg +0 -30
- data/tcl/fsdialog/en.msg +0 -31
- data/tcl/fsdialog/fsdialog.tcl +0 -1783
- data/tcl/fsdialog/fsdlg-gif.tcl +0 -259
- data/tcl/fsdialog/fsdlg-png.tcl +0 -265
- data/tcl/fsdialog/sv.msg +0 -32
- data/tcl/fsdialog/tclIndex +0 -6
- data/tcl/ptwidgets-1.1.0/COPYRIGHT +0 -10
- data/tcl/ptwidgets-1.1.0/ChangeLog +0 -194
- data/tcl/ptwidgets-1.1.0/README +0 -50
- data/tcl/ptwidgets-1.1.0/common/stacktrace.tcl +0 -29
- data/tcl/ptwidgets-1.1.0/common/tokenframe.tcl +0 -200
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_off.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/toggleswitch_on.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokenentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/tokensearch_popup_example2.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/img/wmarkentry.png +0 -0
- data/tcl/ptwidgets-1.1.0/doc/toggleswitch.html +0 -402
- data/tcl/ptwidgets-1.1.0/doc/tokenentry.html +0 -1366
- data/tcl/ptwidgets-1.1.0/doc/tokensearch.html +0 -1549
- data/tcl/ptwidgets-1.1.0/doc/wmarkentry.html +0 -634
- data/tcl/ptwidgets-1.1.0/library/toggleswitch.tcl +0 -432
- data/tcl/ptwidgets-1.1.0/library/tokenentry.tcl +0 -2208
- data/tcl/ptwidgets-1.1.0/library/tokensearch.tcl +0 -2488
- data/tcl/ptwidgets-1.1.0/library/wmarkentry.tcl +0 -630
- data/tcl/ptwidgets-1.1.0/pkgIndex.tcl +0 -10
- data/tcl/ptwidgets-1.1.0/test/Makefile +0 -3
- data/tcl/ptwidgets-1.1.0/test/run.tcl +0 -3
- data/tcl/ptwidgets-1.1.0/test/test.tcl +0 -89
- data/tcl/ptwidgets-1.1.0/test/toggleswitch.test +0 -562
- data/tcl/ptwidgets-1.1.0/test/tokenentry.test +0 -1023
- data/tcl/ptwidgets-1.1.0/test/tokensearch.test +0 -1023
- data/tcl/ptwidgets-1.1.0/test/wmarkentry.test +0 -1325
- data/tcl/themes/altTheme.tcl +0 -101
- data/tcl/themes/aquaTheme.tcl +0 -59
- data/tcl/themes/clamTheme.tcl +0 -140
- data/tcl/themes/classicTheme.tcl +0 -108
- data/tcl/themes/pkgIndex.tcl +0 -3
- data/tcl/themes/ttk.tcl +0 -176
- data/tcl/themes/vistaTheme.tcl +0 -224
- data/tcl/themes/winTheme.tcl +0 -80
- data/tcl/themes/xpTheme.tcl +0 -65
- data/tcl/tkfbox/folder.gif +0 -0
- data/tcl/tkfbox/textfile.gif +0 -0
- data/tcl/tkfbox/tkfbox.tcl +0 -1
- data/tcl/tkfbox/tkfbox.tcl~ +0 -1
- data/tcl/tkfbox/updir.xbm +0 -1
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -31,17 +31,18 @@ Widget::_opt_defaults
|
|
|
31
31
|
|
|
32
32
|
# Try to load lang file corresponding to current msgcat locale
|
|
33
33
|
proc Widget::_opt_lang {} {
|
|
34
|
-
set langfile [file join $::BWIDGET::LIBRARY "lang" "en.rc"]
|
|
35
34
|
if {0 != [llength [info commands ::msgcat::mcpreferences]]} {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
set langs [::msgcat::mcpreferences]
|
|
36
|
+
}
|
|
37
|
+
lappend langs en
|
|
38
|
+
|
|
39
|
+
foreach lang $langs {
|
|
40
|
+
set l [file join $::BWIDGET::LIBRARY "lang" "$lang.rc"]
|
|
41
|
+
if {(![catch {file readable $l} result]) && ($result)} {
|
|
42
|
+
option read $l
|
|
43
|
+
break
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
|
-
option read $langfile
|
|
45
46
|
}
|
|
46
47
|
Widget::_opt_lang
|
|
47
48
|
|
|
File without changes
|
|
@@ -58,7 +58,10 @@ proc LabelEntry::create { path args } {
|
|
|
58
58
|
|
|
59
59
|
bindtags $path [list $path BwLabelEntry [winfo toplevel $path] all]
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Widget::create LabelEntry $path
|
|
62
|
+
proc ::$path { cmd args } \
|
|
63
|
+
"return \[LabelEntry::_path_command [list $path] \$cmd \$args\]"
|
|
64
|
+
return $path
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -38,13 +38,13 @@ namespace eval MainFrame {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
Widget::declare MainFrame {
|
|
41
|
-
{-width
|
|
42
|
-
{-height
|
|
43
|
-
{-background
|
|
44
|
-
{-textvariable
|
|
45
|
-
{-menu
|
|
46
|
-
{-separator
|
|
47
|
-
{-bg
|
|
41
|
+
{-width TkResource 0 0 frame}
|
|
42
|
+
{-height TkResource 0 0 frame}
|
|
43
|
+
{-background TkResource "" 0 frame}
|
|
44
|
+
{-textvariable String "" 0}
|
|
45
|
+
{-menu String {} 1}
|
|
46
|
+
{-separator Enum both 1 {none top bottom both}}
|
|
47
|
+
{-bg Synonym -background}
|
|
48
48
|
|
|
49
49
|
{-menubarfont String "" 0}
|
|
50
50
|
{-menuentryfont String "" 0}
|
|
@@ -203,7 +203,8 @@ proc MainFrame::configure { path args } {
|
|
|
203
203
|
|
|
204
204
|
# The ttk frame has no -background
|
|
205
205
|
if {![Widget::theme] && [Widget::hasChanged $path -background bg] } {
|
|
206
|
-
if {$::tcl_platform(platform) == "unix"
|
|
206
|
+
if {($::tcl_platform(platform) == "unix")
|
|
207
|
+
&& (0 != [string compare [tk windowingsystem] "aqua"])} {
|
|
207
208
|
set listmenu [$_widget($path,top) cget -menu]
|
|
208
209
|
while { [llength $listmenu] } {
|
|
209
210
|
set newlist {}
|
|
@@ -627,7 +628,16 @@ proc MainFrame::_create_entries { path menu menuopts entries } {
|
|
|
627
628
|
set accel [_parse_accelerator [lindex $entry 4]]
|
|
628
629
|
if { [llength $accel] } {
|
|
629
630
|
lappend opt -accelerator [lindex $accel 0]
|
|
630
|
-
|
|
631
|
+
foreach event [lindex $accel 1] {
|
|
632
|
+
bind $_widget($path,top) $event [list $menu invoke $count]
|
|
633
|
+
}
|
|
634
|
+
foreach event [lindex $accel 2] {
|
|
635
|
+
if {[bind $_widget($path,top) $event] == {}} {
|
|
636
|
+
bind $_widget($path,top) $event { # do nothing }
|
|
637
|
+
} else {
|
|
638
|
+
# The existing binding will intercept these events.
|
|
639
|
+
}
|
|
640
|
+
}
|
|
631
641
|
}
|
|
632
642
|
|
|
633
643
|
# user options
|
|
@@ -663,25 +673,39 @@ proc MainFrame::_parse_name { menuname } {
|
|
|
663
673
|
# MainFrame::_parse_accelerator --
|
|
664
674
|
#
|
|
665
675
|
# Given a key combo description, construct an appropriate human readable
|
|
666
|
-
# string (for display on as a menu accelerator)
|
|
667
|
-
# bind
|
|
676
|
+
# string (for display on as a menu accelerator), a list of the
|
|
677
|
+
# corresponding bind events, and a separate list of bind events that need
|
|
678
|
+
# to be blocked.
|
|
679
|
+
#
|
|
680
|
+
# When argument $desc does not include "Shift", the bindings to $events
|
|
681
|
+
# will in some cases also intercept events that have the modifier "Shift",
|
|
682
|
+
# unless more specific bindings $blockEvents exist to the latter. This
|
|
683
|
+
# situation occurs, for example, when a Cmd binding exists without a
|
|
684
|
+
# corresponding ShiftCmd binding. The list of events that need to be
|
|
685
|
+
# blocked is returned as the third element of the result.
|
|
668
686
|
#
|
|
669
687
|
# Arguments:
|
|
670
688
|
# desc a list with the following format:
|
|
671
689
|
# ?sequence? key
|
|
672
|
-
# sequence may be None, Ctrl, Alt, or
|
|
690
|
+
# sequence may be None, Ctrl, Alt, CtrlAlt, Shift, Cmd or
|
|
691
|
+
# ShiftCmd
|
|
673
692
|
# key may be any key
|
|
674
693
|
#
|
|
675
694
|
# Results:
|
|
676
|
-
# {accel
|
|
695
|
+
# {accel events blockEvents} a list containing the accelerator string and
|
|
696
|
+
# two lists of events
|
|
677
697
|
|
|
678
698
|
proc MainFrame::_parse_accelerator { desc } {
|
|
699
|
+
variable _widget
|
|
700
|
+
|
|
701
|
+
set fKey 0
|
|
679
702
|
if { [llength $desc] == 1 } {
|
|
680
703
|
set seq None
|
|
681
704
|
set key [string tolower [lindex $desc 0]]
|
|
682
705
|
# If the key is an F key (ie, F1, F2, etc), it has to be capitalized
|
|
683
706
|
if {[regexp {^f([1-9]|([12][0-9]|3[0-5]))$} $key]} {
|
|
684
707
|
set key [string toupper $key]
|
|
708
|
+
set fKey 1
|
|
685
709
|
}
|
|
686
710
|
} elseif { [llength $desc] == 2 } {
|
|
687
711
|
set seq [lindex $desc 0]
|
|
@@ -689,30 +713,94 @@ proc MainFrame::_parse_accelerator { desc } {
|
|
|
689
713
|
# If the key is an F key (ie, F1, F2, etc), it has to be capitalized
|
|
690
714
|
if {[regexp {^f([1-9]|([12][0-9]|3[0-5]))$} $key]} {
|
|
691
715
|
set key [string toupper $key]
|
|
716
|
+
set fKey 1
|
|
692
717
|
}
|
|
693
718
|
} else {
|
|
694
719
|
return {}
|
|
695
720
|
}
|
|
721
|
+
|
|
722
|
+
# Plain "Shift" can be used only with F keys, but "ShiftCmd" is allowed.
|
|
723
|
+
if {[string equal $seq "Shift"] && (!$fKey)} {
|
|
724
|
+
return -code error {Shift accelerator can be used only with F keys}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
set blockEvents {}
|
|
728
|
+
set upc [string toupper $key]
|
|
729
|
+
|
|
696
730
|
switch -- $seq {
|
|
697
731
|
None {
|
|
698
|
-
set accel "
|
|
699
|
-
set
|
|
732
|
+
set accel "$upc"
|
|
733
|
+
set events [list "<Key-$key>"]
|
|
734
|
+
if {$fKey} {
|
|
735
|
+
set blockEvents [list "<Shift-Key-$key>"]
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
Shift {
|
|
739
|
+
# Used only with Function keys.
|
|
740
|
+
set accel "Shift+$upc"
|
|
741
|
+
set events [list "<Shift-Key-$key>"]
|
|
742
|
+
}
|
|
743
|
+
Cmd {
|
|
744
|
+
set accel "Cmd+$upc"
|
|
745
|
+
|
|
746
|
+
if { [string equal [tk windowingsystem] "aqua"] &&
|
|
747
|
+
([string first AppKit [winfo server .]] == -1)
|
|
748
|
+
} {
|
|
749
|
+
# Carbon
|
|
750
|
+
set events [list "<Command-Key-$key>" \
|
|
751
|
+
"<Lock-Command-Key-$upc>" ]
|
|
752
|
+
set blockEvents [list "<Lock-Shift-Command-Key-$upc>"]
|
|
753
|
+
# Both bindings must be included in $events - the first binding
|
|
754
|
+
# does not fire if "Lock" is set, and this is as bind(n) states
|
|
755
|
+
# because the second binding is NOT a more specialized form of
|
|
756
|
+
# the first.
|
|
757
|
+
} else {
|
|
758
|
+
# Cocoa and anything else that uses Cmd
|
|
759
|
+
set events [list "<Command-Key-$key>"]
|
|
760
|
+
# A binding to "<Lock-Command-Key-$upc>" must not be included
|
|
761
|
+
# here - both events fire if "Lock" is set.
|
|
762
|
+
set blockEvents [list "<Shift-Command-Key-$key>"]
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
ShiftCmd {
|
|
766
|
+
if { [string equal [tk windowingsystem] "aqua"] &&
|
|
767
|
+
([string first AppKit [winfo server .]] == -1)
|
|
768
|
+
} {
|
|
769
|
+
# Carbon
|
|
770
|
+
set accel "Shift+Cmd+$upc"
|
|
771
|
+
set events [list "<Shift-Command-Key-$upc>" \
|
|
772
|
+
"<Lock-Shift-Command-Key-$upc>"]
|
|
773
|
+
# Both bindings must be included here - the first binding does
|
|
774
|
+
# not fire if "Lock" is set, even though the second binding
|
|
775
|
+
# should be recognized as a more specialized form of the first.
|
|
776
|
+
} else {
|
|
777
|
+
# Cocoa and anything else that uses Cmd
|
|
778
|
+
set accel "Shift+Cmd+$upc"
|
|
779
|
+
set events [list "<Shift-Command-Key-$key>"]
|
|
780
|
+
# A binding to "<Lock-Shift-Command-Key-$key>" must not be
|
|
781
|
+
# included here - both events fire if "Lock" is set.
|
|
782
|
+
# Tk/Cocoa fails to recognize
|
|
783
|
+
# <Lock-Shift-Command-Key-$key> as a "more specialized" binding
|
|
784
|
+
# than <Shift-Command-Key-$key>.
|
|
785
|
+
# Perversely, Tk/Carbon (above) makes the opposite error.
|
|
786
|
+
}
|
|
700
787
|
}
|
|
701
788
|
Ctrl {
|
|
702
|
-
set accel "Ctrl
|
|
703
|
-
set
|
|
789
|
+
set accel "Ctrl+$upc"
|
|
790
|
+
set events [list "<Control-Key-$key>"]
|
|
704
791
|
}
|
|
705
792
|
Alt {
|
|
706
|
-
set accel "Alt
|
|
707
|
-
set
|
|
793
|
+
set accel "Alt+$upc"
|
|
794
|
+
set events [list "<Alt-Key-$key>"]
|
|
708
795
|
}
|
|
709
796
|
CtrlAlt {
|
|
710
|
-
set accel "Ctrl+Alt
|
|
711
|
-
set
|
|
797
|
+
set accel "Ctrl+Alt+$upc"
|
|
798
|
+
set events [list "<Control-Alt-Key-$key>"]
|
|
712
799
|
}
|
|
713
800
|
default {
|
|
714
801
|
return -code error "invalid accelerator code $seq"
|
|
715
802
|
}
|
|
716
803
|
}
|
|
717
|
-
|
|
804
|
+
|
|
805
|
+
return [list $accel $events $blockEvents]
|
|
718
806
|
}
|
|
File without changes
|
|
@@ -1107,12 +1107,22 @@ proc NoteBook::_resize { path } {
|
|
|
1107
1107
|
variable $path
|
|
1108
1108
|
upvar 0 $path data
|
|
1109
1109
|
|
|
1110
|
+
# Check if pages are fully initialized or if we are still initializing
|
|
1111
|
+
if { 0 < [llength $data(pages)] &&
|
|
1112
|
+
![info exists data([lindex $data(pages) end],width)] } {
|
|
1113
|
+
return
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1110
1116
|
if {!$data(realized)} {
|
|
1111
|
-
|
|
1112
|
-
|
|
1117
|
+
set data(realized) 1
|
|
1118
|
+
if { [Widget::cget $path -width] == 0 ||
|
|
1119
|
+
[Widget::cget $path -height] == 0 } {
|
|
1120
|
+
# This does an update allowing other events (resize) to enter
|
|
1121
|
+
# In addition, it does a redraw, so first set the realized and
|
|
1122
|
+
# then exit
|
|
1113
1123
|
compute_size $path
|
|
1124
|
+
return
|
|
1114
1125
|
}
|
|
1115
|
-
set data(realized) 1
|
|
1116
1126
|
}
|
|
1117
1127
|
|
|
1118
1128
|
NoteBook::_redraw $path
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if {[catch {package require Tcl}]} return
|
|
2
|
-
package ifneeded BWidget 1.9.
|
|
2
|
+
package ifneeded BWidget 1.9.7 "\
|
|
3
3
|
package require Tk 8.1.1;\
|
|
4
|
-
[list tclPkgSetup $dir BWidget 1.9.
|
|
4
|
+
[list tclPkgSetup $dir BWidget 1.9.7 {
|
|
5
5
|
{arrow.tcl source {ArrowButton ArrowButton::create ArrowButton::use}}
|
|
6
6
|
{labelframe.tcl source {LabelFrame LabelFrame::create LabelFrame::use}}
|
|
7
7
|
{labelentry.tcl source {LabelEntry LabelEntry::create LabelEntry::use}}
|
|
@@ -35,7 +35,6 @@ package ifneeded BWidget 1.9.6 "\
|
|
|
35
35
|
{dialog.tcl source {Dialog Dialog::create Dialog::use}}
|
|
36
36
|
{messagedlg.tcl source {MessageDlg MessageDlg::create MessageDlg::use}}
|
|
37
37
|
{font.tcl source {SelectFont SelectFont::create SelectFont::use SelectFont::loadfont}}
|
|
38
|
-
{widgetdoc.tcl source {Widget::generate-doc Widget::generate-widget-doc}}
|
|
39
38
|
{wizard.tcl source {Wizard Wizard::create Wizard::use SimpleWizard ClassicWizard}}
|
|
40
39
|
{xpm2image.tcl source {xpm-to-image}}
|
|
41
40
|
}]; \
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1100,6 +1100,19 @@ proc Widget::_configure_option { option altopt } {
|
|
|
1100
1100
|
return [list $optdb $optclass]
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
|
+
# ----------------------------------------------------------------------------
|
|
1104
|
+
# Command Widget::_make_tk_widget_name
|
|
1105
|
+
# ----------------------------------------------------------------------------
|
|
1106
|
+
# Before, the widget meta name was build as: ".#BWidget.#$tkwidget"
|
|
1107
|
+
# This does not work for ttk widgets, as they have an "::" in their name.
|
|
1108
|
+
# Thus replace any "::" by "__" will do the job.
|
|
1109
|
+
proc Widget::_make_tk_widget_name { tkwidget } {
|
|
1110
|
+
set pos 0
|
|
1111
|
+
for {set pos 0} {0 <= [set pos [string first "::" $tkwidget $pos]]} {incr pos} {
|
|
1112
|
+
set tkwidget [string range $tkwidget 0 [expr {$pos-1}]]__[string range $tkwidget [expr {$pos+2}] end]
|
|
1113
|
+
}
|
|
1114
|
+
return ".#BWidget.#$tkwidget"
|
|
1115
|
+
}
|
|
1103
1116
|
|
|
1104
1117
|
# ----------------------------------------------------------------------------
|
|
1105
1118
|
# Command Widget::_get_tkwidget_options
|
|
@@ -1109,7 +1122,7 @@ proc Widget::_get_tkwidget_options { tkwidget } {
|
|
|
1109
1122
|
variable _optiondb
|
|
1110
1123
|
variable _optionclass
|
|
1111
1124
|
|
|
1112
|
-
set widget
|
|
1125
|
+
set widget [_make_tk_widget_name $tkwidget]
|
|
1113
1126
|
# encapsulation frame to not pollute '.' childspace
|
|
1114
1127
|
if {![winfo exists ".#BWidget"]} { frame ".#BWidget" }
|
|
1115
1128
|
if { ![winfo exists $widget] || ![info exists _tk_widget($tkwidget)] } {
|
|
@@ -1162,7 +1175,7 @@ proc Widget::_test_tkresource { option value arg } {
|
|
|
1162
1175
|
# set tkwidget [lindex $arg 0]
|
|
1163
1176
|
# set realopt [lindex $arg 1]
|
|
1164
1177
|
foreach {tkwidget realopt} $arg break
|
|
1165
|
-
set path
|
|
1178
|
+
set path [_make_tk_widget_name $tkwidget]
|
|
1166
1179
|
set old [$path cget $realopt]
|
|
1167
1180
|
$path configure $realopt $value
|
|
1168
1181
|
set res [$path cget $realopt]
|
|
File without changes
|
|
@@ -10,16 +10,87 @@
|
|
|
10
10
|
#
|
|
11
11
|
# ----------------------------------------------------------------------------
|
|
12
12
|
|
|
13
|
+
proc _xpm-to-image_process_line { line } {
|
|
14
|
+
upvar 1 data data
|
|
15
|
+
set line [string map {"\t" " "} $line]
|
|
16
|
+
|
|
17
|
+
set idx $data(chars_per_pixel)
|
|
18
|
+
incr idx -1
|
|
19
|
+
set cname [string range $line 0 $idx]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
set lend [string trim [string range $line $data(chars_per_pixel) end]]
|
|
23
|
+
|
|
24
|
+
## now replace multiple spaces with just one..
|
|
25
|
+
while {-1 != [string first " " $lend]} {
|
|
26
|
+
set lend [string map {" " " "} $lend]
|
|
27
|
+
}
|
|
28
|
+
set cl [split $lend " "]
|
|
29
|
+
|
|
30
|
+
set idx 0
|
|
31
|
+
set clen [llength $cl]
|
|
32
|
+
|
|
33
|
+
## scan through the line, looking for records of type c, g or m
|
|
34
|
+
while { $idx < $clen } {
|
|
35
|
+
set key [lindex $cl $idx]
|
|
36
|
+
if { [string equal $key {}] } {
|
|
37
|
+
incr idx
|
|
38
|
+
continue
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
while { ![string equal $key "c"]
|
|
42
|
+
&& ![string equal $key "m"]
|
|
43
|
+
&& ![string equal $key "g"]
|
|
44
|
+
&& ![string equal $key "g4"]
|
|
45
|
+
&& ![string equal $key ""]
|
|
46
|
+
} {
|
|
47
|
+
incr idx
|
|
48
|
+
set key [lindex $cl $idx]
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
incr idx
|
|
52
|
+
set color [string tolower [lindex $cl $idx]]
|
|
53
|
+
|
|
54
|
+
## one file used opaque to mean black
|
|
55
|
+
if { [string equal -nocase $color "opaque"] } {
|
|
56
|
+
set color "black"
|
|
57
|
+
}
|
|
58
|
+
set data(color-$key-$cname) $color
|
|
59
|
+
if { [string equal -nocase $color "none"] } {
|
|
60
|
+
set data(transparent) $cname
|
|
61
|
+
}
|
|
62
|
+
incr idx
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
foreach key {c g g4 m} {
|
|
67
|
+
if {[info exists data(color-$key-$cname)]} {
|
|
68
|
+
set color $data(color-$key-$cname)
|
|
69
|
+
set data(color-$cname) $color
|
|
70
|
+
set data(cname-$color) $cname
|
|
71
|
+
lappend data(colors) $color
|
|
72
|
+
break
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if { ![info exists data(color-$cname)] } {
|
|
76
|
+
error "color definition {$line} failed to define a color"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
13
80
|
proc xpm-to-image { file } {
|
|
14
81
|
set f [open $file]
|
|
15
82
|
set string [read $f]
|
|
16
83
|
close $f
|
|
17
84
|
|
|
18
|
-
#
|
|
19
85
|
# parse the strings in the xpm data
|
|
20
86
|
#
|
|
21
87
|
set xpm {}
|
|
22
88
|
foreach line [split $string "\n"] {
|
|
89
|
+
## some files have blank lines in them, skip those
|
|
90
|
+
## also, some files indent each line with spaces - remove those
|
|
91
|
+
set line [string trim $line]
|
|
92
|
+
if { $line eq "" } { continue }
|
|
93
|
+
|
|
23
94
|
if {[regexp {^"([^\"]*)"} $line all meat]} {
|
|
24
95
|
if {[string first XPMEXT $meat] == 0} {
|
|
25
96
|
break
|
|
@@ -51,32 +122,7 @@ proc xpm-to-image { file } {
|
|
|
51
122
|
# extract the color definitions in the xpm data
|
|
52
123
|
#
|
|
53
124
|
foreach line [lrange $xpm 1 $data(ncolors)] {
|
|
54
|
-
|
|
55
|
-
set cname [lindex $colors 0]
|
|
56
|
-
lappend data(cnames) $cname
|
|
57
|
-
if { [string length $cname] != $data(chars_per_pixel) } {
|
|
58
|
-
error "color definition {$line} in file $file has a bad size color name"
|
|
59
|
-
}
|
|
60
|
-
foreach record [lrange $colors 1 end] {
|
|
61
|
-
set key [lindex $record 0]
|
|
62
|
-
set color [string tolower [join [lrange $record 1 end] { }]]
|
|
63
|
-
set data(color-$key-$cname) $color
|
|
64
|
-
if { [string equal -nocase $color "none"] } {
|
|
65
|
-
set data(transparent) $cname
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
foreach key {c g g4 m} {
|
|
69
|
-
if {[info exists data(color-$key-$cname)]} {
|
|
70
|
-
set color $data(color-$key-$cname)
|
|
71
|
-
set data(color-$cname) $color
|
|
72
|
-
set data(cname-$color) $cname
|
|
73
|
-
lappend data(colors) $color
|
|
74
|
-
break
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if { ![info exists data(color-$cname)] } {
|
|
78
|
-
error "color definition {$line} in $file failed to define a color"
|
|
79
|
-
}
|
|
125
|
+
_xpm-to-image_process_line $line
|
|
80
126
|
}
|
|
81
127
|
|
|
82
128
|
#
|
|
@@ -84,11 +130,25 @@ proc xpm-to-image { file } {
|
|
|
84
130
|
#
|
|
85
131
|
set image [image create photo -width $data(width) -height $data(height)]
|
|
86
132
|
set y 0
|
|
133
|
+
set idx 0
|
|
87
134
|
foreach line [lrange $xpm [expr {1+$data(ncolors)}] [expr {1+$data(ncolors)+$data(height)}]] {
|
|
88
135
|
set x 0
|
|
89
136
|
set pixels {}
|
|
90
137
|
while { [string length $line] > 0 } {
|
|
91
138
|
set pixel [string range $line 0 [expr {$data(chars_per_pixel)-1}]]
|
|
139
|
+
## see if they lied about the number of colors by not counting
|
|
140
|
+
## "none" in the color count entry
|
|
141
|
+
set none 0
|
|
142
|
+
if { ($idx == 0) && ([info exists data(cname-none)]) && \
|
|
143
|
+
![info exists data(color-$pixel)] } {
|
|
144
|
+
## it appears that way - process this line as another
|
|
145
|
+
## color entry
|
|
146
|
+
_xpm-to-image_process_line $line
|
|
147
|
+
incr idx
|
|
148
|
+
set none 1
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
incr idx
|
|
92
152
|
set c $data(color-$pixel)
|
|
93
153
|
if { [string equal $c none] } {
|
|
94
154
|
if { [string length $pixels] } {
|
|
@@ -101,6 +161,9 @@ proc xpm-to-image { file } {
|
|
|
101
161
|
set line [string range $line $data(chars_per_pixel) end]
|
|
102
162
|
incr x
|
|
103
163
|
}
|
|
164
|
+
if { $none == 1 } {
|
|
165
|
+
continue
|
|
166
|
+
}
|
|
104
167
|
if { [llength $pixels] } {
|
|
105
168
|
$image put [list $pixels] -to [expr {$x-[llength $pixels]}] $y
|
|
106
169
|
}
|
|
@@ -112,4 +175,3 @@ proc xpm-to-image { file } {
|
|
|
112
175
|
#
|
|
113
176
|
return $image
|
|
114
177
|
}
|
|
115
|
-
|