72 void setExtraComponent (
Component* extraTabComponent,
73 ExtraComponentPlacement extraComponentPlacement);
95 Colour getTabBackgroundColour()
const;
98 bool isFrontTab()
const;
107 virtual int getBestTabLength (
int depth);
111 void paintButton (
Graphics&,
bool,
bool)
override;
115 bool hitTest (
int x,
int y)
override;
117 void resized()
override;
119 void childBoundsChanged (
Component*)
override;
124 int overlapPixels = 0;
127 ExtraComponentPlacement extraCompPlacement = afterText;
130 using Button::clicked;
185 void setOrientation (Orientation orientation);
193 bool isVertical() const noexcept {
return orientation == TabsAtLeft || orientation == TabsAtRight; }
196 int getThickness() const noexcept {
return isVertical() ? getWidth() : getHeight(); }
201 void setMinimumTabScaleFactor (
double newMinimumScale);
213 void addTab (
const String& tabName,
214 Colour tabBackgroundColour,
218 void setTabName (
int tabIndex,
const String& newName);
221 void removeTab (
int tabIndex,
bool animate =
false);
226 void moveTab (
int currentIndex,
int newIndex,
bool animate =
false);
229 int getNumTabs()
const;
241 void setCurrentTabIndex (
int newTabIndex,
bool sendChangeMessage =
true);
246 String getCurrentTabName()
const;
261 int indexOfTabButton (
const TabBarButton* button)
const;
270 virtual void currentTabChanged (
int newCurrentTabIndex,
271 const String& newCurrentTabName);
274 virtual void popupMenuClickOnTab (
int tabIndex,
const String& tabName);
279 Colour getTabBackgroundColour (
int tabIndex);
284 void setTabBackgroundColour (
int tabIndex,
Colour newColour);
296 tabOutlineColourId = 0x1005812,
297 tabTextColourId = 0x1005813,
299 frontOutlineColourId = 0x1005814,
300 frontTextColourId = 0x1005815,
313 virtual int getTabButtonSpaceAroundImage() = 0;
314 virtual int getTabButtonOverlap (
int tabDepth) = 0;
315 virtual int getTabButtonBestWidth (
TabBarButton&,
int tabDepth) = 0;
320 virtual void drawTabButtonText (
TabBarButton&,
Graphics&,
bool isMouseOver,
bool isMouseDown) = 0;
324 virtual void createTabButtonShape (
TabBarButton&,
Path& path,
bool isMouseOver,
bool isMouseDown) = 0;
325 virtual void fillTabButtonShape (
TabBarButton&,
Graphics&,
const Path& path,
bool isMouseOver,
bool isMouseDown) = 0;
327 virtual Button* createTabBarExtrasButton() = 0;
334 void resized()
override;
336 void lookAndFeelChanged()
override;
359 Orientation orientation;
360 double minimumScale = 0.7;
361 int currentTabIndex = -1;
363 class BehindFrontTabComp;
367 void showExtraItemsMenu();
368 void updateTabPositions (
bool animate);
Holds a list of ChangeListeners, and sends messages to them when instructed.
Represents a colour, also including a transparency value.
The base class for all JUCE user-interface objects.
Represents a particular font, including its size, style, etc.
A graphics context, used for drawing a component or image.
Represents the state of the mouse buttons and modifier keys.
An array designed for holding objects.
A path is a sequence of lines and curves that may either form a closed shape or be open-ended.
Manages a rectangle and allows geometric operations to be performed on it.
A special array for holding a list of strings.