# dlangui.widgets.layouts

DLANGUI library.
This module contains common layouts implementations.
Layouts are similar to the same in Android.
LinearLayout - either VerticalLayout or HorizontalLayout. VerticalLayout - just LinearLayout with orientation=Orientation.Vertical HorizontalLayout - just LinearLayout with orientation=Orientation.Vertical FrameLayout - children occupy the same place, usually one one is visible at a time TableLayout - children aligned into rows and columns
Synopsis:

    import dlangui.widgets.layouts;

License:
Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com

struct LayoutItem;
  helper for layouts
  void set(Widget widget, Orientation orientation);
    sets item for widget
  void measure(int parentWidth, int parentHeight);
    set item and measure it
class LayoutItems;
  helper class for layouts
  Point measure(int parentWidth, int parentHeight);
    fill widget layout list with Visible or Invisible items, measure them
  void setWidgets(ref WidgetList widgets);
    fill widget layout list with Visible or Invisible items, measure them
class FrameLayout: dlangui.widgets.widget.WidgetGroup;
  place all children into same place (usually, only one child should be visible at a time)
  void measure(int parentWidth, int parentHeight);
    Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
  void layout(Rect rc);
    Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
  void onDraw(DrawBuf buf);
    Draw widget at its position to buffer
  bool showChild(string ID, Visibility otherChildrenVisibility = Visibility.Invisible, bool updateFocus = false);
    make one of children (with specified ID) visible, for the rest, set visibility to otherChildrenVisibility
class TableLayout: dlangui.widgets.widget.WidgetGroup;
  layout children as table with rows and columns
  @property int colCount();
    number of columns
  void measure(int parentWidth, int parentHeight);
    Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
  void layout(Rect rc);
    Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
  void onDraw(DrawBuf buf);
    Draw widget at its position to buffer

Page generated by Ddoc. Vadim Lopatin, 2014