29class MultiDocumentPanel;
57 void maximiseButtonPressed()
override;
59 void closeButtonPressed()
override;
61 void activeWindowStatusChanged()
override;
63 void broughtToFront()
override;
67 void updateActiveDocument();
112 #if JUCE_MODAL_LOOPS_PERMITTED
124 bool closeAllDocuments (
bool checkItsOkToCloseFirst);
139 void closeAllDocumentsAsync (
bool checkItsOkToCloseFirst,
161 bool deleteWhenRemoved);
163 #if JUCE_MODAL_LOOPS_PERMITTED
178 bool closeDocument (
Component* component,
179 bool checkItsOkToCloseFirst);
196 void closeDocumentAsync (
Component* component,
197 bool checkItsOkToCloseFirst,
204 int getNumDocuments()
const noexcept;
213 Component* getDocument (
int index)
const noexcept;
224 Component* getActiveDocument()
const noexcept;
230 void setActiveDocument (
Component* component);
233 virtual void activeDocumentChanged();
240 void setMaximumNumDocuments (
int maximumNumDocuments);
249 void useFullscreenWhenOneDocument (
bool shouldUseTabs);
253 bool isFullscreenWhenOneDocument()
const noexcept;
260 MaximisedWindowsWithTabs
267 void setLayoutMode (LayoutMode newLayoutMode);
277 void setBackgroundColour (
Colour newBackgroundColour);
289 #if JUCE_MODAL_LOOPS_PERMITTED
311 virtual bool tryToCloseDocument (
Component* component);
349 void resized()
override;
351 void componentNameChanged (
Component&)
override;
365 void updateActiveDocumentFromUIState();
368 void recreateLayout();
373 bool isLayoutBeingChanged =
false;
375 Colour backgroundColour { Colours::lightblue };
376 int maximumNumDocuments = 0, numDocsBeforeTabsUsed = 0;
Holds a resizable array of primitive or copy-by-value objects.
Represents a colour, also including a transparency value.
Gets informed about changes to a component's hierarchy or position.
Holds a pointer to some type of Component, which automatically becomes null if the component is delet...
The base class for all JUCE user-interface objects.
A resizable window with a title bar and maximise, minimise and close buttons.
A graphics context, used for drawing a component or image.
This is a derivative of DocumentWindow that is used inside a MultiDocumentPanel component.
A component that contains a set of other components either in floating windows or tabs.
virtual void tryToCloseDocumentAsync(Component *component, std::function< void(bool)> callback)=0
A subclass must override this to say whether its currently ok for a document to be closed.
LayoutMode
The different layout modes available.
@ FloatingWindows
In this mode, there are overlapping DocumentWindow components for each document.
Colour getBackgroundColour() const noexcept
Returns the current background colour.
TabbedComponent * getCurrentTabbedComponent() const noexcept
If the panel is being used in tabbed mode, this returns the TabbedComponent that's involved.
LayoutMode getLayoutMode() const noexcept
Returns the current layout mode.
A component with a TabbedButtonBar along one of its sides.