|
enum | SectionOverride {
kNone
, kLogo
, kHeader
, kOverlay
,
kOscillator
, kSample
, kSub
, kFilter
,
kEnvelope
, kLfo
, kRandomLfo
, kVoice
,
kMacro
, kKeyboard
, kAllEffects
, kChorus
,
kCompressor
, kDelay
, kDistortion
, kEqualizer
,
kFxFilter
, kFlanger
, kPhaser
, kReverb
,
kModulationDragDrop
, kModulationMatrix
, kPresetBrowser
, kPopupBrowser
,
kAdvanced
, kWavetableEditor
, kNumSectionOverrides
} |
| Identifiers for different UI sections that can have color or value overrides. More...
|
|
enum | ValueId {
kBodyRounding
, kLabelHeight
, kLabelBackgroundHeight
, kLabelBackgroundRounding
,
kLabelOffset
, kTextComponentLabelOffset
, kRotaryOptionXOffset
, kRotaryOptionYOffset
,
kRotaryOptionWidth
, kTitleWidth
, kPadding
, kLargePadding
,
kSliderWidth
, kTextComponentHeight
, kTextComponentOffset
, kTextComponentFontSize
,
kTextButtonHeight
, kButtonFontSize
, kKnobArcSize
, kKnobArcThickness
,
kKnobBodySize
, kKnobHandleLength
, kKnobModAmountArcSize
, kKnobModAmountArcThickness
,
kKnobModMeterArcSize
, kKnobModMeterArcThickness
, kKnobOffset
, kKnobSectionHeight
,
kKnobShadowWidth
, kKnobShadowOffset
, kModulationButtonWidth
, kModulationFontSize
,
kWidgetMargin
, kWidgetRoundedCorner
, kWidgetLineWidth
, kWidgetLineBoost
,
kWidgetFillCenter
, kWidgetFillFade
, kWidgetFillBoost
, kWavetableHorizontalAngle
,
kWavetableVerticalAngle
, kWavetableDrawWidth
, kWavetableWaveHeight
, kWavetableYOffset
,
kNumSkinValueIds
, kFrequencyDisplay = kNumSkinValueIds
, kNumAllValueIds
} |
| Identifiers for various UI scaling/spacing values and configuration constants. More...
|
|
enum | ColorId {
kInitialColor = 0x42345678
, kBackground = kInitialColor
, kBody
, kBodyHeading
,
kHeadingText
, kPresetText
, kBodyText
, kBorder
,
kLabelBackground
, kLabelConnection
, kPowerButtonOn
, kPowerButtonOff
,
kOverlayScreen
, kLightenScreen
, kShadow
, kPopupSelectorBackground
,
kPopupBackground
, kPopupBorder
, kTextComponentBackground
, kTextComponentText
,
kRotaryArc
, kRotaryArcDisabled
, kRotaryArcUnselected
, kRotaryArcUnselectedDisabled
,
kRotaryHand
, kRotaryBody
, kRotaryBodyBorder
, kLinearSlider
,
kLinearSliderDisabled
, kLinearSliderUnselected
, kLinearSliderThumb
, kLinearSliderThumbDisabled
,
kWidgetCenterLine
, kWidgetPrimary1
, kWidgetPrimary2
, kWidgetPrimaryDisabled
,
kWidgetSecondary1
, kWidgetSecondary2
, kWidgetSecondaryDisabled
, kWidgetAccent1
,
kWidgetAccent2
, kWidgetBackground
, kModulationMeter
, kModulationMeterLeft
,
kModulationMeterRight
, kModulationMeterControl
, kModulationButtonSelected
, kModulationButtonDragging
,
kModulationButtonUnselected
, kIconSelectorIcon
, kIconButtonOff
, kIconButtonOffHover
,
kIconButtonOffPressed
, kIconButtonOn
, kIconButtonOnHover
, kIconButtonOnPressed
,
kUiButton
, kUiButtonText
, kUiButtonHover
, kUiButtonPressed
,
kUiActionButton
, kUiActionButtonHover
, kUiActionButtonPressed
, kTextEditorBackground
,
kTextEditorBorder
, kTextEditorCaret
, kTextEditorSelection
, kFinalColor
} |
| Identifiers for all colors used in the UI. More...
|
|
|
| Skin () |
| Constructs a Skin with default or loaded settings.
|
|
void | setComponentColors (Component *component) const |
| Applies all component colors to a given component.
|
|
void | setComponentColors (Component *component, SectionOverride section_override, bool top_level=false) const |
| Applies section-specific color overrides to a component.
|
|
void | setComponentValues (SynthSection *component) const |
| Applies all default values to a SynthSection.
|
|
void | setComponentValues (SynthSection *component, SectionOverride section_override, bool top_level=false) const |
| Applies section-specific value overrides to a SynthSection.
|
|
void | setColor (ColorId color_id, const Colour &color) |
| Sets a color for a global ColorId.
|
|
Colour | getColor (ColorId color_id) const |
| Retrieves a globally defined color.
|
|
Colour | getColor (int section, ColorId color_id) const |
| Retrieves a color possibly overridden by a section.
|
|
bool | overridesColor (int section, ColorId color_id) const |
| Checks if a given section overrides a specific color.
|
|
bool | overridesValue (int section, ValueId value_id) const |
| Checks if a given section overrides a specific value.
|
|
void | copyValuesToLookAndFeel (LookAndFeel *look_and_feel) const |
| Copies global skin values into a LookAndFeel instance.
|
|
void | setValue (ValueId value_id, float value) |
| Sets a global UI value.
|
|
float | getValue (ValueId value_id) const |
| Gets a global UI value.
|
|
float | getValue (int section, ValueId value_id) const |
| Gets a value with a possible section override.
|
|
void | addOverrideColor (int section, ColorId color_id, Colour color) |
| Adds a color override for a given section.
|
|
void | removeOverrideColor (int section, ColorId color_id) |
| Removes a color override from a section.
|
|
void | addOverrideValue (int section, ValueId value_id, float value) |
| Adds a value override for a given section.
|
|
void | removeOverrideValue (int section, ValueId value_id) |
| Removes a value override from a section.
|
|
json | stateToJson () |
| Converts the current skin state to JSON.
|
|
String | stateToString () |
| Converts the current skin state to a string (JSON representation).
|
|
void | saveToFile (File destination) |
| Saves the current skin to a file.
|
|
json | updateJson (json data) |
| Updates JSON data to a newer format or version if needed.
|
|
void | jsonToState (json skin_var) |
| Loads skin state from JSON data.
|
|
bool | stringToState (String skin_string) |
| Loads skin state from a JSON string.
|
|
bool | loadFromFile (File source) |
| Loads skin state from a file.
|
|
void | loadDefaultSkin () |
| Loads a default built-in skin.
|
|
void | clearSkin () |
| Clears all overrides, returning to a clean default state.
|
|
Manages the overall color and value theme (or "skin") of the user interface.
The Skin class stores a variety of colors and values that determine the appearance and layout of UI components. It supports section-based overrides, allowing different interface sections (e.g., Oscillator, Filter, Envelope) to have unique colors or values if desired.
The skin information can be serialized to and from JSON, allowing customization and saving of user-defined skins. It also integrates with JUCE's LookAndFeel system, applying colors and values to components and ensuring consistent UI styling.