17 INLINE WindowProperties::
25 INLINE WindowProperties::
32 INLINE
bool WindowProperties::
34 return !operator == (other);
42 return (_specified != 0);
53 _specified |= S_origin;
63 _origin.set(x_origin, y_origin);
64 _specified |= S_origin;
84 return _origin.get_x();
94 return _origin.get_y();
102 return ((_specified & S_origin) != 0);
110 _specified &= ~S_origin;
111 _origin = LPoint2i::zero();
121 _specified |= S_size;
130 _size.set(x_size, y_size);
131 _specified |= S_size;
140 nassertr(
has_size(), LVector2i::zero());
151 return _size.get_x();
161 return _size.get_y();
169 return ((_specified & S_size) != 0);
177 _specified &= ~S_size;
178 _size = LVector2i::zero();
187 _specified |= S_title;
204 return ((_specified & S_title) != 0);
212 _specified &= ~S_title;
213 _title = std::string();
223 _flags |= F_undecorated;
225 _flags &= ~F_undecorated;
227 _specified |= S_undecorated;
235 return (_flags & F_undecorated) != 0;
243 return ((_specified & S_undecorated) != 0);
251 _specified &= ~S_undecorated;
252 _flags &= ~F_undecorated;
261 _flags |= F_fixed_size;
263 _flags &= ~F_fixed_size;
265 _specified |= S_fixed_size;
273 return (_flags & F_fixed_size) != 0;
281 return ((_specified & S_fixed_size) != 0);
289 _specified &= ~S_fixed_size;
290 _flags &= ~F_fixed_size;
300 _flags |= F_fullscreen;
302 _flags &= ~F_fullscreen;
304 _specified |= S_fullscreen;
312 return (_flags & F_fullscreen) != 0;
320 return ((_specified & S_fullscreen) != 0);
328 _specified &= ~S_fullscreen;
329 _flags &= ~F_fullscreen;
339 _flags |= F_foreground;
341 _flags &= ~F_foreground;
343 _specified |= S_foreground;
351 return (_flags & F_foreground) != 0;
359 return ((_specified & S_foreground) != 0);
367 _specified &= ~S_foreground;
368 _flags &= ~F_foreground;
378 _flags |= F_minimized;
380 _flags &= ~F_minimized;
382 _specified |= S_minimized;
390 return (_flags & F_minimized) != 0;
398 return ((_specified & S_minimized) != 0);
406 _specified &= ~S_minimized;
407 _flags &= ~F_minimized;
416 _flags |= F_raw_mice;
418 _flags &= ~F_raw_mice;
420 _specified |= S_raw_mice;
428 return (_flags & F_raw_mice) != 0;
436 return ((_specified & S_raw_mice) != 0);
444 _specified &= ~S_raw_mice;
445 _flags &= ~F_raw_mice;
460 _specified |= S_open;
468 return (_flags & F_open) != 0;
476 return ((_specified & S_open) != 0);
484 _specified &= ~S_open;
494 _flags |= F_cursor_hidden;
496 _flags &= ~F_cursor_hidden;
498 _specified |= S_cursor_hidden;
506 return (_flags & F_cursor_hidden) != 0;
514 return ((_specified & S_cursor_hidden) != 0);
522 _specified &= ~S_cursor_hidden;
523 _flags &= ~F_cursor_hidden;
532 _icon_filename = icon_filename;
533 _specified |= S_icon_filename;
542 return _icon_filename;
550 return ((_specified & S_icon_filename) != 0);
558 _specified &= ~S_icon_filename;
568 _cursor_filename = cursor_filename;
569 _specified |= S_cursor_filename;
577 return _cursor_filename;
585 return ((_specified & S_cursor_filename) != 0);
593 _specified &= ~S_cursor_filename;
607 _specified |= S_z_order;
623 return ((_specified & S_z_order) != 0);
631 _specified &= ~S_z_order;
660 _specified |= S_mouse_mode;
674 INLINE
bool WindowProperties::
675 has_mouse_mode()
const {
676 return ((_specified & S_mouse_mode)!=0);
684 _specified &= ~S_mouse_mode;
685 _mouse_mode = M_absolute;
702 _parent_window = parent_window;
703 _specified |= S_parent_window;
712 return _parent_window;
720 return ((_specified & S_parent_window)!=0);
728 _specified &= ~S_parent_window;
729 _parent_window =
nullptr;
733 INLINE std::ostream &
The name of a file, such as a texture file or an Egg file.
This object represents a window on the desktop, not necessarily a Panda window.
A container for the various kinds of properties we might ask to have on a graphics window before we o...
clear_cursor_filename
Removes the cursor_filename specification from the properties.
get_open
Returns true if the window is open.
has_cursor_filename
Returns true if set_cursor_filename() has been specified.
get_title
Returns the window's title.
get_undecorated
Returns true if the window has no border.
clear_cursor_hidden
Removes the cursor_hidden specification from the properties.
set_title
Specifies the title that should be assigned to the window.
has_open
Returns true if set_open() has been specified.
static WindowProperties size(const LVecBase2i &size)
Returns a WindowProperties structure with only the size specified.
int get_y_size() const
Returns size in pixels in the y dimension of the useful part of the window, not including decorations...
set_mouse_mode
Specifies the mode in which the window is to operate its mouse pointer.
has_parent_window
Checks the S_parent_window specification from the properties.
int get_x_size() const
Returns size in pixels in the x dimension of the useful part of the window, not including decorations...
void set_raw_mice(bool raw_mice)
Specifies whether the window should read the raw mouse devices.
clear_parent_window
Removes the S_parent_window specification from the properties.
get_origin
Returns the coordinates of the window's top-left corner, not including decorations.
set_parent_window
Specifies the window that this window should be attached to.
int get_y_origin() const
Returns the y coordinate of the window's top-left corner, not including decorations.
has_undecorated
Returns true if set_undecorated() has been specified.
clear_z_order
Removes the z_order specification from the properties.
get_minimized
Returns true if the window is minimized.
bool has_raw_mice() const
Returns true if set_raw_mice() has been specified.
clear_mouse_mode
Removes the mouse_mode specification from the properties.
has_fullscreen
Returns true if set_fullscreen() has been specified.
has_size
Returns true if the window size has been specified, false otherwise.
clear_title
Removes the title specification from the properties.
get_size
Returns size in pixels of the useful part of the window, not including decorations.
clear_origin
Removes the origin specification from the properties.
has_minimized
Returns true if set_minimized() has been specified.
set_size
Specifies the requested size of the window, in pixels.
get_foreground
Returns true if the window is in the foreground.
set_icon_filename
Specifies the file that contains the icon to associate with the window when it is minimized.
has_fixed_size
Returns true if set_fixed_size() has been specified.
bool is_any_specified() const
Returns true if any properties have been specified, false otherwise.
clear_fixed_size
Removes the fixed_size specification from the properties.
clear_fullscreen
Removes the fullscreen specification from the properties.
set_foreground
Specifies whether the window should be opened in the foreground (true), or left in the background (fa...
clear_size
Removes the size specification from the properties.
set_open
Specifies whether the window should be open.
set_undecorated
Specifies whether the window should be created with a visible title and border (false,...
get_z_order
Returns the window's z_order.
bool get_raw_mice() const
Returns true if the window reads the raw mice.
get_icon_filename
Returns the icon filename associated with the window.
get_fullscreen
Returns true if the window is in fullscreen mode.
set_cursor_filename
Specifies the file that contains the icon to associate with the mouse cursor when it is within the wi...
has_title
Returns true if the window title has been specified, false otherwise.
set_z_order
Specifies the relative ordering of the window with respect to other windows.
void clear_raw_mice()
Removes the raw_mice specification from the properties.
get_mouse_mode
See set_mouse_mode().
has_origin
Returns true if the window origin has been specified, false otherwise.
has_foreground
Returns true if set_foreground() has been specified.
set_cursor_hidden
Specifies whether the mouse cursor should be visible.
clear_foreground
Removes the foreground specification from the properties.
get_cursor_filename
Returns the icon filename associated with the mouse cursor.
clear_undecorated
Removes the undecorated specification from the properties.
get_cursor_hidden
Returns true if the mouse cursor is invisible.
clear_minimized
Removes the minimized specification from the properties.
has_cursor_hidden
Returns true if set_cursor_hidden() has been specified.
get_parent_window
Returns the parent window specification, or NULL if there is no parent window specified.
set_minimized
Specifies whether the window should be created minimized (true), or normal (false).
clear_open
Removes the open specification from the properties.
clear_icon_filename
Removes the icon_filename specification from the properties.
void output(std::ostream &out) const
Sets any properties that are explicitly specified in other on this object.
has_z_order
Returns true if the window z_order has been specified, false otherwise.
set_fixed_size
Specifies whether the window should be resizable by the user.
get_fixed_size
Returns true if the window cannot be resized by the user, false otherwise.
int get_x_origin() const
Returns the x coordinate of the window's top-left corner, not including decorations.
set_fullscreen
Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (fals...
set_origin
Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window s...
has_icon_filename
Returns true if set_icon_filename() has been specified.