Files
haiku-beta6/headers/os/interface/PopUpMenu.h
T

91 lines
2.5 KiB
C++
Raw Normal View History

/*
2009-08-26 18:46:08 +00:00
* Copyright 2007-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
2002-10-23 13:54:44 +00:00
#ifndef _POP_UP_MENU_H
#define _POP_UP_MENU_H
2008-07-14 17:30:59 +00:00
2002-10-23 13:54:44 +00:00
#include <Menu.h>
2008-07-14 17:30:59 +00:00
class BPopUpMenu : public BMenu {
2008-07-14 17:30:59 +00:00
public:
BPopUpMenu(const char* name,
2009-08-26 18:46:08 +00:00
bool radioMode = true,
bool labelFromMarked = true,
2009-08-26 18:46:08 +00:00
menu_layout layout = B_ITEMS_IN_COLUMN);
BPopUpMenu(BMessage* data);
virtual ~BPopUpMenu();
virtual status_t Archive(BMessage* archive,
bool deep = true) const;
static BArchivable* Instantiate(BMessage* archive);
BMenuItem* Go(BPoint where, bool autoInvoke = false,
bool keepOpen = false, bool async = false);
BMenuItem* Go(BPoint where, bool autoInvoke,
bool keepOpen, BRect openRect,
bool async = false);
virtual void MessageReceived(BMessage* message);
virtual void MouseDown(BPoint where);
virtual void MouseUp(BPoint where);
virtual void MouseMoved(BPoint where, uint32 transit,
const BMessage* dragMessage);
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void FrameMoved(BPoint newPosition);
virtual void FrameResized(float newWidth, float newHeight);
virtual BHandler* ResolveSpecifier(BMessage* message,
int32 index, BMessage* specifier,
int32 form, const char* property);
virtual status_t GetSupportedSuites(BMessage* data);
2013-05-01 22:18:56 -04:00
virtual status_t Perform(perform_code code, void* _data);
2009-08-26 18:46:08 +00:00
virtual void ResizeToPreferred();
virtual void GetPreferredSize(float* _width,
float* _height);
virtual void MakeFocus(bool state = true);
virtual void AllAttached();
virtual void AllDetached();
void SetAsyncAutoDestruct(bool on);
2009-08-26 18:46:08 +00:00
bool AsyncAutoDestruct() const;
2008-07-14 17:30:59 +00:00
protected:
2009-08-26 18:46:08 +00:00
virtual BPoint ScreenLocation();
2008-07-14 17:30:59 +00:00
2009-08-26 18:46:08 +00:00
virtual void _ReservedPopUpMenu1();
virtual void _ReservedPopUpMenu2();
virtual void _ReservedPopUpMenu3();
2008-07-14 17:30:59 +00:00
2009-08-26 18:46:08 +00:00
BPopUpMenu& operator=(const BPopUpMenu& other);
2008-07-14 17:30:59 +00:00
private:
2009-08-26 18:46:08 +00:00
BMenuItem* _Go(BPoint where, bool autoInvoke,
2013-05-01 22:18:56 -04:00
bool startOpened, BRect* _specialRect,
2009-08-26 18:46:08 +00:00
bool async);
BMenuItem* _StartTrack(BPoint where, bool autoInvoke,
2013-05-01 22:18:56 -04:00
bool startOpened, BRect* _specialRect);
BMenuItem* _WaitMenu(void* _data);
2009-08-26 18:46:08 +00:00
2013-05-01 22:18:56 -04:00
static int32 _thread_entry(void* menuData);
2009-08-26 18:46:08 +00:00
private:
BPoint fWhere;
bool fUseWhere;
bool fAutoDestruct;
bool _fUnusedBool1;
bool _fUnusedBool2;
thread_id fTrackThread;
uint32 _reserved[3];
2002-10-23 13:54:44 +00:00
};
2009-08-26 18:46:08 +00:00
#endif // _POP_UP_MENU_H