2 * Copyright 2001-2013 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus, superstippi@gmx.de
7 * Marc Flerackers, mflerackers@androme.be
8 * John Scipione, jscipione@gmail.com
10 #ifndef _BMC_PRIVATE_H
11 #define _BMC_PRIVATE_H
16 #include <MessageFilter.h>
19 static const float kVMargin
= 2.0f
;
22 class _BMCFilter_
: public BMessageFilter
{
24 _BMCFilter_(BMenuField
* menuField
, uint32 what
);
25 virtual ~_BMCFilter_();
27 virtual filter_result
Filter(BMessage
* message
, BHandler
** handler
);
30 _BMCFilter_
& operator=(const _BMCFilter_
&);
32 BMenuField
* fMenuField
;
36 class _BMCMenuBar_
: public BMenuBar
{
38 _BMCMenuBar_(BRect frame
, bool fixedSize
,
39 BMenuField
* menuField
);
40 _BMCMenuBar_(BMenuField
* menuField
);
41 _BMCMenuBar_(BMessage
* data
);
42 virtual ~_BMCMenuBar_();
44 static BArchivable
* Instantiate(BMessage
* data
);
46 virtual void AttachedToWindow();
47 virtual void Draw(BRect updateRect
);
48 virtual void FrameResized(float width
, float height
);
49 virtual void MakeFocus(bool focused
= true);
50 virtual void MessageReceived(BMessage
* message
);
51 virtual void SetMaxContentWidth(float width
);
52 virtual void SetEnabled(bool enabled
);
54 void TogglePopUpMarker(bool show
)
55 { fShowPopUpMarker
= show
; }
56 bool IsPopUpMarkerShown() const
57 { return fShowPopUpMarker
; }
59 virtual BSize
MinSize();
60 virtual BSize
MaxSize();
63 _BMCMenuBar_
&operator=(const _BMCMenuBar_
&);
67 BMenuField
* fMenuField
;
69 bool fShowPopUpMarker
;
74 #endif // _BMC_PRIVATE_H