Loading...
Searching...
No Matches
juce::DesktopWindowOptions Class Referencefinal

Detailed Description

Describes the desktop window that Component::addToDesktop() should create for a component.

See also
Component::addToDesktop

The documentation for this class was generated from the following file:

Public Member Functions

DesktopWindowOptions withStyleFlags (int newFlags) const
 Sets the window's style flags, a combination of the values in ComponentPeer::StyleFlags.
DesktopWindowOptions withParentUIView (void *view) const
 Sets a UIView in which the component should place itself, instead of creating a window of its own.
DesktopWindowOptions withParentAndroidActivity (void *activity) const
 Sets an Android Activity whose content view the component should become, instead of creating a window of its own.
DesktopWindowOptions withParentAndroidViewGroup (void *viewGroup) const
 Sets an Android ViewGroup in which the component should place itself, instead of creating a window of its own.
DesktopWindowOptions withParentNSView (void *view) const
 Sets an NSView in which the component should place itself, instead of creating a window of its own.
DesktopWindowOptions withParentHWND (void *hwnd) const
 Sets a HWND in which the component should place itself as a child window, instead of creating a top-level window.
DesktopWindowOptions withParentX11Window (uint64_t window) const
 Sets an X11 window in which the component should place itself as a child window, instead of creating a top-level window.
DesktopWindowOptions withAssociatedComponent (Component *component) const
 Sets the component that the window is opened from.
int getStyleFlags () const noexcept
 Returns the window's style flags.
void * getParentUIView () const noexcept
 Returns the UIView to attach to.
void * getParentAndroidActivity () const noexcept
 Returns the Android Activity to attach to.
void * getParentAndroidViewGroup () const noexcept
 Returns the Android ViewGroup to attach to.
void * getParentNSView () const noexcept
 Returns the NSView to attach to.
void * getParentHWND () const noexcept
 Returns the HWND to attach to.
uint64_t getParentX11Window () const noexcept
 Returns the X11 window to attach to.
Component * getAssociatedComponent () const noexcept
 Returns the component that the window is opened from, or nullptr if none was set.

Member Functions

◆ withStyleFlags()

DesktopWindowOptions juce::DesktopWindowOptions::withStyleFlags ( int newFlags) const
inlinenodiscard

Sets the window's style flags, a combination of the values in ComponentPeer::StyleFlags.

References juce::withMember().

◆ withParentUIView()

DesktopWindowOptions juce::DesktopWindowOptions::withParentUIView ( void * view) const
inlinenodiscard

Sets a UIView in which the component should place itself, instead of creating a window of its own.

This is used on iOS and has no effect on other platforms.

◆ withParentAndroidActivity()

DesktopWindowOptions juce::DesktopWindowOptions::withParentAndroidActivity ( void * activity) const
inlinenodiscard

Sets an Android Activity whose content view the component should become, instead of creating a window of its own.

This is used on Android and has no effect on other platforms.

◆ withParentAndroidViewGroup()

DesktopWindowOptions juce::DesktopWindowOptions::withParentAndroidViewGroup ( void * viewGroup) const
inlinenodiscard

Sets an Android ViewGroup in which the component should place itself, instead of creating a window of its own.

This is used on Android and has no effect on other platforms.

◆ withParentNSView()

DesktopWindowOptions juce::DesktopWindowOptions::withParentNSView ( void * view) const
inlinenodiscard

Sets an NSView in which the component should place itself, instead of creating a window of its own.

This is used on macOS and has no effect on other platforms.

◆ withParentHWND()

DesktopWindowOptions juce::DesktopWindowOptions::withParentHWND ( void * hwnd) const
inlinenodiscard

Sets a HWND in which the component should place itself as a child window, instead of creating a top-level window.

This is used on Windows and has no effect on other platforms.

◆ withParentX11Window()

DesktopWindowOptions juce::DesktopWindowOptions::withParentX11Window ( uint64_t window) const
inlinenodiscard

Sets an X11 window in which the component should place itself as a child window, instead of creating a top-level window.

This is used on Linux and BSD and has no effect on other platforms.

References juce::window.

◆ withAssociatedComponent()

DesktopWindowOptions juce::DesktopWindowOptions::withAssociatedComponent ( Component * component) const
inlinenodiscard

Sets the component that the window is opened from.

The new window is kept above the window containing that component without being kept above other applications, and is minimised and restored with it. Where a window can position itself, it is also moved when that window is moved. A temporary window such as a menu, a tooltip or a drag image should name the component it was opened for, and a tool window that floats over a main window should name a component in that window, normally omitting ComponentPeer::windowAppearsOnTaskbar from the window style flags as well.

The component's window is looked up when the desktop window is created, so the component should be on the desktop, or inside a component that is, by then. It has no effect on iOS or Android. On macOS a window takes the level of the window it is associated with, so Component::setAlwaysOnTop() has no effect on it.

A window cannot be associated with a component in itself, or in a window that was opened from it, directly or indirectly. Such an association is ignored.

See also
ComponentPeer::getAssociatedComponent, TopLevelWindow::setAssociatedComponent

References juce::withMember().

◆ getStyleFlags()

int juce::DesktopWindowOptions::getStyleFlags ( ) const
inlinenoexcept

Returns the window's style flags.

◆ getParentUIView()

void * juce::DesktopWindowOptions::getParentUIView ( ) const
inlinenoexcept

Returns the UIView to attach to.

◆ getParentAndroidActivity()

void * juce::DesktopWindowOptions::getParentAndroidActivity ( ) const
inlinenoexcept

Returns the Android Activity to attach to.

◆ getParentAndroidViewGroup()

void * juce::DesktopWindowOptions::getParentAndroidViewGroup ( ) const
inlinenoexcept

Returns the Android ViewGroup to attach to.

◆ getParentNSView()

void * juce::DesktopWindowOptions::getParentNSView ( ) const
inlinenoexcept

Returns the NSView to attach to.

◆ getParentHWND()

void * juce::DesktopWindowOptions::getParentHWND ( ) const
inlinenoexcept

Returns the HWND to attach to.

◆ getParentX11Window()

uint64_t juce::DesktopWindowOptions::getParentX11Window ( ) const
inlinenoexcept

Returns the X11 window to attach to.

◆ getAssociatedComponent()

Component * juce::DesktopWindowOptions::getAssociatedComponent ( ) const
inlinenoexcept

Returns the component that the window is opened from, or nullptr if none was set.