company logo

ControlContext :: layout - Layout property

The layout property defines the layout currently activated for a GUI element (control, region, column, line or cell). The control layout for an element merges layout elements in a hierarchy in order to obtain the layout set for the element, i.e. a cell layout might result from a column and control layout, from which it inherits.

Return value:  Font definition ( odabagui::Layout  )

Font definition includes all font properties including size and color.

Implementation overview

Implementation details

  1. Get curren layout settings
    odabagui::Layout ControlContext  :: layout (  )

    The function returns the current layout settings for the control.

    ... MyControlContext::fragment {

      Layout   cLayout(layout());

      ...

      cLayout.color(Color(220,220,220)); // change background collor

      layout(cLayout);                   // applay updated layout

      ...

    }

  2. to list
  3. Change layout for control
    odabagui::Layout ControlContext  :: layout ( odabagui::Layout &cLayout )

    The layout passed to the property will be activated. Only layout properties defined in the passed layout will be updated. Empty layout properties remain unchanged.

    • cLayout - Constant layout reference

      The layout object contains layout information for controls and data items.

  4. to list