#
61dfdec4 |
|
19-Apr-2016 |
John Scipione <jscipione@gmail.com> |
BMenu and friends: style fixes BMenuBar: style fix: msg => message MenuPrivate: style fixes MenuItem: 80 char limit style fix MenuBar: tiny style fix Menu: tiny style fix, indentation Menu: Small refactor Implement _SetIgnoreHidden() in header Change on to ignoreHidden Change on in _SetStickyMode to sticky _BMCItem_: tiny whitespace style fix Menu: style fixes, rename msgr => messenger BMenu: style fix, pointer != NULL BMenu::Archive rename ret to status Also check pointer against NULL explicitly BMenuItem style fixes: rename abbreviation, pointer style
|
#
3dd9ff2b |
|
24-Aug-2013 |
John Scipione <jscipione@gmail.com> |
BMCMenuBar: Refactor MakeFocus() Get rid of unused fRunner variable. It is very basic now, it just works. Also, renamed msg to message in MessageReceived() and declared MakeFocus() above it (alphabetically).
|
#
408c0ee4 |
|
20-Aug-2013 |
John Scipione <jscipione@gmail.com> |
MenuField: enable/disable the menu field when... the child menu bar or the child menu bar's menu is enabled/disabled. This means that there is just one status we have to check, the menu fields, and the child menus agree. This change takes practical form in the Backgrounds preflet which disables the placement menu when the image is set to "None", but, only the menu got disabled and not the parent menu field so the label was erroneously still drawn as enabled.
|
#
1c95f722 |
|
07-Jun-2013 |
John Scipione <jscipione@gmail.com> |
Don't set MaxContentWidth on the menu bar of a BMenuField Fixes #9816 It is no longer necessary, or even desirable for us to set the max content width of the menu bar of a BMenuField now that BMenuItem truncation and BMenuField sizing are working. The user may, however, wish to set the max content width of the menu bar of a BMenuField themselves like so: menuField->MenuBar()->SetMaxContentWidth(width); and the Interface Kit will automatically deduct the left and right margins from the width including the space used by the drop down arrow.
|
#
ca3a1c04 |
|
29-May-2013 |
John Scipione <jscipione@gmail.com> |
BMenuField: If fixed size always set max content width When you resize, also set max content width. Create a SetMaxContentWidth() method that includes the margins.
|
#
92c12506 |
|
29-May-2013 |
John Scipione <jscipione@gmail.com> |
Move kMinMenuBarWidth to MenuField.cpp
|
#
a1cf3ead |
|
25-May-2013 |
John Scipione <jscipione@gmail.com> |
Resize menu field if below minimum width in auto-size mode ... cancelling the normal item truncation behavior. This funcationality comes from BeOS R5, we need to reproduce it for backwards compat. KeymapSwitcher depends on it at least. Minimum width is 20px, was set in last commit, comes from BeOS R5.
|
#
6031e624 |
|
25-May-2013 |
John Scipione <jscipione@gmail.com> |
Move constants to BMCPrivate.h and refactor We use these constants in both MenuField.cpp and BMCPrivate.cpp Incorporate kMarginWidth into kPopUpIndicatorWidth. A small code simplication in FrameResized() along with replacing bare numbers with magic constants.
|
#
e28ba280 |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
BMCPrivate: Cleanup Remove no longer needed header includes, most that I recently added a few that were already there but just aren't needed anymore. Don't use BPrivate::MenuPrivate namespace.
|
#
c1a7e89f |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Put the label truncation code back in BMenuItem. Just a few commits ago I moved the label truncation code out of BMenuItem and into BMCMenuBar because the truncation had to happen outside of BMenuItem. Turns out, that wasn't true so I'm moving the label truncation back into BMenuItem and removing the _DrawItems() method from BMCMenuBar. Note that the code is not a copy of what was there before, but, the updated version I created for BMCMenuBar. The main difference is that I use menuPrivate.Padding() instead of GetItemMargins() and I always use the width of the parent menu frame instead of using fBounds even if the state is not MENU_STATE_CLOSED. These are changes needed for BMCMenuBar but should work just as well for a regular BMenu.
|
#
c3339662 |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Draw truncated menu label in BMCPrivate, fixes #9735 ...instead of in BMenuItem and remove the truncation code from BMenuItem. The label truncation code cannot work in BMenuItem because the super menu helpfully resizes itself to fit the menu item. So, instead we do the label truncation in BMCPrivate making sure that BMenuItem there can't expand the BMCMenuBar because we set the width to fMenuField->_MenuBarWidth() explicity. Note that this only truncates the label in BMCMenuField, i.e. the label inside the menufield, it does nothing to the labels of the menu items in the attached BMenu or BPopUpMenu which is exactly what we want.
|
#
2bf1592a |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Rework layout-enabled contructor for BMCMenuBar Was passing !fixedSize into the view flags of BMenuBar, which made no sense. Stop doing that, set fixedSize to true instead. Remove the fixedSize parameter from this contructor, it's too late for that.
|
#
d5c51ba6 |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Update header comments
|
#
102a66c3 |
|
06-Aug-2009 |
Rene Gollent <anevilyak@gmail.com> |
BMenuField's private menu bar did not take into account the width of the popup indicator when computing its minimum size. Fixes ticket #3635. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32171 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0699a883 |
|
25-Mar-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Sorry, this fixes the build. I accidentally commited headers/os/interface instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29701 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f6e4cbb9 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3a38a485 |
|
30-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* fixed size layout of BMenuBar on BMenuField in fixed size mode (needs to account for the parts that the BMenuField draws, ie the shadow on the right) * fixed follow mode of BMenuBar in fixed size mode (B_FOLLOW_LEFT_RIGHT) * don't resize the BMenuField in fixed size mode (endless loop), this should be more robust anyways, since this endless loop would be triggered if an application tried to manually resize menuField->MenuBar() in auto resizing mode * fixed calculation of the parts that need to be redrawn on resize git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22127 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ec592aa9 |
|
19-Jun-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Implement _BMCMenuBar_::MaxSize() to override BMenuBar::MaxSize() and limit the maximum width. The latter supports unlimited maximum width. The _BMCMenuBar_ draws fine when resized wider than its min/preferred width, but not the complete "button" area will cause the menu to open when being pressed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21465 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cd39decc |
|
28-May-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Added a filter to MenuField, so that mousedown messages caught by the inner menubar are redirected to the BMenuField's MouseDown() like happens on beos. That way we can track and invalidate correctly. Implemented Show/HidePopUpMarker git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17613 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c8773f97 |
|
10-May-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Invalidate less in BMenuBar::FrameResized() and a bit more in _BMCMenuBar_::FrameResized(), removed unused _BMCItem_ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17417 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f9f970d9 |
|
11-Jan-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Yesterday's commit triggered some other visual bugs: hopefully fixed them all. A disabled menufield now doesn't open its associated menu anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15906 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2e6a5805 |
|
05-Jul-2005 |
Stephan Aßmus <superstippi@gmx.de> |
MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13450 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7ea7a892 |
|
16-Jun-2003 |
Marc Flerackers <mflerackers@nowhere.fake> |
BMenuField git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3542 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3dd9ff2b5d3a9c13e0fa87760efc29e6c929ac21 |
|
24-Aug-2013 |
John Scipione <jscipione@gmail.com> |
BMCMenuBar: Refactor MakeFocus() Get rid of unused fRunner variable. It is very basic now, it just works. Also, renamed msg to message in MessageReceived() and declared MakeFocus() above it (alphabetically).
|
#
408c0ee4cdd7cbe9935aae9af2c5e3ca110a89a6 |
|
20-Aug-2013 |
John Scipione <jscipione@gmail.com> |
MenuField: enable/disable the menu field when... the child menu bar or the child menu bar's menu is enabled/disabled. This means that there is just one status we have to check, the menu fields, and the child menus agree. This change takes practical form in the Backgrounds preflet which disables the placement menu when the image is set to "None", but, only the menu got disabled and not the parent menu field so the label was erroneously still drawn as enabled.
|
#
1c95f72222f766079af3183ab490e42506f5feca |
|
07-Jun-2013 |
John Scipione <jscipione@gmail.com> |
Don't set MaxContentWidth on the menu bar of a BMenuField Fixes #9816 It is no longer necessary, or even desirable for us to set the max content width of the menu bar of a BMenuField now that BMenuItem truncation and BMenuField sizing are working. The user may, however, wish to set the max content width of the menu bar of a BMenuField themselves like so: menuField->MenuBar()->SetMaxContentWidth(width); and the Interface Kit will automatically deduct the left and right margins from the width including the space used by the drop down arrow.
|
#
ca3a1c04518ebab574847a83e518c5fa407830a8 |
|
29-May-2013 |
John Scipione <jscipione@gmail.com> |
BMenuField: If fixed size always set max content width When you resize, also set max content width. Create a SetMaxContentWidth() method that includes the margins.
|
#
92c12506ac8c145ba7b3588decc3c2b6ea9a009a |
|
29-May-2013 |
John Scipione <jscipione@gmail.com> |
Move kMinMenuBarWidth to MenuField.cpp
|
#
a1cf3ead5f5e9b2857b9622bef5bc1742fd21151 |
|
25-May-2013 |
John Scipione <jscipione@gmail.com> |
Resize menu field if below minimum width in auto-size mode ... cancelling the normal item truncation behavior. This funcationality comes from BeOS R5, we need to reproduce it for backwards compat. KeymapSwitcher depends on it at least. Minimum width is 20px, was set in last commit, comes from BeOS R5.
|
#
6031e62420fec7cc6c360bb210ca860a4a60e0f0 |
|
25-May-2013 |
John Scipione <jscipione@gmail.com> |
Move constants to BMCPrivate.h and refactor We use these constants in both MenuField.cpp and BMCPrivate.cpp Incorporate kMarginWidth into kPopUpIndicatorWidth. A small code simplication in FrameResized() along with replacing bare numbers with magic constants.
|
#
e28ba280de24a60949104e5c468a4c8c8687ce8b |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
BMCPrivate: Cleanup Remove no longer needed header includes, most that I recently added a few that were already there but just aren't needed anymore. Don't use BPrivate::MenuPrivate namespace.
|
#
c1a7e89fc235363e91d79eb547e92e9e16efd5e5 |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Put the label truncation code back in BMenuItem. Just a few commits ago I moved the label truncation code out of BMenuItem and into BMCMenuBar because the truncation had to happen outside of BMenuItem. Turns out, that wasn't true so I'm moving the label truncation back into BMenuItem and removing the _DrawItems() method from BMCMenuBar. Note that the code is not a copy of what was there before, but, the updated version I created for BMCMenuBar. The main difference is that I use menuPrivate.Padding() instead of GetItemMargins() and I always use the width of the parent menu frame instead of using fBounds even if the state is not MENU_STATE_CLOSED. These are changes needed for BMCMenuBar but should work just as well for a regular BMenu.
|
#
c33396629144d09d2efb678e0d7f97290e69b1ac |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Draw truncated menu label in BMCPrivate, fixes #9735 ...instead of in BMenuItem and remove the truncation code from BMenuItem. The label truncation code cannot work in BMenuItem because the super menu helpfully resizes itself to fit the menu item. So, instead we do the label truncation in BMCPrivate making sure that BMenuItem there can't expand the BMCMenuBar because we set the width to fMenuField->_MenuBarWidth() explicity. Note that this only truncates the label in BMCMenuField, i.e. the label inside the menufield, it does nothing to the labels of the menu items in the attached BMenu or BPopUpMenu which is exactly what we want.
|
#
2bf1592a70d3f413132a0357213aa6be64077c5e |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Rework layout-enabled contructor for BMCMenuBar Was passing !fixedSize into the view flags of BMenuBar, which made no sense. Stop doing that, set fixedSize to true instead. Remove the fixedSize parameter from this contructor, it's too late for that.
|
#
d5c51ba6768d7ffd5bb983af9ab97b6372eae134 |
|
06-May-2013 |
John Scipione <jscipione@gmail.com> |
Update header comments
|
#
102a66c3f6101acacf6e3fcbdd6ac928e9e3a604 |
|
06-Aug-2009 |
Rene Gollent <anevilyak@gmail.com> |
BMenuField's private menu bar did not take into account the width of the popup indicator when computing its minimum size. Fixes ticket #3635. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32171 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0699a8833eed54f06d26f8abe24d4f65a75a7149 |
|
25-Mar-2009 |
Stephan Aßmus <superstippi@gmx.de> |
Sorry, this fixes the build. I accidentally commited headers/os/interface instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29701 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f6e4cbb95290a74b33d012600438b84742b0e572 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3a38a48561809f630ed89ee09acf16b79c307073 |
|
30-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* fixed size layout of BMenuBar on BMenuField in fixed size mode (needs to account for the parts that the BMenuField draws, ie the shadow on the right) * fixed follow mode of BMenuBar in fixed size mode (B_FOLLOW_LEFT_RIGHT) * don't resize the BMenuField in fixed size mode (endless loop), this should be more robust anyways, since this endless loop would be triggered if an application tried to manually resize menuField->MenuBar() in auto resizing mode * fixed calculation of the parts that need to be redrawn on resize git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22127 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ec592aa9e56e04a312235b34ba89d707cc26aff8 |
|
19-Jun-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Implement _BMCMenuBar_::MaxSize() to override BMenuBar::MaxSize() and limit the maximum width. The latter supports unlimited maximum width. The _BMCMenuBar_ draws fine when resized wider than its min/preferred width, but not the complete "button" area will cause the menu to open when being pressed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21465 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cd39decc4481f8bee34c1514366c6468919369e8 |
|
28-May-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Added a filter to MenuField, so that mousedown messages caught by the inner menubar are redirected to the BMenuField's MouseDown() like happens on beos. That way we can track and invalidate correctly. Implemented Show/HidePopUpMarker git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17613 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c8773f97a0894317f219e347abda1379d8b54b86 |
|
10-May-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Invalidate less in BMenuBar::FrameResized() and a bit more in _BMCMenuBar_::FrameResized(), removed unused _BMCItem_ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17417 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f9f970d98c9d5c3dfb544bdedf0561f83f76f1e8 |
|
11-Jan-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Yesterday's commit triggered some other visual bugs: hopefully fixed them all. A disabled menufield now doesn't open its associated menu anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15906 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2e6a5805ba8db3b072d81257cc44f966def5fd37 |
|
05-Jul-2005 |
Stephan Aßmus <superstippi@gmx.de> |
MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13450 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7ea7a8928a55a7ed67c4f9252a03c749ea31fe3a |
|
16-Jun-2003 |
Marc Flerackers <mflerackers@nowhere.fake> |
BMenuField git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3542 a95241bf-73f2-0310-859d-f6bbb57e9c96
|