CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
Window Class Reference

Display window More...

#include <cc/Window>

Inheritance diagram for Window:

Public Member Functions

 Window ()=default
 Create a null window.
 
 Window (const View &view)
 Open a new window for view.
 
String title () const
 Get window title.
 
Windowtitle (const String &newValue)
 Set window title
 
Windowtitle (Definition< String > &&f)
 Define window title.
 
Image icon () const
 Get window icon.
 
Windowicon (const Image &newValue)
 Set window icon
 
Windowicon (Definition< Image > &&f)
 Define window icon.
 
Point pos () const
 Get window position.
 
Windowpos (Point newValue)
 Set window position
 
Size size () const
 Get window size.
 
Windowsize (Size newValue)
 Set window size
 
bool sizing () const
 Window size is currently undergoing a change
 
WindowMode mode () const
 Get window mode.
 
Windowmode (WindowMode newValue)
 Set window mode
 
double opacity () const
 Get opacity.
 
Windowopacity (double newValue)
 Set opacity
 
void show (int display=0)
 Show window on display.
 
void hide ()
 Hide window.
 
void raise ()
 Raise window and acquire input focus.
 
int run ()
 
bool visible () const
 Convenience method to show this window and run the application loop.
 
View view () const
 Get window's root view.
 
Control findControl (Point pos) const
 Get control at pos.
 
Display display () const
 Get the display this window is shown on.
 
void renderViewToImage (const View &view, Image &image)
 Render view into user allocated image.
 
- Public Member Functions inherited from Object
 Object ()=default
 Create a null object.
 
 operator bool () const
 Check if this is a non-null object.
 
bool isNull () const
 Check if this is a null object.
 
template<class T >
bool is () const
 Check if this object is of type T.
 
template<class T >
as () const
 Cast this object to type T.
 
bool isWeak () const
 Check if the underlying object reference is weak.
 
bool operator== (const Object &other) const
 Equality operator.
 
std::strong_ordering operator<=> (const Object &other) const
 Ordering operator.
 
long useCount () const
 Reference count.
 

Protected Member Functions

 Window (State *state)
 
State & me ()
 
const State & me () const
 
- Protected Member Functions inherited from Object
template<class T >
weak () const
 
template<class T >
void initOnce ()
 Create the object state when called the first time.
 
template<class T >
void initOncePerThread ()
 Create a distinct object state for each thread when called the first time in that thread.
 
 Object (State *newState)
 Initialize object with newState.
 
 Object (State *state, Alias)
 
 Object (State *state, Weak)
 
Objectoperator= (std::nullptr_t)
 

Additional Inherited Members

- Static Protected Member Functions inherited from Object
template<class T >
static T alias (const State *state)
 Create an alias object for the given state.
 
template<class T >
static T weak (const State *state)
 
- Protected Attributes inherited from Object
Handle< Stateme
 Internal object state
 

Detailed Description

Display window

Constructor & Destructor Documentation

◆ Window() [1/2]

Window ( )
default

Create a null window.

◆ Window() [2/2]

Window ( const View & view)
explicit

Open a new window for view.

Member Function Documentation

◆ title() [1/3]

String title ( ) const

Get window title.

◆ title() [2/3]

Window & title ( const String & newValue)

Set window title

◆ title() [3/3]

Window & title ( Definition< String > && f)

Define window title.

◆ icon() [1/3]

Image icon ( ) const

Get window icon.

◆ icon() [2/3]

Window & icon ( const Image & newValue)

Set window icon

◆ icon() [3/3]

Window & icon ( Definition< Image > && f)

Define window icon.

◆ pos() [1/2]

Point pos ( ) const

Get window position.

◆ pos() [2/2]

Window & pos ( Point newValue)

Set window position

◆ size() [1/2]

Size size ( ) const

Get window size.

◆ size() [2/2]

Window & size ( Size newValue)

Set window size

◆ sizing()

bool sizing ( ) const

Window size is currently undergoing a change

◆ mode() [1/2]

WindowMode mode ( ) const

Get window mode.

◆ mode() [2/2]

Window & mode ( WindowMode newValue)

Set window mode

◆ opacity() [1/2]

double opacity ( ) const

Get opacity.

◆ opacity() [2/2]

Window & opacity ( double newValue)

Set opacity

◆ show()

void show ( int display = 0)

Show window on display.

◆ hide()

void hide ( )

Hide window.

◆ raise()

void raise ( )

Raise window and acquire input focus.

◆ visible()

bool visible ( ) const

Convenience method to show this window and run the application loop.

Check if window is shown

◆ view()

View view ( ) const

Get window's root view.

◆ findControl()

Control findControl ( Point pos) const

Get control at pos.

◆ display()

Display display ( ) const

Get the display this window is shown on.

◆ renderViewToImage()

void renderViewToImage ( const View & view,
Image & image )

Render view into user allocated image.