m_popup_shortcut_add_q6.srm 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. $PBExportHeader$m_popup_shortcut_add_q6.srm
  2. forward
  3. global type m_popup_shortcut_add_q6 from menu
  4. end type
  5. type m_main from menu within m_popup_shortcut_add_q6
  6. end type
  7. type m_item1 from menu within m_main
  8. end type
  9. type m_main from menu within m_popup_shortcut_add_q6
  10. m_item1 m_item1
  11. end type
  12. global type m_popup_shortcut_add_q6 from menu
  13. m_main m_main
  14. end type
  15. end forward
  16. global type m_popup_shortcut_add_q6 from menu
  17. m_main m_main
  18. end type
  19. global m_popup_shortcut_add_q6 m_popup_shortcut_add_q6
  20. type variables
  21. Powerobject Anyobject
  22. end variables
  23. forward prototypes
  24. public subroutine popupmenu (integer x, integer y)
  25. public subroutine setmenuitem (string itemstring)
  26. public subroutine setitemdisabled (integer itemorder)
  27. public subroutine setiteminvisible (integer itemorder)
  28. end prototypes
  29. public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y)
  30. end subroutine
  31. public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i
  32. string currentitem
  33. if len(itemstring)=0 then return
  34. itempos=pos(itemstring,"|")
  35. DO WHILE itempos<>0
  36. // itempos为间隔符"|"的位置
  37. currentitem=left(itemstring,itempos - 1)
  38. //取出子串
  39. itemstring=mid(itemstring, itempos+1)
  40. this.m_main.item[itemorder].text=currentitem
  41. itempos=pos(itemstring,"|")
  42. itemorder++
  43. LOOP
  44. this.m_main.item[itemorder].text=itemstring
  45. for i=1 to itemorder
  46. this.m_main.item[i].visible=true
  47. this.m_main.item[i].enabled=true
  48. next
  49. for i=itemorder+1 to 15
  50. this.m_main.item[i].visible=false
  51. next
  52. end subroutine
  53. public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return
  54. this.m_main.item[itemorder].enabled=false
  55. end subroutine
  56. public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return
  57. this.m_main.item[itemorder].visible=false
  58. end subroutine
  59. on m_popup_shortcut_add_q6.create
  60. m_popup_shortcut_add_q6=this
  61. call super::create
  62. this.text = "m_popup_shortcut_add_q6"
  63. this.menutextcolor = 134217735
  64. this.menubackcolor = 134217732
  65. this.menuhighlightcolor = 134217741
  66. this.textsize = 8
  67. this.weight = 400
  68. this.facename = "Tahoma"
  69. this.titlebackcolor = 134217730
  70. this.bitmapbackcolor = 12632256
  71. this.menubitmaps = true
  72. this.titlegradient = true
  73. this.toolbartextcolor = 134217746
  74. this.toolbarbackcolor = 67108864
  75. this.toolbarhighlightcolor = 134217741
  76. this.toolbargradient = true
  77. this.bitmapgradient = true
  78. this.m_main=create m_main
  79. this.Item[UpperBound(this.Item)+1]=this.m_main
  80. end on
  81. on m_popup_shortcut_add_q6.destroy
  82. call super::destroy
  83. destroy(this.m_main)
  84. end on
  85. type m_main from menu within m_popup_shortcut_add_q6
  86. m_item1 m_item1
  87. end type
  88. on m_main.create
  89. call super::create
  90. this.text = "main"
  91. this.menutextcolor = 134217735
  92. this.menubackcolor = 134217732
  93. this.menuhighlightcolor = 134217741
  94. this.textsize = 8
  95. this.weight = 400
  96. this.facename = "Tahoma"
  97. this.titlebackcolor = 134217730
  98. this.bitmapbackcolor = 12632256
  99. this.menubitmaps = true
  100. this.titlegradient = true
  101. this.toolbartextcolor = 134217746
  102. this.toolbarbackcolor = 67108864
  103. this.toolbarhighlightcolor = 134217741
  104. this.toolbargradient = true
  105. this.bitmapgradient = true
  106. this.m_item1=create m_item1
  107. this.Item[UpperBound(this.Item)+1]=this.m_item1
  108. end on
  109. on m_main.destroy
  110. call super::destroy
  111. destroy(this.m_item1)
  112. end on
  113. type m_item1 from menu within m_main
  114. end type
  115. on m_item1.create
  116. call super::create
  117. this.text = "添加快捷方式"
  118. this.menutextcolor = 134217735
  119. this.menubackcolor = 134217732
  120. this.menuhighlightcolor = 134217741
  121. this.textsize = 8
  122. this.weight = 400
  123. this.facename = "Tahoma"
  124. this.titlebackcolor = 134217730
  125. this.bitmapbackcolor = 12632256
  126. this.menubitmaps = true
  127. this.titlegradient = true
  128. this.toolbartextcolor = 134217746
  129. this.toolbarbackcolor = 67108864
  130. this.toolbarhighlightcolor = 134217741
  131. this.toolbargradient = true
  132. this.bitmapgradient = true
  133. end on
  134. on m_item1.destroy
  135. call super::destroy
  136. end on
  137. event clicked;w_q6_main.tv_func.triggerevent("ue_add_shortcut")
  138. end event