14#ifndef WINDOWPROPERTIES_H
15#define WINDOWPROPERTIES_H
29class EXPCL_PANDA_DISPLAY WindowProperties {
32 INLINE WindowProperties(
const WindowProperties ©);
47 EXTENSION(WindowProperties(PyObject *self, PyObject *args, PyObject *kwds));
50 void operator = (
const WindowProperties ©);
51 INLINE ~WindowProperties();
55 static void set_default(
const WindowProperties &default_properties);
60 static WindowProperties
size(
const LVecBase2i &
size);
61 static WindowProperties
size(
int x_size,
int y_size);
63 bool operator == (
const WindowProperties &other)
const;
64 INLINE
bool operator != (
const WindowProperties &other)
const;
69 INLINE
void set_origin(
const LPoint2i &origin);
70 INLINE
void set_origin(
int x_origin,
int y_origin);
83 INLINE
void set_size(
int x_size,
int y_size);
87 INLINE
const LVector2i &
get_size()
const;
95 INLINE
bool has_mouse_mode()
const;
102 INLINE
void set_title(
const std::string &title);
106 INLINE
const std::string &
get_title()
const;
203 void output(std::ostream &out)
const;
212 S_undecorated = 0x00008,
213 S_fullscreen = 0x00010,
214 S_foreground = 0x00020,
215 S_minimized = 0x00040,
217 S_cursor_hidden = 0x00100,
218 S_fixed_size = 0x00200,
220 S_icon_filename = 0x00800,
221 S_cursor_filename = 0x01000,
222 S_mouse_mode = 0x02000,
223 S_parent_window = 0x04000,
224 S_raw_mice = 0x08000,
230 F_undecorated = S_undecorated,
231 F_fullscreen = S_fullscreen,
232 F_foreground = S_foreground,
233 F_minimized = S_minimized,
235 F_cursor_hidden = S_cursor_hidden,
236 F_fixed_size = S_fixed_size,
237 F_raw_mice = S_raw_mice,
243 MouseMode _mouse_mode;
245 Filename _cursor_filename;
246 Filename _icon_filename;
249 PT(WindowHandle) _parent_window;
251 static WindowProperties *_default_properties;
254EXPCL_PANDA_DISPLAY std::ostream &
255operator << (std::ostream &out, WindowProperties::ZOrder z_order);
256EXPCL_PANDA_DISPLAY std::istream &
257operator >> (std::istream &in, WindowProperties::ZOrder &z_order);
259EXPCL_PANDA_DISPLAY std::ostream &
260operator << (std::ostream &out, WindowProperties::MouseMode mode);
261EXPCL_PANDA_DISPLAY std::istream &
262operator >> (std::istream &in, WindowProperties::MouseMode &mode);
265INLINE std::ostream &operator << (std::ostream &out,
const WindowProperties &properties);
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...
void add_properties(const WindowProperties &other)
Sets any properties that are explicitly specified in other on this object.
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.
void clear()
Unsets all properties that have been specified so far, and resets the WindowProperties structure to i...
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.
set_default
Replaces the "default" WindowProperties with the specified structure.
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.
static void clear_default()
Returns the "default" WindowProperties to whatever is specified in the user's config file.
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...
get_default
Returns the "default" WindowProperties.
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_config_properties
Returns a WindowProperties structure with all of the default values filled in according to the user's...
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.