158 virtual Path getSidePanelDismissButtonShape (
SidePanel&) = 0;
170 backgroundColour = 0x100f001,
171 titleTextColour = 0x100f002,
172 shadowBaseColour = 0x100f003,
173 dismissButtonNormalColour = 0x100f004,
174 dismissButtonOverColour = 0x100f005,
175 dismissButtonDownColour = 0x100f006
187 void moved()
override;
208 ShapeButton dismissButton {
"dismissButton", Colours::lightgrey, Colours::lightgrey, Colours::white };
212 bool isOnLeft =
false;
213 bool isShowing =
false;
216 int shadowWidth = 15;
217 int titleBarHeight = 40;
220 bool shouldResize =
false;
223 bool shouldShowDismissButton =
true;
226 void lookAndFeelChanged()
override;
233 bool isMouseEventInThisOrChildren (
Component*);
Holds a list of ChangeListeners, and sends messages to them when instructed.
Receives change event callbacks that are sent out by a ChangeBroadcaster.
Gets informed about changes to a component's hierarchy or position.
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 a type of justification to be used when positioning graphical items.
A component that displays a text string, and can optionally become a text editor when clicked.
String getText(bool returnActiveEditorContents=false) const
Returns the label's current text.
Contains position and status information about a mouse event.
Holds a pointer to an object which can optionally be deleted when this pointer goes out of scope.
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 component that is positioned on either the left- or right-hand side of its parent,...
void setTitleBarComponent(Component *titleBarComponentToUse, bool keepDismissButton, bool deleteComponentWhenNoLongerNeeded=true)
Sets a custom component to be used for the title bar of this SidePanel, replacing the default.
bool isPanelShowing() const noexcept
Returns true if the SidePanel is currently showing.
void showOrHide(bool show)
Shows or hides the SidePanel.
std::function< void()> onPanelMove
You can assign a lambda to this callback object and it will be called when the panel is moved.
void setShadowWidth(int newWidth) noexcept
Sets the width of the shadow that will be drawn on the side of the panel.
void setContent(Component *newContentComponent, bool deleteComponentWhenNoLongerNeeded=true)
Sets the component that this SidePanel will contain.
Component * getContent() const noexcept
Returns the component that's currently being used inside the SidePanel.
void setTitleBarHeight(int newHeight) noexcept
Sets the height of the title bar at the top of the SidePanel.
void resized() override
Called when this component's size has been changed.
int getShadowWidth() const noexcept
Returns the width of the shadow that will be drawn on the side of the panel.
ColourIds
A set of colour IDs to use to change the colour of various aspects of the SidePanel.
void paint(Graphics &g) override
Components can override this method to draw their content.
String getTitleText() const noexcept
Returns the text that is displayed in the title bar at the top of the SidePanel.
void parentHierarchyChanged() override
Called to indicate that the component's parents have changed.
Component * getTitleBarComponent() const noexcept
Returns the component that is currently being used as the title bar of the SidePanel.
void mouseUp(const MouseEvent &) override
Called when a mouse button is released.
void mouseDrag(const MouseEvent &) override
Called when the mouse is moved while a button is held down.
std::unique_ptr< AccessibilityHandler > createAccessibilityHandler() override
Override this method to return a custom AccessibilityHandler for this component.
~SidePanel() override
Destructor.
int getTitleBarHeight() const noexcept
Returns the height of the title bar at the top of the SidePanel.
std::function< void(bool)> onPanelShowHide
You can assign a lambda to this callback object and it will be called when the panel is shown or hidd...
void moved() override
Called when this component's position has been changed.
bool isPanelOnLeft() const noexcept
Returns true if the SidePanel is positioned on the left of its parent.
A simple class for holding temporary references to a string literal or String.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
This abstract base class is implemented by LookAndFeel classes to provide SidePanel drawing functiona...