w_html_editor.srw 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. $PBExportHeader$w_html_editor.srw
  2. forward
  3. global type w_html_editor from w_publ_base
  4. end type
  5. type uo_1 from uo_html_editor within w_html_editor
  6. end type
  7. type cb_ok from uo_imflatbutton within w_html_editor
  8. end type
  9. type ln_bar from line within w_html_editor
  10. end type
  11. type ln_bar2 from line within w_html_editor
  12. end type
  13. type r_bar from rectangle within w_html_editor
  14. end type
  15. end forward
  16. global type w_html_editor from w_publ_base
  17. integer width = 3378
  18. integer height = 2140
  19. string title = "HTML编辑"
  20. boolean minbox = false
  21. windowtype windowtype = response!
  22. uo_1 uo_1
  23. cb_ok cb_ok
  24. ln_bar ln_bar
  25. ln_bar2 ln_bar2
  26. r_bar r_bar
  27. end type
  28. global w_html_editor w_html_editor
  29. type variables
  30. s_html_editor ins_rslt
  31. end variables
  32. on w_html_editor.create
  33. int iCurrent
  34. call super::create
  35. this.uo_1=create uo_1
  36. this.cb_ok=create cb_ok
  37. this.ln_bar=create ln_bar
  38. this.ln_bar2=create ln_bar2
  39. this.r_bar=create r_bar
  40. iCurrent=UpperBound(this.Control)
  41. this.Control[iCurrent+1]=this.uo_1
  42. this.Control[iCurrent+2]=this.cb_ok
  43. this.Control[iCurrent+3]=this.ln_bar
  44. this.Control[iCurrent+4]=this.ln_bar2
  45. this.Control[iCurrent+5]=this.r_bar
  46. end on
  47. on w_html_editor.destroy
  48. call super::destroy
  49. destroy(this.uo_1)
  50. destroy(this.cb_ok)
  51. destroy(this.ln_bar)
  52. destroy(this.ln_bar2)
  53. destroy(this.r_bar)
  54. end on
  55. event open;call super::open;ins_rslt.ifok = 0
  56. ins_rslt.html = Message.StringParm
  57. IF IsNull(ins_rslt.html) THEN ins_rslt.html = ''
  58. uo_1.uf_SetHtml(ins_rslt.html)
  59. end event
  60. event close;call super::close;CloseWithReturn(This, ins_rslt)
  61. end event
  62. event resize;call super::resize;r_bar.Width = this.width
  63. ln_bar.endx = this.width
  64. ln_bar2.endx = this.width
  65. uo_1.height = this.WorkSpaceHeight() - uo_1.Y
  66. uo_1.Width = this.WorkSpaceWidth() - uo_1.X
  67. end event
  68. type cb_func from w_publ_base`cb_func within w_html_editor
  69. boolean visible = false
  70. end type
  71. type cb_exit from w_publ_base`cb_exit within w_html_editor
  72. integer x = 160
  73. integer width = 151
  74. integer height = 164
  75. integer picsize = 16
  76. toolbaralignment pic_align = alignattop!
  77. boolean border = false
  78. end type
  79. type uo_1 from uo_html_editor within w_html_editor
  80. integer y = 180
  81. integer width = 2670
  82. integer height = 976
  83. integer taborder = 30
  84. boolean bringtotop = true
  85. end type
  86. on uo_1.destroy
  87. call uo_html_editor::destroy
  88. end on
  89. type cb_ok from uo_imflatbutton within w_html_editor
  90. integer width = 151
  91. integer height = 164
  92. integer taborder = 40
  93. boolean bringtotop = true
  94. string text = "确认"
  95. boolean default = true
  96. string normalpicname = "OK.BMP"
  97. integer picsize = 16
  98. toolbaralignment pic_align = alignattop!
  99. boolean border = false
  100. end type
  101. event clicked;call super::clicked;ins_rslt.ifok = 1
  102. ins_rslt.html = uo_1.uf_gethtml()
  103. close(parent)
  104. end event
  105. type ln_bar from line within w_html_editor
  106. long linecolor = 268435456
  107. integer linethickness = 4
  108. integer beginy = 168
  109. integer endx = 2007
  110. integer endy = 168
  111. end type
  112. type ln_bar2 from line within w_html_editor
  113. long linecolor = 16777215
  114. integer linethickness = 4
  115. integer beginy = 172
  116. integer endx = 2039
  117. integer endy = 172
  118. end type
  119. type r_bar from rectangle within w_html_editor
  120. long linecolor = 16777215
  121. integer linethickness = 4
  122. long fillcolor = 1073741824
  123. integer x = 1422
  124. integer width = 146
  125. integer height = 68
  126. end type
  127. event constructor;this.fillcolor = 14215660
  128. this.linecolor = 14215660
  129. this.x = -1
  130. this.y = -1
  131. this.height = ln_bar.beginy - 5
  132. end event