diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 16:10:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-29 16:11:08 +0000 |
commit | 0881ae68b0d7f977003e0798e52548caa2556f44 (patch) | |
tree | 0b6772d22c2ea8251520e5d0a24a44d239633428 /include/vcl/menu.hxx | |
parent | fdf00229816f5d0f59f90b0266115d293060e2cc (diff) |
Resolves: rhbz#1021915 force menubar menus to be up/down only
If a menu won't fit in the desired location the default mode is to place it
somewhere it will fit. e.g. above, left, right. For some cases, e.g. menubars,
it's desirable to limit the options to above/below and force the menu to scroll
if it won't fit
Change-Id: I1998a842d25752389ec9032e54673408d1ed6cb5
Diffstat (limited to 'include/vcl/menu.hxx')
-rw-r--r-- | include/vcl/menu.hxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 557914941e4f..637c701171e9 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -62,12 +62,17 @@ namespace vcl { struct MenuLayoutData; } #define MENU_APPEND ((sal_uInt16)0xFFFF) #define MENU_ITEM_NOTFOUND ((sal_uInt16)0xFFFF) -#define POPUPMENU_EXECUTE_DOWN ((sal_uInt16)0x0001) -#define POPUPMENU_EXECUTE_UP ((sal_uInt16)0x0002) -#define POPUPMENU_EXECUTE_LEFT ((sal_uInt16)0x0004) -#define POPUPMENU_EXECUTE_RIGHT ((sal_uInt16)0x0008) - -#define POPUPMENU_NOMOUSEUPCLOSE ((sal_uInt16)0x0010) +#define POPUPMENU_EXECUTE_DOWN ((sal_uInt16)0x0001) +#define POPUPMENU_EXECUTE_UP ((sal_uInt16)0x0002) +#define POPUPMENU_EXECUTE_LEFT ((sal_uInt16)0x0004) +#define POPUPMENU_EXECUTE_RIGHT ((sal_uInt16)0x0008) +#define POPUPMENU_NOMOUSEUPCLOSE ((sal_uInt16)0x0010) +//If there isn't enough space to put the menu where it wants +//to go, then they will be autoplaced. Toggle this bit +//on to force menus to be placed either above or below +//the starting rectangle and shrunk to fit and then scroll rather than place +//the menu beside that rectangle +#define POPUPMENU_NOHORZ_PLACEMENT ((sal_uInt16)0x0020) #define MENU_FLAG_NOAUTOMNEMONICS 0x0001 #define MENU_FLAG_HIDEDISABLEDENTRIES 0x0002 |