m_dfc_control_popupmenu_item.srm 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. $PBExportHeader$m_dfc_control_popupmenu_item.srm
  2. $PBExportComments$超级菜单
  3. forward
  4. global type m_dfc_control_popupmenu_item from menu
  5. end type
  6. type m_temp from menu within m_dfc_control_popupmenu_item
  7. end type
  8. global type m_dfc_control_popupmenu_item from menu
  9. m_temp m_temp
  10. end type
  11. end forward
  12. shared variables
  13. end variables
  14. global type m_dfc_control_popupmenu_item from menu
  15. m_temp m_temp
  16. end type
  17. global m_dfc_control_popupmenu_item m_dfc_control_popupmenu_item
  18. type variables
  19. GraphicObject igoObject
  20. end variables
  21. on m_dfc_control_popupmenu_item.create
  22. m_dfc_control_popupmenu_item=this
  23. call super::create
  24. this.menutextcolor = 134217735
  25. this.menubackcolor = 134217732
  26. this.menuhighlightcolor = 134217741
  27. this.textsize = 8
  28. this.weight = 400
  29. this.facename = "Tahoma"
  30. this.titlebackcolor = 134217730
  31. this.bitmapbackcolor = 12632256
  32. this.menubitmaps = true
  33. this.titlegradient = true
  34. this.toolbartextcolor = 134217746
  35. this.toolbarbackcolor = 67108864
  36. this.toolbarhighlightcolor = 134217741
  37. this.toolbargradient = true
  38. this.bitmapgradient = true
  39. this.m_temp=create m_temp
  40. this.Item[UpperBound(this.Item)+1]=this.m_temp
  41. end on
  42. on m_dfc_control_popupmenu_item.destroy
  43. call super::destroy
  44. destroy(this.m_temp)
  45. end on
  46. type m_temp from menu within m_dfc_control_popupmenu_item
  47. end type
  48. on m_temp.create
  49. call super::create
  50. this.text = "Temp"
  51. this.menutextcolor = 134217735
  52. this.menubackcolor = 134217732
  53. this.menuhighlightcolor = 134217741
  54. this.textsize = 8
  55. this.weight = 400
  56. this.facename = "Tahoma"
  57. this.titlebackcolor = 134217730
  58. this.bitmapbackcolor = 12632256
  59. this.menubitmaps = true
  60. this.titlegradient = true
  61. this.toolbartextcolor = 134217746
  62. this.toolbarbackcolor = 67108864
  63. this.toolbarhighlightcolor = 134217741
  64. this.toolbargradient = true
  65. this.bitmapgradient = true
  66. end on
  67. on m_temp.destroy
  68. call super::destroy
  69. end on
  70. event clicked;//====================================================================
  71. // 事件(Event): m_temp::clicked()
  72. //--------------------------------------------------------------------
  73. // 描述(Description): 菜单条触发时
  74. //--------------------------------------------------------------------
  75. // 参数(Arguments): (None)
  76. //--------------------------------------------------------------------
  77. // 返回(Returns): (None)
  78. //--------------------------------------------------------------------
  79. // 作者: 董伟勇 日期: 2003.05.15
  80. //--------------------------------------------------------------------
  81. // 修改历史:
  82. //
  83. //--------------------------------------------------------------------
  84. // 1998-2003 上海亿用软件有限公司 | DongSoft Team
  85. //====================================================================
  86. If upperbound(item) = 0 Then
  87. String dsEventName
  88. String dsMenuText
  89. String dsParmContent
  90. u_Dfc_Base_Func duFunc
  91. dsMenuText = duFunc.uf_GetKeyValue(Tag, "Text")
  92. dsEventName = duFunc.uf_GetKeyValue(Tag, "Event")
  93. dsParmContent = duFunc.uf_GetKeyValue(Tag, "Parm")
  94. If dsEventName <> "" Then
  95. IF dsParmContent = "ControlEvent" THEN
  96. If IsValid(igoObject) Then
  97. igoObject.TriggerEvent(dsEventName)
  98. Else
  99. ParentWindow.TriggerEvent(dsEventName)
  100. End If
  101. ELSE
  102. //File_Way = dsMenuText
  103. ParentWindow.TriggerEvent (dsEventName,0,dsParmContent)
  104. END IF
  105. //ParentWindow.TriggerEvent(dsEventName)
  106. // 如果有效
  107. // If IsValid(igoObject) Then
  108. // igoObject.TriggerEvent(dsEventName)
  109. // Else
  110. // ParentWindow.TriggerEvent(dsEventName)
  111. // End If
  112. End If
  113. End If
  114. end event