History log of /haiku/src/kits/interface/MenuWindow.cpp
Revision Date Author Comments
# 9b33a309 04-Mar-2020 X512 <danger_mail@list.ru>

Interface Kit: fix menu resizing when scrolling is enabled

BMenuWindow::Attach/DetachScrollers can be called when scrollers are
already attached/detached and it should handle this case properly.

Call BMenuWindow::DetachScrollers when scrolling is not needed anymore.

Fixes #8513.

Change-Id: I1f70b63d75106cf33ab1f72d34e221a54b45a75e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2310
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>


# 7a96554c 09-Dec-2015 looncraz <looncraz@looncraz.net>

kits/interface: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0003-0017 from looncraz, unmodified.


# f2de125b 11-Aug-2015 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed code path for be_control_look == NULL.
Adjusted TODO comment.


# 4898c615 03-May-2013 Jessica Hamilton <jessica.l.hamilton@gmail.com>

BMenu: scroll marked item into view when menu has scrollers attached.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>


# a937ffd2 30-Apr-2012 czeidler <haiku@clemens-zeidler.de>

Make the menu window not resizable.

Right clicking the menu border showed the resize arrow and sometimes even made it possible to resize the menu.


# 931cd377 07-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a new flag kAcceptKeyboardFocusFlag that allows B_AVOID_FOCUS windows
to still receive keyboard events. This is now used for menu windows (before,
the menu feel alone would trigger that behaviour).
* This also fixes bug #4691, as tool tip windows use the menu feel as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ecf187e 04-Sep-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Made MenuWindow::GetSteps() const.
Increased the scrollers size from 10 to 12, since at high resolutions,
they're really too small.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32932 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96f041c5 03-Sep-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Also scroll by a small step, when using the menuscrollers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d62eae6e 24-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Do not allow a menu window to be movable. This fixes bug #4314.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32650 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50f8cd14 07-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.
* Remove superfluous operator=() implementations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32174 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e23bc03 02-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* BMenu now scrolls when you press page up/down, if possible.
* BMenuWindow no longer uses a fixed scroll step - instead, the menu sets it
to the height of its first item.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7bb90f8 14-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Improve cosmetics when menu scrollers are shown. The menu is not supposed to
draw all of the frame (no top/bottom borders).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29532 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f86ba45 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

Implemented a new look for the Haiku interface controls. It was
overheard that they looked too ninety-ish.
TODO: The code behind this is work in progress. The basic idea
is to extract all drawing code into a new class BControlLook,
of which there is a global instance be_control_look, instantiated
in InterfaceDefs.cpp. At the moment, all the old drawing code is
still there, and the usage of be_control_look is inside if-bodies
checking the instance against NULL. In another words, by not
instanitating be_control_look, you can revert back to the old look.
BControlLook's job is to provide reusable methods for drawing
certain types of frames, backgrounds and labels, so that application
developers can make controls that re-use the same drawing code
as built-in controls and adopt to changes made there. I have added
the notion of "borders". Each of the frame drawing methods can be
made to draw certain borders only, which is supposed to help when
controls shall visually attach. This feature is not fully explored
at all ATM.
TODO: Update BColumnListView header view and BStringItem text
spacing. Update other apps where it makes sense to use BControlLook.
For the moment, only Tracker and LaunchBox are updated. More...
NOTE: The new look is not very radically different, so that existing
apps do not immediately look too ugly or out of place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e0c2a79 03-Oct-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menus can be scrolled also using the mouse wheel

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60e1cfbf 24-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

don't freak out if BMenuWindow::AttachScrollers() is called more than once (happens when a menu window has scrollers already, and we call BMenu::AddItem().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24094 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9e64a7ed 03-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed problem with some popup menus (check ticket #1679)
Moved GetMouse() calls near the check for exit conditions.
Reorganized a bit the code, and hopefully simplified it in some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23229 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 059ca4bd 04-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Some other changes, make sure we delete all resources on destruction


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf5948ae 05-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BMenuFrame overlapped partially with a BMenuScroller. This fixes the
spurious lines drawn over the menu. Thanks to Stephan for making me
notice this!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21327 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3616859a 05-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Changed the interaction between BMenuFrame, BMenuScroller and
BMenuWindow. BMenuScroller now is just the scroller button, and it's a
child of BMenuWindow. This simplifies attaching/detaching the
scrollers, and it's also a bit cleaner.
The lower scroller wasn't shown anymore for some reason, and this commit also fixes this problem.
A drawing bug shows up now, though: when scrolling the menu UP, some
spurious lines are drawn over the menu. I wonder if this is an
app_server bug or what.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7338938 29-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Greatly improved scrolling, and simplified the code too. Now scrolling
is done from inside the BMenu::_track() function, and not inside Pulse()
anymore. Patch by Lucasz Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08d92916 07-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

removed now unneded extra Draw() call used as a workaround to broken
scrolling.
Menu attached to menubars now use scrolling if they are opened near the
bottom of the screen (just like in beos). I'm not sure if this is so
nice, though, so it could be reverted. Patch contributed by Lucasz
Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19442 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2628e60c 22-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Moved BMenuWindow, BMenuFrame, and BMenuScroller into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19360 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27cc2508 20-Nov-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

First try at menu scrolling, courthesy of Łukasz Zemczak. Works more or less, although a bit buggy

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19343 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07dc2c69 30-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* The app_server now gives top-most menus the keyboard focus.
* BMenuWindow now makes its menu focus view, so that it can receive key events.
* Keyboard navigation doesn't work as it should though, that is bug #670 is
still valid - there should even be another recently opened bug about this,
but Trac obviously ate it :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19152 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4436b726 30-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menuitems are layoutted better, fixing bug 526

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4185bd8b 28-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37cf3d97 22-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Avoid attaching a menu to the BMenuWindow when not needed

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c11ec31 03-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BMenuItem also draws ctrl bitmap if needed, BTextView::AutoResize implemented more correctly

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16577 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55b35fb4 31-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Empty menus now display an '<empty>' label

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16175 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7023acd 30-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed B_AVOID_FRONT support in the app_server.
* Menu windows now use the kMenuWindowFeel feel (but still need the B_AVOID_FOCUS
flag set, as that's currently independent from the feel).
* Minor cleanup in MenuWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16150 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ba5a32 29-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5aa032f1 20-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f353b33a 20-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

MenuWindows seems to behave better this way on our app_server. We should either find the right flags/feel combination or test and implement support for kMenuWindowFeel within the app server.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13213 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b47fd87 23-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

MenuWindow's look is now B_BORDERED_WINDOW_LOOK, so we can avoid drawing the border ourselves.

Now BMenu caches its windows instead of creating a new one every time. This last change could be reverted, though, as we could end up keeping around too many windows.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12782 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ff5ade2 04-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Many visual fixes to BMenu. Now it's almost undistinguable from the real thing. SeparatorItems were being drawn too dark. Fixed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b752875 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The frame around the BMenu is now drawn by a special class (as happens in beos), and not by BMenu::DrawBackground(). Refactored BMenuWindow to support scrolling (not implemented yet). The AddItem() functions now call the private _AddItem(). Implemented AddList(), but it's not tested. BMenus are now offsetted by 2, 2, as in BeOS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1664b981 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added some todo items, cleanups. Removed the frame parameter from BMenuWindow as it's not needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10573 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0d01b5f 30-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

MenuWindow now uses the private window_feel "1025", which I guess we'll need to implement server side too, since it behaves differently than B_MODAL_WINDOW_FEEL. Menu items added to a menubar didn't appear immediately, so I forced an Invalidate(). Could be made better, I think.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10552 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e411c658 27-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Mmmmh, I love Cut & Paste...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 446b8c19 27-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved BMenuWindow to its own file


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10536 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2de125b8c695e86bd3e896167553083b61e0908 11-Aug-2015 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Removed code path for be_control_look == NULL.
Adjusted TODO comment.


# 4898c615d6c4f72deb9433c784b9e6d84419efb0 03-May-2013 Jessica Hamilton <jessica.l.hamilton@gmail.com>

BMenu: scroll marked item into view when menu has scrollers attached.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>


# a937ffd238367dee5036096658c6c360c1e23136 30-Apr-2012 czeidler <haiku@clemens-zeidler.de>

Make the menu window not resizable.

Right clicking the menu border showed the resize arrow and sometimes even made it possible to resize the menu.


# 931cd377aade563781849d3e6f91a9b635cd6753 07-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a new flag kAcceptKeyboardFocusFlag that allows B_AVOID_FOCUS windows
to still receive keyboard events. This is now used for menu windows (before,
the menu feel alone would trigger that behaviour).
* This also fixes bug #4691, as tool tip windows use the menu feel as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33481 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3ecf187e2a139ce92df3a1664afa3d3cf1f614ef 04-Sep-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Made MenuWindow::GetSteps() const.
Increased the scrollers size from 10 to 12, since at high resolutions,
they're really too small.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32932 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96f041c56c0b5c2372c4fe822aeb10b4dcd5de01 03-Sep-2009 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Also scroll by a small step, when using the menuscrollers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d62eae6e2e267e6791b0d6ba27c464ef00f310f1 24-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Do not allow a menu window to be movable. This fixes bug #4314.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32650 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50f8cd14bb40895f9167f44752525386af219513 07-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.
* Remove superfluous operator=() implementations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32174 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e23bc03830b81ec305154bcbddfa0792ece17f0 02-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* BMenu now scrolls when you press page up/down, if possible.
* BMenuWindow no longer uses a fixed scroll step - instead, the menu sets it
to the height of its first item.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7bb90f8de3de030bd9b9e670cbc12543658dd8a 14-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Improve cosmetics when menu scrollers are shown. The menu is not supposed to
draw all of the frame (no top/bottom borders).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29532 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f86ba45579bdc9648b232175f87edc62ab71b54 15-Feb-2009 Stephan Aßmus <superstippi@gmx.de>

Implemented a new look for the Haiku interface controls. It was
overheard that they looked too ninety-ish.
TODO: The code behind this is work in progress. The basic idea
is to extract all drawing code into a new class BControlLook,
of which there is a global instance be_control_look, instantiated
in InterfaceDefs.cpp. At the moment, all the old drawing code is
still there, and the usage of be_control_look is inside if-bodies
checking the instance against NULL. In another words, by not
instanitating be_control_look, you can revert back to the old look.
BControlLook's job is to provide reusable methods for drawing
certain types of frames, backgrounds and labels, so that application
developers can make controls that re-use the same drawing code
as built-in controls and adopt to changes made there. I have added
the notion of "borders". Each of the frame drawing methods can be
made to draw certain borders only, which is supposed to help when
controls shall visually attach. This feature is not fully explored
at all ATM.
TODO: Update BColumnListView header view and BStringItem text
spacing. Update other apps where it makes sense to use BControlLook.
For the moment, only Tracker and LaunchBox are updated. More...
NOTE: The new look is not very radically different, so that existing
apps do not immediately look too ugly or out of place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e0c2a797d01708bc3c1a49f2d496dc465f833cf 03-Oct-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menus can be scrolled also using the mouse wheel

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27844 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60e1cfbfbb3cbae2ef963a80704518769312a2da 24-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

don't freak out if BMenuWindow::AttachScrollers() is called more than once (happens when a menu window has scrollers already, and we call BMenu::AddItem().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24094 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9e64a7ed1ba6e91718aeae9a5a32c74ba9ca5421 03-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed problem with some popup menus (check ticket #1679)
Moved GetMouse() calls near the check for exit conditions.
Reorganized a bit the code, and hopefully simplified it in some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23229 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 059ca4bd97cf31c5445ea2e535925db5275aea57 04-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Some other changes, make sure we delete all resources on destruction


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf5948ae6c7ae4898eb2c9048a29a02ecad69c98 05-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BMenuFrame overlapped partially with a BMenuScroller. This fixes the
spurious lines drawn over the menu. Thanks to Stephan for making me
notice this!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21327 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3616859a05eb7c0db11c8dff0259260f3448c944 05-Jun-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Changed the interaction between BMenuFrame, BMenuScroller and
BMenuWindow. BMenuScroller now is just the scroller button, and it's a
child of BMenuWindow. This simplifies attaching/detaching the
scrollers, and it's also a bit cleaner.
The lower scroller wasn't shown anymore for some reason, and this commit also fixes this problem.
A drawing bug shows up now, though: when scrolling the menu UP, some
spurious lines are drawn over the menu. I wonder if this is an
app_server bug or what.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7338938468d2b88409ef3ec4c3289d389da693e 29-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Greatly improved scrolling, and simplified the code too. Now scrolling
is done from inside the BMenu::_track() function, and not inside Pulse()
anymore. Patch by Lucasz Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08d92916672b9c6c4274547f9366485dce31330e 07-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

removed now unneded extra Draw() call used as a workaround to broken
scrolling.
Menu attached to menubars now use scrolling if they are opened near the
bottom of the screen (just like in beos). I'm not sure if this is so
nice, though, so it could be reverted. Patch contributed by Lucasz
Zemczak


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19442 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2628e60cbca2ed49bf7d5704f99eb72bec7e249f 22-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Moved BMenuWindow, BMenuFrame, and BMenuScroller into the BPrivate namespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19360 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27cc25083edc760e3ce0f2163f5222fa118e7852 20-Nov-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

First try at menu scrolling, courthesy of Łukasz Zemczak. Works more or less, although a bit buggy

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19343 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07dc2c697239f7eae1fc184f1796b4fa705d1fd5 30-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* The app_server now gives top-most menus the keyboard focus.
* BMenuWindow now makes its menu focus view, so that it can receive key events.
* Keyboard navigation doesn't work as it should though, that is bug #670 is
still valid - there should even be another recently opened bug about this,
but Trac obviously ate it :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19152 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4436b7269deb26c44ccaa9f57a1a041e13f1afed 30-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menuitems are layoutted better, fixing bug 526

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4185bd8b34afeea08550982b4a93d9a13a508504 28-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37cf3d970dd0ca905fac555a7a117972a89ec439 22-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Avoid attaching a menu to the BMenuWindow when not needed

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16863 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c11ec31c876f2b77e3d03c9776dbf99119bbce7 03-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

BMenuItem also draws ctrl bitmap if needed, BTextView::AutoResize implemented more correctly

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16577 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55b35fb4d5df91adca8f54d520253696873c495d 31-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Empty menus now display an '<empty>' label

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16175 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7023acdc6849932266eb1fc374ad368c3322e69 30-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed B_AVOID_FRONT support in the app_server.
* Menu windows now use the kMenuWindowFeel feel (but still need the B_AVOID_FOCUS
flag set, as that's currently independent from the feel).
* Minor cleanup in MenuWindow.cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16150 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ba5a32c1377a3a20242991f2ba24bd857b8e97 29-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5aa032f1e8b7ccb4c5659a89d6517460ab2a501c 20-Dec-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f353b33a85682390390849ed534911c0012211c1 20-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

MenuWindows seems to behave better this way on our app_server. We should either find the right flags/feel combination or test and implement support for kMenuWindowFeel within the app server.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13213 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b47fd8708e59bc6a73566593373b65b1d701397 23-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

MenuWindow's look is now B_BORDERED_WINDOW_LOOK, so we can avoid drawing the border ourselves.

Now BMenu caches its windows instead of creating a new one every time. This last change could be reverted, though, as we could end up keeping around too many windows.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12782 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ff5ade2533831e6142d04d814b41bf1f88a688b 04-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Many visual fixes to BMenu. Now it's almost undistinguable from the real thing. SeparatorItems were being drawn too dark. Fixed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10585 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b7528754df83835624e2536e13c848deb58ac93 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The frame around the BMenu is now drawn by a special class (as happens in beos), and not by BMenu::DrawBackground(). Refactored BMenuWindow to support scrolling (not implemented yet). The AddItem() functions now call the private _AddItem(). Implemented AddList(), but it's not tested. BMenus are now offsetted by 2, 2, as in BeOS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1664b981f2eb246d6622806e20c04b187664cafd 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added some todo items, cleanups. Removed the frame parameter from BMenuWindow as it's not needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10573 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0d01b5f78336ce86555eed4d4824de02f5db163 30-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

MenuWindow now uses the private window_feel "1025", which I guess we'll need to implement server side too, since it behaves differently than B_MODAL_WINDOW_FEEL. Menu items added to a menubar didn't appear immediately, so I forced an Invalidate(). Could be made better, I think.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10552 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e411c658625037b93f927467840993775cd490e6 27-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Mmmmh, I love Cut & Paste...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 446b8c194e9ec252eaac62a62551800b9775b833 27-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Moved BMenuWindow to its own file


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10536 a95241bf-73f2-0310-859d-f6bbb57e9c96