|
CTWM
|
Go to the source code of this file.
Data Structures | |
| struct | MenuItem |
| struct | MenuRoot |
| struct | MouseButton |
| struct | FuncButton |
| struct | FuncKey |
Macros | |
| #define | TWM_ROOT "bLoB_GoOp" /* my private root menu */ |
| #define | TWM_WINDOWS "TwmWindows" /* for f.menu "TwmWindows" */ |
| #define | TWM_ICONS "TwmIcons" /* for f.menu "TwmIcons" */ |
| #define | TWM_WORKSPACES "TwmWorkspaces" /* for f.menu "TwmWorkspaces" */ |
| #define | TWM_ALLWINDOWS "TwmAllWindows" /* for f.menu "TwmAllWindows" */ |
| #define | TWM_ALLICONS "TwmAllIcons" /* for f.menu "TwmAllIcons" */ |
| #define | TWM_KEYS "TwmKeys" /* for f.menu "TwmKeys" */ |
| #define | TWM_VISIBLE "TwmVisible" /* for f.menu "TwmVisible" */ |
| #define | MAXMENUDEPTH 10 /* max number of nested menus */ |
| #define | WARPSCREEN_NEXT "next" |
| #define | WARPSCREEN_PREV "prev" |
| #define | WARPSCREEN_BACK "back" |
| #define | COLORMAP_NEXT "next" |
| #define | COLORMAP_PREV "prev" |
| #define | COLORMAP_DEFAULT "default" |
Enumerations | |
| enum | MRMapState { MRM_NEVER , MRM_UNMAPPED , MRM_MAPPED } |
Functions | |
| MenuRoot * | NewMenuRoot (char *name) |
| MenuItem * | AddToMenu (MenuRoot *menu, char *item, char *action, MenuRoot *sub, int func, char *fore, char *back) |
| bool | PopUpMenu (MenuRoot *menu, int x, int y, bool center) |
| void | MakeWorkspacesMenu (void) |
| MenuRoot * | FindMenuRoot (char *name) |
| bool | AddFuncKey (char *name, int cont, int mods, int func, MenuRoot *menu, char *win_name, char *action) |
| void | AddFuncButton (int num, int cont, int mods, int func, MenuRoot *menu, MenuItem *item) |
| void | AddDefaultFuncButtons (void) |
| void | PopDownMenu (void) |
| void | HideMenu (MenuRoot *menu) |
| void | PaintEntry (MenuRoot *mr, MenuItem *mi, bool exposure) |
| void | PaintMenu (MenuRoot *mr, XEvent *e) |
| bool | cur_fromMenu (void) |
| void | UpdateMenu (void) |
| void | MakeMenus (void) |
| void | MakeMenu (MenuRoot *mr) |
| void | MoveMenu (XEvent *eventp) |
| void | WarpCursorToDefaultEntry (MenuRoot *menu) |
| char * | mk_twmkeys_entry (const FuncKey *key) |
| Generate up a string representation of a keybinding->action. | |
Variables | |
| MenuRoot * | ActiveMenu |
| MenuItem * | ActiveItem |
| bool | menuFromFrameOrWindowOrTitlebar |
| char * | CurrentSelectedWorkspace |
| bool | AlternateContext |
| int | AlternateKeymap |
| int | MenuDepth |
| #define COLORMAP_DEFAULT "default" |
Definition at line 137 of file menus.h.
Referenced by CheckColormapArg().
| #define COLORMAP_NEXT "next" |
Definition at line 135 of file menus.h.
Referenced by CheckColormapArg(), and f_colormap_impl().
| #define COLORMAP_PREV "prev" |
Definition at line 136 of file menus.h.
Referenced by CheckColormapArg(), and f_colormap_impl().
| #define MAXMENUDEPTH 10 /* max number of nested menus */ |
Definition at line 128 of file menus.h.
Referenced by UpdateMenu().
| #define TWM_ALLICONS "TwmAllIcons" /* for f.menu "TwmAllIcons" */ |
Definition at line 27 of file menus.h.
Referenced by NewMenuRoot().
| #define TWM_ALLWINDOWS "TwmAllWindows" /* for f.menu "TwmAllWindows" */ |
Definition at line 24 of file menus.h.
Referenced by NewMenuRoot().
| #define TWM_ICONS "TwmIcons" /* for f.menu "TwmIcons" */ |
Definition at line 22 of file menus.h.
Referenced by NewMenuRoot().
| #define TWM_KEYS "TwmKeys" /* for f.menu "TwmKeys" */ |
Definition at line 31 of file menus.h.
Referenced by NewMenuRoot().
| #define TWM_ROOT "bLoB_GoOp" /* my private root menu */ |
Definition at line 20 of file menus.h.
Referenced by GotButton().
| #define TWM_VISIBLE "TwmVisible" /* for f.menu "TwmVisible" */ |
Definition at line 32 of file menus.h.
Referenced by NewMenuRoot().
| #define TWM_WINDOWS "TwmWindows" /* for f.menu "TwmWindows" */ |
Definition at line 21 of file menus.h.
Referenced by NewMenuRoot().
| #define TWM_WORKSPACES "TwmWorkspaces" /* for f.menu "TwmWorkspaces" */ |
Definition at line 23 of file menus.h.
Referenced by NewMenuRoot().
| #define WARPSCREEN_BACK "back" |
Definition at line 133 of file menus.h.
Referenced by CheckWarpScreenArg(), and f_warptoscreen_impl().
| #define WARPSCREEN_NEXT "next" |
Definition at line 131 of file menus.h.
Referenced by CheckWarpRingArg(), CheckWarpScreenArg(), and f_warptoscreen_impl().
| #define WARPSCREEN_PREV "prev" |
Definition at line 132 of file menus.h.
Referenced by CheckWarpRingArg(), CheckWarpScreenArg(), and f_warptoscreen_impl().
| enum MRMapState |
| void AddDefaultFuncButtons | ( | void | ) |
Definition at line 223 of file menus.c.
References addingdefaults, C_ICON, C_ICONMGR, C_TITLE, and SETDEF.
Referenced by InitTitlebarButtons().
Definition at line 171 of file menus.c.
References addingdefaults, cont, FuncButton::cont, FuncButton::func, FuncButton::item, FuncButton::menu, FuncButton::mods, FuncButton::next, FuncButton::num, and Scr.
Referenced by GotButton().
| bool AddFuncKey | ( | char * | name, |
| int | cont, | ||
| int | mods, | ||
| int | func, | ||
| MenuRoot * | menu, | ||
| char * | win_name, | ||
| char * | action ) |
Definition at line 102 of file menus.c.
References FuncKey::action, cont, FuncKey::cont, dpy, FuncKey::func, FuncKey::keycode, FuncKey::keysym, FuncKey::menu, FuncKey::mods, FuncKey::name, FuncKey::next, Scr, and FuncKey::win_name.
Referenced by GotKey().
| MenuItem * AddToMenu | ( | MenuRoot * | menu, |
| char * | item, | ||
| char * | action, | ||
| MenuRoot * | sub, | ||
| int | func, | ||
| char * | fore, | ||
| char * | back ) |
Definition at line 732 of file menus.c.
References MenuItem::action, ColorPair::back, CreateFonts(), MenuRoot::defaultitem, dpy, MenuRoot::first, ColorPair::fore, MenuItem::func, GetColor(), GetShadeColors(), MenuItem::item, MenuItem::item_num, MenuRoot::items, MenuRoot::last, MenuItem::next, MenuItem::normal, MenuItem::prev, MenuRoot::pull, MenuItem::root, Scr, MenuItem::separated, MenuItem::state, MenuItem::strlen, MenuItem::sub, MenuItem::user_colors, and MenuRoot::width.
Referenced by GotButton(), MakeWorkspacesMenu(), and PopUpMenu().
| bool cur_fromMenu | ( | void | ) |
| MenuRoot * FindMenuRoot | ( | char * | name | ) |
Definition at line 1503 of file menus.c.
References MenuRoot::name, MenuRoot::next, and Scr.
| void HideMenu | ( | MenuRoot * | menu | ) |
Definition at line 1476 of file menus.c.
References dpy, MenuRoot::mapped, MRM_UNMAPPED, Scr, MenuRoot::shadow, and MenuRoot::w.
Referenced by HandleEnterNotify(), and PopDownMenu().
| void MakeMenu | ( | MenuRoot * | mr | ) |
Definition at line 851 of file menus.c.
References ColorPair::back, dpy, ENTRY_SPACING, MenuRoot::first, ColorPair::fore, MenuItem::func, GetColor(), GetShadeColors(), MenuRoot::height, MenuItem::highlight, MenuRoot::highlight, MenuItem::item_num, MenuRoot::items, MenuRoot::mapped, MAX, MenuContext, MRM_NEVER, MRM_UNMAPPED, MenuItem::next, MenuItem::normal, MenuRoot::pinned, MenuRoot::pmenu, MenuRoot::pull, Scr, ScreenContext, MenuRoot::shadow, UNUSED_PIXEL, MenuItem::user_colors, MenuRoot::w, and MenuRoot::width.
Referenced by f_pin_impl(), MakeMenus(), MakeWorkspacesMenu(), and PopUpMenu().
| void MakeMenus | ( | void | ) |
Definition at line 836 of file menus.c.
References MakeMenu(), MenuRoot::next, MenuRoot::pinned, MenuRoot::real_menu, and Scr.
Referenced by ctwm_main().
| void MakeWorkspacesMenu | ( | void | ) |
Definition at line 442 of file menus.c.
References AddToMenu(), MakeMenu(), WorkSpace::name, WorkSpace::next, and Scr.
Referenced by ctwm_main().
| char * mk_twmkeys_entry | ( | const FuncKey * | key | ) |
Generate up a string representation of a keybinding->action.
Internally used in generating TwmKeys menu.
Definition at line 1657 of file menus.c.
References FuncKey::action, DO, MSLEN, and FuncKey::name.
Referenced by PopUpMenu().
| void MoveMenu | ( | XEvent * | eventp | ) |
Definition at line 1538 of file menus.c.
References ActiveMenu, ButtonPressed, ConstrainByBorders1(), cont, DispatchEvent(), dpy, Event, MenuDepth, MenuOrigins, and Scr.
Referenced by HandleButtonPress().
| MenuRoot * NewMenuRoot | ( | char * | name | ) |
Definition at line 637 of file menus.c.
References ColorPair::back, MenuRoot::defaultitem, MenuRoot::first, ColorPair::fore, MenuRoot::highlight, MenuRoot::items, MenuRoot::last, MenuRoot::mapped, MRM_NEVER, MenuRoot::name, NewMenuRoot(), MenuRoot::prev, MenuRoot::pull, MenuRoot::real_menu, Scr, MenuRoot::shadow, TWM_ALLICONS, TWM_ALLWINDOWS, TWM_ICONS, TWM_KEYS, TWM_VISIBLE, TWM_WINDOWS, TWM_WORKSPACES, UNUSED_PIXEL, MenuRoot::w, and MenuRoot::width.
Referenced by GetRoot(), and NewMenuRoot().
Definition at line 242 of file menus.c.
References MenuRoot::lastactive, Paint3DEntry(), PaintNormalEntry(), Scr, and MenuItem::state.
Referenced by HandleEnterNotify(), HandleKeyPress(), PaintMenu(), PopDownMenu(), and UpdateMenu().
| void PaintMenu | ( | MenuRoot * | mr, |
| XEvent * | e ) |
Definition at line 419 of file menus.c.
References dpy, Draw3DBorder(), MenuRoot::first, MenuRoot::height, MenuItem::item_num, MenuItem::next, off, PaintEntry(), Scr, MenuRoot::w, and MenuRoot::width.
Referenced by HandleExpose().
| void PopDownMenu | ( | void | ) |
Definition at line 1442 of file menus.c.
References ActiveItem, ActiveMenu, C_FRAME, C_ICON, C_TITLE, C_WINDOW, Context, dpy, HideMenu(), MenuDepth, menuFromFrameOrWindowOrTitlebar, PaintEntry(), MenuRoot::pinned, MenuRoot::prev, and UninstallRootColormap().
Referenced by f_exec_impl(), f_movetitlebar_impl(), f_pin_impl(), f_resize_impl(), HandleButtonPress(), HandleButtonRelease(), HandleKeyPress(), HandleLeaveNotify(), and movewindow().
| bool PopUpMenu | ( | MenuRoot * | menu, |
| int | x, | ||
| int | y, | ||
| bool | center ) |
Definition at line 1130 of file menus.c.
References ActiveMenu, AddToMenu(), ColorPair::back, TwmWindow::class, ConstrainByLayout(), CurrentSelectedWorkspace, DestroyMenu(), dpy, MenuRoot::entered, MenuRoot::first, ColorPair::fore, MenuRoot::height, MenuRoot::highlight, InstallRootColormap(), TwmWindow::isicon, TwmWindow::isiconmgr, TwmWindow::iswspmgr, MenuRoot::items, MenuRoot::last, LookInList(), MakeMenu(), MenuRoot::mapped, MenuDepth, MenuOrigins, mk_twmkeys_entry(), MRM_MAPPED, MRM_NEVER, TwmWindow::name, WorkSpace::name, TwmWindow::next, WorkSpace::next, OCCUPY, MenuRoot::pinned, MenuRoot::prev, Scr, MenuRoot::shadow, SHADOWWIDTH, UNUSED_PIXEL, MenuRoot::w, MenuRoot::width, MenuRoot::x, x, MenuRoot::y, and y.
Referenced by do_key_menu(), do_menu(), HandleEnterNotify(), and UpdateMenu().
| void UpdateMenu | ( | void | ) |
Definition at line 487 of file menus.c.
References ActiveItem, ActiveMenu, Cancel, CurrentSelectedWorkspace, DispatchEvent(), dpy, Event, fromMenu, JunkChild, JunkMask, JunkRoot, MAXMENUDEPTH, MenuDepth, menuFromFrameOrWindowOrTitlebar, MenuOrigins, MenuItem::next, PaintEntry(), PopUpMenu(), Scr, ScreenContext, x, and y.
Referenced by do_key_menu(), do_menu(), and HandleEnterNotify().
| void WarpCursorToDefaultEntry | ( | MenuRoot * | menu | ) |
Definition at line 1626 of file menus.c.
References MenuRoot::defaultitem, dpy, Event, MenuRoot::first, MenuRoot::height, MenuRoot::last, MenuItem::next, root, Scr, MenuRoot::w, MenuRoot::width, x, and y.
Referenced by HandleButtonRelease().
|
extern |
Definition at line 59 of file menus.c.
Referenced by f_menu_impl(), HandleButtonPress(), HandleButtonRelease(), HandleEnterNotify(), HandleKeyPress(), PopDownMenu(), and UpdateMenu().
|
extern |
Definition at line 58 of file menus.c.
Referenced by AutoLowerWindow(), AutoRaiseWindow(), f_pin_impl(), HandleButtonPress(), HandleButtonRelease(), HandleEnterNotify(), HandleKeyPress(), HandleLeaveNotify(), MoveMenu(), PopDownMenu(), PopUpMenu(), and UpdateMenu().
|
extern |
Definition at line 65 of file menus.c.
Referenced by f_altcontext_impl(), HandleButtonPress(), HandleButtonRelease(), and HandleKeyPress().
|
extern |
Definition at line 64 of file menus.c.
Referenced by f_altkeymap_impl(), HandleButtonPress(), HandleButtonRelease(), and HandleKeyPress().
|
extern |
Definition at line 61 of file menus.c.
Referenced by HandleKeyPress(), PopUpMenu(), and UpdateMenu().
|
extern |
Definition at line 67 of file menus.c.
Referenced by HandleEnterNotify(), HandleKeyPress(), MoveMenu(), PopDownMenu(), PopUpMenu(), and UpdateMenu().
|
extern |
Definition at line 60 of file menus.c.
Referenced by DispatchEvent2(), f_movetitlebar_impl(), HandleButtonPress(), movewindow(), PopDownMenu(), and UpdateMenu().