20 #ifndef ofxOuiGroup_hpp 21 #define ofxOuiGroup_hpp 40 Group(
int x_ = 0,
int y_ = 0,
int width_ = 100,
int height_ = 100);
62 virtual bool inside(
int x_,
int y_);
86 bool addComponent(shared_ptr<Component> component,
int row,
int col,
87 int rowSpan = 1,
int colSpan = 1);
vector< shared_ptr< Component > > getComponents()
get a vector of pointers to the components of the group
Definition: ofxOuiGroup.cpp:198
int rows() const
get the number of rows in the group
Definition: ofxOuiGroup.cpp:149
bool removeComponent(shared_ptr< Component > component)
remove a given component from the group by pointer
Group(int x_=0, int y_=0, int width_=100, int height_=100)
Constructor.
Definition: ofxOuiGroup.cpp:22
void clear()
clear the UI group (deletes all components)
Definition: ofxOuiGroup.cpp:231
int max_component_height
maximum height of each component
Definition: ofxOuiGroup.hpp:168
int frame_width
width of the group frame
Definition: ofxOuiGroup.hpp:188
virtual void update()
OF-like update function.
Definition: ofxOuiGroup.cpp:104
shared_ptr< Component > getComponent(int row, int col)
get the pointer to a component by grid position
Definition: ofxOuiGroup.cpp:180
float y
y position(top)
Definition: ofxOuiGroup.hpp:148
void enable()
disable all components
Definition: ofxOuiGroup.cpp:242
shared_ptr< Component > getComponentByLabel(string label)
get the pointer to a component by label (inactive label)
Definition: ofxOuiGroup.cpp:189
~Group()
Destructor.
Definition: ofxOuiGroup.cpp:34
Definition: ofxOuiColormap.hpp:25
int cols() const
get the number of columns in the group
Definition: ofxOuiGroup.cpp:157
float x
x position (left)
Definition: ofxOuiGroup.hpp:143
Group of UI components.
Definition: ofxOuiGroup.hpp:31
ofColor frameColor
frame color of the group
Definition: ofxOuiGroup.hpp:183
virtual bool inside(int x_, int y_)
checks if the point (x, y) is inside the UI group
Definition: ofxOuiGroup.cpp:145
map< vector< int >, shared_ptr< Component > > components
Definition: ofxOuiGroup.hpp:196
int padding
padding between the components
Definition: ofxOuiGroup.hpp:173
Anchor
Generic Anchor specifier for Text/Image alignment.
Definition: ofxOuiCommon.hpp:57
bool addComponent(shared_ptr< Component > component, int row, int col, int rowSpan=1, int colSpan=1)
add a component to the group
Definition: ofxOuiGroup.cpp:165
float height
group height
Definition: ofxOuiGroup.hpp:158
void disable()
disable all components
Definition: ofxOuiGroup.cpp:236
float width
group width
Definition: ofxOuiGroup.hpp:153
ofColor backgroundColor
background color of the group
Definition: ofxOuiGroup.hpp:178
virtual void setup()
Definition: ofxOuiGroup.cpp:36
virtual void draw()
OF-like draw function.
Definition: ofxOuiGroup.cpp:110
int max_component_width
maximum width of each component
Definition: ofxOuiGroup.hpp:163
ofxOui::Anchor alignment
width of the group frame
Definition: ofxOuiGroup.hpp:193