WYSWYG editor for JUCE GUIs including Visualisers
Loading...
Searching...
No Matches
SliderItem Class Reference
+ Inheritance diagram for SliderItem:

Public Member Functions

 SliderItem (MagicGUIBuilder &builder, const juce::ValueTree &node)
 
void update () override
 In update() the ValueTree properties should be used to set all properties to the component.
 
std::vector< SettablePropertygetSettableProperties () const override
 Override this to return each settable option the designer should be able to configure on your component.
 
juce::String getControlledParameterID (juce::Point< int >) override
 Returns the parameterID that is controlled from this component.
 
juce::Component * getWrappedComponent () override
 Allows accessing the Component inside that GuiItem.
 
- Public Member Functions inherited from GuiItem
 GuiItem (MagicGUIBuilder &builder, juce::ValueTree node)
 
 ~GuiItem () override
 
virtual void updateColours ()
 Set colours in the wrapped Component to the value from the stylesheet and palette.
 
void setColourTranslation (std::vector< std::pair< juce::String, int > > mapping)
 For each factory you can register a translation table, which will forward the colours from the Stylesheet to the Components.
 
juce::StringArray getColourNames () const
 Return the names of configurable colours.
 
juce::var getProperty (const juce::Identifier &property)
 Look up a value through the DOM and CSS.
 
MagicGUIStategetMagicState ()
 
virtual GuiItemfindGuiItemWithId (const juce::String &name)
 Lookup a Component through the tree.
 
void updateInternal ()
 Reread properties from the config ValueTree.
 
void paint (juce::Graphics &g) final
 
void resized () override
 
virtual bool isContainer () const
 
virtual void createSubComponents ()
 
virtual void updateLayout ()
 This will trigger a recalculation of the children layout regardless of resized.
 
LayoutType getParentsLayoutType () const
 Returns the layout type this item is managed by.
 
void configureFlexBoxItem (const juce::ValueTree &node)
 Parse the values and set it to the FlexBox::Item for layouting.
 
void configurePosition (const juce::ValueTree &node)
 
juce::Rectangle< int > resolvePosition (juce::Rectangle< int > parent)
 Calculates the position according to the parent area.
 
juce::Rectangle< int > getClientBounds () const
 Returns the bounds of the wrapped Component.
 
juce::String getTabCaption (const juce::String &defaultName) const
 
juce::Colour getTabColour () const
 
juce::FlexItem & getFlexItem ()
 
void itemDragEnter (const juce::DragAndDropTarget::SourceDetails &details) override
 
void itemDragExit (const juce::DragAndDropTarget::SourceDetails &details) override
 
void paintOverChildren (juce::Graphics &g) override
 
virtual GuiItemfindGuiItem (const juce::ValueTree &node)
 Seeks recursively for a GuiItem.
 
virtual void setEditMode (bool shouldEdit)
 This method sets the GUI in edit mode, that allows to drag the components around.
 
void setDraggable (bool selected)
 
void mouseDown (const juce::MouseEvent &event) override
 
void mouseDrag (const juce::MouseEvent &event) override
 
void mouseUp (const juce::MouseEvent &event) override
 
bool isInterestedInDragSource (const juce::DragAndDropTarget::SourceDetails &dragSourceDetails) override
 
void itemDropped (const juce::DragAndDropTarget::SourceDetails &dragSourceDetails) override
 

Static Public Attributes

static const juce::Identifier pSliderType { "slider-type" }
 
static const juce::StringArray pSliderTypes { "auto", "linear-horizontal", "linear-vertical", "rotary", "rotary-horizontal-vertical", "inc-dec-buttons" }
 
static const juce::Identifier pSliderTextBox { "slider-textbox" }
 
static const juce::StringArray pTextBoxPositions { "no-textbox", "textbox-above", "textbox-below", "textbox-left", "textbox-right" }
 
static const juce::Identifier pValue { "value" }
 
static const juce::Identifier pMinValue { "min-value" }
 
static const juce::Identifier pMaxValue { "max-value" }
 
static const juce::Identifier pInterval { "interval" }
 
static const juce::Identifier pSuffix { "suffix" }
 
static const juce::Identifier pFilmStrip { "filmstrip" }
 
static const juce::Identifier pNumImages { "num-filmstrip-images" }
 

Additional Inherited Members

- Public Attributes inherited from GuiItem
MagicGUIBuildermagicBuilder
 
- Protected Attributes inherited from GuiItem
juce::ValueTree configNode
 
Decorator decorator
 
juce::FlexItem flexItem { juce::FlexItem (*this).withFlex (1.0f) }
 
std::vector< std::pair< juce::String, int > > colourTranslation
 

Constructor & Destructor Documentation

◆ SliderItem()

SliderItem ( MagicGUIBuilder & builder,
const juce::ValueTree & node )

Member Function Documentation

◆ update()

◆ getSettableProperties()

◆ getControlledParameterID()

juce::String getControlledParameterID ( juce::Point< int > )
overridevirtual

Returns the parameterID that is controlled from this component.

To allow multiple return values depending of the position where the drop arrived there is the drop position supplied.

Reimplemented from GuiItem.

References GuiItem::configNode.

Referenced by SliderItem::update().

◆ getWrappedComponent()

juce::Component * getWrappedComponent ( )
overridevirtual

Allows accessing the Component inside that GuiItem.

Don't keep this pointer!

Implements GuiItem.

Member Data Documentation

◆ pSliderType

const juce::Identifier pSliderType { "slider-type" }
static

◆ pSliderTypes

const juce::StringArray pSliderTypes { "auto", "linear-horizontal", "linear-vertical", "rotary", "rotary-horizontal-vertical", "inc-dec-buttons" }
static

◆ pSliderTextBox

const juce::Identifier pSliderTextBox { "slider-textbox" }
static

◆ pTextBoxPositions

const juce::StringArray pTextBoxPositions { "no-textbox", "textbox-above", "textbox-below", "textbox-left", "textbox-right" }
static

◆ pValue

const juce::Identifier pValue { "value" }
static

◆ pMinValue

const juce::Identifier pMinValue { "min-value" }
static

◆ pMaxValue

const juce::Identifier pMaxValue { "max-value" }
static

◆ pInterval

const juce::Identifier pInterval { "interval" }
static

◆ pSuffix

const juce::Identifier pSuffix { "suffix" }
static

◆ pFilmStrip

const juce::Identifier pFilmStrip { "filmstrip" }
static

◆ pNumImages

const juce::Identifier pNumImages { "num-filmstrip-images" }
static

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