21 INLINE WindowProperties::
31 INLINE WindowProperties::
40 INLINE
bool WindowProperties::
42 return !operator == (other);
53 return (_specified != 0);
68 _specified |= S_origin;
82 _origin.set(x_origin, y_origin);
83 _specified |= S_origin;
107 return _origin.get_x();
119 return _origin.get_y();
130 return ((_specified & S_origin) != 0);
140 _specified &= ~S_origin;
154 _specified |= S_size;
166 _size.set(x_size, y_size);
167 _specified |= S_size;
192 return _size.get_x();
205 return _size.get_y();
216 return ((_specified & S_size) != 0);
226 _specified &= ~S_size;
239 _specified |= S_title;
261 return ((_specified & S_title) != 0);
271 _specified &= ~S_title;
285 _flags |= F_undecorated;
287 _flags &= ~F_undecorated;
289 _specified |= S_undecorated;
299 return (_flags & F_undecorated) != 0;
309 return ((_specified & S_undecorated) != 0);
319 _specified &= ~S_undecorated;
320 _flags &= ~F_undecorated;
332 _flags |= F_fixed_size;
334 _flags &= ~F_fixed_size;
336 _specified |= S_fixed_size;
347 return (_flags & F_fixed_size) != 0;
357 return ((_specified & S_fixed_size) != 0);
367 _specified &= ~S_fixed_size;
368 _flags &= ~F_fixed_size;
381 _flags |= F_fullscreen;
383 _flags &= ~F_fullscreen;
385 _specified |= S_fullscreen;
395 return (_flags & F_fullscreen) != 0;
405 return ((_specified & S_fullscreen) != 0);
415 _specified &= ~S_fullscreen;
416 _flags &= ~F_fullscreen;
429 _flags |= F_foreground;
431 _flags &= ~F_foreground;
433 _specified |= S_foreground;
443 return (_flags & F_foreground) != 0;
453 return ((_specified & S_foreground) != 0);
463 _specified &= ~S_foreground;
464 _flags &= ~F_foreground;
476 _flags |= F_minimized;
478 _flags &= ~F_minimized;
480 _specified |= S_minimized;
490 return (_flags & F_minimized) != 0;
500 return ((_specified & S_minimized) != 0);
510 _specified &= ~S_minimized;
511 _flags &= ~F_minimized;
523 _flags |= F_raw_mice;
525 _flags &= ~F_raw_mice;
527 _specified |= S_raw_mice;
537 return (_flags & F_raw_mice) != 0;
547 return ((_specified & S_raw_mice) != 0);
557 _specified &= ~S_raw_mice;
558 _flags &= ~F_raw_mice;
575 _specified |= S_open;
585 return (_flags & F_open) != 0;
595 return ((_specified & S_open) != 0);
605 _specified &= ~S_open;
617 _flags |= F_cursor_hidden;
619 _flags &= ~F_cursor_hidden;
621 _specified |= S_cursor_hidden;
631 return (_flags & F_cursor_hidden) != 0;
641 return ((_specified & S_cursor_hidden) != 0);
651 _specified &= ~S_cursor_hidden;
652 _flags &= ~F_cursor_hidden;
663 _icon_filename = icon_filename;
664 _specified |= S_icon_filename;
675 return _icon_filename;
686 return ((_specified & S_icon_filename) != 0);
697 _specified &= ~S_icon_filename;
710 _cursor_filename = cursor_filename;
711 _specified |= S_cursor_filename;
722 return _cursor_filename;
733 return ((_specified & S_cursor_filename) != 0);
744 _specified &= ~S_cursor_filename;
761 _specified |= S_z_order;
782 return ((_specified & S_z_order) != 0);
792 _specified &= ~S_z_order;
829 _specified |= S_mouse_mode;
847 INLINE
bool WindowProperties::
848 has_mouse_mode()
const {
849 return ((_specified & S_mouse_mode)!=0);
859 _specified &= ~S_mouse_mode;
860 _mouse_mode = M_absolute;
883 _parent_window = parent_window;
884 _specified |= S_parent_window;
895 return _parent_window;
905 return ((_specified & S_parent_window)!=0);
915 _specified &= ~S_parent_window;
916 _parent_window = NULL;
int get_x_origin() const
Returns the x coordinate of the window's top-left corner, not including decorations.
void set_cursor_hidden(bool cursor_hidden)
Specifies whether the mouse cursor should be visible.
bool has_cursor_filename() const
Returns true if set_cursor_filename() has been specified.
This object represents a window on the desktop, not necessarily a Panda window.
const Filename & get_icon_filename() const
Returns the icon filename associated with the window.
static WindowProperties size(int x_size, int y_size)
Returns a WindowProperties structure with only the size specified.
void clear_foreground()
Removes the foreground specification from the properties.
bool has_cursor_hidden() const
Returns true if set_cursor_hidden() has been specified.
const string & get_title() const
Returns the window's title.
bool get_open() const
Returns true if the window is open.
void set_parent_window(size_t parent)
Specifies the window that this window should be attached to.
void clear_origin()
Removes the origin specification from the properties.
void set_raw_mice(bool raw_mice)
Specifies whether the window should read the raw mouse devices.
bool get_minimized() const
Returns true if the window is minimized.
bool has_icon_filename() const
Returns true if set_icon_filename() has been specified.
static const LPoint2i & zero()
Returns a zero-length point.
void set_fixed_size(bool fixed_size)
Specifies whether the window should be resizable by the user.
void set_mouse_mode(MouseMode mode)
Specifies the mode in which the window is to operate its mouse pointer.
int get_y_size() const
Returns size in pixels in the y dimension of the useful part of the window, not including decorations...
void clear_undecorated()
Removes the undecorated specification from the properties.
void set_size(const LVector2i &size)
Specifies the requested size of the window, in pixels.
int get_y_origin() const
Returns the y coordinate of the window's top-left corner, not including decorations.
void output(ostream &out) const
Sets any properties that are explicitly specified in other on this object.
void clear_title()
Removes the title specification from the properties.
const LPoint2i & get_origin() const
Returns the coordinates of the window's top-left corner, not including decorations.
void set_fullscreen(bool fullscreen)
Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (fals...
void clear_parent_window()
Removes the S_parent_window specification from the properties.
bool has_z_order() const
Returns true if the window z_order has been specified, false otherwise.
void clear_minimized()
Removes the minimized specification from the properties.
void set_icon_filename(const Filename &icon_filename)
Specifies the file that contains the icon to associate with the window when it is minimized...
bool get_fullscreen() const
Returns true if the window is in fullscreen mode.
bool has_parent_window() const
Checks the S_parent_window 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).
const LVector2i & get_size() const
Returns size in pixels of the useful part of the window, not including decorations.
MouseMode get_mouse_mode() const
See set_mouse_mode().
A container for the various kinds of properties we might ask to have on a graphics window before we o...
This is a two-component point in space.
The name of a file, such as a texture file or an Egg file.
void clear_icon_filename()
Removes the icon_filename specification from the properties.
void clear_mouse_mode()
Removes the mouse_mode specification from the properties.
void set_z_order(ZOrder z_order)
Specifies the relative ordering of the window with respect to other windows.
bool has_raw_mice() const
Returns true if set_raw_mice() has been specified.
void clear_raw_mice()
Removes the raw_mice specification from the properties.
const Filename & get_cursor_filename() const
Returns the icon filename associated with the mouse cursor.
void clear_size()
Removes the size specification from the properties.
bool has_title() const
Returns true if the window title has been specified, false otherwise.
bool get_foreground() const
Returns true if the window is in the foreground.
void set_origin(const LPoint2i &origin)
Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window s...
void clear_open()
Removes the open specification from the properties.
bool has_foreground() const
Returns true if set_foreground() has been specified.
static const LVector2i & zero()
Returns a zero-length vector.
void clear_fixed_size()
Removes the fixed_size specification from the properties.
WindowHandle * get_parent_window() const
Returns the parent window specification, or NULL if there is no parent window specified.
This is a two-component vector offset.
bool has_minimized() const
Returns true if set_minimized() has been specified.
bool is_any_specified() const
Returns true if any properties have been specified, false otherwise.
bool has_origin() const
Returns true if the window origin has been specified, false otherwise.
bool get_fixed_size() const
Returns true if the window cannot be resized by the user, false otherwise.
bool get_raw_mice() const
Returns true if the window reads the raw mice.
void set_cursor_filename(const Filename &cursor_filename)
Specifies the file that contains the icon to associate with the mouse cursor when it is within the wi...
bool has_size() const
Returns true if the window size has been specified, false otherwise.
bool get_cursor_hidden() const
Returns true if the mouse cursor is invisible.
void set_foreground(bool foreground)
Specifies whether the window should be opened in the foreground (true), or left in the background (fa...
int get_x_size() const
Returns size in pixels in the x dimension of the useful part of the window, not including decorations...
void clear_z_order()
Removes the z_order specification from the properties.
void clear_cursor_hidden()
Removes the cursor_hidden specification from the properties.
void set_minimized(bool minimized)
Specifies whether the window should be created minimized (true), or normal (false).
bool has_fixed_size() const
Returns true if set_fixed_size() has been specified.
void set_title(const string &title)
Specifies the title that should be assigned to the window.
bool has_undecorated() const
Returns true if set_undecorated() has been specified.
ZOrder get_z_order() const
Returns the window's z_order.
void clear_cursor_filename()
Removes the cursor_filename specification from the properties.
bool get_undecorated() const
Returns true if the window has no border.
void set_open(bool open)
Specifies whether the window should be open.
bool has_open() const
Returns true if set_open() has been specified.
void clear_fullscreen()
Removes the fullscreen specification from the properties.
bool has_fullscreen() const
Returns true if set_fullscreen() has been specified.