Button Matrix (supports both button -single-button activation- and toggle -multi-button activation-)
More...
#include <ofxOuiMatrix.hpp>
|
template<typename T , typename args , class ListenerClass > |
void | onClick (T *owner, void(ListenerClass::*listenerMethod)(args)) |
| Set callback function for click events. More...
|
|
| Matrix (int x_=0, int y_=0, int width_=0, int height_=0) |
| Constructor. More...
|
|
virtual | ~Matrix () |
| Destructor. More...
|
|
virtual void | setup () |
| Setup the Matrix layout. 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...
|
|
Button Matrix (supports both button -single-button activation- and toggle -multi-button activation-)
§ Matrix()
ofxOui::Matrix::Matrix |
( |
int |
x_ = 0 , |
|
|
int |
y_ = 0 , |
|
|
int |
width_ = 0 , |
|
|
int |
height_ = 0 |
|
) |
| |
Constructor.
- Parameters
-
x_ | x position (left) |
y_ | y position (top) |
width_ | component width |
height_ | component height |
§ ~Matrix()
ofxOui::Matrix::~Matrix |
( |
| ) |
|
|
virtual |
§ draw()
void ofxOui::Matrix::draw |
( |
| ) |
|
|
virtual |
§ drawBackground()
void ofxOui::Component::drawBackground |
( |
| ) |
|
|
protectedvirtualinherited |
§ drawFrame()
void ofxOui::Component::drawFrame |
( |
| ) |
|
|
protectedvirtualinherited |
§ drawIcon()
void ofxOui::Component::drawIcon |
( |
| ) |
|
|
protectedvirtualinherited |
§ drawLabel()
void ofxOui::Component::drawLabel |
( |
| ) |
|
|
protectedvirtualinherited |
§ inside()
bool ofxOui::Component::inside |
( |
float |
x_, |
|
|
float |
y_ |
|
) |
| const |
|
virtualinherited |
checks if a point is inside the component (depending on the shape)
- Returns
- true if the point of coordinates (x, y) is inside the component
§ mouseDragged()
void ofxOui::Matrix::mouseDragged |
( |
ofMouseEventArgs & |
e | ) |
|
|
protected |
§ onButtonClick()
§ onClick()
template<typename T , typename args , class ListenerClass >
void ofxOui::Matrix::onClick |
( |
T * |
owner, |
|
|
void(ListenerClass::*)(args) |
listenerMethod |
|
) |
| |
|
inline |
Set callback function for click events.
- Parameters
-
owner | pointer to the owner object |
listenerMethod | method to be called on eaech event |
- Template Parameters
-
T | type of the owner object |
args | arguments of the callback function |
ListenerClass | class to which the listener method belongs |
§ setup()
void ofxOui::Matrix::setup |
( |
| ) |
|
|
virtual |
§ type()
Type ofxOui::Component::type |
( |
| ) |
const |
|
inlineinherited |
get the type of the component
- Returns
- type of the component
§ update()
void ofxOui::Matrix::update |
( |
| ) |
|
|
virtual |
§ active
bool ofxOui::Component::active = false |
|
inherited |
specifies if the component is active
§ blocking_component
§ button_height_
float ofxOui::Matrix::button_height_ |
|
protected |
§ button_shape
Shape ofxOui::Matrix::button_shape |
shape of individual buttons
§ button_width_
float ofxOui::Matrix::button_width_ |
|
protected |
§ buttons
vector<vector<Button> > ofxOui::Matrix::buttons |
§ click_event_callback_
§ cols
§ current_background_color_
ofColor ofxOui::Component::current_background_color_ |
|
protectedinherited |
§ current_frame_color_
ofColor ofxOui::Component::current_frame_color_ |
|
protectedinherited |
§ disabled
bool ofxOui::Component::disabled = false |
|
inherited |
specifies if the component should be in "disabled" mode (no interaction)
§ draw_grid
bool ofxOui::Matrix::draw_grid |
specifies if the grid between buttons should be drawn
§ font
textbox for the main label of the component
§ grid_rect_
ofRectangle ofxOui::Matrix::grid_rect_ |
|
protected |
§ height
float ofxOui::Component::height |
|
inherited |
§ hover_
bool ofxOui::Component::hover_ = false |
|
protectedinherited |
§ icon
Icon ofxOui::Component::icon |
|
inherited |
icon box of the component
§ labelOff
string ofxOui::Component::labelOff = "" |
|
inherited |
Label of the component (not active)
§ labelOn
string ofxOui::Component::labelOn = "" |
|
inherited |
Label of the component (active)
§ padding
float ofxOui::Matrix::padding |
padding between matrix buttons
§ rows
§ selected_button_
Button const* ofxOui::Matrix::selected_button_ |
|
protected |
§ shape
§ style
§ toggle
bool ofxOui::Matrix::toggle |
specifies if the matrix works in toggle with several buttons that can be activated at the same time or if a single button can be activated at a time
§ type_
§ width
float ofxOui::Component::width |
|
inherited |
float ofxOui::Component::x |
|
inherited |
float ofxOui::Component::y |
|
inherited |
The documentation for this class was generated from the following files: