w_genapp_toolbars.srw 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. $PBExportHeader$w_genapp_toolbars.srw
  2. $PBExportComments$Generated toolbar configuration window
  3. forward
  4. global type w_genapp_toolbars from window
  5. end type
  6. type rb_floating from radiobutton within w_genapp_toolbars
  7. end type
  8. type rb_bottom from radiobutton within w_genapp_toolbars
  9. end type
  10. type rb_right from radiobutton within w_genapp_toolbars
  11. end type
  12. type rb_top from radiobutton within w_genapp_toolbars
  13. end type
  14. type rb_left from radiobutton within w_genapp_toolbars
  15. end type
  16. type cb_done from commandbutton within w_genapp_toolbars
  17. end type
  18. type cb_visible from commandbutton within w_genapp_toolbars
  19. end type
  20. type cbx_showtips from checkbox within w_genapp_toolbars
  21. end type
  22. type cbx_showtext from checkbox within w_genapp_toolbars
  23. end type
  24. type gb_1 from groupbox within w_genapp_toolbars
  25. end type
  26. end forward
  27. global type w_genapp_toolbars from window
  28. integer x = 850
  29. integer y = 468
  30. integer width = 1157
  31. integer height = 856
  32. boolean titlebar = true
  33. string title = "工具栏设置"
  34. boolean controlmenu = true
  35. windowtype windowtype = response!
  36. long backcolor = 134217739
  37. rb_floating rb_floating
  38. rb_bottom rb_bottom
  39. rb_right rb_right
  40. rb_top rb_top
  41. rb_left rb_left
  42. cb_done cb_done
  43. cb_visible cb_visible
  44. cbx_showtips cbx_showtips
  45. cbx_showtext cbx_showtext
  46. gb_1 gb_1
  47. end type
  48. global w_genapp_toolbars w_genapp_toolbars
  49. type variables
  50. /* Current application */
  51. Application iapp_application
  52. /* Owning toolbar window */
  53. Window iw_window
  54. end variables
  55. event open;// MOVE TO CENTER
  56. environment exerun_env
  57. GetEnvironment(exerun_env )
  58. this.Move ( (exerun_env.screenwidth*4.62 - this.Width)/2, (exerun_env.screenheight*3.87 - this.Height)/2)
  59. // Owning toolbar window is passed as reference
  60. iw_window = message.powerobjectparm
  61. // Note the current application
  62. iapp_application = GetApplication ()
  63. // Set toolbar alignment status
  64. choose case iw_window.toolbaralignment
  65. case alignatbottom!
  66. rb_bottom.Checked = TRUE
  67. case alignatleft!
  68. rb_left.Checked = TRUE
  69. case alignatright!
  70. rb_right.Checked = TRUE
  71. case alignattop!
  72. rb_top.Checked = TRUE
  73. case floating!
  74. rb_floating.Checked = TRUE
  75. end choose
  76. // Set toolbar visible status
  77. if iw_window.toolbarvisible then
  78. cb_visible.text = "[&H]隐藏"
  79. else
  80. cb_visible.text = "[&S]显示"
  81. end if
  82. // Set toolbar text mode status
  83. cbx_showtext.checked = iapp_application.toolbartext
  84. // Set toolbar tips mode status
  85. cbx_showtips.checked = iapp_application.toolbartips
  86. end event
  87. on w_genapp_toolbars.create
  88. this.rb_floating=create rb_floating
  89. this.rb_bottom=create rb_bottom
  90. this.rb_right=create rb_right
  91. this.rb_top=create rb_top
  92. this.rb_left=create rb_left
  93. this.cb_done=create cb_done
  94. this.cb_visible=create cb_visible
  95. this.cbx_showtips=create cbx_showtips
  96. this.cbx_showtext=create cbx_showtext
  97. this.gb_1=create gb_1
  98. this.Control[]={this.rb_floating,&
  99. this.rb_bottom,&
  100. this.rb_right,&
  101. this.rb_top,&
  102. this.rb_left,&
  103. this.cb_done,&
  104. this.cb_visible,&
  105. this.cbx_showtips,&
  106. this.cbx_showtext,&
  107. this.gb_1}
  108. end on
  109. on w_genapp_toolbars.destroy
  110. destroy(this.rb_floating)
  111. destroy(this.rb_bottom)
  112. destroy(this.rb_right)
  113. destroy(this.rb_top)
  114. destroy(this.rb_left)
  115. destroy(this.cb_done)
  116. destroy(this.cb_visible)
  117. destroy(this.cbx_showtips)
  118. destroy(this.cbx_showtext)
  119. destroy(this.gb_1)
  120. end on
  121. type rb_floating from radiobutton within w_genapp_toolbars
  122. integer x = 155
  123. integer y = 484
  124. integer width = 334
  125. integer height = 72
  126. integer textsize = -9
  127. integer weight = 400
  128. fontcharset fontcharset = gb2312charset!
  129. fontpitch fontpitch = variable!
  130. string facename = "宋体"
  131. long textcolor = 33554432
  132. long backcolor = 134217739
  133. string text = "[&F]浮动"
  134. end type
  135. event clicked;// Make toolbar float
  136. iw_window.toolbaralignment = floating!
  137. end event
  138. type rb_bottom from radiobutton within w_genapp_toolbars
  139. integer x = 155
  140. integer y = 396
  141. integer width = 315
  142. integer height = 72
  143. integer textsize = -9
  144. integer weight = 400
  145. fontcharset fontcharset = gb2312charset!
  146. fontpitch fontpitch = variable!
  147. string facename = "宋体"
  148. long textcolor = 33554432
  149. long backcolor = 134217739
  150. string text = "[&B]底"
  151. end type
  152. event clicked;// Align toolbar at bottom
  153. iw_window.toolbaralignment = alignatbottom!
  154. end event
  155. type rb_right from radiobutton within w_genapp_toolbars
  156. integer x = 155
  157. integer y = 308
  158. integer width = 279
  159. integer height = 72
  160. integer textsize = -9
  161. integer weight = 400
  162. fontcharset fontcharset = gb2312charset!
  163. fontpitch fontpitch = variable!
  164. string facename = "宋体"
  165. long textcolor = 33554432
  166. long backcolor = 134217739
  167. string text = "[&R]右"
  168. end type
  169. event clicked;// Align toolbar at right
  170. iw_window.toolbaralignment = alignatright!
  171. end event
  172. type rb_top from radiobutton within w_genapp_toolbars
  173. integer x = 155
  174. integer y = 220
  175. integer width = 274
  176. integer height = 72
  177. integer textsize = -9
  178. integer weight = 400
  179. fontcharset fontcharset = gb2312charset!
  180. fontpitch fontpitch = variable!
  181. string facename = "宋体"
  182. long textcolor = 33554432
  183. long backcolor = 134217739
  184. string text = "[&T]顶"
  185. end type
  186. event clicked;// Align toolbar at top
  187. iw_window.toolbaralignment = alignattop!
  188. end event
  189. type rb_left from radiobutton within w_genapp_toolbars
  190. integer x = 155
  191. integer y = 124
  192. integer width = 247
  193. integer height = 72
  194. integer textsize = -9
  195. integer weight = 400
  196. fontcharset fontcharset = gb2312charset!
  197. fontpitch fontpitch = variable!
  198. string facename = "宋体"
  199. long textcolor = 33554432
  200. long backcolor = 134217739
  201. string text = "[&L]左"
  202. end type
  203. event clicked;// Align toolbar at left
  204. iw_window.toolbaralignment = alignatleft!
  205. end event
  206. type cb_done from commandbutton within w_genapp_toolbars
  207. integer x = 690
  208. integer y = 232
  209. integer width = 334
  210. integer height = 96
  211. integer taborder = 30
  212. integer textsize = -9
  213. integer weight = 400
  214. fontcharset fontcharset = gb2312charset!
  215. fontpitch fontpitch = variable!
  216. string facename = "宋体"
  217. string text = "[&D]确定"
  218. end type
  219. event clicked;// Close toolbar configuration window
  220. Close (parent)
  221. end event
  222. type cb_visible from commandbutton within w_genapp_toolbars
  223. integer x = 690
  224. integer y = 84
  225. integer width = 334
  226. integer height = 96
  227. integer taborder = 20
  228. integer textsize = -9
  229. integer weight = 400
  230. fontcharset fontcharset = gb2312charset!
  231. fontpitch fontpitch = variable!
  232. string facename = "宋体"
  233. string text = "[&H]隐藏"
  234. boolean default = true
  235. end type
  236. event clicked;// Indicate opposite toolbar visible status
  237. if this.text = "[&H]隐藏" then
  238. iw_window.toolbarvisible = FALSE
  239. this.text = "[&S]显示"
  240. else
  241. iw_window.toolbarvisible = TRUE
  242. this.text = "[&H]隐藏"
  243. end if
  244. end event
  245. type cbx_showtips from checkbox within w_genapp_toolbars
  246. integer x = 635
  247. integer y = 624
  248. integer width = 439
  249. integer height = 72
  250. integer textsize = -9
  251. integer weight = 400
  252. fontcharset fontcharset = gb2312charset!
  253. fontpitch fontpitch = variable!
  254. string facename = "宋体"
  255. long textcolor = 33554432
  256. long backcolor = 134217739
  257. string text = "[&p]显示提示"
  258. end type
  259. event clicked;// Set toolbar tips mode
  260. iapp_application.toolbartips = this.checked
  261. end event
  262. type cbx_showtext from checkbox within w_genapp_toolbars
  263. integer x = 101
  264. integer y = 624
  265. integer width = 457
  266. integer height = 72
  267. integer textsize = -9
  268. integer weight = 400
  269. fontcharset fontcharset = gb2312charset!
  270. fontpitch fontpitch = variable!
  271. string facename = "宋体"
  272. long textcolor = 33554432
  273. long backcolor = 134217739
  274. string text = "[&x]显示文字"
  275. end type
  276. event clicked;// Set toolbar text mode
  277. iapp_application.toolbartext = this.checked
  278. end event
  279. type gb_1 from groupbox within w_genapp_toolbars
  280. integer x = 91
  281. integer y = 52
  282. integer width = 457
  283. integer height = 544
  284. integer taborder = 10
  285. integer textsize = -9
  286. integer weight = 400
  287. fontcharset fontcharset = gb2312charset!
  288. fontpitch fontpitch = variable!
  289. string facename = "宋体"
  290. long textcolor = 33554432
  291. long backcolor = 134217739
  292. string text = "移动"
  293. end type