ofxDOM
A DOM Level 3 Events implementation for openFrameworks.
ofx::DOM::Layout Class Referenceabstract

A base class for laying out Elements. More...

#include <Layout.h>

Inheritance diagram for ofx::DOM::Layout:
ofx::DOM::BoxLayout

Public Member Functions

 Layout (Element *parent)
 Create a Layout with a given Element parent. More...
 
virtual ~Layout ()
 Destroy the layout.
 
Elementparent ()
 
bool isDoingLayout () const
 
std::vector< Element * > children ()
 Get all of the children for this element.
 
virtual void doLayout ()=0
 Do.
 

Protected Attributes

Element_parent = nullptr
 The owning Widget class.
 
bool _isDoingLayout = false
 True if in doLayout(). Used to prevent recusive calls.
 

Friends

class Element
 

Detailed Description

A base class for laying out Elements.

Generally this class and its subclasses should not be instantiated directly but instead should be created using Element::createLayout<LayoutType>(...). This pattern preserves the ownership of the Layout.

Constructor & Destructor Documentation

ofx::DOM::Layout::Layout ( Element parent)

Create a Layout with a given Element parent.

Parameters
parentThe parent Element.

Member Function Documentation

bool ofx::DOM::Layout::isDoingLayout ( ) const
Returns
true iff this layout is currently being done.
Element * ofx::DOM::Layout::parent ( )
Returns
a pointer to the parent Element or nullptr if none.

The documentation for this class was generated from the following files: