Breakpoint function component. More...
#include <ofxOuiWaveform.hpp>
Classes | |
class | EditEvent |
Event arguments when a frame is edited. More... | |
Public Types | |
enum | Layout { Layout::Superposed, Layout::Juxtaposed } |
Layout of the different channels. More... | |
enum | Appearance { Appearance::Lines, Appearance::FillBottom, Appearance::FillTop, Appearance::FillZero } |
Appearance of the Waveform display. More... | |
Public Member Functions | |
Waveform (int x_=0, int y_=0, int width_=0, int height_=0) | |
Constructor. More... | |
virtual | ~Waveform () |
Destructor. More... | |
template<typename T , typename args , class ListenerClass > | |
void | onEditPoint (T *owner, void(ListenerClass::*listenerMethod)(args)) |
Set callback function for editing events. More... | |
virtual void | update () |
OF-like update function. More... | |
void | clipBounds () |
Set the bounds to the min/max of the values. 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 | |
float * | values |
Vector of x/y values of the Waveform. More... | |
int | size |
Size of the data (number of frames) More... | |
int | dimension |
Dimension of the data (number of channels) More... | |
map< int, ofColor > | channels_colors |
Data channels to display and Associated colors. More... | |
shared_ptr< Graph > | graph |
2D Graph area More... | |
Appearance | appearance = Appearance::Lines |
Appearance of the Waveform display. More... | |
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 | drawLabel () |
virtual void | drawBackground () |
virtual void | drawFrame () |
virtual void | drawIcon () |
Protected Attributes | |
std::function< void(Waveform::EditEvent &)> | callback_ |
Type | type_ = ofxOui::Type::Label |
bool | hover_ = false |
ofColor | current_background_color_ |
ofColor | current_frame_color_ |
Static Protected Attributes | |
static Component * | blocking_component = nullptr |
Breakpoint function component.
Mouse Interaction modes: click + drag. Single clik can be used to edit existing values, double click can be used for either adding or removing nodes in the Waveform
|
strong |
|
strong |
ofxOui::Waveform::Waveform | ( | int | x_ = 0 , |
int | y_ = 0 , |
||
int | width_ = 0 , |
||
int | height_ = 0 |
||
) |
Constructor.
x_ | x position (left) |
y_ | y position (top) |
width_ | component width |
height_ | component height |
|
virtual |
Destructor.
void ofxOui::Waveform::clipBounds | ( | ) |
Set the bounds to the min/max of the values.
|
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.
|
protectedvirtualinherited |
|
protectedvirtualinherited |
|
protectedvirtualinherited |
Reimplemented in ofxOui::CheckBox.
|
protectedvirtual |
Reimplemented from ofxOui::Component.
|
virtualinherited |
checks if a point is inside the component (depending on the shape)
|
inline |
Set callback function for editing events.
owner | pointer to the owner object |
listenerMethod | method to be called on eaech event |
T | type of the owner object |
args | arguments of the callback function |
ListenerClass | class to which the listener method belongs |
|
inlineinherited |
get the type of the component
|
virtual |
OF-like update function.
Reimplemented from ofxOui::Component.
|
inherited |
specifies if the component is active
Appearance ofxOui::Waveform::appearance = Appearance::Lines |
Appearance of the Waveform display.
|
staticprotectedinherited |
|
protected |
map<int, ofColor> ofxOui::Waveform::channels_colors |
Data channels to display and Associated colors.
|
protectedinherited |
|
protectedinherited |
int ofxOui::Waveform::dimension |
Dimension of the data (number of channels)
|
inherited |
specifies if the component should be in "disabled" mode (no interaction)
|
inherited |
textbox for the main label of the component
shared_ptr<Graph> ofxOui::Waveform::graph |
2D Graph area
|
inherited |
component height
|
protectedinherited |
|
inherited |
icon box of the component
|
inherited |
Label of the component (not active)
|
inherited |
Label of the component (active)
|
inherited |
shape of the component
int ofxOui::Waveform::size |
Size of the data (number of frames)
|
inherited |
style of the component
|
protectedinherited |
float* ofxOui::Waveform::values |
Vector of x/y values of the Waveform.
|
inherited |
component width
|
inherited |
x position (left)
|
inherited |
y position(top)