JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::DialogWindow::LaunchOptions Struct Reference

This class defines a collection of settings to be used to open a DialogWindow. More...

#include "juce_DialogWindow.h"

Public Member Functions

DialogWindowlaunchAsync ()
 Launches a new modal dialog window.
 
DialogWindowcreate ()
 Creates a new DialogWindow instance with these settings.
 

Public Attributes

String dialogTitle
 The title to give the window.
 
Colour dialogBackgroundColour
 The background colour for the window.
 
OptionalScopedPointer< Componentcontent
 The content component to show in the window.
 
ComponentcomponentToCentreAround
 If this is not a nullptr, it indicates a component that you'd like to position this dialog box in front of.
 
bool escapeKeyTriggersCloseButton
 If true, then the escape key will trigger the dialog's close button.
 
bool useNativeTitleBar
 If true, the dialog will use a native title bar.
 
bool resizable
 If true, the window will be resizable.
 
bool useBottomRightCornerResizer
 Indicates whether to use a border or corner resizer component.
 

Detailed Description

This class defines a collection of settings to be used to open a DialogWindow.

The easiest way to open a DialogWindow is to create yourself a LaunchOptions structure, initialise its fields with the appropriate details, and then call its launchAsync() method to launch the dialog.

Definition at line 89 of file juce_DialogWindow.h.

Constructor & Destructor Documentation

◆ LaunchOptions()

juce::DialogWindow::LaunchOptions::LaunchOptions ( )
noexcept

Definition at line 107 of file juce_DialogWindow.cpp.

Member Function Documentation

◆ create()

DialogWindow * juce::DialogWindow::LaunchOptions::create ( )

Creates a new DialogWindow instance with these settings.

This method simply creates the window, it doesn't run it modally. In most cases you'll want to use launchAsync() or runModal() instead.

Definition at line 109 of file juce_DialogWindow.cpp.

◆ launchAsync()

DialogWindow * juce::DialogWindow::LaunchOptions::launchAsync ( )

Launches a new modal dialog window.

This will create a dialog based on the settings in this structure, launch it modally, and return immediately. The window that is returned will be automatically deleted when the modal state is terminated.

When the dialog's close button is clicked, it'll automatically terminate its modal state, but you can also do this programmatically by calling exitModalState (returnValue) on the DialogWindow.

If your content component needs to find the dialog window that it is contained in, a quick trick is to do this:

dw->exitModalState (1234);
TargetClass * findParentComponentOfClass() const
Searches the parent components for a component of a specified class.
A dialog-box style window.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Definition juce_Memory.h:88

Definition at line 116 of file juce_DialogWindow.cpp.

Member Data Documentation

◆ componentToCentreAround

Component* juce::DialogWindow::LaunchOptions::componentToCentreAround

If this is not a nullptr, it indicates a component that you'd like to position this dialog box in front of.

See the DocumentWindow::centreAroundComponent() method for more info about this parameter.

Definition at line 110 of file juce_DialogWindow.h.

◆ content

OptionalScopedPointer<Component> juce::DialogWindow::LaunchOptions::content

The content component to show in the window.

This must not be null! Using an OptionalScopedPointer to hold this pointer lets you indicate whether you'd like the dialog to automatically delete the component when the dialog has terminated.

Definition at line 104 of file juce_DialogWindow.h.

◆ dialogBackgroundColour

Colour juce::DialogWindow::LaunchOptions::dialogBackgroundColour

The background colour for the window.

Definition at line 97 of file juce_DialogWindow.h.

◆ dialogTitle

String juce::DialogWindow::LaunchOptions::dialogTitle

The title to give the window.

Definition at line 94 of file juce_DialogWindow.h.

◆ escapeKeyTriggersCloseButton

bool juce::DialogWindow::LaunchOptions::escapeKeyTriggersCloseButton

If true, then the escape key will trigger the dialog's close button.

Definition at line 113 of file juce_DialogWindow.h.

◆ resizable

bool juce::DialogWindow::LaunchOptions::resizable

If true, the window will be resizable.

See ResizableWindow::setResizable()

Definition at line 117 of file juce_DialogWindow.h.

◆ useBottomRightCornerResizer

bool juce::DialogWindow::LaunchOptions::useBottomRightCornerResizer

Indicates whether to use a border or corner resizer component.

See ResizableWindow::setResizable()

Definition at line 119 of file juce_DialogWindow.h.

◆ useNativeTitleBar

bool juce::DialogWindow::LaunchOptions::useNativeTitleBar

If true, the dialog will use a native title bar.

See TopLevelWindow::setUsingNativeTitleBar()

Definition at line 115 of file juce_DialogWindow.h.


The documentation for this struct was generated from the following files: