xref: /haiku/src/kits/tracker/MiniMenuField.h (revision 40ef04f38edd3b7aff125635be25aa9e1ba288d3)
102be5353SAxel Dörfler /*
202be5353SAxel Dörfler Open Tracker License
302be5353SAxel Dörfler 
402be5353SAxel Dörfler Terms and Conditions
502be5353SAxel Dörfler 
602be5353SAxel Dörfler Copyright (c) 1991-2000, Be Incorporated. All rights reserved.
702be5353SAxel Dörfler 
802be5353SAxel Dörfler Permission is hereby granted, free of charge, to any person obtaining a copy of
902be5353SAxel Dörfler this software and associated documentation files (the "Software"), to deal in
1002be5353SAxel Dörfler the Software without restriction, including without limitation the rights to
1102be5353SAxel Dörfler use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
1202be5353SAxel Dörfler of the Software, and to permit persons to whom the Software is furnished to do
1302be5353SAxel Dörfler so, subject to the following conditions:
1402be5353SAxel Dörfler 
1502be5353SAxel Dörfler The above copyright notice and this permission notice applies to all licensees
1602be5353SAxel Dörfler and shall be included in all copies or substantial portions of the Software.
1702be5353SAxel Dörfler 
1802be5353SAxel Dörfler THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1902be5353SAxel Dörfler IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
2002be5353SAxel Dörfler FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
2102be5353SAxel Dörfler BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
2202be5353SAxel Dörfler AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
2302be5353SAxel Dörfler WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2402be5353SAxel Dörfler 
2502be5353SAxel Dörfler Except as contained in this notice, the name of Be Incorporated shall not be
2602be5353SAxel Dörfler used in advertising or otherwise to promote the sale, use or other dealings in
2702be5353SAxel Dörfler this Software without prior written authorization from Be Incorporated.
2802be5353SAxel Dörfler 
2902be5353SAxel Dörfler Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
3002be5353SAxel Dörfler of Be Incorporated in the United States and other countries. Other brand product
3102be5353SAxel Dörfler names are registered trademarks or trademarks of their respective holders.
3202be5353SAxel Dörfler All rights reserved.
3302be5353SAxel Dörfler */
34*40ef04f3SJohn Scipione #ifndef _MINI_MENU_FIELD_H
35*40ef04f3SJohn Scipione #define _MINI_MENU_FIELD_H
3602be5353SAxel Dörfler 
37b05aa8b5SJohn Scipione 
3802be5353SAxel Dörfler #include <View.h>
3902be5353SAxel Dörfler 
40b05aa8b5SJohn Scipione 
4102be5353SAxel Dörfler class BPopUpMenu;
4202be5353SAxel Dörfler 
43*40ef04f3SJohn Scipione 
4402be5353SAxel Dörfler namespace BPrivate {
4502be5353SAxel Dörfler 
4602be5353SAxel Dörfler class MiniMenuField : public BView {
4702be5353SAxel Dörfler public:
4802be5353SAxel Dörfler 	MiniMenuField(BRect frame, const char* name, BPopUpMenu* menu,
4902be5353SAxel Dörfler 		uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP,
5002be5353SAxel Dörfler 		uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
5102be5353SAxel Dörfler 	// ToDo:
5202be5353SAxel Dörfler 	// use BMenu instead of BPopUpMenu here
5302be5353SAxel Dörfler 
5402be5353SAxel Dörfler 	virtual ~MiniMenuField();
5502be5353SAxel Dörfler 
5602be5353SAxel Dörfler protected:
5702be5353SAxel Dörfler 	virtual void AttachedToWindow();
5802be5353SAxel Dörfler 	virtual void Draw(BRect);
5902be5353SAxel Dörfler 	virtual void MouseDown(BPoint );
6002be5353SAxel Dörfler 	virtual	void MakeFocus(bool);
6102be5353SAxel Dörfler 	virtual	void KeyDown(const char*, int32);
6202be5353SAxel Dörfler 
6302be5353SAxel Dörfler private:
6402be5353SAxel Dörfler 	BPopUpMenu* fMenu;
6502be5353SAxel Dörfler };
6602be5353SAxel Dörfler 
6702be5353SAxel Dörfler } // namespace BPrivate
6802be5353SAxel Dörfler 
6902be5353SAxel Dörfler using namespace BPrivate;
7002be5353SAxel Dörfler 
71*40ef04f3SJohn Scipione 
72*40ef04f3SJohn Scipione #endif	// _MINI_MENU_FIELD_H
73