PopupButton

Button which launches a popup widget.

Remark: This class overrides nanogui.Widget.mIconExtraScale to be 0.8f`, which affects all subclasses of this Widget. Subclasses must explicitly set a different value if needed (e.g., in their constructor).

Constructors

this
this(Widget parent, string caption, int buttonIcon)
Undocumented in source.

Members

Functions

chevronIcon
void chevronIcon(int icon)
Undocumented in source. Be warned that the author may not have intended to support it.
chevronIcon
dchar chevronIcon()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(NanoContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
performLayout
void performLayout(NanoContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
popup
Popup popup()
Undocumented in source. Be warned that the author may not have intended to support it.
popup
auto popup()
Undocumented in source. Be warned that the author may not have intended to support it.
preferredSize
Vector2i preferredSize(NanoContext ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
side
void side(Popup.Side popupSide)
Undocumented in source.
side
Popup.Side side()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

mChevronIcon
dchar mChevronIcon;
Undocumented in source.
mPopup
Popup mPopup;
Undocumented in source.

Inherited Members

From Button

Flags
enum Flags

Flags to specify the button behavior (can be combined with binary OR)

IconPosition
enum IconPosition

The available icon positions.

caption
string caption()

Returns the caption of this Button.

caption
void caption(string caption)

Sets the caption of this Button.

backgroundColor
Color backgroundColor()

Returns the background color of this Button.

backgroundColor
void backgroundColor(Color backgroundColor)

Sets the background color of this Button.

textColor
Color textColor()

Returns the text color of the caption of this Button.

textColor
void textColor(Color textColor)

Sets the text color of the caption of this Button.

icon
dchar icon()

Returns the icon of this Button. See nanogui.Button.mIcon.

icon
void icon(int icon)

Sets the icon of this Button. See nanogui.Button.mIcon.

flags
int flags()

The current flags of this Button (see nanogui.Button.Flags for options).

flags
void flags(int buttonFlags)

Sets the flags of this Button (see nanogui.Button.Flags for options).

iconPosition
IconPosition iconPosition()

The position of the icon for this Button.

iconPosition
void iconPosition(IconPosition iconPosition)

Sets the position of the icon for this Button.

pushed
bool pushed()

Whether or not this Button is currently pushed.

pushed
void pushed(bool pushed)

Sets whether or not this Button is currently pushed.

callback
void delegate() callback()

The current callback to execute (for any type of button).

callback
void callback(void delegate() callback)

Set the push callback (for any type of button).

changeCallback
void delegate(bool) changeCallback()

The current callback to execute (for toggle buttons).

changeCallback
void changeCallback(void delegate(bool) callback)

Set the change callback (for toggle buttons).

buttonGroup
void buttonGroup(ButtonGroup buttonGroup)

Set the button group (for radio buttons).

buttonGroup
buttonGroup()

The current button group (for radio buttons).

preferredSize
Vector2i preferredSize(NanoContext ctx)

The preferred size of this Button.

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

The callback that is called when any type of mouse button event is issued to this Button.

draw
void draw(NanoContext ctx)

Responsible for drawing the Button.

mCaption
string mCaption;

The caption of this Button.

mIcon
dchar mIcon;

The icon to display with this Button (0 means icon is represented by mImage).

mImage
NVGImage mImage;

The icon to display with this Button (it's used if mIcon is 0 and mImage.valid returns true).

mIconPosition
IconPosition mIconPosition;

The position to draw the icon at.

mPushed
bool mPushed;

Whether or not this Button is currently pushed.

mFlags
int mFlags;

The current flags of this button (see nanogui.Button.Flags for options).

mBackgroundColor
Color mBackgroundColor;

The background color of this Button.

mTextColor
Color mTextColor;

The color of the caption text of this Button.

mCallback
void delegate() mCallback;

The callback issued for all types of buttons.

mChangeCallback
void delegate(bool) mChangeCallback;

The callback issued for toggle buttons.

mButtonGroup
ButtonGroup mButtonGroup;

The button group for radio buttons.

Meta