⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 win_menu.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 2 页
字号:

.np
.keyword Editwindow
:cont.:
.millust begin
editwindow
    dimension 0 1 %(SW)-1 %(SH)-2
    border 1 %(white) %(black)
    text %(white) %(black) 0
    hilight %(yellow) %(blue) 0
    whitespace %(white) %(black) 0
    selection %(yellow) %(blue) 0
    eoftext %(white) %(black) 0
    keyword %(highwhite) %(black) 0
    octal %(cyan) %(black) 0
    hex %(cyan) %(black) 0
    integer %(cyan) %(black) 0
    char %(cyan) %(black) 0
    preprocessor %(yellow) %(black) 0
    symbol %(white) %(black) 0
    invalidtext %(yellow) %(black) 0
    identifier %(white) %(black) 0
    jumplabel %(cyan) %(black) 0
    comment %(lightcyan) %(black) 0
    float %(cyan) %(black) 0
    string %(cyan) %(black) 0
endwindow
.millust end

.np
.keyword Extrainfowindow
:cont.:
.millust begin
extrainfowindow
    dimension 0 1 %(SW)-1 %(SH)-3
    border 1 7 1
    text %(white) %(blue) 0
    hilight %(purple) %(cyan) 1
endwindow
.millust end
    
.keyword Filecwindow
:cont.:
.millust begin
filecwindow
    dimension 4 7 %(SW)-5 %(SH)-9
    border 1 7 1
    text %(white) %(blue) 0
    hilight %(highwhite) %(cyan) 1
endwindow
.millust end

.np
.keyword Filewindow
:cont.:
.millust begin
filewindow
    dimension 26 2 %(SW)-2 %(SH)-7
    border 1 7 1
    text %(white) %(blue) 0
    hilight %(highwhite) %(cyan) 1
endwindow
.millust end

.np
.keyword Messagewindow
:cont.:
.millust begin
messagewindow
    dimension 18 %(SH)-1 %(SW)-1 %(SH)-1
    border -1
    text %(white) %(blue) 0
    hilight %(yellow) %(blue) 1
endwindow
.millust end

.np
.keyword Menuwindow
:cont.:
.millust begin
menuwindow
    dimension 0 1 %(SW)-1 %(SH)-3
    border 1 14 1
    text %(highwhite) %(blue) 0
    hilight %(yellow) %(blue) 1
endwindow
.millust end
    
.np
.keyword Menubarwindow
:cont.:
.millust begin
menubarwindow
    dimension 0 0 %(SW)-1 0
    border -1
    text %(highwhite) %(blue) 0
    hilight %(yellow) %(blue) 1
endwindow
.millust end

.keyword Setvalwindow
:cont.:
.millust begin
setvalwindow
    dimension 46 6 %(SW)-7 9
    border 1 7 1
    text %(white) %(blue) 0
    hilight %(highwhite) %(cyan) 1
endwindow
.millust end
    
.np
.keyword Setwindow
:cont.:
.millust begin
setwindow
    dimension 12 2 43 %(SH)-4
    border 1 7 1
    text %(white) %(blue) 0
    hilight %(highwhite) %(cyan) 1
endwindow
.millust end
    
.np
.keyword Statuswindow
:cont.:
.millust begin
statuswindow
    dimension 0 %(SH)-1 17 %(SH)-1
    border -1
    text %(white) %(blue) 0
    hilight %(yellow) %(blue) 1
endwindow
.millust end
.* ******************************************************************
.section *refid=menucmd 'Menu Commands'
.* ******************************************************************
.np
&edvi menus are set dynamically.  Any menu will
automatically be added to the menu bar when created, and removed when
destroyed.  There are some reserved menus:
:DL.
:DT.windowgadget
:DD.This menu is the one that appears when the upper left hand
corner of an edit window is clicked.
:DT.float&lt.0-3&gt.
:DD.These are floating (popup) menus.  They are made to appear when
the script command
.keyref floatmenu
is used.
There are 4 floating menus,
.param float0
through
.param float3
:period.
:eDL.
.np
Menus will attempt to open up where they are told to; however, if the menu
cannot fit, then it will try to open above the position that it was told
to, to the left of the position that it was told to, and above and to the
left of the position that it was told to.
.np
The following sections describe each of the &cmdline
commands for controlling menus.
.*
.fnlist begin 'Menu Commands'
.*
.begfunc ADDMENUITEM
.syntx * ADDMENUItem &lt.menuname&gt. &lt.itemname&gt. &lt.cmd&gt.
.begdescr
Adds a new item to a previously created menu &parm1.
:period.
The item &parm2 is added to the menu.
.np
This command is similar to the &cmdline command
.keyref menuitem
:cont., only the
.keyref menuitem
command is used when first defining a menu.
.np
&parm1 may be a quoted string, if the parameter
contains spaces. If &parm1 is specified as "", then
a solid bar is displayed in the menu.
.np
A character in &parm2 preceded with an '&' will be the hot key
for activating the menu, e.g. &Control would have 'C' as
the hot key.
.np
The command &parm3 may be any &edname &cmdline
command, and is run whenever the item is selected.
.enddescr
.alsosee begin
.seethis menuitem
.alsosee end
.endfunc

.begfunc DELETEMENU
.syntx * DELETEMENU &lt.menuname&gt.
.begdescr
Destroys menu with name &parm1.
:period.
.enddescr
.endfunc

.begfunc DELETEMENUITEM
.syntx * DELETEMENUItem &lt.menuname&gt. &lt.index&gt.
.begdescr
Deletes item number &parm2 from menu &parm1.
:period.
The item number &parm2
is 0 based.
.np
If &parm2 is specified as -1, then the last item
is removed from the menu.
.enddescr
.endfunc

.begfunc ENDMENU
.syntx * ENDMENU
.begdescr
Finishes the creation of a new menu.
.enddescr
.alsosee begin
.seethis menu
.alsosee end
.endfunc

.begfunc MENU
.syntx * MENU &lt.menuname&gt.
.begdescr
Starts the creation of a new menu &parm1.
:period.
If a menu exists with the name already, it is destroyed and re-created.
A character preceded with an ampersand ('&') will be the hot key
for activating the menu, e.g. &Control would have 'C' as
the hot key.
.np
&parm1 may be a reserved name: windowgadget, float0,
float1, float2, or float3
.enddescr
.alsosee begin
.seethis endmenu
.seethis menuitem
.alsosee end
.endfunc

.begfunc MENUITEM
.syntx * MENUITEM &lt.itemname&gt. &lt.cmd&gt.
.begdescr
Adds the item &parm1 to the last menu started with the
.keyref menu
command.   Menu items may be added until the &cmdline command
.keyref endmenu
has been issued.
.np
&parm1 may be a quoted string, if the parameter
contains spaces. If &parm1 is specified as "", then
a solid bar is displayed in the menu.
.np
A character in &parm1 preceded
with an ampersand ('&') will be the hot key for activating the menu
item, e.g. &Exit would have 'E' as the hot key.
.np
The command &parm2 may be any &edname &cmdline
command, and is run whenever the item is selected.
.enddescr
.alsosee begin
.seethis addmenuitem
.seethis endmenu
.seethis menu
.alsosee end
.endfunc
.*
.fnlist end
.* ******************************************************************
.section 'Sample Menus'
.* ******************************************************************
.np
The following examples are sample menu setups.
These commands may be issued from the &cmdline
one at at time, or may be contained in a
.keyword script
and executed in the script.
Typically, these commands will be found in the &edname
.keyword configuration script
:period.
.np
This configures the menu that is popped up whenever the top left-hand
corner of an edit window is clicked with the mouse.
.millust begin
menu windowgadget
    menuitem "&$AMP.Maximize" maximize
    menuitem "M&$AMP.inimize" minimize
    menuitem ""
    menuitem "&$AMP.Open another view" open
    menuitem ""
    menuitem "&$AMP.Save" write
    menuitem "&$AMP.Save &$AMP. close" keyadd ZZ
    menuitem "Close &$AMP.no save" quit!
    menuitem "&$AMP.Close" quit
endmenu
.millust end
.np
This configures one of the floating (popup) menus.  This menu could
be displayed whenever a word is selected with the mouse.
.millust begin
menu float0
    menuitem "&$AMP.Open" edit %1
    menuitem ""
    menuitem "&$AMP.Change" keyadd cr
    menuitem "&$AMP.Delete" keyadd dr
    menuitem "&$AMP.Yank" keyadd yr
    menuitem ""
    menuitem "&$AMP.Fgrep" fgrep "%1"
    menuitem "&$AMP.Tag" tag %1
endmenu
.millust end

.np
This configures a menu bar menu item called File.
.millust begin
menu &$AMP.File
    menuitem "&$AMP.Open new file ..." edit
    menuitem "&$AMP.Next file" next
    menuitem "&$AMP.Read file ..." read
    menuitem "&$AMP.File list ..." file
    menuitem ""
    menuitem "&$AMP.Save current file" write
    menuitem "Save &$AMP.current file & close" wq
    menuitem ""
    menuitem "En&$AMP.ter command ..." keyadd \&lt.CTRL_K&gt.
    menuitem "S&$AMP.ystem" shell
    menuitem ""
    menuitem "E&$AMP.xit" exitall
endmenu
.millust end

.np
This configures a menu bar menu item called Edit.
.millust begin
menu &$AMP.Edit
    menuitem "&$AMP.Delete region" keyadd \&lt.SHIFT_DEL&gt.
    menuitem "&$AMP.Copy (yank) region" keyadd yr
    menuitem "&$AMP.Paste (put)" put
    menuitem ""
    menuitem "&$AMP.Insert Text" keyadd i
    menuitem "&$AMP.Overstrike Text" keyadd R
    menuitem ""
    menuitem "&$AMP.Undo" undo
    menuitem "&$AMP.Redo" undo!
endmenu
.millust end

.np
This configures a menu bar menu item called Position.
.millust begin
menu &$AMP.Position
    menuitem "&$AMP.Start of file" 1
    menuitem "&$AMP.End of file" $
    menuitem "Line &$AMP.number" so lnum._vi
    menuitem ""
    menuitem "S&$AMP.tart of line" keyadd 0
    menuitem "En&$AMP.d of line" keyadd $
    menuitem ""
    menuitem "Search &$AMP.forwards" keyadd /
    menuitem "Search &$AMP.backwards" keyadd ?
    menuitem "&$AMP.Last search" keyadd n
    menuitem "&$AMP.Reverse last search" keyadd N
endmenu
.millust end

.np
This configures a menu bar menu item called Window.
.millust begin
menu &$AMP.Window
    menuitem "&$AMP.Tile windows" tile
    menuitem "&$AMP.Cascade windows" cascade
    menuitem "&$AMP.Reset windows" tile 1 1
    menuwindowlist
endmenu
.millust end

.np
This configures a menu bar menu item called Options.
.millust begin
menu &$AMP.Options
    menuitem "&$AMP.Settings ..." set
endmenu
.millust end

.np
This configures a menu bar menu item called Help.
.millust begin
menu &$AMP.Help
    menuitem "&$AMP.Command Line" help com
    menuitem "&$AMP.Key Strokes" help keys
    menuitem "&$AMP.Regular Expressions" help reg
    menuitem "&$AMP.Scripts" help scr
    menuitem "S&$AMP.ettings" help set
    menuitem "Starting &$AMP.Up" help start
endmenu
.millust end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -