haiku/headers/private/interface/MenuWindow.h
Stefano Ceccherini 9e64a7ed1b 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
2008-01-03 07:30:05 +00:00

54 lines
915 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();
virtual void DispatchMessage(BMessage *message, BHandler *handler);
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