2006-05-28 07:48:53 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2001-2006, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Marc Flerackers (mflerackers@androme.be)
|
|
|
|
* Stephan Aßmus <superstippi@gmx.de>
|
|
|
|
*/
|
|
|
|
|
2003-06-16 08:32:55 +00:00
|
|
|
|
|
|
|
#ifndef _BMC_PRIVATE_H
|
|
|
|
#define _BMC_PRIVATE_H
|
|
|
|
|
|
|
|
#include <BeBuild.h>
|
|
|
|
#include <MenuBar.h>
|
|
|
|
#include <MenuItem.h>
|
2006-05-28 07:48:53 +00:00
|
|
|
#include <MessageFilter.h>
|
2003-06-16 08:32:55 +00:00
|
|
|
|
2006-05-28 07:48:53 +00:00
|
|
|
class _BMCFilter_ : public BMessageFilter {
|
|
|
|
public:
|
|
|
|
_BMCFilter_(BMenuField *menuField, uint32 what);
|
|
|
|
~_BMCFilter_();
|
|
|
|
filter_result Filter(BMessage *message, BHandler **handler);
|
|
|
|
|
|
|
|
private:
|
|
|
|
_BMCFilter_ &operator=(const _BMCFilter_ &);
|
|
|
|
BMenuField *fMenuField;
|
|
|
|
};
|
2003-06-16 08:32:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
class _BMCMenuBar_ : public BMenuBar {
|
|
|
|
|
|
|
|
public:
|
|
|
|
_BMCMenuBar_(BRect frame, bool fixed_size,
|
|
|
|
BMenuField *menuField);
|
|
|
|
_BMCMenuBar_(BMessage *data);
|
|
|
|
virtual ~_BMCMenuBar_();
|
|
|
|
|
|
|
|
static BArchivable *Instantiate(BMessage *data);
|
|
|
|
|
|
|
|
virtual void AttachedToWindow();
|
MenuField layouts the menu bar better with respect to fDivider, it aligns better with other controls. fDivider in TextControl is an integer number now, small fix and small cleanup in Menu, Window::InitData takes an optional BBitmap token to construct an offscreen window, fixed PrivateScreen IndexForColor, View prevents being located at fractional coordinates as in R5, BBitmap unlocks its offscreen window since it is never Show()n and needs manual unlocking, fixed Slider offscreen window mode and improved triange thumb drawing, ScrollView would not crash when passing a NULL target just for kicks, the private MenuBar class now implements Draw to draw itself a little differently inside the BMenuField (dark right and bottom side) - though how it currently sets the clipping region prevents the text controls to draw in Playground, needs fixing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-05 16:30:53 +00:00
|
|
|
virtual void Draw(BRect updateRect);
|
2003-06-16 08:32:55 +00:00
|
|
|
virtual void FrameResized(float width, float height);
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
|
|
virtual void MakeFocus(bool focused = true);
|
|
|
|
|
2006-05-28 07:48:53 +00:00
|
|
|
void TogglePopUpMarker(bool show) { fShowPopUpMarker = show; }
|
|
|
|
bool IsPopUpMarkerShown() const { return fShowPopUpMarker; }
|
|
|
|
|
2003-06-16 08:32:55 +00:00
|
|
|
private:
|
|
|
|
_BMCMenuBar_&operator=(const _BMCMenuBar_ &);
|
2006-05-10 19:29:35 +00:00
|
|
|
|
|
|
|
BMenuField *fMenuField;
|
|
|
|
bool fFixedSize;
|
2003-06-16 08:32:55 +00:00
|
|
|
BMessageRunner *fRunner;
|
2006-05-28 07:48:53 +00:00
|
|
|
bool fShowPopUpMarker;
|
2003-06-16 08:32:55 +00:00
|
|
|
};
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#endif // _BMC_PRIVATE_H
|