libAlgAudio
v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
|
#include <ModuleGUI.hpp>
Classes | |
struct | WhatIsHere |
Public Member Functions | |
virtual std::string | GetIoletParamID (UIWidget::ID) const =0 |
std::shared_ptr< Module > | GetModule () |
virtual WhatIsHere | GetWhatIsHere (Point2D) const =0 |
virtual void | OnInletsChanged () |
Point2D & | position () |
virtual void | SetHighlight (bool)=0 |
virtual void | SliderDragEnd (UIWidget::ID) |
virtual void | SliderDragStart (UIWidget::ID) |
virtual void | SliderDragStep (UIWidget::ID, Point2D_< float >) |
virtual std::shared_ptr< UIWidget > | Widget ()=0 |
virtual Point2D | WhereIsInlet (std::string inlet)=0 |
virtual Point2D | WhereIsOutlet (std::string outlet)=0 |
virtual Point2D | WhereIsParamInlet (std::string inlet)=0 |
virtual Point2D | WhereIsParamRelativeOutlet (std::string inlet)=0 |
virtual Point2D | WhereIsParamAbsoluteOutlet (std::string inlet)=0 |
Protected Member Functions | |
ModuleGUI (std::shared_ptr< Module > mod) | |
Protected Attributes | |
std::weak_ptr< Module > | module |
Merely an interface implemented by standard box types. Module creators may wish to implement a custom version of a module GUI, by inheriting from this class and writing a custom Module::BuildGUI.
Each Module has zero or one corresponding ModuleGUI. ModuleGUIs are drawn by the CanvasView.
|
strong |
|
inlineprotected |
|
pure virtual |
This method shall translate an inlet/outlet widget id to the corresponding param id.
Implemented in AlgAudio::StandardModuleGUI.
|
inline |
Gets the corresponding module instance
|
pure virtual |
This function is used by the CanvasView to ask the module GUI what kind of element is located at a given point. This way the CanvasView can handle connections etc. and ModuleGUI does not have to bother about them.
Implemented in AlgAudio::StandardModuleGUI.
|
inlinevirtual |
A Module may call this method sometimes to notify its GUI that the set of inlets has changed, and the ModuleGUI should take appropriate changes.
Reimplemented in AlgAudio::StandardModuleGUI.
|
inline |
The position of this module on the parent CanvasView.
|
pure virtual |
When set to true, the module shall draw itself in it's "highlighted" variant.
Implemented in AlgAudio::StandardModuleGUI.
|
inlinevirtual |
This method is called by CanvasView when a slider drag has ended. Usually, the ModuleGUI will pass this event to the right slider widget.
Reimplemented in AlgAudio::StandardModuleGUI.
|
inlinevirtual |
CanvasView uses this function to notify the ModuleGUI that a slider is being dragged. This way the drag can continue outside the ModuleGUI. The only arguments is the slider widget id (as returned by WhatIsHere). Usually, the ModuleGUI will pass this event to the right slider widget.
Reimplemented in AlgAudio::StandardModuleGUI.
|
inlinevirtual |
This method is called by CanvasView for each step of a slider drag. Note that offset values may be outside moduleGUI, or even negative. Usually, the ModuleGUI will pass this event to the right slider widget.
Reimplemented in AlgAudio::StandardModuleGUI.
|
pure virtual |
These methods are used by the CanvasView to query where it should draw connection wire endings. The only parameter is iolet ID. The ModuleGUI implementation should return the coordinates where the connector is drawn.
Implemented in AlgAudio::StandardModuleGUI.
|
pure virtual |
These methods are used by the CanvasView to query where it should draw connection wire endings. The only parameter is iolet ID. The ModuleGUI implementation should return the coordinates where the connector is drawn.
Implemented in AlgAudio::StandardModuleGUI.
|
pure virtual |
These methods are used by the CanvasView to query where it should draw connection wire endings. The only parameter is iolet ID. The ModuleGUI implementation should return the coordinates where the connector is drawn.
Implemented in AlgAudio::StandardModuleGUI.
|
pure virtual |
These methods are used by the CanvasView to query where it should draw connection wire endings. The only parameter is iolet ID. The ModuleGUI implementation should return the coordinates where the connector is drawn.
Implemented in AlgAudio::StandardModuleGUI.
|
pure virtual |
These methods are used by the CanvasView to query where it should draw connection wire endings. The only parameter is iolet ID. The ModuleGUI implementation should return the coordinates where the connector is drawn.
Implemented in AlgAudio::StandardModuleGUI.
|
pure virtual |
Returns the widget representing this module. Cannot return nullptr. Must be implemented by all ModuleGUI specialisations. ModuleGUI is just an interface defining a set of methods. It cannot inherit from UIWidget, as that would mess up inheritance completely. Tuhs, to access the underlyin widget use this method. Custom implementations, like StandardModuleGUI, return a pointer to itself, because StandardModuleGUI inherts from both ModuleGUI and UIWidget.
Implemented in AlgAudio::StandardModuleGUI.
|
protected |