|
| ModuleWidget () |
|
DEPRECATED | ModuleWidget (engine::Module *module) |
|
| ~ModuleWidget () |
|
plugin::Model * | getModel () |
| Returns the Model instance of this ModuleWidget.
|
|
void | setModel (plugin::Model *model) |
|
engine::Module * | getModule () |
| Returns Module attached to this ModuleWidget.
|
|
template<class TModule > |
TModule * | getModule () |
| Returns Module attached to this ModuleWidget, casted to the given Module type.
|
|
void | setModule (engine::Module *module) |
| Associates this ModuleWidget with the Module.
|
|
widget::Widget * | getPanel () |
|
void | setPanel (widget::Widget *panel) |
| Sets the panel and sets the size of the ModuleWidget from the panel.
|
|
void | setPanel (std::shared_ptr< window::Svg > svg) |
|
void | addParam (ParamWidget *param) |
| Convenience functions for adding special widgets.
|
|
void | addInput (PortWidget *input) |
|
void | addOutput (PortWidget *output) |
|
ParamWidget * | getParam (int paramId) |
| Scans children widgets recursively for a ParamWidget with the given paramId.
|
|
PortWidget * | getInput (int portId) |
|
PortWidget * | getOutput (int portId) |
|
std::vector< ParamWidget * > | getParams () |
| Scans children widgets recursively for all ParamWidgets.
|
|
std::vector< PortWidget * > | getPorts () |
|
std::vector< PortWidget * > | getInputs () |
|
std::vector< PortWidget * > | getOutputs () |
|
void | draw (const DrawArgs &args) override |
| Draws the widget to the NanoVG context.
|
|
void | drawLayer (const DrawArgs &args, int layer) override |
| Draw additional layers.
|
|
virtual void | appendContextMenu (ui::Menu *menu) |
| Override to add context menu entries to your subclass.
|
|
void | onHover (const HoverEvent &e) override |
|
void | onHoverKey (const HoverKeyEvent &e) override |
|
void | onButton (const ButtonEvent &e) override |
|
void | onDragStart (const DragStartEvent &e) override |
|
void | onDragEnd (const DragEndEvent &e) override |
|
void | onDragMove (const DragMoveEvent &e) override |
|
void | onDragHover (const DragHoverEvent &e) override |
|
json_t * | toJson () |
|
void | fromJson (json_t *rootJ) |
|
bool | pasteJsonAction (json_t *rootJ) |
| Returns whether paste was successful.
|
|
void | copyClipboard () |
|
bool | pasteClipboardAction () |
|
void | load (std::string filename) |
|
void | loadAction (std::string filename) |
|
void | loadTemplate () |
|
void | loadDialog () |
|
void | save (std::string filename) |
|
void | saveTemplate () |
|
void | saveTemplateDialog () |
|
bool | hasTemplate () |
|
void | clearTemplate () |
|
void | clearTemplateDialog () |
|
void | saveDialog () |
|
void | disconnect () |
| Disconnects cables from all ports Called when the user clicks Disconnect Cables in the context menu.
|
|
void | resetAction () |
| Resets the parameters of the module and calls the Module's randomize().
|
|
void | randomizeAction () |
| Randomizes the parameters of the module and calls the Module's randomize().
|
|
void | appendDisconnectActions (history::ComplexAction *complexAction) |
|
void | disconnectAction () |
|
void | cloneAction (bool cloneCables=true) |
|
void | bypassAction (bool bypassed) |
|
void | removeAction () |
| Deletes this
|
|
void | createContextMenu () |
|
math::Vec | getGridPosition () |
|
void | setGridPosition (math::Vec pos) |
|
math::Vec | getGridSize () |
|
math::Rect | getGridBox () |
|
PRIVATE math::Vec & | dragOffset () |
|
PRIVATE bool & | dragEnabled () |
|
PRIVATE engine::Module * | releaseModule () |
|
void | onHover (const HoverEvent &e) override |
|
void | onButton (const ButtonEvent &e) override |
|
void | onHoverKey (const HoverKeyEvent &e) override |
|
void | onHoverText (const HoverTextEvent &e) override |
|
void | onHoverScroll (const HoverScrollEvent &e) override |
|
void | onDragHover (const DragHoverEvent &e) override |
|
void | onPathDrop (const PathDropEvent &e) override |
|
virtual | ~Widget () |
|
math::Rect | getBox () |
|
void | setBox (math::Rect box) |
| Calls setPosition() and then setSize().
|
|
math::Vec | getPosition () |
|
void | setPosition (math::Vec pos) |
| Sets position and triggers RepositionEvent if position changed.
|
|
math::Vec | getSize () |
|
void | setSize (math::Vec size) |
| Sets size and triggers ResizeEvent if size changed.
|
|
widget::Widget * | getParent () |
|
bool | isVisible () |
|
void | setVisible (bool visible) |
| Sets visible and triggers ShowEvent or HideEvent if changed.
|
|
void | show () |
| Makes Widget visible and triggers ShowEvent if changed.
|
|
void | hide () |
| Makes Widget not visible and triggers HideEvent if changed.
|
|
void | requestDelete () |
| Requests this Widget's parent to delete it in the next step().
|
|
virtual math::Rect | getChildrenBoundingBox () |
| Returns the smallest rectangle containing this widget's children (visible and invisible) in its local coordinates.
|
|
virtual math::Rect | getVisibleChildrenBoundingBox () |
|
bool | isDescendantOf (Widget *ancestor) |
| Returns whether ancestor is a parent or distant parent of this widget.
|
|
virtual math::Vec | getRelativeOffset (math::Vec v, Widget *ancestor) |
| Returns v (given in local coordinates) transformed into the coordinate system of ancestor .
|
|
math::Vec | getAbsoluteOffset (math::Vec v) |
| Returns v transformed into world/root/global/absolute coordinates.
|
|
virtual float | getRelativeZoom (Widget *ancestor) |
| Returns the zoom level in the coordinate system of ancestor .
|
|
float | getAbsoluteZoom () |
|
virtual math::Rect | getViewport (math::Rect r=math::Rect::inf()) |
| Returns a subset of the given Rect bounded by the box of this widget and all ancestors.
|
|
template<class T > |
T * | getAncestorOfType () |
|
template<class T > |
T * | getFirstDescendantOfType () |
|
bool | hasChild (Widget *child) |
| Checks if the given widget is a child of this widget.
|
|
void | addChild (Widget *child) |
| Adds widget to the top of the children.
|
|
void | addChildBottom (Widget *child) |
| Adds widget to the bottom of the children.
|
|
void | addChildBelow (Widget *child, Widget *sibling) |
| Adds widget directly below another widget.
|
|
void | addChildAbove (Widget *child, Widget *sibling) |
|
void | removeChild (Widget *child) |
| Removes widget from list of children if it exists.
|
|
void | clearChildren () |
| Removes and deletes all child Widgets.
|
|
virtual void | step () |
| Advances the module by one frame.
|
|
virtual DEPRECATED void | draw (NVGcontext *vg) |
| Override draw(const DrawArgs &args) instead.
|
|
void | drawChild (Widget *child, const DrawArgs &args, int layer=0) |
| Draws a particular child.
|
|
template<typename TMethod , class TEvent > |
void | recurseEvent (TMethod f, const TEvent &e) |
| Recurses an event to all visible Widgets.
|
|
template<typename TMethod , class TEvent > |
void | recursePositionEvent (TMethod f, const TEvent &e) |
| Recurses an event to all visible Widgets until it is consumed.
|
|
virtual void | onDoubleClick (const DoubleClickEvent &e) |
|
virtual void | onEnter (const EnterEvent &e) |
|
virtual void | onLeave (const LeaveEvent &e) |
|
virtual void | onSelect (const SelectEvent &e) |
|
virtual void | onDeselect (const DeselectEvent &e) |
|
virtual void | onSelectKey (const SelectKeyEvent &e) |
|
virtual void | onSelectText (const SelectTextEvent &e) |
|
virtual void | onDragEnter (const DragEnterEvent &e) |
|
virtual void | onDragLeave (const DragLeaveEvent &e) |
|
virtual void | onDragDrop (const DragDropEvent &e) |
|
virtual void | onAction (const ActionEvent &e) |
|
virtual void | onChange (const ChangeEvent &e) |
|
virtual void | onDirty (const DirtyEvent &e) |
|
virtual void | onReposition (const RepositionEvent &e) |
|
virtual void | onResize (const ResizeEvent &e) |
|
virtual void | onAdd (const AddEvent &e) |
|
virtual void | onRemove (const RemoveEvent &e) |
|
virtual void | onShow (const ShowEvent &e) |
|
virtual void | onHide (const HideEvent &e) |
|
virtual void | onContextCreate (const ContextCreateEvent &e) |
|
virtual void | onContextDestroy (const ContextDestroyEvent &e) |
|
| ~WeakBase () |
|
size_t | getWeakCount () |
|
Manages an engine::Module in the rack.