Changeset 2157
- Timestamp:
- Mar 27, 2011 3:13:21 PM (12 years ago)
- Location:
- trunk/lang/tcl/scripts
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lang/tcl/scripts/objects.tcl
r2154 r2157 865 865 public variable only "" 866 866 public variable expand "no" 867 public variable tooltip "" 867 868 868 869 constructor {args} { -
trunk/lang/tcl/scripts/objects/base.rp
r2154 r2157 1 1 object base { 2 attr label -title "Label" -type string -path about.label 3 attr description -title "Description" -type string:lines=3 -expand yes -path about.description 4 attr enable -title "Enable" -type string:validate=enable -path about.enable -only input 2 attr label -title "Label" -type string -path about.label -tooltip "Short label for the object, indicating what it represents." 3 4 attr description -title "Description" -type string:lines=3 -expand yes -path about.description -tooltip "Brief description of the object, which appears in a tooltip when the user mouses over the value. Avoid repeating the label. Instead, add information about what the object represents for your simulator, what it affects as an input, or what it means as an output." 5 6 attr enable -title "Enable" -type string:validate=enable -path about.enable -only input -tooltip "Use this to enable/disable an input. A value of \"false\" permanently disables the input. More commonly, the value is an expression that indicates when the input should be enabled.\nEXAMPLE: input.choice(model) == \"dd\"" 7 5 8 6 9 check label { -
trunk/lang/tcl/scripts/objects/boolean/boolean.rp
r2154 r2157 18 18 help http://rappture.org/wiki/rp_xml_ele_boolean 19 19 20 attr default -title "Default Value" -type boolean -path default -only input 20 attr default -title "Default Value" -type boolean -path default -only input -tooltip "Sets the value that this input has when the program first starts. This value is used by default unless the user explicitly changes it." 21 21 22 22 check default { -
trunk/lang/tcl/scripts/objects/choice/choice.rp
r2154 r2157 18 18 help http://rappture.org/wiki/rp_xml_ele_choice 19 19 20 attr options -title "Options" -type choices -path option 21 attr default -title "Default Value" -type string -path default -only input 20 attr options -title "Options" -type choices -path option -tooltip "List of choices that will appear on the drop-down menu in your program." 21 22 attr default -title "Default Value" -type string -path default -only input -tooltip "Sets the value that this input has when the program first starts. This value is used by default unless the user explicitly changes it." 22 23 23 24 check options { -
trunk/lang/tcl/scripts/objects/curve/curve.rp
r2154 r2157 19 19 help http://rappture.org/wiki/rp_xml_ele_curve 20 20 21 attr group -title "Plotting Group" -type string -path about.group 22 attr xlabel -title "X-axis Label" -type string -path xaxis.label 23 attr xdesc -title "X-axis Description" -type string -path xaxis.description 24 attr xunits -title "X-axis Units" -type units -path xaxis.units 25 attr ylabel -title "Y-axis Label" -type string -path yaxis.label 26 attr ydesc -title "Y-axis Description" -type string -path yaxis.description 27 attr yunits -title "Y-axis Units" -type units -path yaxis.units 21 attr group -title "Plotting Group" -type string -path about.group -tooltip "If two or more curves share the same name for their plotting group, they are overlayed on the same plot. The name for the plotting group becomes the name of the overall output, and the label for each curve appears in a tooltip when you mouse over its points." 22 23 attr xlabel -title "X-axis Label" -type string -path xaxis.label -tooltip "Label shown on the x-axis for the plot." 24 25 attr xdesc -title "X-axis Description" -type string -path xaxis.description -tooltip "Description of the x-axis that appears in a tooltip window when you mouse over the x-axis. This should not merely repeat what the label says, but explain what it means." 26 27 attr xunits -title "X-axis Units" -type units -path xaxis.units -tooltip "Units for the physical quantity that the x-axis represents." 28 29 attr ylabel -title "Y-axis Label" -type string -path yaxis.label -tooltip "Label shown on the y-axis for the plot." 30 31 attr ydesc -title "Y-axis Description" -type string -path yaxis.description -tooltip "Description of the y-axis that appears in a tooltip window when you mouse over the y-axis. This should not merely repeat what the label says, but explain what it means." 32 33 attr yunits -title "Y-axis Units" -type units -path yaxis.units -tooltip "Units for the physical quantity that the y-axis represents." 34 28 35 29 36 check xlabel { -
trunk/lang/tcl/scripts/objects/histogram/histogram.rp
r2154 r2157 19 19 help http://rappture.org/wiki/rp_xml_ele_histogram 20 20 21 attr xlabel -title "X-axis Label" -type string -path xaxis.label 22 attr xdesc -title "X-axis Description" -type string -path xaxis.description 23 attr xunits -title "X-axis Units" -type units -path xaxis.units 24 attr ylabel -title "Y-axis Label" -type string -path yaxis.label 25 attr ydesc -title "Y-axis Description" -type string -path yaxis.description 26 attr yunits -title "Y-axis Units" -type units -path yaxis.units 21 attr xlabel -title "X-axis Label" -type string -path xaxis.label -tooltip "Label shown on the x-axis for the plot." 22 23 attr xdesc -title "X-axis Description" -type string -path xaxis.description -tooltip "Description of the x-axis that appears in a tooltip window when you mouse over the x-axis. This should not merely repeat what the label says, but explain what it means." 24 25 attr xunits -title "X-axis Units" -type units -path xaxis.units -tooltip "Units for the physical quantity that the x-axis represents." 26 27 attr ylabel -title "Y-axis Label" -type string -path yaxis.label -tooltip "Label shown on the y-axis for the plot." 28 29 attr ydesc -title "Y-axis Description" -type string -path yaxis.description -tooltip "Description of the y-axis that appears in a tooltip window when you mouse over the y-axis. This should not merely repeat what the label says, but explain what it means." 30 31 attr yunits -title "Y-axis Units" -type units -path yaxis.units -tooltip "Units for the physical quantity that the y-axis represents." 32 27 33 28 34 check xlabel { -
trunk/lang/tcl/scripts/objects/image/image.rp
r2154 r2157 18 18 help http://rappture.org/wiki/rp_xml_ele_image 19 19 20 attr default -title "Default Value" -type image -path default 21 attr resize -title "Resize" -type string:validate=imresize -path resize 22 attr convert -title "Convert" -type string:validate=imformat -path convert 20 attr default -title "Default Value" -type image -path default -tooltip "Sets the value that this input has when the program first starts. This value is used by default unless the user explicitly changes it." 21 22 attr resize -title "Resize" -type string:validate=imresize -path resize -only input -tooltip "Limits the size of the thumbnail shown for any image uploaded into this input. Valid options are: auto, none, width=XX, height=XX" 23 24 attr convert -title "Convert" -type string:validate=imformat -path convert -only input -tooltip "Causes the image to be converted to a particular image format before being passed along to your simulation program. Valid options are: bmp, gif, ico, jpeg, pcx, png, pgm, ppm, ps, pdf, sgi, sun, tga, tiff, xbm, xpm" 25 23 26 24 27 storage { -
trunk/lang/tcl/scripts/objects/integer/integer.rp
r2154 r2157 18 18 help http://rappture.org/wiki/rp_xml_ele_integer 19 19 20 attr default -title "Default Value" -type string:validate=int -path default -only input 21 attr min -title "Minimum Value" -type string:validate=int -path min -only input 22 attr max -title "Maximum Value" -type string:validate=int -path max -only input 20 attr default -title "Default Value" -type string:validate=int -path default -only input -tooltip "Sets the value that this input has when the program first starts. This value is used by default unless the user explicitly changes it." 21 22 attr min -title "Minimum Value" -type string:validate=int -path min -only input -tooltip "Sets the minimum value for this integer. The value can be equal to the minimum, but no lower." 23 24 attr max -title "Maximum Value" -type string:validate=int -path max -only input -tooltip "Sets the maximum value for this integer. The value can be equal to the maximum, but no higher." 25 23 26 24 27 check default { -
trunk/lang/tcl/scripts/objects/note/note.rp
r2154 r2157 19 19 help http://rappture.org/wiki/rp_xml_ele_note 20 20 21 attr contents -title "HTML File" -type file -path contents 21 attr contents -title "HTML File" -type file -path contents -tooltip "Name of an HTML file loaded into the note area as documentation. The file may contain embedded images and links, as long as those files reside in the same directory as the HTML file or have explicit http:// paths." 22 22 23 23 24 check contents { -
trunk/lang/tcl/scripts/objects/number/number.rp
r2156 r2157 18 18 help http://rappture.org/wiki/rp_xml_ele_number 19 19 20 attr default -title "Default Value" -type string:validate=number -path default -only input 21 attr units -title "Units of Measurement" -type units -path units 22 attr min -title "Minimum Value" -type string:validate=number -path min -only input 23 attr max -title "Maximum Value" -type string:validate=number -path max -only input 24 attr icon -title "Icon" -type image:maxsize=20,rescale=yes -path about.icon -only input 25 attr color -title "Color" -type color -path color -only input 20 attr default -title "Default Value" -type string:validate=number -path default -only input -tooltip "Sets the value that this input has when the program first starts. This value is used by default unless the user explicitly changes it." 21 22 attr units -title "Units of Measurement" -type units -path units -tooltip "Units for the physical quantity that this number represents." 23 24 attr min -title "Minimum Value" -type string:validate=number -path min -only input -tooltip "Sets the minimum value for this number. The value can be equal to the minimum, but no lower." 25 26 attr max -title "Maximum Value" -type string:validate=number -path max -only input -tooltip "Sets the maximum value for this number. The value can be equal to the maximum, but no higher." 27 28 attr icon -title "Icon" -type image:maxsize=20,rescale=yes -path about.icon -only input -tooltip "Sets an icon shown next to the number, which is normally used to indicate the quantity that the number represents. If the icon is transparent, any color set for the number will show through." 29 30 attr color -title "Color" -type color -path color -only input -tooltip "Sets the color shown next to the number to indicate its strength. If the number is near the minimum, the color will be white; as it nears the maximum, it will be the color selected here." 31 26 32 27 33 check default { -
trunk/lang/tcl/scripts/objects/string/string.rp
r2154 r2157 18 18 help http://rappture.org/wiki/rp_xml_ele_string 19 19 20 attr default -title "Default Value" -type string -path default -only input 21 attr size -title "Size" -type string:validate=size -path size -only input 22 attr hints -title "Hint String" -type string -path about.hints -only input 20 attr default -title "Default Value" -type string -path default -only input -tooltip "Sets the value that this input has when the program first starts. This value is used by default unless the user explicitly changes it." 21 22 attr size -title "Size" -type string:validate=size -path size -only input -tooltip "Sets the desired size for the string. Strings are normally 1 line of text, but if the size is set to some WxH, then the entry area will be at least W chars wide and H lines tall. For example, 40x5 says that the string should be 40 chars wide and 10 lines tall." 23 24 attr hints -title "Hint String" -type string -path about.hints -only input -tooltip "Sets a line of text displayed beneath the entry area for the string. This is used to give a hint to the user about what should be entered in the string area." 25 23 26 24 27 storage { -
trunk/lang/tcl/scripts/types/boolean.tcl
r2154 r2157 14 14 constructor {win args} { 15 15 Rappture::getopts args params { 16 value -tooltip "" 16 17 } 17 18 … … 19 20 pack $win.val -side left 20 21 $win.val choices insert end 1 "True" 0 "False" 22 23 Rappture::Tooltip::for $win.val $params(-tooltip) 24 21 25 set _win $win 22 26 } -
trunk/lang/tcl/scripts/types/choices.tcl
r2154 r2157 14 14 constructor {win args} { 15 15 Rappture::getopts args params { 16 value -tooltip "" 16 17 } 17 18 … … 20 21 button $win.cntls.add -text "Add" -command [itcl::code $this _add] 21 22 pack $win.cntls.add -side left 23 Rappture::Tooltip::for $win.cntls.add "Adds a new option to the list of choices." 22 24 button $win.cntls.del -text "Delete" -command [itcl::code $this _delete] 23 25 pack $win.cntls.del -side right 26 Rappture::Tooltip::for $win.cntls.del "Removes an option from the list of choices." 24 27 25 28 Rappture::Scroller $win.scrl -height 1.5i \ … … 29 32 bind $win.scrl.lbox <<ListboxSelect>> [itcl::code $this _edit] 30 33 $win.scrl contents $win.scrl.lbox 34 Rappture::Tooltip::for $win.scrl.lbox $params(-tooltip) 31 35 32 36 frame $win.editelem … … 39 43 grid $win.editelem.l -row 1 -column 0 -sticky e 40 44 entry $win.editelem.label 45 Rappture::Tooltip::for $win.editelem.label "Label for the option that appears in the drop-down list of choices." 41 46 grid $win.editelem.label -row 1 -column 1 -columnspan 2 -sticky ew 42 47 label $win.editelem.v -text "Value:" 43 48 grid $win.editelem.v -row 2 -column 0 -sticky e 44 49 entry $win.editelem.value 50 Rappture::Tooltip::for $win.editelem.value "Value for the option reported to your program when this choice is selected." 45 51 grid $win.editelem.value -row 2 -column 1 -sticky ew 46 52 label $win.editelem.vopt -text "(optional)" … … 52 58 text $win.editelem.scrl.desc -wrap char 53 59 $win.editelem.scrl contents $win.editelem.scrl.desc 60 Rappture::Tooltip::for $win.editelem.scrl.desc "Description of the option that appears in the tooltip when you mouse over the choice when it appears in the combobox." 54 61 55 62 bind $win.editelem.label <KeyPress-Return> \ -
trunk/lang/tcl/scripts/types/color.tcl
r2154 r2157 13 13 constructor {win args} { 14 14 Rappture::getopts args params { 15 value -tooltip "" 15 16 } 16 17 set _icon [image create photo -width 20 -height 20] … … 18 19 label $win.sample -image $_icon 19 20 pack $win.sample -side left 21 Rappture::Tooltip::for $win.sample $params(-tooltip) 22 20 23 button $win.change -text "Choose..." -command [itcl::code $this choose] 21 24 pack $win.change -side left -
trunk/lang/tcl/scripts/types/file.tcl
r2154 r2157 16 16 constructor {win args} { 17 17 Rappture::getopts args params { 18 value -tooltip "" 18 19 } 19 20 label $win.file -text "select a file" -width 10 -anchor e -fg gray60 20 21 pack $win.file -side left 22 Rappture::Tooltip::for $win.file $params(-tooltip) 23 21 24 button $win.getfile -text "Choose..." -command [itcl::code $this _getfile] 22 25 pack $win.getfile -side left -
trunk/lang/tcl/scripts/types/image.tcl
r2154 r2157 15 15 value -maxsize "" 16 16 value -rescale no 17 value -tooltip "" 17 18 } 18 19 set _currview [image create photo] … … 22 23 label $win.image -image $_currview -borderwidth 1 -relief solid 23 24 pack $win.image -side left 25 Rappture::Tooltip::for $win.image $params(-tooltip) 24 26 25 27 frame $win.btns -
trunk/lang/tcl/scripts/types/language.tcl
r2154 r2157 17 17 constructor {win args} { 18 18 Rappture::getopts args params { 19 value -tooltip "" 19 20 } 20 21 … … 28 29 bind $win.val <<Value>> [itcl::code $this _react] 29 30 31 Rappture::Tooltip::for $win.val $params(-tooltip) 32 30 33 frame $win.custom 31 34 label $win.custom.l -text "Command:" … … 33 36 entry $win.custom.val 34 37 pack $win.custom.val -side left -expand yes -fill x 38 Rappture::Tooltip::for $win.custom.val "Enter the command line that Rappture should invoke to run your simulation program. Include @driver somewhere on this line; it will be replaced with the name of the Rappture driver file (usually passed in as the first argument on the command line). If you include @tool, it will be replaced with the name of the directory where the tool.xml file is installed. Instead of hard-coding your program path, you can express it as a relative path from @tool." 35 39 36 40 set _win $win … … 95 99 96 100 public proc export {xmlobj path value} { 97 $xmlobj put $path $value 101 set value [string trim $value] 102 if {$value ne ""} { 103 $xmlobj put $path $value 104 } 98 105 } 99 106 -
trunk/lang/tcl/scripts/types/string.tcl
r2154 r2157 20 20 value -lines 1 21 21 value -validate "" 22 value -tooltip "" 22 23 } 23 24 … … 27 28 text $win.scrl.text -width 10 -height $params(-lines) -wrap word 28 29 $win.scrl contents $win.scrl.text 30 Rappture::Tooltip::for $win.scrl.text $params(-tooltip) 29 31 } else { 30 32 entry $win.str 31 33 pack $win.str -fill x 34 Rappture::Tooltip::for $win.str $params(-tooltip) 32 35 } 33 36 set _win $win -
trunk/lang/tcl/scripts/types/units.tcl
r2154 r2157 14 14 constructor {win args} { 15 15 Rappture::getopts args params { 16 value -tooltip "" 16 17 } 17 18 … … 57 58 T " T - Teslas" \ 58 59 G " G - Gauss" 60 61 Rappture::Tooltip::for $win.val $params(-tooltip) 59 62 60 63 set _win $win … … 113 116 114 117 public proc export {xmlobj path value} { 115 $xmlobj put $path $value 118 set value [string trim $value] 119 if {$value ne ""} { 120 $xmlobj put $path $value 121 } 116 122 } 117 123
Note: See TracChangeset
for help on using the changeset viewer.