1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-04 03:40:07 +00:00

Small fixes for MSVC compiler problems.

This commit is contained in:
Julian Storer 2010-12-01 09:42:36 +00:00
parent 4e52fac18e
commit fc04109434
4 changed files with 46 additions and 42 deletions

View file

@ -60,6 +60,27 @@ void DialogWindow::resized()
}
}
// (Sadly, this can't be made a local class inside the showModalDialog function, because the
// VC compiler complains about the undefined copy constructor)
class TempDialogWindow : public DialogWindow
{
public:
TempDialogWindow (const String& title, const Colour& colour, const bool escapeCloses)
: DialogWindow (title, colour, escapeCloses, true)
{
if (! JUCEApplication::isStandaloneApp())
setAlwaysOnTop (true); // for a plugin, make it always-on-top because the host windows are often top-level
}
void closeButtonPressed()
{
setVisible (false);
}
private:
JUCE_DECLARE_NON_COPYABLE (TempDialogWindow);
};
//==============================================================================
int DialogWindow::showModalDialog (const String& dialogTitle,
@ -70,25 +91,6 @@ int DialogWindow::showModalDialog (const String& dialogTitle,
const bool shouldBeResizable,
const bool useBottomRightCornerResizer)
{
class TempDialogWindow : public DialogWindow
{
public:
TempDialogWindow (const String& title, const Colour& colour, const bool escapeCloses)
: DialogWindow (title, colour, escapeCloses, true)
{
if (! JUCEApplication::isStandaloneApp())
setAlwaysOnTop (true); // for a plugin, make it always-on-top because the host windows are often top-level
}
void closeButtonPressed()
{
setVisible (false);
}
private:
JUCE_DECLARE_NON_COPYABLE (TempDialogWindow);
};
TempDialogWindow dw (dialogTitle, colour, escapeKeyTriggersCloseButton);
dw.setContentComponent (contentComponent, true, true);