MQPopup class

(new in Rev4.30)

MQPopup class manages a popup that contains menus and so on. It inherits MQWidgetBase - MQWindowBase class.

Please refer the inherited class about member functions declared in the inherited class.

Class
MQPopup Constructor
~MQPopup Destructor
Member functions
CreateMenuItem Create a menu item
CreateSubMenuItem Create a child menu item
GetPreferredSidePosition Get a side position for a widget
ShowPopup Show a popup
GetShadow Get a shadow
SetShadow Set a shadow
GetOverlay Get an overlay
SetOverlay Get an overlay

MQPopup::MQPopup();

MQPopup::MQPopup(int id);

MQPopup::MQPopup(MQPopupBase& parent);

id
A widget ID created outside the plug-in
parent
A parent window

It is a constructor.


virtual MQPopup::~MQPopup();

This method is a destructor. It is defined as a virtual function.


MQMenuItem *MQPopup::CreateMenuItem(const std::wstring& text);

text
A displayed text
Return value
A menu

It creates a menu displayed in the popup.


MQMenuItem *MQPopup::CreateSubMenuItem(MQMenuItem *parent, const std::wstring& text)

parent
A parent menu
text
A displayed text
Return value
A child menu

It create a child menu under the parent.


void MQPopup::GetPreferredSidePosition(int& x, int& y, int& w, int& h, MQWidgetBase *widget, bool horz);

x
X coordinate in the screen
y
Y coordinate in the screen
w
A width
h
A height
widget
A widget
horz
Position
[false] Up or down
[true] Left or right

It returns a preffered position for displaying beside the specified widget.


void MQPopup::ShowPopup(int screen_x, int screen_y);

screen_x
X coordinate in the screen
screen_y
Y coordinate in the screen

It shows a popup at the specified position.

A popup displaying is performed as a modal procedure, and the procedure returns when a popup is closed.


bool MQPopup::GetShadow();

Return value
A shadow displaying

It returns whether a shadow is displayed or not behide the popup.


void MQPopup::SetShadow(bool value);

value
A shadow displaying

It specifies whether a shadow is displayed or not behide the popup.


bool MQPopup::GetOverlay();

Return value
An overlay displaying

It returns whether a popup is overlaid or not.


void MQPopup::SetOverlay(bool value);

value
An overlay displaying

It specifies whether a popup is overlaid or not.