phoenix::Layout

The abstract base class for all layout container types.

This is designed in such a way that users of the phoenix library are capable of programming their own layout containers. phoenix also comes with a few containers of its own. This class cannot be used directly.

struct Layout : Sizable {
  virtual void append(Sizable &sizable) = 0;
  virtual void remove(Sizable &sizable) = 0;
  virtual void synchronize() = 0;
};

void Layout::append(Sizable &sizable);

Append a new Layout or Widget to the internal Layout container list.

This is an internal function that is used simply to keep track of all attached children, and reparent child widgets to the root window as needed. Each layout should have its own customized append() function that takes placement information.

void Layout::remove(Sizable &sizable);

Remove the specified Layout or Widget from this Layout container. This function can be called from anywhere, as no geometry / placement information is necessary to remove an item from a Layout.

void Layout::synchronize();

This is an internal function that is used to update the geometry placement of all attached child Layouts and Widgets.