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;
71 INLINE
const LPoint2i &WindowProperties::
84 return _origin.get_x();
94 return _origin.get_y();
100 INLINE
bool WindowProperties::
102 return ((_specified & S_origin) != 0);
108 INLINE
void WindowProperties::
110 _specified &= ~S_origin;
111 _origin = LPoint2i::zero();
121 _specified |= S_size;
130 _size.set(x_size, y_size);
131 _specified |= S_size;
138 INLINE
const LVector2i &WindowProperties::
140 nassertr(
has_size(), LVector2i::zero());
151 return _size.get_x();
161 return _size.get_y();
167 INLINE
bool WindowProperties::
169 return ((_specified & S_size) != 0);
175 INLINE
void WindowProperties::
177 _specified &= ~S_size;
178 _size = LVector2i::zero();
187 _specified |= S_title;
193 INLINE
const std::string &WindowProperties::
202 INLINE
bool WindowProperties::
204 return ((_specified & S_title) != 0);
210 INLINE
void WindowProperties::
212 _specified &= ~S_title;
213 _title = std::string();
223 _flags |= F_undecorated;
225 _flags &= ~F_undecorated;
227 _specified |= S_undecorated;
233 INLINE
bool WindowProperties::
234 get_undecorated()
const {
235 return (_flags & F_undecorated) != 0;
241 INLINE
bool WindowProperties::
242 has_undecorated()
const {
243 return ((_specified & S_undecorated) != 0);
249 INLINE
void WindowProperties::
250 clear_undecorated() {
251 _specified &= ~S_undecorated;
252 _flags &= ~F_undecorated;
261 _flags |= F_fixed_size;
263 _flags &= ~F_fixed_size;
265 _specified |= S_fixed_size;
271 INLINE
bool WindowProperties::
272 get_fixed_size()
const {
273 return (_flags & F_fixed_size) != 0;
279 INLINE
bool WindowProperties::
280 has_fixed_size()
const {
281 return ((_specified & S_fixed_size) != 0);
287 INLINE
void WindowProperties::
289 _specified &= ~S_fixed_size;
290 _flags &= ~F_fixed_size;
300 _flags |= F_fullscreen;
302 _flags &= ~F_fullscreen;
304 _specified |= S_fullscreen;
310 INLINE
bool WindowProperties::
311 get_fullscreen()
const {
312 return (_flags & F_fullscreen) != 0;
318 INLINE
bool WindowProperties::
319 has_fullscreen()
const {
320 return ((_specified & S_fullscreen) != 0);
326 INLINE
void WindowProperties::
328 _specified &= ~S_fullscreen;
329 _flags &= ~F_fullscreen;
339 _flags |= F_foreground;
341 _flags &= ~F_foreground;
343 _specified |= S_foreground;
349 INLINE
bool WindowProperties::
350 get_foreground()
const {
351 return (_flags & F_foreground) != 0;
357 INLINE
bool WindowProperties::
358 has_foreground()
const {
359 return ((_specified & S_foreground) != 0);
365 INLINE
void WindowProperties::
367 _specified &= ~S_foreground;
368 _flags &= ~F_foreground;
378 _flags |= F_minimized;
380 _flags &= ~F_minimized;
382 _specified |= S_minimized;
388 INLINE
bool WindowProperties::
389 get_minimized()
const {
390 return (_flags & F_minimized) != 0;
396 INLINE
bool WindowProperties::
397 has_minimized()
const {
398 return ((_specified & S_minimized) != 0);
404 INLINE
void WindowProperties::
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;
466 INLINE
bool WindowProperties::
468 return (_flags & F_open) != 0;
474 INLINE
bool WindowProperties::
476 return ((_specified & S_open) != 0);
482 INLINE
void WindowProperties::
484 _specified &= ~S_open;
494 _flags |= F_cursor_hidden;
496 _flags &= ~F_cursor_hidden;
498 _specified |= S_cursor_hidden;
504 INLINE
bool WindowProperties::
505 get_cursor_hidden()
const {
506 return (_flags & F_cursor_hidden) != 0;
512 INLINE
bool WindowProperties::
513 has_cursor_hidden()
const {
514 return ((_specified & S_cursor_hidden) != 0);
520 INLINE
void WindowProperties::
521 clear_cursor_hidden() {
522 _specified &= ~S_cursor_hidden;
523 _flags &= ~F_cursor_hidden;
532 _icon_filename = icon_filename;
533 _specified |= S_icon_filename;
540 INLINE
const Filename &WindowProperties::
541 get_icon_filename()
const {
542 return _icon_filename;
548 INLINE
bool WindowProperties::
549 has_icon_filename()
const {
550 return ((_specified & S_icon_filename) != 0);
556 INLINE
void WindowProperties::
557 clear_icon_filename() {
558 _specified &= ~S_icon_filename;
568 _cursor_filename = cursor_filename;
569 _specified |= S_cursor_filename;
575 INLINE
const Filename &WindowProperties::
576 get_cursor_filename()
const {
577 return _cursor_filename;
583 INLINE
bool WindowProperties::
584 has_cursor_filename()
const {
585 return ((_specified & S_cursor_filename) != 0);
591 INLINE
void WindowProperties::
592 clear_cursor_filename() {
593 _specified &= ~S_cursor_filename;
607 _specified |= S_z_order;
613 INLINE WindowProperties::ZOrder WindowProperties::
614 get_z_order()
const {
621 INLINE
bool WindowProperties::
622 has_z_order()
const {
623 return ((_specified & S_z_order) != 0);
629 INLINE
void WindowProperties::
631 _specified &= ~S_z_order;
660 _specified |= S_mouse_mode;
666 INLINE WindowProperties::MouseMode WindowProperties::
667 get_mouse_mode()
const {
674 INLINE
bool WindowProperties::
675 has_mouse_mode()
const {
676 return ((_specified & S_mouse_mode)!=0);
682 INLINE
void WindowProperties::
684 _specified &= ~S_mouse_mode;
685 _mouse_mode = M_absolute;
702 _parent_window = parent_window;
703 _specified |= S_parent_window;
711 get_parent_window()
const {
712 return _parent_window;
718 INLINE
bool WindowProperties::
719 has_parent_window()
const {
720 return ((_specified & S_parent_window)!=0);
726 INLINE
void WindowProperties::
727 clear_parent_window() {
728 _specified &= ~S_parent_window;
729 _parent_window =
nullptr;
733 INLINE std::ostream &
set_mouse_mode
Specifies the mode in which the window is to operate its mouse pointer.
bool is_any_specified() const
Returns true if any properties have been specified, false otherwise.
set_cursor_hidden
Specifies whether the mouse cursor should be visible.
set_parent_window
Specifies the window that this window should be attached to.
This object represents a window on the desktop, not necessarily a Panda window.
set_size
Specifies the requested size of the window, in pixels.
set_fullscreen
Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (fals...
set_z_order
Specifies the relative ordering of the window with respect to other windows.
void set_raw_mice(bool raw_mice)
Specifies whether the window should read the raw mouse devices.
set_minimized
Specifies whether the window should be created minimized (true), or normal (false).
set_fixed_size
Specifies whether the window should be resizable by the user.
int get_y_origin() const
Returns the y coordinate of the window's top-left corner, not including decorations.
static WindowProperties size(const LVecBase2i &size)
Returns a WindowProperties structure with only the size specified.
set_undecorated
Specifies whether the window should be created with a visible title and border (false,...
set_cursor_filename
Specifies the file that contains the icon to associate with the mouse cursor when it is within the wi...
A container for the various kinds of properties we might ask to have on a graphics window before we o...
has_origin
Returns true if the window origin has been specified, false otherwise.
The name of a file, such as a texture file or an Egg file.
set_origin
Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window s...
void clear_raw_mice()
Removes the raw_mice specification from the properties.
set_icon_filename
Specifies the file that contains the icon to associate with the window when it is minimized.
bool get_raw_mice() const
Returns true if the window reads the raw mice.
void output(std::ostream &out) const
Sets any properties that are explicitly specified in other on this object.
bool has_raw_mice() const
Returns true if set_raw_mice() has been specified.
has_title
Returns true if the window title has been specified, false otherwise.
int get_y_size() const
Returns size in pixels in the y dimension of the useful part of the window, not including decorations...
int get_x_size() const
Returns size in pixels in the x dimension of the useful part of the window, not including decorations...
set_open
Specifies whether the window should be open.
int get_x_origin() const
Returns the x coordinate of the window's top-left corner, not including decorations.
has_size
Returns true if the window size has been specified, false otherwise.
set_title
Specifies the title that should be assigned to the window.
set_foreground
Specifies whether the window should be opened in the foreground (true), or left in the background (fa...