mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a new struct DialogWindow::LaunchOptions, to provide a better mechanism than the existing static methods for launching dialog boxes. I've left the old static methods in there but will probably deprecate them at some point in the future. Also added a couple of methods to OptionalOwnedPointer.
This commit is contained in:
parent
a4e87ef28a
commit
d7cea05104
11 changed files with 253 additions and 125 deletions
|
|
@ -83,7 +83,16 @@ void PreferencesPanel::addSettingsPage (const String& title, const void* imageDa
|
|||
void PreferencesPanel::showInDialogBox (const String& dialogTitle, int dialogWidth, int dialogHeight, const Colour& backgroundColour)
|
||||
{
|
||||
setSize (dialogWidth, dialogHeight);
|
||||
DialogWindow::showDialog (dialogTitle, this, 0, backgroundColour, false);
|
||||
|
||||
DialogWindow::LaunchOptions o;
|
||||
o.content.setNonOwned (this);
|
||||
o.dialogTitle = dialogTitle;
|
||||
o.dialogBackgroundColour = backgroundColour;
|
||||
o.escapeKeyTriggersCloseButton = false;
|
||||
o.useNativeTitleBar = false;
|
||||
o.resizable = false;
|
||||
|
||||
o.launchAsync();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue