Class Layout

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class nanogui::Layout

Basic interface of a layout engine.

Inherits from nanogui::Object

Subclassed by nanogui::AdvancedGridLayout, nanogui::BoxLayout, nanogui::GridLayout, nanogui::GroupLayout

Public Functions

virtual void performLayout(NVGcontext *ctx, Widget *widget) const = 0

Performs any and all resizing applicable.

Parameters
  • ctx: The NanoVG context being used for drawing.
  • widget: The Widget this layout is controlling sizing for.

virtual Vector2i preferredSize(NVGcontext *ctx, const Widget *widget) const = 0

The preferred size for this layout.

Return
The preferred size, accounting for things such as spacing, padding for icons, etc.
Parameters
  • ctx: The NanoVG context being used for drawing.
  • widget: The Widget this layout’s preferred size is considering.

Protected Functions

virtual ~Layout()

Default destructor (exists for inheritance).