Base UI Component (equivalent to a label) More...
#include <ofxOuiComponent.hpp>
Public Member Functions | |
Component (float x_=0, float y_=0, float width_=0, float height_=0) | |
Constructor. More... | |
virtual | ~Component () |
Destructor. More... | |
virtual void | update () |
OF-like update function. More... | |
virtual void | draw () |
OF-like draw function. More... | |
virtual bool | inside (float x_, float y_) const |
checks if a point is inside the component (depending on the shape) More... | |
Type | type () const |
get the type of the component More... | |
Public Attributes | |
Shape | shape = ofxOui::Shape::Rectangle |
shape of the component More... | |
Style | style = ofxOui::Style::Default |
style of the component More... | |
TextBox | font |
textbox for the main label of the component More... | |
Icon | icon |
icon box of the component More... | |
float | x |
x position (left) More... | |
float | y |
y position(top) More... | |
float | width |
component width More... | |
float | height |
component height More... | |
string | labelOn = "" |
Label of the component (active) More... | |
string | labelOff = "" |
Label of the component (not active) More... | |
bool | disabled = false |
specifies if the component should be in "disabled" mode (no interaction) More... | |
bool | active = false |
specifies if the component is active More... | |
Protected Member Functions | |
virtual void | drawBackground () |
virtual void | drawFrame () |
virtual void | drawLabel () |
virtual void | drawIcon () |
Protected Attributes | |
Type | type_ = ofxOui::Type::Label |
bool | hover_ = false |
ofColor | current_background_color_ |
ofColor | current_frame_color_ |
Static Protected Attributes | |
static Component * | blocking_component = nullptr |
Friends | |
class | Group |
Base UI Component (equivalent to a label)
ofxOui::Component::Component | ( | float | x_ = 0 , |
float | y_ = 0 , |
||
float | width_ = 0 , |
||
float | height_ = 0 |
||
) |
Constructor.
x_ | x position (left) |
y_ | y position (top) |
width_ | component width |
height_ | component height |
|
virtual |
Destructor.
|
virtual |
OF-like draw function.
this method is subdivided in protected sub-methods that can be overloaded in inherited components
Reimplemented in ofxOui::Matrix, and ofxOui::DropDown.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in ofxOui::CheckBox.
|
protectedvirtual |
Reimplemented in ofxOui::Waveform, ofxOui::Bpf, ofxOui::MultiSlider, ofxOui::Numbox, ofxOui::TextInput, and ofxOui::Slider.
|
virtual |
checks if a point is inside the component (depending on the shape)
|
inline |
get the type of the component
|
virtual |
OF-like update function.
Reimplemented in ofxOui::Waveform, ofxOui::Bpf, ofxOui::MultiSlider, ofxOui::Matrix, ofxOui::Button, ofxOui::DropDown, ofxOui::Numbox, and ofxOui::Slider.
|
friend |
bool ofxOui::Component::active = false |
specifies if the component is active
|
staticprotected |
|
protected |
|
protected |
bool ofxOui::Component::disabled = false |
specifies if the component should be in "disabled" mode (no interaction)
TextBox ofxOui::Component::font |
textbox for the main label of the component
float ofxOui::Component::height |
component height
|
protected |
Icon ofxOui::Component::icon |
icon box of the component
string ofxOui::Component::labelOff = "" |
Label of the component (not active)
string ofxOui::Component::labelOn = "" |
Label of the component (active)
Shape ofxOui::Component::shape = ofxOui::Shape::Rectangle |
shape of the component
Style ofxOui::Component::style = ofxOui::Style::Default |
style of the component
|
protected |
float ofxOui::Component::width |
component width
float ofxOui::Component::x |
x position (left)
float ofxOui::Component::y |
y position(top)