Draggable Button (specialization of button)
More...
#include <ofxOuiDraggableButton.hpp>
|
| DraggableButton (int x_=0, int y_=0, int width_=0, int height_=0) |
| Constructor. More...
|
|
virtual | ~DraggableButton () |
| Destructor. More...
|
|
template<typename T , typename args , class ListenerClass > |
void | onDrop (T *owner, void(ListenerClass::*listenerMethod)(args)) |
| Set callback function for drag and drop events. More...
|
|
virtual void | setReferencePosition () |
| Sets the reference position of the button. More...
|
|
template<typename T , typename args , class ListenerClass > |
void | onClick (T *owner, void(ListenerClass::*listenerMethod)(args)) |
| Set callback function for click events. 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...
|
|
Draggable Button (specialization of button)
§ DraggableButton()
ofxOui::DraggableButton::DraggableButton |
( |
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 |
§ ~DraggableButton()
ofxOui::DraggableButton::~DraggableButton |
( |
| ) |
|
|
virtual |
§ draw()
void ofxOui::Component::draw |
( |
| ) |
|
|
virtualinherited |
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.
§ 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::DraggableButton::mouseDragged |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mousePressed()
void ofxOui::DraggableButton::mousePressed |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mouseReleased()
void ofxOui::DraggableButton::mouseReleased |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ onClick()
template<typename T , typename args , class ListenerClass >
void ofxOui::Button::onClick |
( |
T * |
owner, |
|
|
void(ListenerClass::*)(args) |
listenerMethod |
|
) |
| |
|
inlineinherited |
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 |
§ onDrop()
template<typename T , typename args , class ListenerClass >
void ofxOui::DraggableButton::onDrop |
( |
T * |
owner, |
|
|
void(ListenerClass::*)(args) |
listenerMethod |
|
) |
| |
|
inline |
Set callback function for drag and drop 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 |
§ setReferencePosition()
void ofxOui::DraggableButton::setReferencePosition |
( |
| ) |
|
|
virtual |
Sets the reference position of the button.
§ type()
Type ofxOui::Component::type |
( |
| ) |
const |
|
inlineinherited |
get the type of the component
- Returns
- type of the component
§ update()
void ofxOui::Button::update |
( |
| ) |
|
|
virtualinherited |
§ active
bool ofxOui::Component::active = false |
|
inherited |
specifies if the component is active
§ blocking_component
§ click_event_callback_
§ 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)
§ dragging_
bool ofxOui::DraggableButton::dragging_ |
|
protected |
§ drop_event_callback_
§ font
textbox for the main label of the component
§ 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)
§ mouse_offset_
ofPoint ofxOui::DraggableButton::mouse_offset_ |
|
protected |
§ mouse_pressed_inside_
bool ofxOui::DraggableButton::mouse_pressed_inside_ |
|
protected |
§ num_frames_on_
int ofxOui::Button::num_frames_on_ |
|
protectedinherited |
§ reference_position_
ofPoint ofxOui::DraggableButton::reference_position_ |
|
protected |
§ shape
§ style
§ toggle
bool ofxOui::Button::toggle |
|
inherited |
specifies if the button works as button or toggle
§ 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: