Popup

Popup window for combo boxes, popup buttons, nested dialogs etc.

Usually the Popup instance is constructed by another widget (e.g. PopupButton) and does not need to be created by hand.

Constructors

this
this(Widget parent, Window parentWindow)

Create a new popup parented to a screen (first argument) and a parent window

Members

Enums

Side
enum Side
Undocumented in source.

Functions

anchorHeight
void anchorHeight(int anchorHeight)

Set the anchor height; this determines the vertical shift relative to the anchor position

anchorHeight
int anchorHeight()

Return the anchor height; this determines the vertical shift relative to the anchor position

anchorPos
void anchorPos(Vector2i anchorPos)

Return the anchor position in the parent window; the placement of the popup is relative to it

anchorPos
Vector2i anchorPos()

Set the anchor position in the parent window; the placement of the popup is relative to it

draw
void draw(NVGContext nvg)

Draw the popup window

parentWindow
Window parentWindow()

Return the parent window of the popup

parentWindow
parentWindow()

Return the parent window of the popup

performLayout
void performLayout(NVGContext nvg)

Invoke the associated layout generator to properly place child widgets, if any

refreshRelativePlacement
void refreshRelativePlacement()

Internal helper function to maintain nested window position values

setSide
void setSide(Side popupSide)

Set the side of the parent window at which popup will appear

side
Side side()

Return the side of the parent window at which popup will appear

Variables

mAnchorHeight
int mAnchorHeight;
Undocumented in source.
mAnchorPos
Vector2i mAnchorPos;
Undocumented in source.
mParentWindow
Window mParentWindow;
Undocumented in source.
mSide
Side mSide;
Undocumented in source.

Inherited Members

From Window

title
string title()

Return the window title

title
void title(string title)

Set the window title

modal
bool modal()

Is this a model dialog?

modal
void modal(bool modal)

Set whether or not this is a modal dialog

buttonPanel
Widget buttonPanel()

Return the panel used to house window buttons

dispose
void dispose()

Dispose the window

center
void center()

Center the window in the current Screen

draw
void draw(NVGContext nvg)

Draw the window

mouseDragEvent
bool mouseDragEvent(Vector2i p, Vector2i rel, MouseButton button, int modifiers)

Handle window drag events

mouseButtonEvent
bool mouseButtonEvent(Vector2i p, MouseButton button, bool down, int modifiers)

Handle mouse events recursively and bring the current window to the top

scrollEvent
bool scrollEvent(Vector2i p, Vector2f rel)

Accept scroll events and propagate them to the widget under the mouse cursor

preferredSize
Vector2i preferredSize(NVGContext nvg)

Compute the preferred size of the widget

performLayout
void performLayout(NVGContext nvg)

Invoke the associated layout generator to properly place child widgets, if any

refreshRelativePlacement
void refreshRelativePlacement()

Internal helper function to maintain nested window position values; overridden in \ref Popup

mTitle
string mTitle;
Undocumented in source.
mButtonPanel
Widget mButtonPanel;
Undocumented in source.
mModal
bool mModal;
Undocumented in source.
mDrag
bool mDrag;
Undocumented in source.

Meta