#include <windowProperties.h>
Public Member Functions | |
WindowProperties () | |
WindowProperties (const WindowProperties ©) | |
void | operator= (const WindowProperties ©) |
~WindowProperties () | |
bool | operator== (const WindowProperties &other) const |
bool | operator!= (const WindowProperties &other) const |
void | clear () |
Unsets all properties that have been specified so far, and resets the WindowProperties structure to its initial empty state. | |
bool | is_any_specified () const |
Returns true if any properties have been specified, false otherwise. | |
void | set_origin (int x_origin, int y_origin) |
Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window should appear. | |
int | get_x_origin () const |
Returns the x coordinate of the window's top-left corner, not including decorations. | |
int | get_y_origin () const |
Returns the y coordinate of the window's top-left corner, not including decorations. | |
bool | has_origin () const |
Returns true if the window origin has been specified, false otherwise. | |
void | clear_origin () |
Removes the origin specification from the properties. | |
void | set_size (int x_size, int y_size) |
Specifies the requested size of the window, in pixels. | |
int | get_x_size () const |
Returns size in pixels in the x dimension of the useful part of the window, not including decorations. | |
int | get_y_size () const |
Returns size in pixels in the y dimension of the useful part of the window, not including decorations. | |
bool | has_size () const |
Returns true if the window size has been specified, false otherwise. | |
void | clear_size () |
Removes the size specification from the properties. | |
void | set_title (const string &title) |
Specifies the title that should be assigned to the window. | |
const string & | get_title () const |
Returns the window's title. | |
bool | has_title () const |
Returns true if the window title has been specified, false otherwise. | |
void | clear_title () |
Removes the title specification from the properties. | |
void | set_undecorated (bool undecorated) |
Specifies whether the window should be created with a visible title and border (false, the default) or not (true). | |
bool | get_undecorated () const |
Returns true if the window has no border. | |
bool | has_undecorated () const |
Returns true if set_undecorated() has been specified. | |
void | clear_undecorated () |
Removes the undecorated specification from the properties. | |
void | set_fullscreen (bool fullscreen) |
Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (false, the default). | |
bool | get_fullscreen () const |
Returns true if the window is in fullscreen mode. | |
bool | has_fullscreen () const |
Returns true if set_fullscreen() has been specified. | |
void | clear_fullscreen () |
Removes the fullscreen specification from the properties. | |
void | set_foreground (bool foreground) |
Specifies whether the window should be opened in the foreground (true), or left in the background (false). | |
bool | get_foreground () const |
Returns true if the window is in the foreground. | |
bool | has_foreground () const |
Returns true if set_foreground() has been specified. | |
void | clear_foreground () |
Removes the foreground specification from the properties. | |
void | set_minimized (bool minimized) |
Specifies whether the window should be created minimized (true), or normal (false). | |
bool | get_minimized () const |
Returns true if the window is minimized. | |
bool | has_minimized () const |
Returns true if set_minimized() has been specified. | |
void | clear_minimized () |
Removes the minimized specification from the properties. | |
void | set_open (bool open) |
Specifies whether the window should be open. | |
bool | get_open () const |
Returns true if the window is open. | |
bool | has_open () const |
Returns true if set_open() has been specified. | |
void | clear_open () |
Removes the open specification from the properties. | |
void | set_cursor_hidden (bool cursor_hidden) |
Specifies whether the mouse cursor should be visible. | |
bool | get_cursor_hidden () const |
Returns true if the mouse cursor is invisible. | |
bool | has_cursor_hidden () const |
Returns true if set_cursor_hidden() has been specified. | |
void | clear_cursor_hidden () |
Removes the cursor_hidden specification from the properties. | |
void | add_properties (const WindowProperties &other) |
Sets any properties that are explicitly specified in other on this object. | |
void | output (ostream &out) const |
Sets any properties that are explicitly specified in other on this object. | |
Private Types | |
enum | Specified { S_origin = 0x0001, S_size = 0x0002, S_title = 0x0004, S_undecorated = 0x0008, S_fullscreen = 0x0010, S_foreground = 0x0020, S_minimized = 0x0040, S_open = 0x0080, S_cursor_hidden = 0x0100 } |
enum | Flags { F_undecorated = S_undecorated, F_fullscreen = S_fullscreen, F_foreground = S_foreground, F_minimized = S_minimized, F_open = S_open, F_cursor_hidden = S_cursor_hidden } |
Private Attributes | |
int | _specified |
int | _x_origin |
int | _y_origin |
int | _x_size |
int | _y_size |
string | _title |
int | _flags |
This also serves to hold the current properties for a window after it has been opened.
Definition at line 40 of file windowProperties.h.
|
Definition at line 123 of file windowProperties.h. |
|
Definition at line 108 of file windowProperties.h. |
|
Definition at line 33 of file windowProperties.cxx. References _specified, _title, _x_origin, _x_size, _y_origin, and _y_size. |
|
Definition at line 31 of file windowProperties.I. References INLINE. |
|
Definition at line 43 of file windowProperties.I. References INLINE, and operator==(). |
|
Sets any properties that are explicitly specified in other on this object. Leaves other properties unchanged. Definition at line 109 of file windowProperties.cxx. References get_minimized(), and set_minimized(). Referenced by GraphicsWindow::clear(), GraphicsWindow::clear_rejected_properties(), and GraphicsWindow::verify_window_sizes(). |
|
Unsets all properties that have been specified so far, and resets the WindowProperties structure to its initial empty state.
Definition at line 86 of file windowProperties.cxx. References get_foreground(), get_fullscreen(), get_title(), get_undecorated(), get_x_origin(), get_x_size(), get_y_origin(), get_y_size(), has_foreground(), has_fullscreen(), has_origin(), has_size(), has_title(), has_undecorated(), set_foreground(), set_fullscreen(), set_origin(), set_size(), set_title(), and set_undecorated(). Referenced by GraphicsWindow::verify_window_sizes(). |
|
Removes the cursor_hidden specification from the properties.
Definition at line 663 of file windowProperties.I. |
|
Removes the foreground specification from the properties.
Definition at line 483 of file windowProperties.I. |
|
Removes the fullscreen specification from the properties.
Definition at line 421 of file windowProperties.I. References _flags, _specified, F_open, INLINE, and S_open. |
|
Removes the minimized specification from the properties.
Definition at line 543 of file windowProperties.I. |
|
Removes the open specification from the properties.
Definition at line 605 of file windowProperties.I. |
|
Removes the origin specification from the properties.
Definition at line 152 of file windowProperties.I. References _y_size, has_size(), INLINE, and nassertr. Referenced by GraphicsWindow::clear(). |
|
Removes the size specification from the properties.
Definition at line 237 of file windowProperties.I. References _flags, _specified, F_undecorated, INLINE, and S_undecorated. Referenced by GraphicsWindow::clear(). |
|
Removes the title specification from the properties.
Definition at line 297 of file windowProperties.I. References _flags, F_fullscreen, and INLINE. |
|
Removes the undecorated specification from the properties.
Definition at line 359 of file windowProperties.I. References _specified, INLINE, and S_foreground. |
|
Returns true if the mouse cursor is invisible.
Definition at line 637 of file windowProperties.I. |
|
Returns true if the window is in the foreground.
Definition at line 457 of file windowProperties.I. Referenced by clear(). |
|
Returns true if the window is in fullscreen mode.
Definition at line 395 of file windowProperties.I. References _flags, F_minimized, and INLINE. Referenced by clear(). |
|
Returns true if the window is minimized.
Definition at line 517 of file windowProperties.I. References output(). Referenced by add_properties(), and glxGraphicsWindow::open_window(). |
|
Returns true if the window is open.
Definition at line 579 of file windowProperties.I. |
|
Returns the window's title.
Definition at line 268 of file windowProperties.I. References _flags, _specified, F_undecorated, INLINE, and S_undecorated. Referenced by clear(), and glxGraphicsWindow::open_window(). |
|
Returns true if the window has no border.
Definition at line 333 of file windowProperties.I. References _flags, _specified, F_foreground, INLINE, and S_foreground. Referenced by clear(), glxGraphicsWindow::open_window(), and WinGraphicsWindow::reconsider_fullscreen_size(). |
|
Returns the x coordinate of the window's top-left corner, not including decorations.
Definition at line 107 of file windowProperties.I. References _specified, and S_origin. Referenced by clear(), GraphicsWindow::clear(), wdxGraphicsWindow8::end_flip(), and glxGraphicsWindow::open_window(). |
|
Returns size in pixels in the x dimension of the useful part of the window, not including decorations. That is, this is the window's width. Definition at line 190 of file windowProperties.I. References _specified, _title, INLINE, and S_title. Referenced by GraphicsWindow::begin_flip(), clear(), GraphicsWindow::clear(), wdxGraphicsWindow8::end_flip(), DisplayRegion::get_bottom(), GraphicsWindow::get_mouse_data(), DisplayRegion::get_pipe(), GraphicsWindow::has_pointer(), glxGraphicsWindow::open_window(), WindowFramework::set_one_sided_reverse(), and MouseAndKeyboard::set_source(). |
|
Returns the y coordinate of the window's top-left corner, not including decorations.
Definition at line 123 of file windowProperties.I. References _specified, _x_size, _y_size, INLINE, and S_size. Referenced by clear(), GraphicsWindow::clear(), wdxGraphicsWindow8::end_flip(), and glxGraphicsWindow::open_window(). |
|
Returns size in pixels in the y dimension of the useful part of the window, not including decorations. That is, this is the window's height. Definition at line 208 of file windowProperties.I. References _specified, INLINE, and S_title. Referenced by GraphicsWindow::begin_flip(), clear(), GraphicsWindow::clear(), wdxGraphicsWindow8::end_flip(), DisplayRegion::get_bottom(), GraphicsWindow::get_mouse_data(), DisplayRegion::get_pipe(), GraphicsWindow::has_pointer(), glxGraphicsWindow::open_window(), and WindowFramework::set_one_sided_reverse(). |
|
Returns true if set_cursor_hidden() has been specified.
Definition at line 650 of file windowProperties.I. |
|
Returns true if set_foreground() has been specified.
Definition at line 470 of file windowProperties.I. References _flags, _specified, F_cursor_hidden, INLINE, and S_cursor_hidden. Referenced by clear(). |
|
Returns true if set_fullscreen() has been specified.
Definition at line 408 of file windowProperties.I. References _specified, and S_minimized. Referenced by clear(). |
|
Returns true if set_minimized() has been specified.
Definition at line 530 of file windowProperties.I. Referenced by glxGraphicsWindow::open_window(). |
|
Returns true if set_open() has been specified.
Definition at line 592 of file windowProperties.I. |
|
Returns true if the window origin has been specified, false otherwise.
Definition at line 139 of file windowProperties.I. References _x_size, has_size(), INLINE, and nassertr. Referenced by clear(), GraphicsWindow::clear(), glxGraphicsWindow::open_window(), and set_origin(). |
|
Returns true if the window size has been specified, false otherwise.
Definition at line 224 of file windowProperties.I. References _specified, _title, INLINE, and S_title. Referenced by clear(), GraphicsWindow::clear(), clear_origin(), DisplayRegion::get_pipe(), has_origin(), glxGraphicsWindow::open_window(), and WindowFramework::set_one_sided_reverse(). |
|
Returns true if the window title has been specified, false otherwise.
Definition at line 284 of file windowProperties.I. References _flags, _specified, F_fullscreen, INLINE, and S_fullscreen. Referenced by clear(), and glxGraphicsWindow::open_window(). |
|
Returns true if set_undecorated() has been specified.
Definition at line 346 of file windowProperties.I. References _flags, F_foreground, and INLINE. Referenced by clear(), and WinGraphicsWindow::reconsider_fullscreen_size(). |
|
Returns true if any properties have been specified, false otherwise.
Definition at line 69 of file windowProperties.I. References _specified, _x_origin, _y_origin, INLINE, and S_origin. Referenced by GraphicsWindow::verify_window_sizes(). |
|
Definition at line 54 of file windowProperties.I. References _specified, and INLINE. |
|
Definition at line 45 of file windowProperties.cxx. References _flags. |
|
Definition at line 63 of file windowProperties.cxx. References _flags, _specified, _title, _x_origin, _x_size, _y_origin, and _y_size. Referenced by ~WindowProperties(). |
|
Sets any properties that are explicitly specified in other on this object. Leaves other properties unchanged. Definition at line 152 of file windowProperties.cxx. Referenced by get_minimized(). |
|
Specifies whether the mouse cursor should be visible.
Definition at line 619 of file windowProperties.I. |
|
Specifies whether the window should be opened in the foreground (true), or left in the background (false).
Definition at line 439 of file windowProperties.I. References _flags, F_open, and INLINE. Referenced by clear(). |
|
Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (false, the default).
Definition at line 377 of file windowProperties.I. References _flags, _specified, F_minimized, INLINE, and S_minimized. Referenced by clear(). |
|
Specifies whether the window should be created minimized (true), or normal (false).
Definition at line 499 of file windowProperties.I. References _specified, INLINE, and S_cursor_hidden. Referenced by add_properties(). |
|
Specifies whether the window should be open. It is legal to create a GraphicsWindow in the closed state, and later request it to open by changing this flag. Definition at line 561 of file windowProperties.I. |
|
Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window should appear. This is the origin of the top-left corner of the useful part of the window, not including decorations. Definition at line 90 of file windowProperties.I. References _y_origin, has_origin(), INLINE, and nassertr. Referenced by clear(), GraphicsWindow::clear(), and WinGraphicsWindow::fullscreen_minimized(). |
|
Specifies the requested size of the window, in pixels. This is the size of the useful part of the window, not including decorations. Definition at line 171 of file windowProperties.I. References _specified, and S_size. Referenced by clear(), GraphicsWindow::clear(), and WinGraphicsWindow::fullscreen_minimized(). |
|
Specifies the title that should be assigned to the window.
Definition at line 254 of file windowProperties.I. References _flags, and F_undecorated. Referenced by clear(). |
|
Specifies whether the window should be created with a visible title and border (false, the default) or not (true).
Definition at line 315 of file windowProperties.I. References _flags, _specified, F_fullscreen, INLINE, and S_fullscreen. Referenced by clear(). |
|
Definition at line 138 of file windowProperties.h. Referenced by clear_fullscreen(), clear_size(), clear_title(), get_fullscreen(), get_title(), get_undecorated(), has_foreground(), has_title(), has_undecorated(), operator=(), operator==(), set_foreground(), set_fullscreen(), set_title(), and set_undecorated(). |
|
Definition at line 132 of file windowProperties.h. Referenced by clear_fullscreen(), clear_size(), clear_undecorated(), get_title(), get_undecorated(), get_x_origin(), get_x_size(), get_y_origin(), get_y_size(), has_foreground(), has_fullscreen(), has_size(), has_title(), is_any_specified(), operator!=(), operator==(), set_fullscreen(), set_minimized(), set_size(), set_undecorated(), and WindowProperties(). |
|
Definition at line 137 of file windowProperties.h. Referenced by get_x_size(), has_size(), operator==(), and WindowProperties(). |
|
Definition at line 133 of file windowProperties.h. Referenced by is_any_specified(), operator==(), and WindowProperties(). |
|
Definition at line 135 of file windowProperties.h. Referenced by get_y_origin(), has_origin(), operator==(), and WindowProperties(). |
|
Definition at line 134 of file windowProperties.h. Referenced by is_any_specified(), operator==(), set_origin(), and WindowProperties(). |
|
Definition at line 136 of file windowProperties.h. Referenced by clear_origin(), get_y_origin(), operator==(), and WindowProperties(). |