Allolib  1.0
C++ Components For Interactive Multimedia
al::ControlGUI Class Reference

The ControlGUI class. More...

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/ui/al_ControlGUI.hpp>

Public Member Functions

ControlGUIregisterParameterMeta (ParameterMeta &param)
 
ControlGUIoperator<< (ParameterMeta &newParam)
 Register parameter using the streaming operator.
 
ControlGUIadd (ParameterMeta &newParam)
 
ControlGUIoperator<< (ParameterMeta *newParam)
 Register parameter using the streaming operator.
 
ControlGUIadd (ParameterMeta *newParam)
 
ControlGUIregisterParameterBundle (ParameterBundle &bundle)
 
ControlGUIoperator<< (ParameterBundle &newBundle)
 Register parameter using the streaming operator.
 
ControlGUIadd (ParameterBundle &newBundle)
 
ControlGUIoperator<< (ParameterBundle *newBundle)
 Register parameter using the streaming operator.
 
ControlGUIadd (ParameterBundle *newBundle)
 
ControlGUIregisterNav (Nav &nav)
 
ControlGUIoperator<< (Nav &nav)
 
ControlGUIadd (Nav &nav)
 
ControlGUIregisterPresetHandler (PresetHandler &presetHandler, int numRows=-1, int numColumns=-1)
 
ControlGUIoperator<< (PresetHandler &ph)
 
ControlGUIadd (PresetHandler &ph)
 
ControlGUIoperator<< (PresetHandler *ph)
 
ControlGUIadd (PresetHandler *ph)
 
ControlGUIregisterPresetSequencer (PresetSequencer &presetSequencer)
 
ControlGUIoperator<< (PresetSequencer &ps)
 
ControlGUIadd (PresetSequencer &ps)
 
ControlGUIregisterSequenceRecorder (SequenceRecorder &recorder)
 
ControlGUIoperator<< (SequenceRecorder &ps)
 
ControlGUIadd (SequenceRecorder &ps)
 
ControlGUIregisterSynthRecorder (SynthRecorder &recorder)
 
ControlGUIoperator<< (SynthRecorder &recorder)
 Register a SynthRecorder. This will display GUI widgets to control it.
 
ControlGUIadd (SynthRecorder &recorder)
 
ControlGUIregisterSynthSequencer (SynthSequencer &seq)
 
ControlGUIoperator<< (SynthSequencer &seq)
 
ControlGUIadd (SynthSequencer &seq)
 
ControlGUIregisterDynamicScene (DynamicScene &scene)
 
ControlGUIoperator<< (DynamicScene &scene)
 
ControlGUIadd (DynamicScene &scene)
 
ControlGUIregisterMarker (GUIMarker &marker)
 
ControlGUIoperator<< (GUIMarker marker)
 
ControlGUIadd (GUIMarker marker)
 
void setTitle (std::string title)
 
void fixedPosition (bool fixed=true)
 
void draw (Graphics &g)
 draws the GUI
 
void manageImGUI (bool manage)
 Call to set if this GUI manages ImGUI. More...
 
void init (int x=5, int y=5, bool manageImgui=true)
 initialize ImGUI. More...
 
void cleanup ()
 
bool usingInput ()
 usingInput returns true if the mouse is within the imgui window More...
 
int getBundleCurrent (std::string bundleName)
 get currently active index for a parameter bundle registerd with the GUI More...
 
bool getBundleIsGlobal (std::string bundleName)
 Returns true if global controls is enabled for bundle. More...
 
void backgroundAlpha (float a)
 Set background alpha value. More...
 
float backgroundAlpha () const
 Get background alpha value. More...
 

Static Public Member Functions

static GUIMarker beginGroup (const char *groupName=nullptr)
 
static GUIMarker endGroup ()
 
static GUIMarker separator ()
 

Detailed Description

The ControlGUI class.

You must call init() before any draw calls.

Definition at line 85 of file al_ControlGUI.hpp.

Member Function Documentation

◆ backgroundAlpha() [1/2]

float al::ControlGUI::backgroundAlpha ( ) const
inline

Get background alpha value.

0 for transparent, 1 for opaque

Definition at line 288 of file al_ControlGUI.hpp.

◆ backgroundAlpha() [2/2]

void al::ControlGUI::backgroundAlpha ( float  a)
inline

Set background alpha value.

0 for transparent, 1 for opaque

Definition at line 281 of file al_ControlGUI.hpp.

◆ getBundleCurrent()

int al::ControlGUI::getBundleCurrent ( std::string  bundleName)
inline

get currently active index for a parameter bundle registerd with the GUI

Parameters
bundleName
Returns
current index

Returns -1 if bundleName is not a registered bundle name

Definition at line 258 of file al_ControlGUI.hpp.

◆ getBundleIsGlobal()

bool al::ControlGUI::getBundleIsGlobal ( std::string  bundleName)
inline

Returns true if global controls is enabled for bundle.

Parameters
bundleNamename of the bundle to query

Definition at line 269 of file al_ControlGUI.hpp.

◆ init()

void al::ControlGUI::init ( int  x = 5,
int  y = 5,
bool  manageImgui = true 
)

initialize ImGUI.

Parameters
xx position for the control window
yy position for the control window
manageImguicall imgui initialization and cleanup functions

This function must be called before anu call to begin() or draw(). If you want to use mulitple ControlGUI objects, you need to set manageImgui to false, and perform the ImGui initialization and cleanup manually

◆ manageImGUI()

void al::ControlGUI::manageImGUI ( bool  manage)
inline

Call to set if this GUI manages ImGUI.

Set to false if you want to have additional ImGUI windows. You will have to handle the initialization, cleanup and begin/end calls yourself.

Definition at line 216 of file al_ControlGUI.hpp.

◆ operator<<() [1/8]

ControlGUI& al::ControlGUI::operator<< ( DynamicScene scene)
inline

Register a SynthSequencer. This will display GUI widgets to control it Will also register the PolySynth contained within it.

Definition at line 188 of file al_ControlGUI.hpp.

◆ operator<<() [2/8]

ControlGUI& al::ControlGUI::operator<< ( GUIMarker  marker)
inline

Register a SynthSequencer. This will display GUI widgets to control it Will also register the PolySynth contained within it.

Definition at line 197 of file al_ControlGUI.hpp.

◆ operator<<() [3/8]

ControlGUI& al::ControlGUI::operator<< ( Nav nav)
inline

Register nav using the streaming operator. A set of widgets are shown to control it.

Definition at line 127 of file al_ControlGUI.hpp.

◆ operator<<() [4/8]

ControlGUI& al::ControlGUI::operator<< ( PresetHandler ph)
inline

Register preset handler using the streaming operator. GUI widgets for preset control are shown.

Definition at line 135 of file al_ControlGUI.hpp.

◆ operator<<() [5/8]

ControlGUI& al::ControlGUI::operator<< ( PresetHandler ph)
inline

Register preset handler using the streaming operator. GUI widgets for preset control are shown.

Definition at line 142 of file al_ControlGUI.hpp.

◆ operator<<() [6/8]

ControlGUI& al::ControlGUI::operator<< ( PresetSequencer ps)
inline

Register preset sequencer using the streaming operator. GUI widgets for preset sequencing are shown.

Definition at line 151 of file al_ControlGUI.hpp.

◆ operator<<() [7/8]

ControlGUI& al::ControlGUI::operator<< ( SequenceRecorder ps)
inline

Register preset sequencer using the streaming operator. GUI widgets for preset sequencing are shown.

Definition at line 160 of file al_ControlGUI.hpp.

◆ operator<<() [8/8]

ControlGUI& al::ControlGUI::operator<< ( SynthSequencer seq)
inline

Register a SynthSequencer. This will display GUI widgets to control it Will also register the PolySynth contained within it.

Definition at line 179 of file al_ControlGUI.hpp.

◆ usingInput()

bool al::ControlGUI::usingInput ( )
inline

usingInput returns true if the mouse is within the imgui window

Can be used to selectively turn off navigation when using ImGUI you should place this within your onAnimate() callback:

virtual void onAnimate(double dt) override {
navControl().active(!gui.usingInput());
}

Note that if the call is placed outside the ImGUI begin and end calls, then the data is likely to be one frame late. This is often not a big issue and simplifies the code.

Definition at line 248 of file al_ControlGUI.hpp.


The documentation for this class was generated from the following file: