Shape editor.
More...
#include <ofxOuiShapeEditor.hpp>
|
enum | Selector {
Selector::None,
Selector::Shape,
Selector::TopLeft,
Selector::TopCenter,
Selector::TopRight,
Selector::MiddleLeft,
Selector::MiddleCenter,
Selector::MiddleRight,
Selector::BottomLeft,
Selector::BottomCenter,
Selector::BottomRight
} |
| Index of the selector of the shape. More...
|
|
enum | MouseDraggingMode { MouseDraggingMode::Normal,
MouseDraggingMode::Symmetric,
MouseDraggingMode::Rotation
} |
| Type of mouse interaction mode. More...
|
|
|
template<typename T , typename args , class ListenerClass > |
void | onEditShape (T *owner, void(ListenerClass::*listenerMethod)(args)) |
| Set callback function for shape editing events. More...
|
|
| ShapeEditor (float x_=0, float y_=0, float width_=0, float height_=0, float angle_=0) |
| Constructor. More...
|
|
virtual | ~ShapeEditor () |
| Destructor. More...
|
|
virtual void | draw () |
| OF-like draw function. More...
|
|
virtual bool | inside (float x_, float y_) |
| checks if a point is inside the shape editor More...
|
|
virtual ShapeEditor::Selector | insideSelector (float x_, float y_) |
| checks if a point is inside a selector of the shape editor (corner or mid-edge) More...
|
|
§ MouseDraggingMode
Type of mouse interaction mode.
Enumerator |
---|
Normal | |
Symmetric | |
Rotation | |
§ Selector
Index of the selector of the shape.
Enumerator |
---|
None | |
Shape | |
TopLeft | |
TopCenter | |
TopRight | |
MiddleLeft | |
MiddleCenter | |
MiddleRight | |
BottomLeft | |
BottomCenter | |
BottomRight | |
§ ShapeEditor()
ofxOui::ShapeEditor::ShapeEditor |
( |
float |
x_ = 0 , |
|
|
float |
y_ = 0 , |
|
|
float |
width_ = 0 , |
|
|
float |
height_ = 0 , |
|
|
float |
angle_ = 0 |
|
) |
| |
Constructor.
- Parameters
-
x_ | x position (left) |
y_ | y position (top) |
width_ | component width |
height_ | component height |
angle_ | component angle |
§ ~ShapeEditor()
ofxOui::ShapeEditor::~ShapeEditor |
( |
| ) |
|
|
virtual |
§ draw()
void ofxOui::ShapeEditor::draw |
( |
| ) |
|
|
virtual |
§ inside()
bool ofxOui::ShapeEditor::inside |
( |
float |
x_, |
|
|
float |
y_ |
|
) |
| |
|
virtual |
checks if a point is inside the shape editor
- Parameters
-
x_ | x position (in pixels) |
y_ | y position (in pixels) |
- Returns
- true if a point is inside the shape editor
§ insideSelector()
checks if a point is inside a selector of the shape editor (corner or mid-edge)
- Parameters
-
x_ | x position (in pixels) |
y_ | y position (in pixels) |
- Returns
- true if a point is inside a selector the shape editor
§ keyPressed()
void ofxOui::ShapeEditor::keyPressed |
( |
ofKeyEventArgs & |
e | ) |
|
|
protectedvirtual |
§ keyReleased()
void ofxOui::ShapeEditor::keyReleased |
( |
ofKeyEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mouseDragged()
void ofxOui::ShapeEditor::mouseDragged |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mouseDraggedNormal()
void ofxOui::ShapeEditor::mouseDraggedNormal |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mouseDraggedRotation()
void ofxOui::ShapeEditor::mouseDraggedRotation |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mouseDraggedSymmetric()
void ofxOui::ShapeEditor::mouseDraggedSymmetric |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mousePressed()
void ofxOui::ShapeEditor::mousePressed |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ mouseReleased()
void ofxOui::ShapeEditor::mouseReleased |
( |
ofMouseEventArgs & |
e | ) |
|
|
protectedvirtual |
§ onEditShape()
template<typename T , typename args , class ListenerClass >
void ofxOui::ShapeEditor::onEditShape |
( |
T * |
owner, |
|
|
void(ListenerClass::*)(args) |
listenerMethod |
|
) |
| |
|
inline |
Set callback function for shape editing 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 |
§ angle
float ofxOui::ShapeEditor::angle |
§ color
ofColor ofxOui::ShapeEditor::color |
color of the editor frame
§ dragging_
§ dragging_mode_
§ frame_width
float ofxOui::ShapeEditor::frame_width |
width of the editor frame
§ height
float ofxOui::ShapeEditor::height |
§ mouse_offset_
ofPoint ofxOui::ShapeEditor::mouse_offset_ |
|
protected |
§ reference_angle_
float ofxOui::ShapeEditor::reference_angle_ |
|
protected |
§ selector_size
float ofxOui::ShapeEditor::selector_size |
size of the corner and edge selectors
§ shape_editor_event_callback_
§ width
float ofxOui::ShapeEditor::width |
float ofxOui::ShapeEditor::x |
float ofxOui::ShapeEditor::y |
The documentation for this class was generated from the following files: