123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- $PBExportHeader$m_popup_shortcut_add_q6.srm
- forward
- global type m_popup_shortcut_add_q6 from menu
- end type
- type m_main from menu within m_popup_shortcut_add_q6
- end type
- type m_item1 from menu within m_main
- end type
- type m_main from menu within m_popup_shortcut_add_q6
- m_item1 m_item1
- end type
- global type m_popup_shortcut_add_q6 from menu
- m_main m_main
- end type
- end forward
- global type m_popup_shortcut_add_q6 from menu
- m_main m_main
- end type
- global m_popup_shortcut_add_q6 m_popup_shortcut_add_q6
- type variables
- Powerobject Anyobject
- end variables
- forward prototypes
- public subroutine popupmenu (integer x, integer y)
- public subroutine setmenuitem (string itemstring)
- public subroutine setitemdisabled (integer itemorder)
- public subroutine setiteminvisible (integer itemorder)
- end prototypes
- public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y)
- end subroutine
- public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i
- string currentitem
- if len(itemstring)=0 then return
- itempos=pos(itemstring,"|")
- DO WHILE itempos<>0
- // itempos为间隔符"|"的位置
- currentitem=left(itemstring,itempos - 1)
- //取出子串
- itemstring=mid(itemstring, itempos+1)
- this.m_main.item[itemorder].text=currentitem
- itempos=pos(itemstring,"|")
- itemorder++
- LOOP
- this.m_main.item[itemorder].text=itemstring
- for i=1 to itemorder
- this.m_main.item[i].visible=true
- this.m_main.item[i].enabled=true
- next
- for i=itemorder+1 to 15
- this.m_main.item[i].visible=false
- next
- end subroutine
- public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return
- this.m_main.item[itemorder].enabled=false
- end subroutine
- public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return
- this.m_main.item[itemorder].visible=false
- end subroutine
- on m_popup_shortcut_add_q6.create
- m_popup_shortcut_add_q6=this
- call super::create
- this.text = "m_popup_shortcut_add_q6"
- this.menutextcolor = 134217735
- this.menubackcolor = 134217732
- this.menuhighlightcolor = 134217741
- this.textsize = 8
- this.weight = 400
- this.facename = "Tahoma"
- this.titlebackcolor = 134217730
- this.bitmapbackcolor = 12632256
- this.menubitmaps = true
- this.titlegradient = true
- this.toolbartextcolor = 134217746
- this.toolbarbackcolor = 67108864
- this.toolbarhighlightcolor = 134217741
- this.toolbargradient = true
- this.bitmapgradient = true
- this.m_main=create m_main
- this.Item[UpperBound(this.Item)+1]=this.m_main
- end on
- on m_popup_shortcut_add_q6.destroy
- call super::destroy
- destroy(this.m_main)
- end on
- type m_main from menu within m_popup_shortcut_add_q6
- m_item1 m_item1
- end type
- on m_main.create
- call super::create
- this.text = "main"
- this.menutextcolor = 134217735
- this.menubackcolor = 134217732
- this.menuhighlightcolor = 134217741
- this.textsize = 8
- this.weight = 400
- this.facename = "Tahoma"
- this.titlebackcolor = 134217730
- this.bitmapbackcolor = 12632256
- this.menubitmaps = true
- this.titlegradient = true
- this.toolbartextcolor = 134217746
- this.toolbarbackcolor = 67108864
- this.toolbarhighlightcolor = 134217741
- this.toolbargradient = true
- this.bitmapgradient = true
- this.m_item1=create m_item1
- this.Item[UpperBound(this.Item)+1]=this.m_item1
- end on
- on m_main.destroy
- call super::destroy
- destroy(this.m_item1)
- end on
- type m_item1 from menu within m_main
- end type
- on m_item1.create
- call super::create
- this.text = "添加快捷方式"
- this.menutextcolor = 134217735
- this.menubackcolor = 134217732
- this.menuhighlightcolor = 134217741
- this.textsize = 8
- this.weight = 400
- this.facename = "Tahoma"
- this.titlebackcolor = 134217730
- this.bitmapbackcolor = 12632256
- this.menubitmaps = true
- this.titlegradient = true
- this.toolbartextcolor = 134217746
- this.toolbarbackcolor = 67108864
- this.toolbarhighlightcolor = 134217741
- this.toolbargradient = true
- this.bitmapgradient = true
- end on
- on m_item1.destroy
- call super::destroy
- end on
- event clicked;w_q6_main.tv_func.triggerevent("ue_add_shortcut")
- end event
|