Class Popup¶
Defined in File popup.h
Page Contents
Inheritance Relationships¶
Base Type¶
public nanogui::Window
(Class Window)
Class Documentation¶
-
class
Popup
: public nanogui::Window¶ 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.
Public Functions
-
Popup
(Widget *parent, Window *parentWindow)¶ Create a new popup parented to a screen (first argument) and a parent window.
-
void
setAnchorPos
(const Vector2i &anchorPos)¶ Return the anchor position in the parent window; the placement of the popup is relative to it.
-
const Vector2i &
anchorPos
() const¶ Set the anchor position in the parent window; the placement of the popup is relative to it.
-
void
setAnchorHeight
(int anchorHeight)¶ Set the anchor height; this determines the vertical shift relative to the anchor position.
-
int
anchorHeight
() const¶ Return the anchor height; this determines the vertical shift relative to the anchor position.
-
virtual void
performLayout
(NVGcontext *ctx)¶ Invoke the associated layout generator to properly place child widgets, if any.
-
virtual void
draw
(NVGcontext *ctx)¶ Draw the popup window.
-
virtual void
save
(Serializer &s) const¶ Save the state of the widget into the given Serializer instance.
-
virtual bool
load
(Serializer &s)¶ Restore the state of the widget from the given Serializer instance.
Protected Functions
-
virtual void
refreshRelativePlacement
()¶ Internal helper function to maintain nested window position values.
-