3616859a05
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
52 lines
844 B
C++
52 lines
844 B
C++
/*
|
|
* Copyright 2001-2006, Haiku, Inc.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Marc Flerackers (mflerackers@androme.be)
|
|
* Stefano Ceccherini (burton666@libero.it)
|
|
*/
|
|
#ifndef __MENUWINDOW_H
|
|
#define __MENUWINDOW_H
|
|
|
|
|
|
#include <Window.h>
|
|
|
|
class BMenu;
|
|
|
|
|
|
namespace BPrivate {
|
|
|
|
class BMenuFrame;
|
|
class BMenuScroller;
|
|
|
|
|
|
class BMenuWindow : public BWindow {
|
|
public:
|
|
BMenuWindow(const char *name);
|
|
virtual ~BMenuWindow();
|
|
|
|
void AttachMenu(BMenu *menu);
|
|
void DetachMenu();
|
|
|
|
void AttachScrollers();
|
|
void DetachScrollers();
|
|
|
|
bool CheckForScrolling(BPoint cursor);
|
|
|
|
private:
|
|
BMenu *fMenu;
|
|
BMenuFrame *fMenuFrame;
|
|
BMenuScroller *fUpperScroller;
|
|
BMenuScroller *fLowerScroller;
|
|
|
|
float fValue;
|
|
float fLimit;
|
|
|
|
bool _Scroll(BPoint cursor);
|
|
};
|
|
|
|
} // namespace BPrivate
|
|
|
|
#endif // __MENUWINDOW_H
|