Posted to tcl by Lectus at Thu Sep 20 00:10:31 GMT 2007view raw

  1. # test.tcl --
  2. #
  3. # UI generated by GUI Builder Build 146 on 2007-09-19 21:05:54 from:
  4. # C:/Documents and Settings/Frederico/Desktop/test.ui
  5. # This file is auto-generated. Only the code within
  6. # '# BEGIN USER CODE'
  7. # '# END USER CODE'
  8. # and code inside the callback subroutines will be round-tripped.
  9. # The proc names 'ui' and 'init' are reserved.
  10. #
  11.  
  12. package require Tk 8.4
  13.  
  14. # Declare the namespace for this dialog
  15. namespace eval test {}
  16.  
  17. # Source the ui file, which must exist
  18. set test::SCRIPTDIR [file dirname [info script]]
  19. source [file join $test::SCRIPTDIR test_ui.tcl]
  20.  
  21. # BEGIN USER CODE
  22. # I added the 2 following lines by hand only:
  23. package require tile
  24. namespace import -force ttk::*
  25. # END USER CODE
  26.  
  27. # BEGIN CALLBACK CODE
  28. # ONLY EDIT CODE INSIDE THE PROCS.
  29.  
  30. # test::_button_1_command --
  31. #
  32. # Callback to handle _button_1 widget option -command
  33. #
  34. # ARGS:
  35. # <NONE>
  36. #
  37. proc test::_button_1_command args {}
  38.  
  39. # test::_entry_1_invalidcommand --
  40. #
  41. # Callback to handle _entry_1 widget option -invalidcommand
  42. #
  43. # ARGS:
  44. # <NONE>
  45. #
  46. proc test::_entry_1_invalidcommand args {}
  47.  
  48. # test::_entry_1_validatecommand --
  49. #
  50. # Callback to handle _entry_1 widget option -validatecommand
  51. #
  52. # ARGS:
  53. # <NONE>
  54. #
  55. proc test::_entry_1_validatecommand args {}
  56.  
  57. # test::_entry_1_xscrollcommand --
  58. #
  59. # Callback to handle _entry_1 widget option -xscrollcommand
  60. #
  61. # ARGS:
  62. # <NONE>
  63. #
  64. proc test::_entry_1_xscrollcommand args {}
  65.  
  66. # END CALLBACK CODE
  67.  
  68. # test::init --
  69. #
  70. # Call the optional userinit and initialize the dialog.
  71. # DO NOT EDIT THIS PROCEDURE.
  72. #
  73. # Arguments:
  74. # root the root window to load this dialog into
  75. #
  76. # Results:
  77. # dialog will be created, or a background error will be thrown
  78. #
  79. proc test::init {root args} {
  80. # Catch this in case the user didn't define it
  81. catch {test::userinit}
  82. if {[info exists embed_args]} {
  83. # we are running in the plugin
  84. test::ui $root
  85. } elseif {$::argv0 == [info script]} {
  86. # we are running in stand-alone mode
  87. wm title $root test
  88. if {[catch {
  89. # Create the UI
  90. test::ui $root
  91. } err]} {
  92. bgerror $err ; exit 1
  93. }
  94. }
  95. catch {test::run $root}
  96. }
  97. test::init .
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. ##############################################################################
  106.  
  107. # test_ui.tcl --
  108. #
  109. # UI generated by GUI Builder Build 146 on 2007-09-19 21:05:54 from:
  110. # C:/Documents and Settings/Frederico/Desktop/test.ui
  111. # THIS IS AN AUTOGENERATED FILE AND SHOULD NOT BE EDITED.
  112. # The associated callback file should be modified instead.
  113. #
  114.  
  115. # Declare the namespace for this dialog
  116. namespace eval test {}
  117.  
  118. package require Tk
  119. # test::ui --
  120. #
  121. # Create the UI for this dialog.
  122. #
  123. # ARGS:
  124. # root the parent window for this form
  125. # args a catch-all for other args, but none are expected
  126. #
  127. proc test::ui {root args} {
  128. # this handles '.' as a special case
  129. set base [expr {($root == ".") ? "" : $root}]
  130. variable ROOT $root
  131. variable BASE $base
  132. variable SCRIPTDIR ; # defined in main script
  133.  
  134.  
  135. # Widget Initialization
  136. variable _entry_1 [entry $BASE._entry_1 \
  137. -invalidcommand [namespace code [list _entry_1_invalidcommand]] \
  138. -validatecommand [namespace code [list _entry_1_validatecommand]] \
  139. -width 0 \
  140. -xscrollcommand [namespace code [list _entry_1_xscrollcommand]]]
  141. variable _button_1 [button $BASE._button_1 \
  142. -command [namespace code [list _button_1_command]] \
  143. -text "OK"]
  144.  
  145.  
  146. # Geometry Management
  147.  
  148. grid $BASE._entry_1 -in $root -row 2 -column 2 \
  149. -columnspan 7 \
  150. -ipadx 0 \
  151. -ipady 0 \
  152. -padx 0 \
  153. -pady 0 \
  154. -rowspan 1 \
  155. -sticky "ew"
  156. grid $BASE._button_1 -in $root -row 2 -column 10 \
  157. -columnspan 2 \
  158. -ipadx 0 \
  159. -ipady 0 \
  160. -padx 0 \
  161. -pady 0 \
  162. -rowspan 1 \
  163. -sticky ""
  164.  
  165. # Resize Behavior
  166. grid rowconfigure $root 1 -weight 0 -minsize 40 -pad 0
  167. grid rowconfigure $root 2 -weight 0 -minsize 40 -pad 0
  168. grid rowconfigure $root 3 -weight 0 -minsize 40 -pad 0
  169. grid rowconfigure $root 4 -weight 0 -minsize 40 -pad 0
  170. grid rowconfigure $root 5 -weight 0 -minsize 40 -pad 0
  171. grid rowconfigure $root 6 -weight 0 -minsize 40 -pad 0
  172. grid rowconfigure $root 7 -weight 0 -minsize 40 -pad 0
  173. grid columnconfigure $root 1 -weight 0 -minsize 40 -pad 0
  174. grid columnconfigure $root 2 -weight 0 -minsize 40 -pad 0
  175. grid columnconfigure $root 3 -weight 0 -minsize 40 -pad 0
  176. grid columnconfigure $root 4 -weight 0 -minsize 40 -pad 0
  177. grid columnconfigure $root 5 -weight 0 -minsize 40 -pad 0
  178. grid columnconfigure $root 6 -weight 0 -minsize 40 -pad 0
  179. grid columnconfigure $root 7 -weight 0 -minsize 40 -pad 0
  180. grid columnconfigure $root 8 -weight 0 -minsize 40 -pad 0
  181. grid columnconfigure $root 9 -weight 0 -minsize 40 -pad 0
  182. grid columnconfigure $root 10 -weight 0 -minsize 40 -pad 0
  183. grid columnconfigure $root 11 -weight 0 -minsize 40 -pad 0
  184. grid columnconfigure $root 12 -weight 0 -minsize 40 -pad 0
  185. }
  186.