61 template <
typename... ItemColours>
64 static_assert (
sizeof... (coloursToUse) == numColours,
"Must supply one colour for each UIColour item");
67 for (
int i = 0; i < numColours; ++i)
71 ColourScheme (
const ColourScheme&) =
default;
72 ColourScheme& operator= (
const ColourScheme&) =
default;
75 Colour getUIColour (UIColour colourToGet)
const noexcept;
78 void setUIColour (UIColour colourToSet, Colour newColour)
noexcept;
81 bool operator== (
const ColourScheme&)
const noexcept;
83 bool operator!= (
const ColourScheme&)
const noexcept;
86 Colour palette[numColours];
94 LookAndFeel_V4 (ColourScheme);
97 ~LookAndFeel_V4()
override;
100 void setColourScheme (ColourScheme);
101 ColourScheme& getCurrentColourScheme() noexcept {
return currentColourScheme; }
103 static ColourScheme getDarkColourScheme();
104 static ColourScheme getMidnightColourScheme();
105 static ColourScheme getGreyColourScheme();
106 static ColourScheme getLightColourScheme();
109 Button* createDocumentWindowButton (
int)
override;
110 void positionDocumentWindowButtons (DocumentWindow&,
int,
int,
int,
int, Button*, Button*, Button*,
bool)
override;
111 void drawDocumentWindowTitleBar (DocumentWindow&, Graphics&,
int,
int,
int,
int,
const Image*,
bool)
override;
114 Font getTextButtonFont (TextButton&,
int buttonHeight)
override;
116 void drawButtonBackground (Graphics&, Button&,
const Colour& backgroundColour,
117 bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown)
override;
119 void drawToggleButton (Graphics&, ToggleButton&,
120 bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown)
override;
121 void drawTickBox (Graphics&, Component&,
122 float x,
float y,
float w,
float h,
123 bool ticked,
bool isEnabled,
124 bool shouldDrawButtonAsHighlighted,
bool shouldDrawButtonAsDown)
override;
126 void changeToggleButtonWidthToFitText (ToggleButton&)
override;
129 AlertWindow* createAlertWindow (
const String& title,
const String& message,
130 const String& button1,
131 const String& button2,
132 const String& button3,
133 MessageBoxIconType iconType,
134 int numButtons, Component* associatedComponent)
override;
135 void drawAlertBox (Graphics&, AlertWindow&,
const Rectangle<int>& textArea, TextLayout&)
override;
137 int getAlertWindowButtonHeight()
override;
138 Font getAlertWindowTitleFont()
override;
139 Font getAlertWindowMessageFont()
override;
140 Font getAlertWindowFont()
override;
143 void drawProgressBar (Graphics&, ProgressBar&,
int width,
int height,
double progress,
const String&)
override;
144 bool isProgressBarOpaque (ProgressBar&)
override {
return false; }
145 ProgressBar::Style getDefaultProgressBarStyle (
const ProgressBar&)
override;
148 int getDefaultScrollbarWidth()
override;
149 void drawScrollbar (Graphics&, ScrollBar&,
int x,
int y,
int width,
int height,
bool isScrollbarVertical,
150 int thumbStartPosition,
int thumbSize,
bool isMouseOver,
bool isMouseDown)
override;
153 Path getTickShape (
float height)
override;
154 Path getCrossShape (
float height)
override;
157 void fillTextEditorBackground (Graphics&,
int width,
int height, TextEditor&)
override;
158 void drawTextEditorOutline (Graphics&,
int width,
int height, TextEditor&)
override;
161 Button* createFileBrowserGoUpButton()
override;
163 void layoutFileBrowserComponent (FileBrowserComponent&,
164 DirectoryContentsDisplayComponent*,
165 FilePreviewComponent*,
166 ComboBox* currentPathBox,
167 TextEditor* filenameBox,
168 Button* goUpButton)
override;
170 void drawFileBrowserRow (Graphics&,
int width,
int height,
171 const File& file,
const String& filename, Image* icon,
172 const String& fileSizeDescription,
const String& fileTimeDescription,
173 bool isDirectory,
bool isItemSelected,
int itemIndex,
174 DirectoryContentsDisplayComponent&)
override;
177 void drawPopupMenuItem (Graphics&,
const Rectangle<int>& area,
178 bool isSeparator,
bool isActive,
bool isHighlighted,
bool isTicked,
bool hasSubMenu,
179 const String& text,
const String& shortcutKeyText,
180 const Drawable* icon,
const Colour* textColour)
override;
182 void getIdealPopupMenuItemSize (
const String& text,
bool isSeparator,
int standardMenuItemHeight,
183 int& idealWidth,
int& idealHeight)
override;
185 void drawMenuBarBackground (Graphics&,
int width,
int height,
bool isMouseOverBar, MenuBarComponent&)
override;
187 void drawMenuBarItem (Graphics&,
int width,
int height,
188 int itemIndex,
const String& itemText,
189 bool isMouseOverItem,
bool isMenuOpen,
bool isMouseOverBar,
190 MenuBarComponent&)
override;
193 void drawComboBox (Graphics&,
int width,
int height,
bool isButtonDown,
194 int buttonX,
int buttonY,
int buttonW,
int buttonH,
196 Font getComboBoxFont (ComboBox&)
override;
197 void positionComboBoxText (ComboBox&, Label&)
override;
200 int getSliderThumbRadius (Slider&)
override;
202 void drawLinearSlider (Graphics&,
int x,
int y,
int width,
int height,
203 float sliderPos,
float minSliderPos,
float maxSliderPos,
204 Slider::SliderStyle, Slider&)
override;
206 void drawRotarySlider (Graphics&,
int x,
int y,
int width,
int height,
207 float sliderPosProportional,
float rotaryStartAngle,
208 float rotaryEndAngle, Slider&)
override;
210 void drawPointer (Graphics&,
float x,
float y,
float diameter,
211 const Colour&,
int direction)
noexcept;
213 Label* createSliderTextBox (Slider&)
override;
216 void drawTooltip (Graphics&,
const String& text,
int width,
int height)
override;
219 void drawConcertinaPanelHeader (Graphics&,
const Rectangle<int>& area,
220 bool isMouseOver,
bool isMouseDown,
221 ConcertinaPanel&, Component& panel)
override;
224 void drawLevelMeter (Graphics&,
int,
int,
float)
override;
227 void paintToolbarBackground (Graphics&,
int width,
int height, Toolbar&)
override;
229 void paintToolbarButtonLabel (Graphics&,
int x,
int y,
int width,
int height,
230 const String& text, ToolbarItemComponent&)
override;
233 void drawPropertyPanelSectionHeader (Graphics&,
const String& name,
bool isOpen,
int width,
int height)
override;
234 void drawPropertyComponentBackground (Graphics&,
int width,
int height, PropertyComponent&)
override;
235 void drawPropertyComponentLabel (Graphics&,
int width,
int height, PropertyComponent&)
override;
236 Rectangle<int> getPropertyComponentContentPosition (PropertyComponent&)
override;
239 void drawCallOutBoxBackground (CallOutBox&, Graphics&,
const Path&, Image&)
override;
242 void drawStretchableLayoutResizerBar (Graphics&,
int,
int,
bool,
bool,
bool)
override;
246 static void drawLinearProgressBar (Graphics&,
const ProgressBar&,
int,
int,
double,
const String&);
247 static void drawCircularProgressBar (Graphics&,
const ProgressBar&,
const String&);
250 int getPropertyComponentIndent (PropertyComponent&);
253 void initialiseColours();
254 ColourScheme currentColourScheme;