foleys_gui_magic
WYSWYG editor for JUCE GUIs including Visualisers
Public Member Functions | Static Public Attributes | List of all members
XYDraggerItem Class Reference
+ Inheritance diagram for XYDraggerItem:

Public Member Functions

 XYDraggerItem (MagicGUIBuilder &builder, const juce::ValueTree &node)
 
void update () override
 In update() the ValueTree properties should be used to set all properties to the component. More...
 
std::vector< SettablePropertygetSettableProperties () const override
 Override this to return each settable option the designer should be able to configure on your component. More...
 
juce::Component * getWrappedComponent () override
 Allows accessing the Component inside that GuiItem. More...
 
- 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. More...
 
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. More...
 
juce::StringArray getColourNames () const
 Return the names of configurable colours. More...
 
virtual juce::String getControlledParameterID (juce::Point< int >)
 Returns the parameterID that is controlled from this component. More...
 
juce::var getProperty (const juce::Identifier &property)
 Look up a value through the DOM and CSS. More...
 
MagicGUIStategetMagicState ()
 
virtual GuiItemfindGuiItemWithId (const juce::String &name)
 Lookup a Component through the tree. More...
 
void updateInternal ()
 Reread properties from the config ValueTree. More...
 
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. More...
 
LayoutType getParentsLayoutType () const
 Returns the layout type this item is managed by. More...
 
void configureFlexBoxItem (const juce::ValueTree &node)
 Parse the values and set it to the FlexBox::Item for layouting. More...
 
void configurePosition (const juce::ValueTree &node)
 
juce::Rectangle< int > resolvePosition (juce::Rectangle< int > parent)
 Calculates the position according to the parent area. More...
 
juce::Rectangle< int > getClientBounds () const
 Returns the bounds of the wrapped Component. More...
 
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. More...
 
bool isInterestedInDragSource (const juce::DragAndDropTarget::SourceDetails &dragSourceDetails) override
 
void itemDropped (const juce::DragAndDropTarget::SourceDetails &dragSourceDetails) override
 

Static Public Attributes

static const juce::Identifier pCrosshair { "xy-crosshair" }
 
static const juce::StringArray pCrosshairTypes { "no-crosshair", "vertical", "horizontal", "crosshair" }
 
static const juce::Identifier pRadius { "xy-radius" }
 
static const juce::Identifier pSenseFactor { "xy-sense-factor" }
 

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

◆ XYDraggerItem()

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

Member Function Documentation

◆ update()

void update ( )
overridevirtual

In update() the ValueTree properties should be used to set all properties to the component.

You can use the magicBuilder to resolve properties from CSS. The Colours will be handled by default.

Implements GuiItem.

References GuiItem::configNode, GuiItem::getMagicState(), GuiItem::getProperty(), XYDraggerItem::pCrosshair, XYDraggerItem::pCrosshairTypes, XYDragComponent::setCrossHair(), XYDragComponent::setParameterX(), XYDragComponent::setParameterY(), and XYDragComponent::setRightClickParameter().

◆ getSettableProperties()

std::vector<SettableProperty> getSettableProperties ( ) const
overridevirtual

◆ getWrappedComponent()

juce::Component* getWrappedComponent ( )
overridevirtual

Allows accessing the Component inside that GuiItem.

Don't keep this pointer!

Implements GuiItem.

Member Data Documentation

◆ pCrosshair

const juce::Identifier pCrosshair { "xy-crosshair" }
static

◆ pCrosshairTypes

const juce::StringArray pCrosshairTypes { "no-crosshair", "vertical", "horizontal", "crosshair" }
static

◆ pRadius

const juce::Identifier pRadius { "xy-radius" }
static

◆ pSenseFactor

const juce::Identifier pSenseFactor { "xy-sense-factor" }
static

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