Make UEFI boot-platform build again
[haiku.git] / headers / os / interface / PopUpMenu.h
blob2ecf6ddb5271b9a26bf9ed2a9c54851c2290231a
1 /*
2 * Copyright 2007-2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _POP_UP_MENU_H
6 #define _POP_UP_MENU_H
9 #include <Menu.h>
12 class BPopUpMenu : public BMenu {
13 public:
14 BPopUpMenu(const char* name,
15 bool radioMode = true,
16 bool labelFromMarked = true,
17 menu_layout layout = B_ITEMS_IN_COLUMN);
18 BPopUpMenu(BMessage* data);
19 virtual ~BPopUpMenu();
21 virtual status_t Archive(BMessage* archive,
22 bool deep = true) const;
23 static BArchivable* Instantiate(BMessage* archive);
25 BMenuItem* Go(BPoint where, bool autoInvoke = false,
26 bool keepOpen = false, bool async = false);
27 BMenuItem* Go(BPoint where, bool autoInvoke,
28 bool keepOpen, BRect openRect,
29 bool async = false);
31 virtual void MessageReceived(BMessage* message);
32 virtual void MouseDown(BPoint where);
33 virtual void MouseUp(BPoint where);
34 virtual void MouseMoved(BPoint where, uint32 transit,
35 const BMessage* dragMessage);
36 virtual void AttachedToWindow();
37 virtual void DetachedFromWindow();
38 virtual void FrameMoved(BPoint newPosition);
39 virtual void FrameResized(float newWidth, float newHeight);
41 virtual BHandler* ResolveSpecifier(BMessage* message,
42 int32 index, BMessage* specifier,
43 int32 form, const char* property);
44 virtual status_t GetSupportedSuites(BMessage* data);
46 virtual status_t Perform(perform_code code, void* _data);
48 virtual void ResizeToPreferred();
49 virtual void GetPreferredSize(float* _width,
50 float* _height);
51 virtual void MakeFocus(bool state = true);
52 virtual void AllAttached();
53 virtual void AllDetached();
55 void SetAsyncAutoDestruct(bool on);
56 bool AsyncAutoDestruct() const;
58 protected:
59 virtual BPoint ScreenLocation();
61 virtual void _ReservedPopUpMenu1();
62 virtual void _ReservedPopUpMenu2();
63 virtual void _ReservedPopUpMenu3();
65 BPopUpMenu& operator=(const BPopUpMenu& other);
67 private:
68 BMenuItem* _Go(BPoint where, bool autoInvoke,
69 bool startOpened, BRect* _specialRect,
70 bool async);
71 BMenuItem* _StartTrack(BPoint where, bool autoInvoke,
72 bool startOpened, BRect* _specialRect);
73 BMenuItem* _WaitMenu(void* _data);
75 static int32 _thread_entry(void* menuData);
77 private:
78 BPoint fWhere;
79 bool fUseWhere;
80 bool fAutoDestruct;
82 bool _fUnusedBool1;
83 bool _fUnusedBool2;
85 thread_id fTrackThread;
87 uint32 _reserved[3];
90 #endif // _POP_UP_MENU_H