Inheritance diagram for DialogWindow:

This class is a convenient way of creating a DocumentWindow with a close button that can be triggered by pressing the escape key.
Any of the methods available to a DocumentWindow or ResizableWindow are also available to this, so it can be made resizable, have a menu bar, etc.
To add items to the box, see the ResizableWindow::setContentComponent() method. Don't add components directly to this class - always put them in a content component!
You'll need to override the DocumentWindow::closeButtonPressed() method to handle the user clicking the close button - for more info, see the DocumentWindow help.
Public Member Functions | |
| DialogWindow (const String &name, const Colour &backgroundColour, const bool escapeKeyTriggersCloseButton, const bool addToDesktop=true) | |
| Creates a DialogWindow. | |
| ~DialogWindow () | |
| Destructor. | |
Static Public Member Functions | |
| static int | showModalDialog (const String &dialogTitle, Component *contentComponent, Component *componentToCentreAround, const Colour &backgroundColour, const bool escapeKeyTriggersCloseButton, const bool shouldBeResizable=false, const bool useBottomRightCornerResizer=false) |
| Easy way of quickly showing a dialog box containing a given component. | |
Protected Member Functions | |
| void | resized () |
|
||||||||||||||||||||
|
Creates a DialogWindow.
|
|
|
Destructor. If a content component has been set with setContentComponent(), it will be deleted. |
|
||||||||||||||||||||||||||||||||
|
Easy way of quickly showing a dialog box containing a given component. This will open and display a DialogWindow containing a given component, returning when the user clicks its close button. It returns the value that was returned by the dialog box's runModalLoop() call. To close the dialog programatically, you should call exitModalState (returnValue) on the DialogWindow that is created. To find a pointer to this window from your contentComponent, you can do something like this: Dialogwindow* dw = contentComponent->findParentComponentOfClass ((DialogWindow*) 0); if (dw != 0) dw->exitModalState (1234);
|
|
|
For internal use only.
Reimplemented from DocumentWindow. |