History log of /haiku/src/kits/interface/MenuBar.cpp
Revision Date Author Comments
# dcecaf60 19-Apr-2016 John Scipione <jscipione@gmail.com>

BMenu: Remove _ from protected method _DrawItems


# 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


# 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.


# 14cc5b4c 09-Sep-2015 Axel Dörfler <axeld@pinc-software.de>

BMenuBar::SetBorders() added.

* This allows you to only draw some of the borders.


# c884d017 24-Apr-2014 John Scipione <jscipione@gmail.com>

BMenuBar style fixes


# ef92b3dd 06-Nov-2013 John Scipione <jscipione@gmail.com>

BMenuBar: Update param names related to docs.

No functional change intended.

Renamed title => name in regular constructors,
No right or wrong here but consistant now.
Renamed data => archive in Achive constructor,
Ditto.


# e67f9c9b 08-Oct-2013 John Scipione <jscipione@gmail.com>

Revert "MenuBar: Fix sticky menu issue. #6408 comment:9"

This reverts commit 74627342028d4a2ca7cf4e64d5ea9a07efab87ef.

Fixes #10072, breaks #6408 comment:9 again.


# 74627342 24-Aug-2013 John Scipione <jscipione@gmail.com>

MenuBar: Fix sticky menu issue. #6408 comment:9


# cccc4076 24-Aug-2013 John Scipione <jscipione@gmail.com>

Menu and friends: Style fixes, no functional

... changes intended.

* 80 char limit fixes
* Indentation fixes
* Braces style fixes
* Use ternary operator where appropriate
* Rename menuItem to just item and declare it once outside
the loop
* Omit 3rd param of GetMouse() because it is default
* Rename variables eg state => focused and menu => submenu
* Indent comments below line they apply to
* Reword some comments
* Add some #pragmas


# d5de9547 21-Aug-2013 John Scipione <jscipione@gmail.com>

Menu: some helpful comments


# 6c145207 06-May-2013 John Scipione <jscipione@gmail.com>

Remove pre-ControlLook drawing code in menu classes


# ff9b4ff8 04-Mar-2013 John Scipione <jscipione@gmail.com>

Lock BMenuBar::_Track() atomically. Fixes #9481


# da179153 24-Feb-2013 John Scipione <jscipione@gmail.com>

Small whitespace fix in MenuBar.cpp


# afa1c291 21-Jul-2012 John Scipione <jscipione@gmail.com>

Tweaks, remove dead code. Menu and Menubar are stock again.


# 49ff476d 19-Jul-2012 John Scipione <jscipione@gmail.com>

Make ScrollMenu not rely on Menu.cpp

Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.


# cb55ef9f 27-Jun-2011 John Scipione <jscipione@gmail.com>

WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.

Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.


# 0eed2a7c 02-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Fix flickering menus, especially menu bars.

Figured out by Stephan originally and only hacked in WebPositive, I knew
something about WebPositive was different because it did not flicker when
everything else did.

Since we fully draw the menus there is no need to have app_server fill in the
background with the view color. That is what was causing the flickering.

Should fix #484, #532 and #4335. Thanks diver for confirming the patch against
those tickets.


# eee4243d 20-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout.


# e750d35c 06-Jun-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Pete Goodeve from ticket #7182. It improves
keyboard navigation/tracking of BMenus and BMenuBars, although
many issues remain.
Should not yet go into alpha, since there is one issue which
I am not sure if it's not a regression. The issue is that
invoking a menu item with Enter for the first time seems to
have no effect, while invoking it subsequently works as
expected. I don't know, yet, if that's a regression of this patch.
In any case, it's better than before, thanks, Pete!


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


# 2bcccf5a 03-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Patch in part by "yourpalal":
* Set the MENU_STATE_CLOSED state upon BMenu initialization.
* When drawing the label, use the parent bounds, including
item margins to truncate the label, when the parent menu is
closed.

Thanks a lot for the patch!

Changes by myself:
* Cache the MenuPrivate instance in BMenuItem::DrawContent().
* Use Window()->UpdateIfNeeded() to animate the flashing invoked menu item,
which makes a lot more sense, the comment about it working in BeOS is
probably due to item->Select() probably drawing outside of an update cycle.
* The trigger invokation in keyboard handling didn't break out of the loop
after invoking an item. Probably didn't matter since triggers are hopefully
not assigned to more than one menu item. :-)
* Use the same trick as BMenuBar to avoid interfering with keyboard navigation
in the BMenu::_Track() hook.


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


# 926e63c8 22-Oct-2009 Brecht Machiels <brecht@mos6581.org>

* added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



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


# 6eb37bde 25-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

* Copyright fixed
* Indentation updated.
* Better grouping of methods.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32702 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


# 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


# 39fbf550 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# e58419d3 02-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* White space cleanup.


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


# 7fb33cd0 01-Sep-2008 Rene Gollent <anevilyak@gmail.com>

I hate to add another special case, but with the way the BMenu* classes are designed, I see little in the way of alternatives. If we're a BMenuField's menu bar, then we should invoke the menu item regardless of where in the bar we click. This problem was visible in ticket #1877, where basically you could click only on the portion with text, because that was the size of the menu item, where the rest of the contained menu bar was considered dead space. Thus we now check if we're an instance of BMenuField's special menubar class, and if so we unconditionally select the item instead of a hit test. Fixes the aforementioned bug. If someone has a better approach, I'm all ears.


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


# ea021c67 22-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Clicking on a menu item that already has an open submenu will close the
sub menu and quit menu tracking. This closes #1826. I tested a bit with
various different menu situations and there seem to be no negative side
effects.


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


# 47ed33e0 19-Mar-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Apply the same logic of BMenu::_Track() also in BMenuBar::_track():
check if mouse is over a submenu and then if it's over the current menu.


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


# 556f83c6 07-Mar-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

In the menubar tracking function, loop indefinitely if mouse stands
still. This way keyboard menu navigation works much better.
Unfortunately I can't apply the same trick for BMenu since it opens the
submenu with a delay, and that won't work anymore.


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


# 1134e856 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed a few problems in BMenuBar, triggered by the particular use the
Menu preflet makes of it.


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


# 50cd4d02 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Patch by Denis Washington: menubars now, like menus, can be navigated
without keeping the mouse button pressed.


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


# 3e06c4fa 07-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved the code still a little bit. Menus seems to be somewhat more
responsive.


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


# 8d44324f 07-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Same thing as previous commit, only for BMenuBar. Added some other
comment


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


# d19c9634 07-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added comments which clarify why we are doing things like this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23277 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


# 1d4722b7 25-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

After some testing on beos, I fixed bug #952. Please check but I think
it's correct now.


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


# 795a2888 29-Oct-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Rewrote PopUpMenu.h and MenuBar.h. Adjusted source files accordingly.
Added license to SeparatorItem.h


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


# 20674e31 14-Oct-2007 Jérôme Duval <korli@users.berlios.de>

stop tracking if we don't have a owner anymore, should help with bug #573


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


# 083de48a 30-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote the trigger selection mechanism: it now searches for uppercase
characters first, and then falls back to take everything. fTrigger is now
uint32 and works with all unicode characters; unlike in BeOS, the
MenuTriggerTest application now works correctly in Haiku.
* fTriggerIndex is now a character position, not a byte position of the label;
this allows BMenuItem::DrawContent() to draw the trigger at the correct
position, even if there are multi-byte UTF-8 characters.
* The above fixed bug #1506; triggers are still not working, though.
* Rewrote Menu.h header.
* Renamed all private methods (that are not called by BWindow) to have the
underscore prefix.
* Removed unused methods.
* Some minor cleanup.


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


# bd57c145 15-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* setting a different menu color with the menu preflet gives now visually
agreeable results (I hope)


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


# 23b9a911 19-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Also override MinSize() and PreferredSize().


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


# 8000c5e9 16-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added layout-friendly constructor.
* Fixed invalidation in FrameResized().


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


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

Added some code to fix bug #953. If the mouse moves a bit while the
buttons are down, the popup menu won't become sticky.


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


# 68fb2668 16-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

get rid of the now useless trackTime parameter

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


# ebd1a3a1 16-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

some more work on menus... fixed bug #953 and some more stuff


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


# f0f8601b 21-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

small cleanups


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


# f17a85d1 05-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

set the extrarect also for menubars (but it's not yet used)

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


# a7067566 22-Nov-2006 Waldemar Kornewald <wkornewald@nowhere.fake>

Fixed menu disappearing bug when (in sticky mode) mouse button is pressed (and held down) and the mouse pointer is moved outside of the menu. Now, menus should work as expected and switch from sticky to non-sticky mode on mouse button press correctly.
BTW, I disabled trackTime. It seems to work without it, correctly, so I guess it can be removed completely.
If not, just revert the change ("if (system_time....") after TODO.


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


# aadf8a88 14-Nov-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

invalidate a bit more


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


# fe23fb66 29-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* Renamed private BMenu::SelectItem() to _SelectItem(), and made its arguments a bit more sane.
* Fixed two GCC 4 warnings.


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


# 946d88f9 12-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

We're now using the same priorities for windows as BeOS does - this should improve
the responsiveness of the GUI, and should also fix bug #742.


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


# 9ecf9d1c 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


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


# 0adbde4a 22-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Don't invoke the highlighted item if menu was closed using the ESC key

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


# 136869d8 22-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Don't start tracking if user clicked and released mouse button on a zone without any item.

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


# 4e338ac6 17-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Started implementing menu keyboard navigation. Does only work for menubars because menu windows never get keyboard focus. Any idea how to solve this, since menu windows are B_AVOID_FOCUS both in beos and haiku?

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


# cf2ef43a 13-Jul-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed a small problem with StealFocus and RestoreFocus

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


# b9af5bfa 30-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

- Fixed the recently introduced bug where menus would open again once closed. -Now hitting ESC will close the menu. - Reverted to the other variation of GetMouse() as Axel's advice

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


# c1dd282b 28-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed some bugs in StealFocus, RemoveFocus and SetStickyMode

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17614 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


# e061d1ba 27-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

an eventually opened menu is now quit in BWindow::DispatchMessage()
before sending a B_MOUSE_DOWN message to any other view. This fixes bug
594 for real and another bug in BMenuBar. BMenuBar tracking will also
be simplified a bit because of this. Install items to a NULL window on
Show() as does R5 (although I don't know why yet).


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


# 03f2d779 26-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Switched back to the GetMouse variation which does NOT check the message
queue, should fix bug 594 and not risk of losing clicks. SetStickyMode()
calls StealFocus() to give the chance to be keyboard-navigated to menus.
Added an extra (temporary) InvalidateLayout() because some items weren't
added in
some cases (Tracker's attributes menu for example)


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


# ae749d90 19-May-2006 Stephan Aßmus <superstippi@gmx.de>

* updates fLastBounds in AttachedToWindow
* don't do the checks for invalid rect and Window(),
because Invalidate() does this for you


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17507 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


# f4ff3be7 09-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed the problem mentioned in the previous commit: BMenuBar::FrameResized() now invalidates the view. We might be smarter and try to only invalidate part of it, though

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


# 925479d7 09-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a new method RelayoutIfNeeded(), which does the real Layout invalidation, it's called by menubar and menu. This fixes the menufields not being resized. Note that a problem still remains, will be fixed shortly (hopefully)

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


# 7af215cc 26-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed a small problem introduced with the last commit

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


# 05e515d5 22-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

hopefully improved menu tracking. Among other things, this fixes bug 461

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


# 704c03b9 22-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Got rid of that unused and superfluous TokenSpace callback stuff.


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


# b03deb09 19-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menu settings are now handled by the app_server. As a result, changing them does something, although they aren't saved to disk yet. 'click_to_open' is not checked anymore, because it was useless anyway, I'll remove it from the Menu preflet too.

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


# 36aa2198 14-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Some more changes, fixed bug 487, added a small hysteresis so menus could be more nice to navigate, some corrections in popupmenu

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


# 0e0b8fd5 12-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

more fixes

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


# 7d550b53 11-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

and there, the usual forgotten stuff

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


# 2191a09a 11-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

big improvements for menus. The tracking is in many ways on par with r5, except for a few things, like diagonal movement and that grandparent bug

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


# 357433e0 10-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

more subtle fixes for menubar

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


# c51421cc 07-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented sticky mode. Let's see how many complaints because it's not perfect at all. Under qemu it's super crappy btw

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


# e90bed06 02-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed vlc menubars

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


# a2b0a7ac 02-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Avoid tracking the menubar if it's tracking already

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


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

BMenuItems are invoked if needed when they are child of a menubar. Fixes bug 343

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


# d8ca32c9 08-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented unarchiving constructor more or less correctly. Minor cleanup

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


# fbca7b0c 03-Feb-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed menubars behaviour, and also crashing bug

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


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

The menus work a bit less good now I think, but they no longer have 100% CPU usage
when the menu item under the mouse cursor has a sub-menu.
Minor cleanup.


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


# dd180e63 16-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

SetEnabled() enables or disables the parent menu too, SetRadioMode() and SetLabelFromMarked() call each other if needed, BMenuBar::Draw() doesn't make a difference if the menubar is disabled or not, should even fix bug #87 as it was calling LayoutItems() every cycle. Work done by John Drinkwater and me

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


# 201381d6 13-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menus make a better use of windows: when a child menu is opened, it asks the parent for a window, which is then cached for every other child for that parent menu. This avoids multiple creation/deletion of BWindows in a row. This also makes menus much nicer to use in qemu (together with the slight change in locking in BMenuBar (Lock() instead of LockWithTimeout))

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


# 26e09e58 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Small fix: didn't make sure the previous focus was still part of the window.


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


# 086240f2 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The work-around is no longer needed; but since restoring the high
color only is cheaper than a full PushState()/PopState() we'll
continue to use it.


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


# 0c26ddbc 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The MenuBar background is now drawn correctly when selected.


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


# de5a2352 23-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Flicker fix

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


# e6629a65 21-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc cleanups

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


# cd89e86a 18-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

small change

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


# 00087fc9 16-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

small change

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


# 9b0c5e41 15-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

fixed a crash into the debugger because the looper was not locked in BMenuBar::Track(), Stefano, please review...

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


# 757ce6e5 15-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Greatly improved BMenuBar::Track(). Now it uses a simple tracking loop instad of two nested loops. BMenu will follow, someday.

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


# d4fe6ec1 08-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Looks like our send_data() doesn't like to be called when a thread isn't running. Could just be that I'm not using it correctly, though. Menus now open under the 'real' haiku, though they still hang the window after some time

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


# 4ef10a59 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Accidentally commented out RestoreFocus().

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


# fd083d7e 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Use the private menu actions defines. Small cleanups.

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


# 26ad9841 30-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menus don't flicker anymore, extended some ToDos, small cleanups. Implemented BMenu::IsItemVisible() as I think I'll need it soon, extended Bmenu::OverSubmenu() to be recursive, it's not used at the moment but should be.

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


# 2ce1b3ec 12-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Cleanups


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10695 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


# 4e876d12 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented B_ITEMS_IN_MATRIX layout correctly. Small cleanups all around.


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


# 9a8540fb 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now menuitems are highlighted correctly, and submenus open, at least.


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


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

Fixed BMenuBar drawing. Managed to have BMenu working (partially) with BMenuBar.


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


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

Implemented RestoreFocus(). Thanks to Ingo and Marc for the help


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


# 872e52f2 24-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

DOS-->BeOS endlines


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


# c7499649 24-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Hacked BMenuBar into something working, not yet with our own BMenu but with beos's one. B_WILL_FIX our BMenu. Not everything work, though.


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


# b42c3c8f 14-Nov-2002 Marc Flerackers <mflerackers@nowhere.fake>

Initial Checkin


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


# 14cc5b4c4490db10a48d735f16dc69dd65b4f74b 09-Sep-2015 Axel Dörfler <axeld@pinc-software.de>

BMenuBar::SetBorders() added.

* This allows you to only draw some of the borders.


# c884d017ed8e70e7a8a4f883aab64a3955af5ea5 24-Apr-2014 John Scipione <jscipione@gmail.com>

BMenuBar style fixes


# ef92b3dd4cef462499c13de98df2ab2ab8320e93 06-Nov-2013 John Scipione <jscipione@gmail.com>

BMenuBar: Update param names related to docs.

No functional change intended.

Renamed title => name in regular constructors,
No right or wrong here but consistant now.
Renamed data => archive in Achive constructor,
Ditto.


# e67f9c9bd11e8dc9087fc0f91090609a6b1776e2 08-Oct-2013 John Scipione <jscipione@gmail.com>

Revert "MenuBar: Fix sticky menu issue. #6408 comment:9"

This reverts commit 74627342028d4a2ca7cf4e64d5ea9a07efab87ef.

Fixes #10072, breaks #6408 comment:9 again.


# 74627342028d4a2ca7cf4e64d5ea9a07efab87ef 24-Aug-2013 John Scipione <jscipione@gmail.com>

MenuBar: Fix sticky menu issue. #6408 comment:9


# cccc4076dbd857be016741e5dd75c61858aabe2a 24-Aug-2013 John Scipione <jscipione@gmail.com>

Menu and friends: Style fixes, no functional

... changes intended.

* 80 char limit fixes
* Indentation fixes
* Braces style fixes
* Use ternary operator where appropriate
* Rename menuItem to just item and declare it once outside
the loop
* Omit 3rd param of GetMouse() because it is default
* Rename variables eg state => focused and menu => submenu
* Indent comments below line they apply to
* Reword some comments
* Add some #pragmas


# d5de9547c79ff18ccc3c20b3afd05243a7c230fb 21-Aug-2013 John Scipione <jscipione@gmail.com>

Menu: some helpful comments


# 6c1452071c4b2220dcf554213c3cd1787f93f8e4 06-May-2013 John Scipione <jscipione@gmail.com>

Remove pre-ControlLook drawing code in menu classes


# ff9b4ff8c918d6e8934b3e0d58bc31fce99a6cf2 04-Mar-2013 John Scipione <jscipione@gmail.com>

Lock BMenuBar::_Track() atomically. Fixes #9481


# da179153e88c93913ca46b8bc4c80646fa23a00b 24-Feb-2013 John Scipione <jscipione@gmail.com>

Small whitespace fix in MenuBar.cpp


# afa1c29104c7f6b7a904008fbfc6a4835de4b3d3 21-Jul-2012 John Scipione <jscipione@gmail.com>

Tweaks, remove dead code. Menu and Menubar are stock again.


# 49ff476d139dc28ebaa95d65b7820423b6061d60 19-Jul-2012 John Scipione <jscipione@gmail.com>

Make ScrollMenu not rely on Menu.cpp

Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.


# cb55ef9fb597a3f3bc91e53017360b18b20dd27b 27-Jun-2011 John Scipione <jscipione@gmail.com>

WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.

Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.


# 0eed2a7c98afafc461dd42a93986bb2f898d262e 02-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Fix flickering menus, especially menu bars.

Figured out by Stephan originally and only hacked in WebPositive, I knew
something about WebPositive was different because it did not flicker when
everything else did.

Since we fully draw the menus there is no need to have app_server fill in the
background with the view color. That is what was causing the flickering.

Should fix #484, #532 and #4335. Thanks diver for confirming the patch against
those tickets.


# eee4243d35225a35d0964ebebe94490eaca14261 20-Oct-2011 Alex Wilson <yourpalal2@gmail.com>

De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout.


# e750d35cbfaed10c317bbba6f66212a410500013 06-Jun-2011 Stephan Aßmus <superstippi@gmx.de>

Applied patch by Pete Goodeve from ticket #7182. It improves
keyboard navigation/tracking of BMenus and BMenuBars, although
many issues remain.
Should not yet go into alpha, since there is one issue which
I am not sure if it's not a regression. The issue is that
invoking a menu item with Enter for the first time seems to
have no effect, while invoking it subsequently works as
expected. I don't know, yet, if that's a regression of this patch.
In any case, it's better than before, thanks, Pete!


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


# 2bcccf5a74b943b5cbff81d6481ee26bff244eec 03-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Patch in part by "yourpalal":
* Set the MENU_STATE_CLOSED state upon BMenu initialization.
* When drawing the label, use the parent bounds, including
item margins to truncate the label, when the parent menu is
closed.

Thanks a lot for the patch!

Changes by myself:
* Cache the MenuPrivate instance in BMenuItem::DrawContent().
* Use Window()->UpdateIfNeeded() to animate the flashing invoked menu item,
which makes a lot more sense, the comment about it working in BeOS is
probably due to item->Select() probably drawing outside of an update cycle.
* The trigger invokation in keyboard handling didn't break out of the loop
after invoking an item. Probably didn't matter since triggers are hopefully
not assigned to more than one menu item. :-)
* Use the same trick as BMenuBar to avoid interfering with keyboard navigation
in the BMenu::_Track() hook.


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


# 926e63c8851f8e1d085981e69ef03f8e9cda1e65 22-Oct-2009 Brecht Machiels <brecht@mos6581.org>

* added click to focus mouse mode; right-click for bring-to-front and send-to-back
(might cause some regressions in FFM)
* made accept first click user configurable
* updated the Mouse preflet to use the layout kit
* removed the warp and instant warp modes from the Mouse preflet
* changed internal representation of mouse modes (warp modes moved)
* coding style fixes



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


# 6eb37bdef7e1cfdb94a7aca824ef1301a5a9c585 25-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

* Copyright fixed
* Indentation updated.
* Better grouping of methods.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32702 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


# 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


# 39fbf5509b8740d9883b61649027478dc8a3ead8 15-Oct-2008 Oliver Tappe <zooey@hirschkaefer.de>

bonefish + zooey:
* Fixed a general problem with respect to overriding of the reserved
virtual function slots: instead of statically invoking the method
that corresponds to the reserved slot on the class that contains the
slot, we now invoke the virtual Perform() method. Perform() then dispatches
the method invocation to the "proper" class, i.e. the highest class in the
hierarchy that actually implements the requested method.
This fixes a crash in apps that use liblayout's MSlider class and
should fix one or other spurious bug with old apps or libraries, too.
* added new header folder 'binary_compatibility' that contains files that
define the method codes and data structures required by Perform()
* looked for and implemented all used reserved virtual slot functions to
invoke Perform() where necessary or to pass on the method call statically
(for slots that were already maintained by Be)


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


# e58419d39154618b01eb64eb237abbc9091e0450 02-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* White space cleanup.


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


# 7fb33cd07db4e9a82edc21597981ed2b710e9a8a 01-Sep-2008 Rene Gollent <anevilyak@gmail.com>

I hate to add another special case, but with the way the BMenu* classes are designed, I see little in the way of alternatives. If we're a BMenuField's menu bar, then we should invoke the menu item regardless of where in the bar we click. This problem was visible in ticket #1877, where basically you could click only on the portion with text, because that was the size of the menu item, where the rest of the contained menu bar was considered dead space. Thus we now check if we're an instance of BMenuField's special menubar class, and if so we unconditionally select the item instead of a hit test. Fixes the aforementioned bug. If someone has a better approach, I'm all ears.


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


# ea021c679f588e6f8b8b658e6d39067c05725120 22-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Clicking on a menu item that already has an open submenu will close the
sub menu and quit menu tracking. This closes #1826. I tested a bit with
various different menu situations and there seem to be no negative side
effects.


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


# 47ed33e09b643ffeb0ea2048a716411b4499d1eb 19-Mar-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Apply the same logic of BMenu::_Track() also in BMenuBar::_track():
check if mouse is over a submenu and then if it's over the current menu.


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


# 556f83c6f78235c08890d1658b9b6d5e3e92bc7a 07-Mar-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

In the menubar tracking function, loop indefinitely if mouse stands
still. This way keyboard menu navigation works much better.
Unfortunately I can't apply the same trick for BMenu since it opens the
submenu with a delay, and that won't work anymore.


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


# 1134e85609e66a244a6df040d3b2f0db8dbb3f74 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed a few problems in BMenuBar, triggered by the particular use the
Menu preflet makes of it.


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


# 50cd4d0280ab2f8e351d01360dff677f31a7e729 18-Feb-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Patch by Denis Washington: menubars now, like menus, can be navigated
without keeping the mouse button pressed.


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


# 3e06c4fae21ef3a265827885020d905a7f5e0cff 07-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved the code still a little bit. Menus seems to be somewhat more
responsive.


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


# 8d44324fda4c29a792c763700188a00487835e31 07-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Same thing as previous commit, only for BMenuBar. Added some other
comment


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


# d19c9634d4847ec75dfadb6bde81a0e38a832ed8 07-Jan-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added comments which clarify why we are doing things like this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23277 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


# 1d4722b73a83ea740f40521275e5c7be7998ccf5 25-Dec-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

After some testing on beos, I fixed bug #952. Please check but I think
it's correct now.


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


# 795a2888e7a9a2947d2529f6e955d1544ff0e50f 29-Oct-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Rewrote PopUpMenu.h and MenuBar.h. Adjusted source files accordingly.
Added license to SeparatorItem.h


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


# 20674e31503870e64fc71fd0884c5f9d909bdc4d 14-Oct-2007 Jérôme Duval <korli@users.berlios.de>

stop tracking if we don't have a owner anymore, should help with bug #573


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


# 083de48a4bf9a88273bc1aae47da41a97fed22d2 30-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* Rewrote the trigger selection mechanism: it now searches for uppercase
characters first, and then falls back to take everything. fTrigger is now
uint32 and works with all unicode characters; unlike in BeOS, the
MenuTriggerTest application now works correctly in Haiku.
* fTriggerIndex is now a character position, not a byte position of the label;
this allows BMenuItem::DrawContent() to draw the trigger at the correct
position, even if there are multi-byte UTF-8 characters.
* The above fixed bug #1506; triggers are still not working, though.
* Rewrote Menu.h header.
* Renamed all private methods (that are not called by BWindow) to have the
underscore prefix.
* Removed unused methods.
* Some minor cleanup.


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


# bd57c145be88c15d40eb869978523956a01895a6 15-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

* setting a different menu color with the menu preflet gives now visually
agreeable results (I hope)


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


# 23b9a9117879a58939a5eb58aec3e57f68bf66f4 19-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Also override MinSize() and PreferredSize().


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


# 8000c5e973f1da11a76235f98b2db9cec2763443 16-Jun-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added layout-friendly constructor.
* Fixed invalidation in FrameResized().


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


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

Added some code to fix bug #953. If the mouse moves a bit while the
buttons are down, the popup menu won't become sticky.


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


# 68fb266820911697f0f32ac91fbca0eefbd6230a 16-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

get rid of the now useless trackTime parameter

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


# ebd1a3a1309a2088fac4a5f068a5fb38b3600124 16-Jan-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

some more work on menus... fixed bug #953 and some more stuff


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


# f0f8601b3fb1d24d77c1a9c34ddd51a9d55b2f43 21-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

small cleanups


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


# f17a85d17dcca51bf9032b13f42a1926f9d7ecd8 05-Dec-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

set the extrarect also for menubars (but it's not yet used)

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


# a7067566a15085384a0c47db8e55d4d3fade36f0 22-Nov-2006 Waldemar Kornewald <wkornewald@nowhere.fake>

Fixed menu disappearing bug when (in sticky mode) mouse button is pressed (and held down) and the mouse pointer is moved outside of the menu. Now, menus should work as expected and switch from sticky to non-sticky mode on mouse button press correctly.
BTW, I disabled trackTime. It seems to work without it, correctly, so I guess it can be removed completely.
If not, just revert the change ("if (system_time....") after TODO.


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


# aadf8a88bb207363fa57907dae842b9d9b8830d5 14-Nov-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

invalidate a bit more


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


# fe23fb6699f41536bf1990fcdca05c8a72930383 29-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* Renamed private BMenu::SelectItem() to _SelectItem(), and made its arguments a bit more sane.
* Fixed two GCC 4 warnings.


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


# 946d88f90b9c740ffbfd3ceb123e376a7d0cfa95 12-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

We're now using the same priorities for windows as BeOS does - this should improve
the responsiveness of the GUI, and should also fix bug #742.


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


# 9ecf9d1c1d4888d341a6eac72112c72d1ae3a4cb 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


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


# 0adbde4a9e3e516bd62ab1f4b8cda6086294aa9f 22-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Don't invoke the highlighted item if menu was closed using the ESC key

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


# 136869d8c02bd5ba5d61c961a127ff179c0b3b63 22-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Don't start tracking if user clicked and released mouse button on a zone without any item.

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


# 4e338ac6df8ea2b43e459e6ce82efd099ac01cec 17-Aug-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Started implementing menu keyboard navigation. Does only work for menubars because menu windows never get keyboard focus. Any idea how to solve this, since menu windows are B_AVOID_FOCUS both in beos and haiku?

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


# cf2ef43abd5e9c605d1d82169444b141383f8700 13-Jul-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed a small problem with StealFocus and RestoreFocus

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


# b9af5bfa5c018d4d53252750943ae5e16da562d5 30-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

- Fixed the recently introduced bug where menus would open again once closed. -Now hitting ESC will close the menu. - Reverted to the other variation of GetMouse() as Axel's advice

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


# c1dd282b9b2ae7879d2a6aa58d1a1bac1453ee4e 28-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed some bugs in StealFocus, RemoveFocus and SetStickyMode

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17614 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


# e061d1bae5349fbb420946e44b9c6594786e3f6d 27-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

an eventually opened menu is now quit in BWindow::DispatchMessage()
before sending a B_MOUSE_DOWN message to any other view. This fixes bug
594 for real and another bug in BMenuBar. BMenuBar tracking will also
be simplified a bit because of this. Install items to a NULL window on
Show() as does R5 (although I don't know why yet).


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


# 03f2d7791e97456c292bcbf604c48315b1381821 26-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Switched back to the GetMouse variation which does NOT check the message
queue, should fix bug 594 and not risk of losing clicks. SetStickyMode()
calls StealFocus() to give the chance to be keyboard-navigated to menus.
Added an extra (temporary) InvalidateLayout() because some items weren't
added in
some cases (Tracker's attributes menu for example)


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


# ae749d90ce5bd38f4c14f76dee688c1b8cd6bf48 19-May-2006 Stephan Aßmus <superstippi@gmx.de>

* updates fLastBounds in AttachedToWindow
* don't do the checks for invalid rect and Window(),
because Invalidate() does this for you


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17507 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


# f4ff3be7a40f4f010cdc1144a1b094ad8cfc7ed4 09-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed the problem mentioned in the previous commit: BMenuBar::FrameResized() now invalidates the view. We might be smarter and try to only invalidate part of it, though

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


# 925479d7b37c9182934fcd1e1b88a6ac641273c2 09-May-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added a new method RelayoutIfNeeded(), which does the real Layout invalidation, it's called by menubar and menu. This fixes the menufields not being resized. Note that a problem still remains, will be fixed shortly (hopefully)

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


# 7af215cc5f735325177b661c76e0c86e51a168f4 26-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed a small problem introduced with the last commit

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


# 05e515d56ce28f5a67f0c5cc3d63efd1a1153228 22-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

hopefully improved menu tracking. Among other things, this fixes bug 461

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


# 704c03b9e6c8686496ab214b37044c34cd0c6294 22-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Got rid of that unused and superfluous TokenSpace callback stuff.


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


# b03deb09dbdb2968fecc5f128fd6ae4cf7b8169f 19-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menu settings are now handled by the app_server. As a result, changing them does something, although they aren't saved to disk yet. 'click_to_open' is not checked anymore, because it was useless anyway, I'll remove it from the Menu preflet too.

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


# 36aa2198b715fd6f8440f73355c22cc951c4f22d 14-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Some more changes, fixed bug 487, added a small hysteresis so menus could be more nice to navigate, some corrections in popupmenu

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


# 0e0b8fd554480de7f904b8e886c019bda319bb0f 12-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

more fixes

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


# 7d550b53a0d62f4cae067cfe64f2f5ca8fb3b9ea 11-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

and there, the usual forgotten stuff

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


# 2191a09a931d0c5ababb73c00ea78d3e40d58c17 11-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

big improvements for menus. The tracking is in many ways on par with r5, except for a few things, like diagonal movement and that grandparent bug

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


# 357433e049cc9a38010d874bb9a1175f76e11e54 10-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

more subtle fixes for menubar

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


# c51421cc0b5ce9bcf492722a38b138dd9468b166 07-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented sticky mode. Let's see how many complaints because it's not perfect at all. Under qemu it's super crappy btw

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


# e90bed06b11d8bbfc1477952b63d5a7104fc1769 02-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed vlc menubars

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


# a2b0a7ac3e298f894cda3b74c5770846f901fd5c 02-Apr-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Avoid tracking the menubar if it's tracking already

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


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

BMenuItems are invoked if needed when they are child of a menubar. Fixes bug 343

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


# d8ca32c9aad8212cb9b1b28ddfa00273aef13127 08-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Implemented unarchiving constructor more or less correctly. Minor cleanup

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


# fbca7b0cfd417a987d95f4e0bdc5f1c3acc6f911 03-Feb-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed menubars behaviour, and also crashing bug

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


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

The menus work a bit less good now I think, but they no longer have 100% CPU usage
when the menu item under the mouse cursor has a sub-menu.
Minor cleanup.


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


# dd180e63784033715c13b58a3be4df7b1bf5d474 16-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

SetEnabled() enables or disables the parent menu too, SetRadioMode() and SetLabelFromMarked() call each other if needed, BMenuBar::Draw() doesn't make a difference if the menubar is disabled or not, should even fix bug #87 as it was calling LayoutItems() every cycle. Work done by John Drinkwater and me

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


# 201381d6abdfe03af5d3a854fc43b708c75f98e6 13-Jan-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menus make a better use of windows: when a child menu is opened, it asks the parent for a window, which is then cached for every other child for that parent menu. This avoids multiple creation/deletion of BWindows in a row. This also makes menus much nicer to use in qemu (together with the slight change in locking in BMenuBar (Lock() instead of LockWithTimeout))

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


# 26e09e5870fcf5d1e177676f6d7cc2b2178ffc77 20-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

Small fix: didn't make sure the previous focus was still part of the window.


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


# 086240f26db4e85d8366b9e73aa5929e6493ff51 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The work-around is no longer needed; but since restoring the high
color only is cheaper than a full PushState()/PopState() we'll
continue to use it.


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


# 0c26ddbc29ef759dae88e3689e953251c0c6b1d9 28-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

The MenuBar background is now drawn correctly when selected.


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


# de5a23520e9b35d8055630a6dcdb721bd326cae0 23-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Flicker fix

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


# e6629a65a263e29d80aa43c6c35214f626047028 21-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Misc cleanups

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


# cd89e86a9d05c6cf1eacb03fafd293edbea498d8 18-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

small change

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


# 00087fc9671bb53e7f8384850f6ac46123de4404 16-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

small change

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


# 9b0c5e413c5b1debae26ae6043f037fe3d8257d9 15-Jun-2005 Stephan Aßmus <superstippi@gmx.de>

fixed a crash into the debugger because the looper was not locked in BMenuBar::Track(), Stefano, please review...

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


# 757ce6e540f09208a4bf7b155aa49be2183e572b 15-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Greatly improved BMenuBar::Track(). Now it uses a simple tracking loop instad of two nested loops. BMenu will follow, someday.

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


# d4fe6ec1e77bb5c5af5a839e5529e53fcb82ca9e 08-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Looks like our send_data() doesn't like to be called when a thread isn't running. Could just be that I'm not using it correctly, though. Menus now open under the 'real' haiku, though they still hang the window after some time

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


# 4ef10a59e410b9c29b8bb50f0382dbba3ae562da 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Accidentally commented out RestoreFocus().

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


# fd083d7eede353001ea7adfa17e9974b94d26137 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Use the private menu actions defines. Small cleanups.

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


# 26ad9841a29ff5945fc3706142f52df8b77a4c9b 30-May-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Menus don't flicker anymore, extended some ToDos, small cleanups. Implemented BMenu::IsItemVisible() as I think I'll need it soon, extended Bmenu::OverSubmenu() to be recursive, it's not used at the moment but should be.

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


# 2ce1b3ecc2644d91b7c7692614227c8d1d832761 12-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Cleanups


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10695 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


# 4e876d126e7ab87ec51562b1e7f75358448ad5f6 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

implemented B_ITEMS_IN_MATRIX layout correctly. Small cleanups all around.


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


# 9a8540fb4ec52052c97b8bffa92c68d3ea7420ac 03-Jan-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Now menuitems are highlighted correctly, and submenus open, at least.


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


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

Fixed BMenuBar drawing. Managed to have BMenu working (partially) with BMenuBar.


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


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

Implemented RestoreFocus(). Thanks to Ingo and Marc for the help


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


# 872e52f24914890f357e6d8c02765c0798b3ded8 24-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

DOS-->BeOS endlines


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


# c74996495adb0875de384346dfaeffd20d031d73 24-Dec-2004 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Hacked BMenuBar into something working, not yet with our own BMenu but with beos's one. B_WILL_FIX our BMenu. Not everything work, though.


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


# b42c3c8f2eaebd797fff9075c5d75a3950f910de 14-Nov-2002 Marc Flerackers <mflerackers@nowhere.fake>

Initial Checkin


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