📄 popupmenu1.tbl
字号:
<?xml version="1.0" encoding="utf-8"?>
<vg version="702" range="0,0,173,216" borderstyle="1" scrollbars="0" backcolor="$80000004">
<page name="page" bounds="0,0,793.700787,1122.141732" visible="false"/>
<sheet name="sheet1" bounds="0,0,176,219">
<MenuPanel name="borderG1" lib="Menu.tbl" bounds="0,0,172,215" origin="89,49"/>
<MenuItem name="MenuItem1" lib="Menu.tbl" bounds="2,2,170,24" origin="78.5,13" id="1" Caption="'瑁佸壀(X) Ctrl+X'" Checked="false" Enable="true" Focused="false" Picture="'Icon\Cut.bmp'" submenu="''"/>
<MenuItem name="MenuItem2" lib="Menu.tbl" bounds="2,24,170,46" origin="78.5,35" id="2" Caption="'鎷疯礉(C) Ctrl+C'" Checked="false" Enable="true" Focused="false" Picture="'Icon\Copy.bmp'" submenu="''"/>
<MenuItem name="MenuItem3" lib="Menu.tbl" bounds="2,46,170,68" origin="78.5,57" id="3" Caption="'绮樿创(P) Ctrl+V'" Checked="false" Enable="true" Focused="false" Picture="'Icon\Paste.bmp'" submenu="''"/>
<MenuItem name="MenuItem4" lib="Menu.tbl" bounds="2,73,170,95" origin="78.5,84" id="4" Caption="'娣诲姞鏂囧瓧(W)'" Checked="false" Enable="true" Focused="false" Picture="''" submenu="''"/>
<MenuItem name="MenuItem6" lib="Menu.tbl" bounds="2,99,170,121" origin="78.5,110" Caption="'瀵归綈(A)'" Checked="false" Enable="true" Focused="false" Picture="''" submenu="'p4'"/>
<MenuItem name="MenuItem7" lib="Menu.tbl" bounds="2,121,170,143" origin="78.5,132" Caption="'鍙犳斁娆″簭(L)'" Checked="false" Enable="true" Focused="false" Picture="''" submenu="'p3'"/>
<MenuItem name="MenuItem8" lib="Menu.tbl" bounds="2,147,170,169" origin="78.5,158" id="7" Caption="'缁勫悎(G) Ctrl+G'" Checked="false" Enable="true" Focused="false" Picture="'Icon\MergeElement.bmp'" submenu="''"/>
<MenuItem name="MenuItem9" lib="Menu.tbl" bounds="2,169,170,191" origin="78.5,180" id="184" Caption="'鎷嗗垎(T) Shift+Ctrl+G'" Checked="false" Enable="true" Focused="false" Picture="'Icon\SplitElement.bmp'" submenu="''"/>
<MenuItem name="MenuItem10" lib="Menu.tbl" bounds="2,191,170,213" origin="78.5,202" id="9" Caption="'杩涘叆缂栬緫鍏冧欢(E)'" Checked="false" Enable="true" Focused="false" Picture="''" submenu="''"/>
<Separator name="Separator2" lib="Menu.tbl" bounds="4,70,168,71" origin="80,70.5"/>
<Separator name="Separator3" lib="Menu.tbl" bounds="4,97,168,98" origin="78,97.5"/>
<Separator name="Separator4" lib="Menu.tbl" bounds="4,145,168,146" origin="78,145.5"/>
<KeyManager name="KeyManager1" lib="controls.tbl" bounds="96,88,120,112" origin="108,100" visible="false" hint="璇峰湪椤甸潰鐨凮nKeyDown浜嬩欢閲屽啓KeyManager1.OnKeyDown( Sender, Key )"/>
<programe>
public function HandleCommand(AId)
doc = IDE_GetDocument()
if AId = 1 then
d = GetFocusedText()
if d <> 0 then
if d.SelLength > 0 then
d.CopyToClipboard()
d.DeleteSelection()
Close( 0 )
return
end if
end if
doc.CopyToClipboard()
doc.DeleteSelection()
else if AId = 2 then
d = GetFocusedText()
if d <> 0 then
if d.SelLength > 0 then
d.CopyToClipboard()
Close( 0 )
return
end if
end if
doc.CopyToClipboard()
else if AId = 3 then
d = GetFocusedText()
if d <> 0 then
if d.CanPaste() then
d.PasteFromClipboard()
Close( 0 )
return
end if
end if
doc.Paste()
else if AId = 4 then
d = doc.ActiveSheet.Selection.Units[0]
if ( not d.Locked ) and ( not Layers[d.Layer].Locked ) then
if d.ClassId = 3 or d.ClassId = 6 then
if d.HasProperty( "Text1" ) then
if VarType( d.Text1 ) = 2004 then
d.DeleteLabel( d.Text1 )
else
t = d.AddLabel()
t.Focused = true
end if
else
t = d.AddLabel()
t.Focused = true
end if
end if
end if
else if AId = 7 then
doc.MergeElement()
else if AId = 184 then
IDE_DispatchCommand( AId )
else if AId = 9 then
IDE_EditElement()
else if AId = 10 then
ToggleToEditor()
else if AId > 500 and AId < 600 then
doc.AlignSelection( AId - 501 )
else if AId = 601 then
doc.ActiveSheet.Selection.BringToFront( true )
else if AId = 602 then
doc.ActiveSheet.Selection.BringToFront( false )
else if AId = 603 then
doc.ActiveSheet.Selection.SendToBack( false )
else if AId = 604 then
doc.ActiveSheet.Selection.SendToBack( true )
end if
Close( 0 )
end function
private function OnKeyDown(Sender,Key)
KeyManager1.OnKeyDown( Sender, Key )
end function
private function OnShow(Sender)
s = IDE_GetDocument().ActiveSheet
MenuItem1.Enable = ( s.Selection.UnitCount > 0 )
if not MenuItem1.Enable then
d = GetFocusedText()
if d <> 0 then
if d.SelLength > 0 then
MenuItem1.Enable = true
end if
end if
end if
MenuItem2.Enable = MenuItem1.Enable
MenuItem3.Enable = IDE_GetDocument().CanPaste()
MenuItem4.Enable = false
if s.Selection.UnitCount = 1 then
d = s.Selection.Units[0]
if ( not d.Locked ) and ( not s.Layers[d.Layer].Locked ) then
if d.ClassId = 3 or d.ClassId = 6 then
MenuItem4.Enable = true
MenuItem4.Caption = "娣诲姞鏂囧瓧(W)"
if d.HasProperty( "Text1" ) then
if VarType( d.Text1 ) = 2004 then
MenuItem4.Caption = "鍒犻櫎鏂囧瓧(W)"
end if
end if
end if
end if
end if
MenuItem6.Enable = ( s.Selection.UnitCount > 1 )
MenuItem7.Enable = ( MenuItem1.Enable and ( s.UnitCount > s.Selection.UnitCount ) )
MenuItem8.Enable = ( s.Selection.UnitCount > 1 )
MenuItem10.Enable = false
if s.Selection.UnitCount = 1 then
d = s.Selection.Units[0]
if d.ClassId = 99 then
if d.Lib = 0 then
MenuItem10.Enable = true
end if
end if
end if
end function
</programe>
</sheet>
<sheet name="p3" bounds="-144,16,-16,112">
<MenuPanel name="borderG1" lib="Menu.tbl" bounds="-144,16,-20,108" origin="-55,65"/>
<MenuItem name="MenuItem1" lib="Menu.tbl" bounds="-142,40,-22,62" origin="-65.5,51" id="602" Caption="'涓婄Щ涓
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -