1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-09-03 09:56:22 +00:00
parent e79e69be54
commit 45b2d8a0ce
2 changed files with 18 additions and 15 deletions

View file

@ -91,21 +91,22 @@ private:
};
void DialogWindow::showModalDialog (const String& dialogTitle,
Component* contentComponent,
Component* componentToCentreAround,
const Colour& colour,
const bool escapeKeyTriggersCloseButton,
const bool shouldBeResizable,
const bool useBottomRightCornerResizer)
int DialogWindow::showModalDialog (const String& dialogTitle,
Component* contentComponent,
Component* componentToCentreAround,
const Colour& colour,
const bool escapeKeyTriggersCloseButton,
const bool shouldBeResizable,
const bool useBottomRightCornerResizer)
{
TempDialogWindow dw (dialogTitle, colour, escapeKeyTriggersCloseButton);
dw.setContentComponent (contentComponent, true, true);
dw.centreAroundComponent (componentToCentreAround, dw.getWidth(), dw.getHeight());
dw.setResizable (shouldBeResizable, useBottomRightCornerResizer);
dw.runModalLoop();
const int result = dw.runModalLoop();
dw.setContentComponent (0, false);
return result;
}

View file

@ -88,6 +88,8 @@ public:
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.
@param dialogTitle the dialog box's title
@param contentComponent the content component for the dialog box. Make sure
that this has been set to the size you want it to
@ -106,13 +108,13 @@ public:
@param useBottomRightCornerResizer if shouldBeResizable is true, this indicates whether
to use a border or corner resizer component. See ResizableWindow::setResizable()
*/
static void showModalDialog (const String& dialogTitle,
Component* contentComponent,
Component* componentToCentreAround,
const Colour& backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool shouldBeResizable = false,
const bool useBottomRightCornerResizer = false);
static int showModalDialog (const String& dialogTitle,
Component* contentComponent,
Component* componentToCentreAround,
const Colour& backgroundColour,
const bool escapeKeyTriggersCloseButton,
const bool shouldBeResizable = false,
const bool useBottomRightCornerResizer = false);
//==============================================================================
juce_UseDebuggingNewOperator