Index: BWman/SelectColor.html ================================================================== --- BWman/SelectColor.html +++ BWman/SelectColor.html @@ -11,18 +11,23 @@
WIDGET-SPECIFIC OPTIONS
+ - + + + + + - +
  -background   -color  -parent
  -command  -help
  -parent   -placement  -title
  -title   -type
@@ -39,10 +44,14 @@
SelectColor::menu pathName placement ?option value ...? +
+
SelectColor::setbasecolor + index + color
SelectColor::setcolor index color
@@ -55,14 +64,43 @@ as a dialog box or as a menubutton.




WIDGET-SPECIFIC OPTIONS
+
-background
+
+ +Specifies the background color of the widget. + +
+
-color
-Specifies the color value of the widget. +Specifies the initial color used in the widget's color selectors. When modifying a +color that is used in the GUI, the value supplied is typically the existing value of +that color. + +
+
+
-command
+
+ +Specifies a command to be evaluated, with a color value appended, whenever +the color selected in the dialog changes. This facility can be used to modify +a color in the calling GUI and preview the change before deciding whether or not +to accept it. If the user selects "Cancel" in the dialog, the command is called +a final time to restore the initial color (supplied by option -color) that was +used before the dialog was opened. + +
+
+
-help
+
+ +This option takes a Boolean value. If the value is Boolean true, the SelectColor +dialog will include a panel that offers dynamic help to the user.
-parent
@@ -149,10 +187,19 @@ placement will be in relation to the parent widget.

+
+
SelectColor::setbasecolor + index + color +
+ +Set the value of user predefined base color at index index to color. +index must be between 0 and 10. +
SelectColor::setcolor index color
Index: ChangeLog ================================================================== --- ChangeLog +++ ChangeLog @@ -1,5 +1,18 @@ +2018-01-09 Harald Oehlmann + + * color.tcl: New option -command allows to get a callback + when the user does an unvalidated choice. + New option -background and command SelectColor for + window background. + TitleFrames, Dynamic help and Aqua native buttons used. + Show current choice by highlighting, not focus, to avoid + conflict with keyboard traversal. + Shows entry widget for numerical color input/output. + New option -help to show a help area. + Patch by Keith J. Nash [Patch 75101] + 2017-08-25 Harald Oehlmann **** BWidget 1.9.11 tagged **** 2017-05-08 Harald Oehlmann Index: color.tcl ================================================================== --- color.tcl +++ color.tcl @@ -1,14 +1,17 @@ namespace eval SelectColor { Widget::define SelectColor color Dialog Widget::declare SelectColor { - {-title String "Select a color" 0} - {-parent String "" 0} - {-color TkResource "" 0 {label -background}} - {-type Enum "dialog" 1 {dialog popup}} - {-placement String "center" 1} + {-title String "Select a color" 0} + {-parent String "" 0} + {-command String "" 0} + {-help Boolean 0 1} + {-color TkResource "" 0 {label -background}} + {-type Enum "dialog" 1 {dialog popup}} + {-placement String "center" 1} + {-background TkResource "" 0 {label -background}} } variable _baseColors { \#0000ff \#00ff00 \#00ffff \#ff0000 \#ff00ff \#ffff00 \#000099 \#009900 \#009999 \#990000 \#990099 \#999900 @@ -29,10 +32,19 @@ variable _selectype variable _selection variable _wcolor variable _image variable _hsv + + variable _command + variable _unsavedSelection + variable _oldColor + variable _entryColor + variable _bgColor + variable _fgColor + variable _rounds + variable _help } proc SelectColor::create { path args } { Widget::init SelectColor $path $args @@ -68,18 +80,25 @@ variable _baseColors variable _userColors variable _wcolor variable _selectype variable _selection + variable _command + variable _bgColor + variable _rounds Widget::init SelectColor $path $args set top [toplevel $path] set parent [winfo toplevel [winfo parent $top]] wm withdraw $top wm transient $top $parent wm overrideredirect $top 1 catch { wm attributes $top -topmost 1 } + + set _command [Widget::cget $path -command] + set _bgColor [Widget::cget $path -background] + set _rounds {} set frame [frame $top.frame \ -highlightthickness 0 \ -relief raised -borderwidth 2] set col 0 @@ -113,10 +132,18 @@ bind $top <1> {set SelectColor::_selection -1} bind $top {set SelectColor::_selection -2} bind $top [subst {if {"%W" == "$top"} \ {set SelectColor::_selection -2}}] + + # set background color for menu + $f configure -bg $_bgColor + $frame configure -bg $_bgColor + foreach w [winfo children $frame] { + $w configure -highlightcolor $_bgColor -highlightbackground $_bgColor + } + eval [list BWidget::place $top 0 0] $placement wm deiconify $top raise $top if {$::tcl_platform(platform) == "unix"} { @@ -143,17 +170,39 @@ break } lappend nativecmd $opts($key) $val } if {$native} { + # Call native dialog return [eval $nativecmd] } } + # Call BWidget dialog return [eval [list dialog $path] $args] } else { - return [lindex $colors $_selection] + # The user has either selected one of the palette colors, or has + # cancelled. The full BWidget/native dialog was not called. + # Unless the user has cancelled, pass the selected + # color to _userCommand. + set tmpCol [lindex $colors $_selection] + if {[string equal $tmpCol ""]} { + # User has cancelled - no need to call _userCommand. + } else { + _userCommand $tmpCol + } + return $tmpCol + } +} + + +proc SelectColor::_userCommand {color} { + variable _command + if {[string equal $_command {}]} { + return } + uplevel #0 $_command [list $color] + return } proc SelectColor::dialog {path args} { variable _baseColors @@ -160,10 +209,18 @@ variable _userColors variable _widget variable _selection variable _image variable _hsv + variable _command + variable _unsavedSelection + variable _oldColor + variable _entryColor + variable _bgColor + variable _fgColor + variable _rounds + variable _help Widget::init SelectColor $path:SelectColor $args set top [Dialog::create $path \ -title [Widget::cget $path:SelectColor -title] \ -parent [Widget::cget $path:SelectColor -parent] \ @@ -172,10 +229,16 @@ set dlgf [$top getframe] set fg [frame $dlgf.fg] set desc [list \ base _baseColors "Base colors" \ user _userColors "User colors"] + + set _help [Widget::cget $path:SelectColor -help] + set _command [Widget::cget $path:SelectColor -command] + set _bgColor [Widget::cget $path:SelectColor -background] + set _rounds {} + set count 0 foreach {type varcol defTitle} $desc { set col 0 set lin 0 set title [lindex [BWidget::getname "${type}Colors"] 0] @@ -201,29 +264,73 @@ bind $fround \ "SelectColor::_select_rgb [list $count]; [list $top] invoke 0" bind $fcolor \ "SelectColor::_select_rgb [list $count]; [list $top] invoke 0" + # Record list of $fround values in _rounds + lappend _rounds $fround + incr count if {[incr col] == 6} { incr lin set col 0 } } pack $titf -anchor w -pady 2 } + + # Record these colors for later use + set _fgColor [$fg.round0 cget -highlightcolor] + + # Add a TitleFrame $titf to wrap $fg.round and $fg.value + set name [lindex [BWidget::getname yourSelection] 0] + set titf [TitleFrame $fg.choice -text $name] + set subf [$titf getframe] + pack $titf -anchor w -pady 2 -expand yes -fill both + + # Add an entry widget $fg.value for the #RRGGBB value + if {$::tk_version > 8.4} { + set fixedFont TkFixedFont + } else { + set fixedFont Courier + } + set subf2 $fg.vround + frame $subf2 -highlightthickness 0 -relief sunken -borderwidth 2 + entry $fg.value -width 8 -relief sunken -bd 0 -highlightthickness 0 \ + -bg white -textvariable ::SelectColor::_entryColor -font $fixedFont + pack $subf2 -in $subf -anchor w -side left + pack $fg.value -in $subf2 -anchor w -side left + + # Remove focus from the entry widget by clicking anywhere... + bind $top <1> [list ::SelectColor::_CheckFocus %W] + + # ... or by pressing Return/Escape. + bind $fg.value [list ::SelectColor::_CheckFocus .] + bind $fg.value [list ::SelectColor::_CheckFocus .] + bind $fg.value {+break} + bind $fg.value {+break} + # Break so that the bindings to these events on the toplevel are not + # executed. + + # MODS - record the Tk window path for the entry widget. + set _widget(en) $fg.value + set fround [frame $fg.round \ -highlightthickness 0 \ -relief sunken -borderwidth 2] set fcolor [frame $fg.color \ -width 50 \ -highlightthickness 0 \ -relief flat -borderwidth 0] pack $fcolor -in $fround -fill y -expand yes - pack $fround -anchor e -pady 2 -fill y -expand yes + pack $fround -in $subf -side right -anchor e -pady 2 -fill y -expand yes - set fd [frame $dlgf.fd] + # Add a TitleFrame $dlgf.fd to wrap the canvas selectors. The + # labels are referenced by the DynamicHelp tooltip. + set name [lindex [BWidget::getname colorSelectors] 0] + set fd0 [TitleFrame $dlgf.fd -text $name] + set fd [$fd0 getframe] set f1 [frame $fd.f1 -relief sunken -borderwidth 2] set f2 [frame $fd.f2 -relief sunken -borderwidth 2] set c1 [canvas $f1.c -width 200 -height 200 -bd 0 -highlightthickness 0] set c2 [canvas $f2.c -width 15 -height 200 -bd 0 -highlightthickness 0] @@ -233,11 +340,12 @@ $c2 create polygon 0 0 10 5 0 10 -fill black -outline white -tags target pack $c1 $c2 pack $f1 $f2 -side left -padx 10 -anchor n - pack $fg $fd -side left -anchor n -fill y + pack $fg $fd0 -side left -anchor n -fill y + pack configure $fd0 -pady 2 -padx {4 0} bind $c1 [list SelectColor::_select_hue_sat %x %y] bind $c1 [list SelectColor::_select_hue_sat %x %y] bind $c2 [list SelectColor::_select_value %x %y] @@ -267,22 +375,98 @@ set _hsv [eval rgbToHsv $rgb] _set_rgb [eval [list format "\#%04x%04x%04x"] $rgb] _set_hue_sat [lindex $_hsv 0] [lindex $_hsv 1] _set_value [lindex $_hsv 2] - $top add -name ok - $top add -name cancel + # Initialize _oldColor which is used to reset the color supplied to + # _userCommand if the user cancels. + set _oldColor [set _unsavedSelection] + set tmp24 [::SelectColor::_24BitRgb $_oldColor] + if {[_ValidateColorEntry forced $tmp24]} { + set ::SelectColor::_entryColor $tmp24 + } else { + # Value $tmp24 does not pass entry widget validation and if used + # would disable validation. Use this default instead. + set _entryColor # + } + + # Validate input to the entry field. + # To avoid conflict with the entry -variable (_entryColor), do not set the + # latter directly (because a failed validation will switch off subsequent + # validations). Either call _SetEntryValue, or set _unsavedSelection which + # triggers the trace. + + $fg.value configure -validate all -validatecommand \ + [list SelectColor::_ValidateColorEntry %V %P] + + # Trace _unsavedSelection + # Subsequent modifications to _unsavedSelection will update the entry + # widget, if the value is valid. + # From now on, this is the only way that: + # (1) ::SelectColor::_SetEntryValue is called + # (2) ::SelectColor::_entryColor is modified (except by the user typing in + # the entry widget) + + trace add variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue + + $top add -text [lindex [BWidget::getname ok] 0] + $top add -text [lindex [BWidget::getname cancel] 0] + + if {$_help} { + # Add labels to offer DynamicHelp + set helpWords [lindex [BWidget::getname hoverHelp] 0] + set mouseWord " [lindex [BWidget::getname mouseHelp] 0] " + set keyboardWord " [lindex [BWidget::getname keyboardHelp] 0] " + set mouseHelpText [lindex [BWidget::getname mouseHelpText] 0] + set keyboardHelpText [lindex [BWidget::getname keyboardHelpText] 0] + set mouseHelpText [subst -nocommands -novariables $mouseHelpText] + set keyboardHelpText [subst -nocommands -novariables $keyboardHelpText] + frame $top.help + label $top.help.0 -text $helpWords -relief flat -bd 2 + label $top.help.1 -text $mouseWord -relief groove -bd 2 + label $top.help.2 -text $keyboardWord -relief groove -bd 2 + pack $top.help.0 $top.help.1 $top.help.2 \ + -anchor center -pady 4 -side left -padx 5 + DynamicHelp::add $top.help.1 -text $mouseHelpText + DynamicHelp::add $top.help.2 -text $keyboardHelpText + after idle [list pack $top.help] + } + + # Override background color + ReColor $path $_bgColor + set res [$top draw] if {$res == 0} { set color [$fg.color cget -background] } else { + # User has cancelled - call _userCommand to undo any changes made + # in the caller. + _userCommand $_oldColor set color "" } + + trace remove variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue + destroy $top return $color } + +# ---------------------------------------------------------------------------- +# Command SelectColor::setbasecolor +# ---------------------------------------------------------------------------- +# Exported command, to allow the caller to set the base colors of the palette. + +proc SelectColor::setbasecolor { idx color } { + variable _baseColors + set _baseColors [lreplace $_baseColors $idx $idx $color] +} + +# ---------------------------------------------------------------------------- +# Command SelectColor::setcolor +# ---------------------------------------------------------------------------- + proc SelectColor::setcolor { idx color } { variable _userColors set _userColors [lreplace $_userColors $idx $idx $color] } @@ -290,19 +474,26 @@ variable _baseColors variable _userColors variable _selection variable _widget variable _hsv + variable _unsavedSelection + variable _bgColor + variable _fgColor set frame $_widget(fcolor) + + # Use highlight color instead of focus to identify the selected + # palette color. Tab traversal of focus now works correctly. if {$_selection >= 0} { $frame.round$_selection configure \ - -relief sunken -highlightthickness 1 -borderwidth 2 + -relief sunken -highlightthickness 1 -borderwidth 2 \ + -highlightbackground $_bgColor } $frame.round$count configure \ - -relief flat -highlightthickness 2 -borderwidth 1 - focus $frame.round$count + -relief flat -highlightthickness 2 -borderwidth 1 \ + -highlightbackground $_fgColor set _selection $count set bg [$frame.color$count cget -background] set user [expr {$_selection-[llength $_baseColors]}] if {$user >= 0 && [string equal \ @@ -314,22 +505,33 @@ } else { set _hsv [eval rgbToHsv [winfo rgb $frame.color$count $bg]] _set_hue_sat [lindex $_hsv 0] [lindex $_hsv 1] _set_value [lindex $_hsv 2] $frame.color configure -background $bg + + # Display selected color in entry widget (via trace on + # ::SelectColor::_unsavedSelection), and notify caller. + set ::SelectColor::_unsavedSelection $bg + _userCommand $bg } } proc SelectColor::_set_rgb {rgb} { variable _selection variable _baseColors variable _userColors variable _widget + variable _unsavedSelection set frame $_widget(fcolor) $frame.color configure -background $rgb + + # Display selected color in entry widget (via trace on + # ::SelectColor::_unsavedSelection), and notify caller. + set ::SelectColor::_unsavedSelection $rgb + _userCommand $rgb set user [expr {$_selection-[llength $_baseColors]}] if {$user >= 0} { $frame.color$_selection configure -background $rgb set _userColors [lreplace $_userColors $user $user $rgb] } @@ -489,5 +691,243 @@ } } return [list $hue $sat [expr {$max/65535}]] } +# ------------------------------------------------------------------------------ +# Command SelectColor::ReColor +# ------------------------------------------------------------------------------ +# Command to change the background color for the dialog. +# +# FIXME Ideally this would be called by "$w configure -background $value". +# Currently a "configure -background" command is passed to Dialog and Widget +# but does not change SelectColor. +# ------------------------------------------------------------------------------ + +proc SelectColor::ReColor {path newColor} { + variable _bgColor + variable _rounds + variable _help + + set _bgColor $newColor + + $path:cmd configure -bg $_bgColor + + foreach child { + .sep .frame .bbox + .frame.fd .frame.fd.f.f1 .frame.fd.f.f2 + .frame.fg .frame.fg.base .frame.fg.choice + .frame.fg.user .frame.fg.round .frame.fg.vround + } { + $path$child configure -bg $_bgColor + } + + if {$_help} { + foreach child { + .help .help.0 .help.1 .help.2 + } { + $path$child configure -bg $_bgColor + } + } + + # Special treatment for Aqua native buttons. + # FIXME implement a general fix for BWidget Button/ButtonBox/Dialog + if {[string equal [tk windowingsystem] "aqua"]} { + $path.bbox.b0 configure -highlightbackground $_bgColor \ + -highlightthickness 0 + $path.bbox.b1 configure -highlightbackground $_bgColor \ + -highlightthickness 0 + } else { + $path.bbox.b0 configure -bg $_bgColor -activebackground $_bgColor \ + -highlightbackground $_bgColor + $path.bbox.b1 configure -bg $_bgColor -activebackground $_bgColor \ + -highlightbackground $_bgColor + } + + foreach fround $_rounds { + $fround configure -highlightbackground $_bgColor -bg $_bgColor + } + + return +} + + +# ------------------------------------------------------------------------------ +# Command SelectColor::_24BitRgb +# ------------------------------------------------------------------------------ +# Command to convert a hex 12n-bit RGB color to 24-bit, n > 0. +# Convert anything else to {}. +# Used to process the display in the entry widget. +# ------------------------------------------------------------------------------ + +proc SelectColor::_24BitRgb {col} { + set lenny [string length $col] + incr lenny -1 + + if { ($lenny % 3) + || ($lenny == 0) + || (![regexp {^#[a-fA-F0-9]*$} $col]) + } { + # Not a multiple of 3, or not leading #, or nothing after #, + # or non-HEX digits. + return {} + } elseif {$lenny == 3} { + # 12-bit, pad to 24-bit + set val $col + set val [string replace $val 3 3 "[string index $val 3]0"] + set val [string replace $val 2 2 "[string index $val 2]0"] + set val [string replace $val 1 1 "[string index $val 1]0"] + return $val + } elseif {$lenny == 6} { + # 24-bit, return unchanged + return $col + } else { + # Truncate to 24-bit + set delta [expr {$lenny / 3}] + set delta2 [expr {$delta * 2}] + set deltaP1 [incr delta] + set deltaP2 [incr delta] + set delta2P1 [incr delta2] + set delta2P2 [incr delta2] + set result # + append result [string range $col 1 2] + append result [string range $col $deltaP1 $deltaP2] + append result [string range $col $delta2P1 $delta2P2] + return $result + } +} + + +# ------------------------------------------------------------------------------ +# Command SelectColor::_SetEntryValue +# ------------------------------------------------------------------------------ +# Command to update the (hexadecimal color displayed in the) entry widget +# when there is a change in the color currently selected in the GUI, which is +# stored in _unsavedSelection. +# +# This command is called by a write trace on _unsavedSelection; if the +# value of this variable is a valid color (i.e. "#" followed by 3N hex digits), +# this command converts the value to 24 bits and sets ::SelectColor::_entryColor +# to the result, thereby displaying it in the entry widget. Therefore, +# when the user chooses a color by means other than the entry widget, this +# command updates the entry widget. +# +# This command does not update the GUI when the user changes the value in the +# entry widget: that is done instead by the -vcmd of the entry widget, which +# is SelectColor::_ValidateColorEntry. When the user chooses a color by typing +# in the entry widget, the command _ValidateColorEntry copies the value to +# _unsavedSelection if a keystroke in the widget makes its contents 3N hex +# digits long. +# ------------------------------------------------------------------------------ + +proc SelectColor::_SetEntryValue {argVarName var2 op} { + variable _entryColor + variable _unsavedSelection + + if {[string equal $argVarName ::SelectColor::_unsavedSelection] && + [string equal $var2 {}] && [string equal $op "write"]} { + # OK + } else { + # Unexpected call + return -code error "Unexpected trace of variable\ + \"$argVarName\", \"$var2\", \"$op\"" + } + + set col24bit [::SelectColor::_24BitRgb [set $argVarName]] + + if {[_ValidateColorEntry forced $col24bit]} { + set ::SelectColor::_entryColor $col24bit + } else { + # Value is invalid, and if written to _entryColor this would disable + # validation. + } + + return +} + + +# ------------------------------------------------------------------------------ +# Command SelectColor::_CheckFocus +# ------------------------------------------------------------------------------ +# This command is called with argument %W as a binding to <1> on the toplevel. +# It is also called with argument {.}, by bindings on the entry widget to +# , . +# +# The command does something only if the entry widget has focus, and the +# argument (the clicked window) is the Tk window path of somewhere else. Then, +# the command removes focus from the entry widget to the default button. +# ------------------------------------------------------------------------------ + +proc SelectColor::_CheckFocus {w} { + variable _widget + + if { (! [string equal $w $_widget(en)]) && + ([string equal [focus] $_widget(en)])} { + set top [winfo toplevel $_widget(en)] + $top setfocus default + } + + return +} + + +# ------------------------------------------------------------------------------ +# Command SelectColor::_ValidateColorEntry +# ------------------------------------------------------------------------------ +# This command is the "-validate all -vcmd" of the entry widget. +# It is also called by SelectColor::dialog and SelectColor::_SetEntryValue to +# check values assigned to _entryColor. +# +# When the user chooses a color by typing in the entry widget, this command +# copies the value to _unsavedSelection if a keystroke in the widget makes its +# contents 3N hex digits long. +# ------------------------------------------------------------------------------ + +proc SelectColor::_ValidateColorEntry {percentV percentP} { + variable _unsavedSelection + + set result [regexp -- {^#[0-9a-fA-F]*$} $percentP] + set lenny [string length $percentP] + + if {$result} { + if {[string equal $percentV "forced"]} { + # Validation only. Don't want a loop. + } elseif {[string equal $percentV "key"]} { + # Copy to GUI if a valid color. + if {($lenny - 1) % 3 || $lenny == 1} { + # Not a valid color, which needs 3n+1 characters, n > 0 + } else { + after idle [list SelectColor::_SetWithoutTrace $percentP] + } + } elseif {[string equal $percentV "focusout"]} { + # If the color is valid it will already have been copied to the GUI + # and to _userCommand by the "key" validation above. + # + # The code below only needs to reset the value in the entry widget. + # Remove an invalid value, convert a valid one to 24-bit. + # Ignore $percentP, just fire the trace on _unsavedSelection. + set color $_unsavedSelection + after idle [list set ::SelectColor::_unsavedSelection $color] + } + } + + return $result +} + + +# ------------------------------------------------------------------------------ +# Command SelectColor::_SetWithoutTrace +# ------------------------------------------------------------------------------ +# This command sets _unsavedSelection (using _set_rgb) without firing the trace +# that copies the value to _entryColor. +# The command is called by SelectColor::_ValidateColorEntry to avoid a loop. +# ------------------------------------------------------------------------------ + +proc SelectColor::_SetWithoutTrace {value} { + trace remove variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue + _set_rgb $value + set _hsv [eval rgbToHsv [winfo rgb . $value]] + _set_hue_sat [lindex $_hsv 0] [lindex $_hsv 1] + _set_value [lindex $_hsv 2] + trace add variable ::SelectColor::_unsavedSelection write ::SelectColor::_SetEntryValue + return +} Index: demo/demo.tcl ================================================================== --- demo/demo.tcl +++ demo/demo.tcl @@ -196,10 +196,22 @@ lappend ::auto_path [file dirname $DEMODIR] package require BWidget option add *TitleFrame.l.font {helvetica 11 bold italic} + if {$::tk_version < 8.5} { + set helpFont {helvetica 12} + } else { + set helpFont {TkDefaultFont 10} + } + + DynamicHelp::configure \ + -background #FFFFC0 \ + -foreground #141312 \ + -padx 3 \ + -font $helpFont + wm withdraw . wm title . "BWidget demo" Demo::create BWidget::place . 0 0 center Index: demo/tmpldlg.tcl ================================================================== --- demo/tmpldlg.tcl +++ demo/tmpldlg.tcl @@ -140,11 +140,12 @@ pack $but0 $but1 $but2 $but3 -side left -padx 5 -anchor w } proc DemoDlg::_show_color {w} { set color [SelectColor::menu $w.color [list below $w] \ - -color [$w cget -background]] + -color [$w cget -background] \ + -command [list $w configure -background]] if {[string length $color]} { $w configure -background $color } } Index: lang/da.rc ================================================================== --- lang/da.rc +++ lang/da.rc @@ -24,10 +24,11 @@ *overstrikeName: Overstreg *fontName: &Font *sizeName: &Størrelse *styleName: St&il *colorPickerName: F&arve... + ! --- symbolic names of label of PasswdDlg dialog ----------------------------- *loginName: &Brugernavn *passwordName: &Password @@ -45,15 +46,25 @@ *MessageDlg.infoTitle: Information *MessageDlg.questionTitle: Spørgsmål *MessageDlg.warningTitle: Advarsel *MessageDlg.errorTitle: Fejl - ! --- resource for PasswdDlg dialog ------------------------------------------- *PasswdDlg.title: Indtast brugernavn og password ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Base colors *userColorsName: User colors +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: lang/de.rc ================================================================== --- lang/de.rc +++ lang/de.rc @@ -55,5 +55,16 @@ ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Grundfarben *userColorsName: Benutzerdefinierte Farben +*yourSelectionName: Gewählte Farbe +*colorSelectorsName: Farbraum +*hoverHelpName: Ballonhilfe für Farbauswahl mit: +*mouseHelpName: Maus +*keyboardHelpName: Tastatur + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Um eine Farbe zu wählen bitte im Farbraum und im Helligkeitsregler\nklicken oder ziehen. Bleibt die gewählte Farbe wieder erwarten schwarz,\nso muß die Helligkeit ganz rechts erhöht werden.\n\nMit einem Klick auf die Grundfarbenpalette kann diese gewählt werden.\n\nEin benutzerdefinierter Farbspeicher kann durch einen Klick selektiert\nwerden. Ab dann wird jede Farbveränderung auch in den Farbspeicher\n geschrieben. + +*keyboardHelpTextName: Aktivieren sie das Texteingabefenster mit einem Klick oder mit der\nTabulatortaste. Eine Farbe kann als RGB-Wert eingegeben mit 3 oder 6\nhexadezimalen Ziffern eingegeben werden.\n\nDie Eingabe kann mit der Escape- oder Eingabetaste abgeschlossen werden.\n\nAusserhalb des Eingabefensters wird der Dialog mit der Eingabetaste\nbestätigt und mit der Escapetaste zurückgenommen. Index: lang/en.rc ================================================================== --- lang/en.rc +++ lang/en.rc @@ -55,5 +55,16 @@ ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Base colors *userColorsName: User colors +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: lang/es.rc ================================================================== --- lang/es.rc +++ lang/es.rc @@ -13,10 +13,11 @@ *ignoreName: &Ignorar *okName: &OK *cancelName: &Anular *yesName: &Sí *noName: &No + ! --- symbolic names of label of SelectFont dialog ---------------------------- *boldName: &Negrita *italicName: &Cursiva @@ -30,10 +31,11 @@ ! --- symbolic names of label of PasswdDlg dialog ----------------------------- *loginName: Nombre de &usuario *passwordName: &Contraseña + ! --- resource for SelectFont dialog ------------------------------------------ *SelectFont.title: Selección de fuente *SelectFont.sampletext: Texto de Ejemplo @@ -45,15 +47,25 @@ *MessageDlg.infoTitle: Información *MessageDlg.questionTitle: Pregunta *MessageDlg.warningTitle: Atención *MessageDlg.errorTitle: Error - ! --- resource for PasswdDlg dialog ------------------------------------------- *PasswdDlg.title: Introduzca su nombre de usuario y contraseña ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Base colors *userColorsName: User colors +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: lang/fr.rc ================================================================== --- lang/fr.rc +++ lang/fr.rc @@ -12,10 +12,11 @@ *ignoreName: &Ignorer *okName: &OK *cancelName: &Annuler *yesName: &Oui *noName: &Non + ! --- symbolic names of label of SelectFont dialog ---------------------------- *boldName: &Gras *italicName: &Italique @@ -45,15 +46,25 @@ *MessageDlg.infoTitle: Information *MessageDlg.questionTitle: Question *MessageDlg.warningTitle: Attention *MessageDlg.errorTitle: Erreur - ! --- resource for PasswdDlg dialog ------------------------------------------- *PasswdDlg.title: Entrez le login et le mot de passe ! --- symbolic names of label of SelectColor dialog ---------------------------- -*baseColorsName: Base colors -*userColorsName: User colors +*baseColorsName: Couleurs de base +*userColorsName: Couleurs utilisateur + +*yourSelectionName: Votre selection +*colorSelectorsName: Gamme des Couleurs +*hoverHelpName: Placez dessus pour afficher aide sur utilisation: +*mouseHelpName: Sourie +*keyboardHelpName: Clavier + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Cliquez ou tirez avec la sourie dans la gamme des couleurs pour choisir une couleur.\nModifie la valeur de saturation a droite, si la couleur reste noir ou blanc.\n\nClickez sur couleurs de base pour choisir une de ces couleurs.\nCliquez sur une couleur d'utilisateur pour la choisir ou la modifier si libre. +*keyboardHelpTextName: Cliquez dans le champ d'entré dans "votre selection". Entrez la couleur en notation hexadecimal RVB.\nL'entré de couleur est valable, si 3, 6 ou 9 characters sont entrés. La touche Entré valide l'entré et montre la couleur en clair et comme valeur de 24bit.\nSi le point focal n'est pas sur le champ d'entré, les touches Entrée et Échape fonctionnent comme\nles buttons "OK" et "Abadonner". Index: lang/hu.rc ================================================================== --- lang/hu.rc +++ lang/hu.rc @@ -50,11 +50,21 @@ ! --- resource for PasswdDlg dialog ------------------------------------------- *PasswdDlg.title: Add meg a felhasználónevet és a jelszót - ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Alapszínek *userColorsName: Felhasználói színek +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: lang/nl.rc ================================================================== --- lang/nl.rc +++ lang/nl.rc @@ -55,5 +55,16 @@ ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Base colors *userColorsName: User colors +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: lang/no.rc ================================================================== --- lang/no.rc +++ lang/no.rc @@ -55,5 +55,16 @@ ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Base colors *userColorsName: User colors +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: lang/pl.rc ================================================================== --- lang/pl.rc +++ lang/pl.rc @@ -50,11 +50,21 @@ ! --- resource for PasswdDlg dialog ------------------------------------------- *PasswdDlg.title: Wpisz login i hasło - ! --- symbolic names of label of SelectColor dialog ---------------------------- *baseColorsName: Kolory podstawowe *userColorsName: Kolory niestandardowe +*yourSelectionName: Your Selection +*colorSelectorsName: Color Selectors +*hoverHelpName: Hover for help with color selection by: +*mouseHelpName: Mouse +*keyboardHelpName: Keyboard + +! --- dynamic help text for SelectColor dialog. Lines 75 chars max, split by '\n'. + +*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank. If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color. + +*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key. The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively. Index: pkgIndex.tcl ================================================================== --- pkgIndex.tcl +++ pkgIndex.tcl @@ -30,11 +30,11 @@ {statusbar.tcl source {StatusBar ::StatusBar::create ::StatusBar::use}} {titleframe.tcl source {TitleFrame ::TitleFrame::create ::TitleFrame::use}} {mainframe.tcl source {MainFrame ::MainFrame::create ::MainFrame::use}} {listbox.tcl source {ListBox ::ListBox::create ::ListBox::use}} {tree.tcl source {Tree ::Tree::create ::Tree::use}} - {color.tcl source {SelectColor ::SelectColor::menu ::SelectColor::dialog ::SelectColor::setcolor}} + {color.tcl source {SelectColor ::SelectColor::menu ::SelectColor::dialog ::SelectColor::setcolor ::SelectColor::setbasecolor}} {dynhelp.tcl source {::DynamicHelp::configure ::DynamicHelp::use ::DynamicHelp::register ::DynamicHelp::include ::DynamicHelp::add ::DynamicHelp::delete}} {dialog.tcl source {Dialog ::Dialog::create ::Dialog::use}} {messagedlg.tcl source {MessageDlg ::MessageDlg::create ::MessageDlg::use}} {font.tcl source {SelectFont ::SelectFont::create ::SelectFont::use ::SelectFont::loadfont}} {wizard.tcl source {Wizard ::Wizard::create ::Wizard::use SimpleWizard ClassicWizard}}