mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Big rewrite to the internals of modal components, with a new class ModalComponentManager. This now lets you use modal components asynchronously, providing an object which will receive a callback when they are dismissed, rather than using a blocking event loop. ComboBoxes and some other components now show their popups asynchronously.
This commit is contained in:
parent
80472c3448
commit
b2e0b43960
34 changed files with 1521 additions and 790 deletions
|
|
@ -75,6 +75,11 @@ FileChooserDialogBox::~FileChooserDialogBox()
|
|||
|
||||
//==============================================================================
|
||||
bool FileChooserDialogBox::show (int w, int h)
|
||||
{
|
||||
return showAt (-1, -1, w, h);
|
||||
}
|
||||
|
||||
bool FileChooserDialogBox::showAt (int x, int y, int w, int h)
|
||||
{
|
||||
if (w <= 0)
|
||||
{
|
||||
|
|
@ -88,7 +93,10 @@ bool FileChooserDialogBox::show (int w, int h)
|
|||
if (h <= 0)
|
||||
h = 500;
|
||||
|
||||
centreWithSize (w, h);
|
||||
if (x < 0 || y < 0)
|
||||
centreWithSize (w, h);
|
||||
else
|
||||
setBounds (x, y, w, h);
|
||||
|
||||
const bool ok = (runModalLoop() != 0);
|
||||
setVisible (false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue