diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-05-18 15:34:25 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-05-18 15:34:25 +0100 |
commit | 9c49d5f0909946b96b32d62d60d05a22cc3b72d9 (patch) | |
tree | b7d0f8bc98738b1ce7fdbe2fd5bfd3eb87293477 /amiga/menu.h | |
parent | 15fc44bd4d5b453709decf69d459d3c255619685 (diff) | |
download | netsurf-9c49d5f0909946b96b32d62d60d05a22cc3b72d9.tar.gz netsurf-9c49d5f0909946b96b32d62d60d05a22cc3b72d9.tar.bz2 |
Menu refactor
Diffstat (limited to 'amiga/menu.h')
-rwxr-xr-x | amiga/menu.h | 97 |
1 files changed, 76 insertions, 21 deletions
diff --git a/amiga/menu.h b/amiga/menu.h index 8cff2d539..53c2db5f3 100755 --- a/amiga/menu.h +++ b/amiga/menu.h @@ -23,32 +23,87 @@ #include <libraries/gadtools.h> #include "content/hlcache.h" -/* Number of hotlist items, menu structure needs to be changed in ami_create_menu() - * if this value is changed. */ +/* Maximum number of hotlist items (somewhat arbitrary value) */ #define AMI_HOTLIST_ITEMS 60 -//gwin->hotlist_items -/* Maximum number of menu items - first value is number of static items - * (ie. everything not intially defined as NM_IGNORE) */ -#define AMI_MENU_MAX 57 + AMI_HOTLIST_ITEMS - -/* Where the hotlist entries start */ -#define AMI_MENU_HOTLIST 48 - -/* Where the hotlist entries end */ -#define AMI_MENU_HOTLIST_MAX AMI_MENU_HOTLIST+AMI_HOTLIST_ITEMS - -/* Number of ARexx menu items. menu structure in ami_create_menu() needs to be - * changed if this value is modified. */ +/* Maximum number of ARexx menu items (somewhat arbitrary value) */ #define AMI_MENU_AREXX_ITEMS 20 -/* Where the ARexx menu items start. ARexx menu items are right at the end... - * for now, at least. We can get away with AMI_MENU_MAX falling short as it is - * only used for freeing the UTF-8 converted menu labels */ -#define AMI_MENU_AREXX AMI_MENU_MAX +/* enum menu structure, has to be here as we need it below. */ +enum { + /* Project menu */ + M_PROJECT = 0, + M_NEWWIN, + M_NEWTAB, + M_BAR_P1, + M_OPEN, + M_SAVEAS, + M_SAVESRC, + M_SAVETXT, + M_SAVECOMP, + M_SAVEPDF, + M_SAVEIFF, + M_BAR_P2, + M_CLOSETAB, + M_CLOSEWIN, + M_BAR_P3, + M_PRINT, + M_BAR_P4, + M_ABOUT, + M_QUIT, + /* Edit menu */ + M_EDIT, + M_CUT, + M_COPY, + M_PASTE, + M_BAR_E1, + M_SELALL, + M_CLEAR, + /* Browser menu */ + M_BROWSER, + M_FIND, + M_BAR_B1, + M_HISTLOCL, + M_HISTGLBL, + M_BAR_B2, + M_COOKIES, + M_BAR_B3, + M_SCALE, + M_SCALEDEC, + M_SCALENRM, + M_SCALEINC, + M_IMAGES, + M_IMGFORE, + M_IMGBACK, +#if defined(WITH_JS) || defined(WITH_MOZJS) + M_JS, +#endif + M_BAR_B4, + M_REDRAW, + /* Hotlist menu */ + M_HOTLIST, + M_HLADD, + M_HLSHOW, + M_BAR_H1, // 47 + AMI_MENU_HOTLIST, /* Where the hotlist entries start */ + AMI_MENU_HOTLIST_MAX = AMI_MENU_HOTLIST + AMI_HOTLIST_ITEMS, + /* Settings menu */ + M_PREFS, + M_PREDIT, + M_BAR_S1, + M_SNAPSHOT, + M_PRSAVE, + /* ARexx menu */ + M_AREXX, + M_AREXXEX, + M_BAR_A1, + AMI_MENU_AREXX, + AMI_MENU_AREXX_MAX = AMI_MENU_AREXX + AMI_MENU_AREXX_ITEMS +}; -/* Where the ARexx menu items end (incidentally this is the real AMI_MENU_MAX) */ -#define AMI_MENU_AREXX_MAX AMI_MENU_AREXX+AMI_MENU_AREXX_ITEMS +/* We can get away with AMI_MENU_MAX falling short as it is + * only used for freeing the UTF-8 converted menu labels */ +#define AMI_MENU_MAX AMI_MENU_AREXX /* The Intuition menu numbers of some menus we might need to modify */ #define AMI_MENU_SAVEAS_TEXT FULLMENUNUM(0,4,1) |