xref: /haiku/headers/private/interface/BMCPrivate.h (revision 80d75f15dfa48ebea421c6b2c19a5296cc63d7eb)
1 /*
2  * Copyright 2001-2006, Haiku, Inc.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Marc Flerackers (mflerackers@androme.be)
7  *		Stephan Aßmus <superstippi@gmx.de>
8  */
9 
10 
11 #ifndef _BMC_PRIVATE_H
12 #define _BMC_PRIVATE_H
13 
14 #include <BeBuild.h>
15 #include <MenuBar.h>
16 #include <MenuItem.h>
17 #include <MessageFilter.h>
18 
19 class _BMCFilter_ : public BMessageFilter {
20 public:
21 	_BMCFilter_(BMenuField *menuField, uint32 what);
22 	~_BMCFilter_();
23 	filter_result Filter(BMessage *message, BHandler **handler);
24 
25 private:
26 	_BMCFilter_ &operator=(const _BMCFilter_ &);
27 	BMenuField *fMenuField;
28 };
29 
30 
31 //------------------------------------------------------------------------------
32 class _BMCMenuBar_ : public BMenuBar {
33 
34 public:
35 					_BMCMenuBar_(BRect frame, bool fixed_size,
36 						BMenuField *menuField);
37 					_BMCMenuBar_(BMessage *data);
38 virtual				~_BMCMenuBar_();
39 
40 static	BArchivable	*Instantiate(BMessage *data);
41 
42 virtual	void		AttachedToWindow();
43 virtual	void		Draw(BRect updateRect);
44 virtual	void		FrameResized(float width, float height);
45 virtual	void		MessageReceived(BMessage* msg);
46 virtual	void		MakeFocus(bool focused = true);
47 
48 		void		TogglePopUpMarker(bool show) { fShowPopUpMarker = show; }
49 		bool		IsPopUpMarkerShown() const { return fShowPopUpMarker; }
50 
51 virtual	BSize		MaxSize();
52 
53 private:
54 		_BMCMenuBar_&operator=(const _BMCMenuBar_ &);
55 
56 		BMenuField	*fMenuField;
57 		bool		fFixedSize;
58 		BMessageRunner	*fRunner;
59 		bool		fShowPopUpMarker;
60 };
61 //------------------------------------------------------------------------------
62 
63 #endif // _BMC_PRIVATE_H
64