Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
WindowProperties Class Reference

A container for the various kinds of properties we might ask to have on a graphics window before we open it. More...

#include "windowProperties.h"

Public Types

enum  MouseMode { M_absolute , M_relative , M_confined }
 
enum  ZOrder { Z_bottom , Z_normal , Z_top }
 

Public Member Functions

 WindowProperties (const WindowProperties &copy)
 
void add_properties (const WindowProperties &other)
 Sets any properties that are explicitly specified in other on this object.
 
void clear ()
 Unsets all properties that have been specified so far, and resets the WindowProperties structure to its initial empty state.
 
void clear_cursor_filename ()
 
void clear_cursor_hidden ()
 
void clear_fixed_size ()
 
void clear_foreground ()
 
void clear_fullscreen ()
 
void clear_icon_filename ()
 
void clear_minimized ()
 
void clear_mouse_mode ()
 
void clear_open ()
 
void clear_origin ()
 
void clear_parent_window ()
 
void clear_raw_mice ()
 Removes the raw_mice specification from the properties.
 
void clear_size ()
 
void clear_title ()
 
void clear_undecorated ()
 
void clear_z_order ()
 
const Filenameget_cursor_filename () const
 
bool get_cursor_hidden () const
 
bool get_fixed_size () const
 
bool get_foreground () const
 
bool get_fullscreen () const
 
const Filenameget_icon_filename () const
 
bool get_minimized () const
 
MouseMode get_mouse_mode () const
 
bool get_open () const
 
const LPoint2i & get_origin () const
 
WindowHandleget_parent_window () const
 
bool get_raw_mice () const
 Returns true if the window reads the raw mice.
 
const LVector2i & get_size () const
 
const std::string & get_title () const
 
bool get_undecorated () const
 
int get_x_origin () const
 Returns the x coordinate of the window's top-left corner, 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.
 
int get_y_origin () const
 Returns the y coordinate of the window's top-left corner, 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.
 
ZOrder get_z_order () const
 
bool has_cursor_filename () const
 
bool has_cursor_hidden () const
 
bool has_fixed_size () const
 
bool has_foreground () const
 
bool has_fullscreen () const
 
bool has_icon_filename () const
 
bool has_minimized () const
 
bool has_mouse_mode () const
 
bool has_open () const
 
bool has_origin () const
 
bool has_parent_window () const
 
bool has_raw_mice () const
 Returns true if set_raw_mice() has been specified.
 
bool has_size () const
 
bool has_title () const
 
bool has_undecorated () const
 
bool has_z_order () const
 
bool is_any_specified () const
 Returns true if any properties have been specified, false otherwise.
 
bool operator!= (const WindowProperties &other) const
 
void operator= (const WindowProperties &copy)
 
bool operator== (const WindowProperties &other) const
 
void output (std::ostream &out) const
 Sets any properties that are explicitly specified in other on this object.
 
void set_cursor_filename (const Filename &cursor_filename)
 
void set_cursor_hidden (bool cursor_hidden)
 
void set_fixed_size (bool fixed_size)
 
void set_foreground (bool foreground)
 
void set_fullscreen (bool fullscreen)
 
void set_icon_filename (const Filename &icon_filename)
 
void set_minimized (bool minimized)
 
void set_mouse_mode (MouseMode mode)
 
void set_open (bool open)
 
void set_origin (const LPoint2i &origin)
 
void set_origin (int x_origin, int y_origin)
 
void set_parent_window (size_t parent)
 
void set_parent_window (WindowHandle *parent_window=nullptr)
 
void set_raw_mice (bool raw_mice)
 Specifies whether the window should read the raw mouse devices.
 
void set_size (const LVector2i &size)
 
void set_size (int x_size, int y_size)
 
void set_title (const std::string &title)
 
void set_undecorated (bool undecorated)
 
void set_z_order (ZOrder z_order)
 

Static Public Member Functions

static void clear_default ()
 Returns the "default" WindowProperties to whatever is specified in the user's config file.
 
static WindowProperties get_config_properties ()
 
static WindowProperties get_default ()
 
static void set_default (const WindowProperties &default_properties)
 
static WindowProperties size (const LVecBase2i &size)
 Returns a WindowProperties structure with only the size specified.
 
static WindowProperties size (int x_size, int y_size)
 

Public Attributes

 clear_cursor_filename
 Removes the cursor_filename specification from the properties.
 
 clear_cursor_hidden
 Removes the cursor_hidden specification from the properties.
 
 clear_fixed_size
 Removes the fixed_size specification from the properties.
 
 clear_foreground
 Removes the foreground specification from the properties.
 
 clear_fullscreen
 Removes the fullscreen specification from the properties.
 
 clear_icon_filename
 Removes the icon_filename specification from the properties.
 
 clear_minimized
 Removes the minimized specification from the properties.
 
 clear_mouse_mode
 Removes the mouse_mode specification from the properties.
 
 clear_open
 Removes the open specification from the properties.
 
 clear_origin
 Removes the origin specification from the properties.
 
 clear_parent_window
 Removes the S_parent_window specification from the properties.
 
 clear_size
 Removes the size specification from the properties.
 
 clear_title
 Removes the title specification from the properties.
 
 clear_undecorated
 Removes the undecorated specification from the properties.
 
 clear_z_order
 Removes the z_order specification from the properties.
 
 get_config_properties
 Returns a WindowProperties structure with all of the default values filled in according to the user's config file.
 
 get_cursor_filename
 Returns the icon filename associated with the mouse cursor.
 
 get_cursor_hidden
 Returns true if the mouse cursor is invisible.
 
 get_default
 Returns the "default" WindowProperties.
 
 get_fixed_size
 Returns true if the window cannot be resized by the user, false otherwise.
 
 get_foreground
 Returns true if the window is in the foreground.
 
 get_fullscreen
 Returns true if the window is in fullscreen mode.
 
 get_icon_filename
 Returns the icon filename associated with the window.
 
 get_minimized
 Returns true if the window is minimized.
 
 get_mouse_mode
 See set_mouse_mode().
 
 get_open
 Returns true if the window is open.
 
 get_origin
 Returns the coordinates of the window's top-left corner, not including decorations.
 
 get_parent_window
 Returns the parent window specification, or NULL if there is no parent window specified.
 
 get_size
 Returns size in pixels of the useful part of the window, not including decorations.
 
 get_title
 Returns the window's title.
 
 get_undecorated
 Returns true if the window has no border.
 
 get_z_order
 Returns the window's z_order.
 
 has_cursor_filename
 Returns true if set_cursor_filename() has been specified.
 
 has_cursor_hidden
 Returns true if set_cursor_hidden() has been specified.
 
 has_fixed_size
 Returns true if set_fixed_size() has been specified.
 
 has_foreground
 Returns true if set_foreground() has been specified.
 
 has_fullscreen
 Returns true if set_fullscreen() has been specified.
 
 has_icon_filename
 Returns true if set_icon_filename() has been specified.
 
 has_minimized
 Returns true if set_minimized() has been specified.
 
 has_mouse_mode
 
 has_open
 Returns true if set_open() has been specified.
 
 has_origin
 Returns true if the window origin has been specified, false otherwise.
 
 has_parent_window
 Checks the S_parent_window specification from the properties.
 
 has_size
 Returns true if the window size has been specified, false otherwise.
 
 has_title
 Returns true if the window title has been specified, false otherwise.
 
 has_undecorated
 Returns true if set_undecorated() has been specified.
 
 has_z_order
 Returns true if the window z_order has been specified, false otherwise.
 
 set_cursor_filename
 Specifies the file that contains the icon to associate with the mouse cursor when it is within the window (and visible).
 
 set_cursor_hidden
 Specifies whether the mouse cursor should be visible.
 
 set_default
 Replaces the "default" WindowProperties with the specified structure.
 
 set_fixed_size
 Specifies whether the window should be resizable by the user.
 
 set_foreground
 Specifies whether the window should be opened in the foreground (true), or left in the background (false).
 
 set_fullscreen
 Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (false, the default).
 
 set_icon_filename
 Specifies the file that contains the icon to associate with the window when it is minimized.
 
 set_minimized
 Specifies whether the window should be created minimized (true), or normal (false).
 
 set_mouse_mode
 Specifies the mode in which the window is to operate its mouse pointer.
 
 set_open
 Specifies whether the window should be open.
 
 set_origin
 Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window should appear.
 
 set_parent_window
 Specifies the window that this window should be attached to.
 
 set_size
 Specifies the requested size of the window, in pixels.
 
 set_title
 Specifies the title that should be assigned to the window.
 
 set_undecorated
 Specifies whether the window should be created with a visible title and border (false, the default) or not (true).
 
 set_z_order
 Specifies the relative ordering of the window with respect to other windows.
 

Detailed Description

A container for the various kinds of properties we might ask to have on a graphics window before we open it.

This also serves to hold the current properties for a window after it has been opened.

Definition at line 29 of file windowProperties.h.

Member Enumeration Documentation

◆ MouseMode

enum WindowProperties::MouseMode

Definition at line 41 of file windowProperties.h.

◆ ZOrder

enum WindowProperties::ZOrder

Definition at line 35 of file windowProperties.h.

Constructor & Destructor Documentation

◆ WindowProperties() [1/2]

WindowProperties::WindowProperties ( )

Definition at line 27 of file windowProperties.cxx.

◆ WindowProperties() [2/2]

WindowProperties::WindowProperties ( const WindowProperties & copy)
inline

Definition at line 17 of file windowProperties.I.

◆ ~WindowProperties()

WindowProperties::~WindowProperties ( )
inline

Definition at line 25 of file windowProperties.I.

Member Function Documentation

◆ add_properties()

void WindowProperties::add_properties ( const WindowProperties & other)

◆ clear()

void WindowProperties::clear ( )

Unsets all properties that have been specified so far, and resets the WindowProperties structure to its initial empty state.

Definition at line 175 of file windowProperties.cxx.

Referenced by GraphicsWindow::clear_rejected_properties(), GraphicsWindow::process_events(), and GraphicsWindow::set_properties_now().

◆ clear_default()

void WindowProperties::clear_default ( )
static

Returns the "default" WindowProperties to whatever is specified in the user's config file.

Definition at line 127 of file windowProperties.cxx.

◆ clear_raw_mice()

void WindowProperties::clear_raw_mice ( )
inline

Removes the raw_mice specification from the properties.

Definition at line 442 of file windowProperties.I.

◆ get_raw_mice()

bool WindowProperties::get_raw_mice ( ) const
inline

Returns true if the window reads the raw mice.

Definition at line 426 of file windowProperties.I.

Referenced by add_properties(), and output().

◆ get_x_origin()

int WindowProperties::get_x_origin ( ) const
inline

Returns the x coordinate of the window's top-left corner, not including decorations.

Definition at line 81 of file windowProperties.I.

References has_origin.

Referenced by output(), GraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_x_size()

int WindowProperties::get_x_size ( ) const
inline

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 148 of file windowProperties.I.

References has_size.

Referenced by GraphicsEngine::make_output(), output(), GraphicsWindow::set_properties_now(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_y_origin()

int WindowProperties::get_y_origin ( ) const
inline

Returns the y coordinate of the window's top-left corner, not including decorations.

Definition at line 91 of file windowProperties.I.

References has_origin.

Referenced by output(), GraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_y_size()

int WindowProperties::get_y_size ( ) const
inline

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 158 of file windowProperties.I.

References has_size.

Referenced by GraphicsEngine::make_output(), output(), GraphicsWindow::set_properties_now(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ has_raw_mice()

bool WindowProperties::has_raw_mice ( ) const
inline

Returns true if set_raw_mice() has been specified.

Definition at line 434 of file windowProperties.I.

Referenced by add_properties(), and output().

◆ is_any_specified()

bool WindowProperties::is_any_specified ( ) const
inline

Returns true if any properties have been specified, false otherwise.

Definition at line 40 of file windowProperties.I.

Referenced by GraphicsWindow::process_events(), AndroidGraphicsWindow::set_properties_now(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ operator!=()

bool WindowProperties::operator!= ( const WindowProperties & other) const
inline

Definition at line 32 of file windowProperties.I.

◆ operator=()

void WindowProperties::operator= ( const WindowProperties & copy)

Definition at line 35 of file windowProperties.cxx.

◆ operator==()

bool WindowProperties::operator== ( const WindowProperties & other) const

Definition at line 157 of file windowProperties.cxx.

◆ output()

void WindowProperties::output ( std::ostream & out) const

◆ set_raw_mice()

void WindowProperties::set_raw_mice ( bool raw_mice)
inline

Specifies whether the window should read the raw mouse devices.

Definition at line 413 of file windowProperties.I.

Referenced by add_properties().

◆ size() [1/2]

WindowProperties WindowProperties::size ( const LVecBase2i & size)
static

Returns a WindowProperties structure with only the size specified.

The size is the only property that matters to buffers.

Definition at line 141 of file windowProperties.cxx.

References set_size, and size().

Referenced by GraphicsEngine::make_buffer(), GraphicsEngine::make_buffer(), GraphicsEngine::make_parasite(), and size().

◆ size() [2/2]

WindowProperties WindowProperties::size ( int x_size,
int y_size )
static

Definition at line 147 of file windowProperties.cxx.

Member Data Documentation

◆ clear_cursor_filename

void WindowProperties::clear_cursor_filename
inline

Removes the cursor_filename specification from the properties.

Definition at line 185 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_cursor_hidden

void WindowProperties::clear_cursor_hidden
inline

Removes the cursor_hidden specification from the properties.

Definition at line 163 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_fixed_size

void WindowProperties::clear_fixed_size
inline

Removes the fixed_size specification from the properties.

Definition at line 124 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_foreground

void WindowProperties::clear_foreground
inline

Removes the foreground specification from the properties.

Definition at line 138 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_fullscreen

void WindowProperties::clear_fullscreen
inline

◆ clear_icon_filename

void WindowProperties::clear_icon_filename
inline

Removes the icon_filename specification from the properties.

Definition at line 174 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now().

◆ clear_minimized

void WindowProperties::clear_minimized
inline

Removes the minimized specification from the properties.

Definition at line 145 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now().

◆ clear_mouse_mode

void WindowProperties::clear_mouse_mode
inline

Removes the mouse_mode specification from the properties.

Definition at line 100 of file windowProperties.h.

Referenced by GraphicsWindow::set_properties_now(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_open

void WindowProperties::clear_open
inline

Removes the open specification from the properties.

Definition at line 156 of file windowProperties.h.

Referenced by GraphicsWindow::set_properties_now().

◆ clear_origin

void WindowProperties::clear_origin
inline

Removes the origin specification from the properties.

Definition at line 80 of file windowProperties.h.

Referenced by GraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_parent_window

void WindowProperties::clear_parent_window
inline

Removes the S_parent_window specification from the properties.

Definition at line 199 of file windowProperties.h.

◆ clear_size

void WindowProperties::clear_size
inline

Removes the size specification from the properties.

Definition at line 93 of file windowProperties.h.

Referenced by GraphicsWindow::set_properties_now(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_title

void WindowProperties::clear_title
inline

Removes the title specification from the properties.

Definition at line 110 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ clear_undecorated

void WindowProperties::clear_undecorated
inline

Removes the undecorated specification from the properties.

Definition at line 117 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now().

◆ clear_z_order

void WindowProperties::clear_z_order
inline

Removes the z_order specification from the properties.

Definition at line 191 of file windowProperties.h.

Referenced by WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_config_properties

WindowProperties WindowProperties::get_config_properties

Returns a WindowProperties structure with all of the default values filled in according to the user's config file.

Definition at line 57 of file windowProperties.h.

◆ get_cursor_filename

const Filename & WindowProperties::get_cursor_filename
inline

Returns the icon filename associated with the mouse cursor.

Definition at line 185 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_cursor_hidden

bool WindowProperties::get_cursor_hidden
inline

Returns true if the mouse cursor is invisible.

Definition at line 163 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_default

WindowProperties WindowProperties::get_default

Returns the "default" WindowProperties.

If set_default() has been called, this returns that WindowProperties structure; otherwise, this returns get_config_properties().

Definition at line 58 of file windowProperties.h.

Referenced by PandaFramework::get_default_window_props().

◆ get_fixed_size

bool WindowProperties::get_fixed_size
inline

Returns true if the window cannot be resized by the user, false otherwise.

Definition at line 124 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_foreground

bool WindowProperties::get_foreground
inline

Returns true if the window is in the foreground.

Definition at line 138 of file windowProperties.h.

Referenced by add_properties(), output(), x11GraphicsWindow::process_events(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_fullscreen

bool WindowProperties::get_fullscreen
inline

◆ get_icon_filename

const Filename & WindowProperties::get_icon_filename
inline

Returns the icon filename associated with the window.

Definition at line 174 of file windowProperties.h.

Referenced by add_properties(), output(), and WinGraphicsWindow::set_properties_now().

◆ get_minimized

bool WindowProperties::get_minimized
inline

Returns true if the window is minimized.

Definition at line 145 of file windowProperties.h.

Referenced by add_properties(), GraphicsWindow::is_active(), output(), and WinGraphicsWindow::set_properties_now().

◆ get_mouse_mode

WindowProperties::MouseMode WindowProperties::get_mouse_mode
inline

◆ get_open

bool WindowProperties::get_open
inline

Returns true if the window is open.

Definition at line 156 of file windowProperties.h.

Referenced by add_properties(), GraphicsWindow::is_active(), output(), and GraphicsWindow::set_properties_now().

◆ get_origin

const LPoint2i & WindowProperties::get_origin
inline

Returns the coordinates of the window's top-left corner, not including decorations.

Definition at line 80 of file windowProperties.h.

Referenced by add_properties().

◆ get_parent_window

WindowHandle * WindowProperties::get_parent_window
inline

Returns the parent window specification, or NULL if there is no parent window specified.

Definition at line 199 of file windowProperties.h.

Referenced by add_properties(), output(), and PT().

◆ get_size

const LVector2i & WindowProperties::get_size
inline

Returns size in pixels of the useful part of the window, not including decorations.

Definition at line 93 of file windowProperties.h.

Referenced by add_properties(), GraphicsWindow::request_properties(), and x11GraphicsWindow::set_properties_now().

◆ get_title

const std::string & WindowProperties::get_title
inline

Returns the window's title.

Definition at line 110 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ get_undecorated

bool WindowProperties::get_undecorated
inline

Returns true if the window has no border.

Definition at line 117 of file windowProperties.h.

Referenced by add_properties(), output(), and WinGraphicsWindow::set_properties_now().

◆ get_z_order

WindowProperties::ZOrder WindowProperties::get_z_order
inline

Returns the window's z_order.

Definition at line 191 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ has_cursor_filename

bool WindowProperties::has_cursor_filename
inline

◆ has_cursor_hidden

bool WindowProperties::has_cursor_hidden
inline

◆ has_fixed_size

bool WindowProperties::has_fixed_size
inline

Returns true if set_fixed_size() has been specified.

Definition at line 124 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ has_foreground

bool WindowProperties::has_foreground
inline

◆ has_fullscreen

bool WindowProperties::has_fullscreen
inline

◆ has_icon_filename

bool WindowProperties::has_icon_filename
inline

Returns true if set_icon_filename() has been specified.

Definition at line 174 of file windowProperties.h.

Referenced by add_properties(), output(), and WinGraphicsWindow::set_properties_now().

◆ has_minimized

bool WindowProperties::has_minimized
inline

Returns true if set_minimized() has been specified.

Definition at line 145 of file windowProperties.h.

Referenced by add_properties(), output(), and WinGraphicsWindow::set_properties_now().

◆ has_mouse_mode

bool WindowProperties::has_mouse_mode
inline

Definition at line 100 of file windowProperties.h.

◆ has_open

bool WindowProperties::has_open
inline

Returns true if set_open() has been specified.

Definition at line 156 of file windowProperties.h.

Referenced by add_properties(), output(), and GraphicsWindow::set_properties_now().

◆ has_origin

bool WindowProperties::has_origin
inline

Returns true if the window origin has been specified, false otherwise.

Definition at line 80 of file windowProperties.h.

Referenced by add_properties(), get_x_origin(), get_y_origin(), output(), GraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ has_parent_window

bool WindowProperties::has_parent_window
inline

Checks the S_parent_window specification from the properties.

Definition at line 199 of file windowProperties.h.

Referenced by add_properties(), and output().

◆ has_size

bool WindowProperties::has_size
inline

◆ has_title

bool WindowProperties::has_title
inline

Returns true if the window title has been specified, false otherwise.

Definition at line 110 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ has_undecorated

bool WindowProperties::has_undecorated
inline

Returns true if set_undecorated() has been specified.

Definition at line 117 of file windowProperties.h.

Referenced by add_properties(), output(), and WinGraphicsWindow::set_properties_now().

◆ has_z_order

bool WindowProperties::has_z_order
inline

Returns true if the window z_order has been specified, false otherwise.

Definition at line 191 of file windowProperties.h.

Referenced by add_properties(), output(), WinGraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ set_cursor_filename

void WindowProperties::set_cursor_filename
inline

Specifies the file that contains the icon to associate with the mouse cursor when it is within the window (and visible).

Definition at line 185 of file windowProperties.h.

Referenced by add_properties().

◆ set_cursor_hidden

void WindowProperties::set_cursor_hidden
inline

Specifies whether the mouse cursor should be visible.

Definition at line 163 of file windowProperties.h.

Referenced by add_properties().

◆ set_default

void WindowProperties::set_default

Replaces the "default" WindowProperties with the specified structure.

The specified WindowProperties will be returned by future calls to get_default(), until clear_default() is called.

Note that this completely replaces the default properties; it is not additive.

Definition at line 58 of file windowProperties.h.

◆ set_fixed_size

void WindowProperties::set_fixed_size
inline

Specifies whether the window should be resizable by the user.

Definition at line 124 of file windowProperties.h.

Referenced by add_properties().

◆ set_foreground

void WindowProperties::set_foreground
inline

Specifies whether the window should be opened in the foreground (true), or left in the background (false).

Definition at line 138 of file windowProperties.h.

Referenced by add_properties(), x11GraphicsWindow::process_events(), and WinGraphicsWindow::window_proc().

◆ set_fullscreen

void WindowProperties::set_fullscreen
inline

Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (false, the default).

Definition at line 131 of file windowProperties.h.

Referenced by add_properties().

◆ set_icon_filename

void WindowProperties::set_icon_filename
inline

Specifies the file that contains the icon to associate with the window when it is minimized.

Definition at line 174 of file windowProperties.h.

Referenced by add_properties().

◆ set_minimized

void WindowProperties::set_minimized
inline

Specifies whether the window should be created minimized (true), or normal (false).

Definition at line 145 of file windowProperties.h.

Referenced by add_properties(), x11GraphicsWindow::process_events(), and WinGraphicsWindow::window_proc().

◆ set_mouse_mode

void WindowProperties::set_mouse_mode
inline

Specifies the mode in which the window is to operate its mouse pointer.

M_absolute: the normal mode in which a mouse pointer operates, where the mouse can move outside the window and the mouse coordinates are relative to its position in the window.

M_relative (OSX or Unix/X11 only): a mode where only relative movements are reported; particularly useful for FPS-style mouse movements where you have hidden the mouse pointer and are are more interested in how fast the mouse is moving, rather than precisely where the pointer is hovering.

This has no effect on Windows. On Unix/X11, this requires the Xxf86dga extension to be available.

M_confined: this mode reports absolute mouse positions, but confines the mouse pointer to the window boundary. It can portably replace M_relative for an FPS, but you need to periodically move the pointer to the center of the window and track movement deltas.

Definition at line 100 of file windowProperties.h.

Referenced by add_properties(), x11GraphicsWindow::set_properties_now(), and WinGraphicsWindow::window_proc().

◆ set_open

void WindowProperties::set_open
inline

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 156 of file windowProperties.h.

Referenced by add_properties(), x11GraphicsWindow::process_events(), GraphicsWindow::request_close(), GraphicsWindow::request_open(), GraphicsWindow::set_close_now(), GraphicsWindow::set_properties_now(), and WinGraphicsWindow::window_proc().

◆ set_origin

void WindowProperties::set_origin
inline

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 80 of file windowProperties.h.

Referenced by add_properties(), x11GraphicsWindow::process_events(), GraphicsWindow::set_properties_now(), and x11GraphicsWindow::set_properties_now().

◆ set_parent_window

void WindowProperties::set_parent_window
inline

Specifies the window that this window should be attached to.

This is a deprecated variant on this method, and exists only for backward compatibility. Future code should use the version of set_parent_window() below that receives a WindowHandle object; that interface is much more robust.

In this deprecated variant, the actual value for "parent" is platform- specific. On Windows, it is the HWND of the parent window, cast to an unsigned integer. On X11, it is the Window pointer of the parent window, similarly cast. On OSX, this is the NSWindow pointer, which doesn't appear to work at all.

If this is NULL or unspecified, the window will be created as a toplevel window on the desktop; if this is non-NULL, the window will be bound as a child window to the indicated parent window.

You should use GraphicsPipe::make_window_handle() to create an instance of a WindowHandle object given an appropriate OS-specific window handle representation. Each OS-specific GraphicsPipe class defines a make_window_handle() method that returns an appropriate WindowHandle object to wrap the particular OS-specific representation.

Definition at line 199 of file windowProperties.h.

Referenced by add_properties().

◆ set_size

void WindowProperties::set_size
inline

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 93 of file windowProperties.h.

Referenced by add_properties(), x11GraphicsWindow::process_events(), GraphicsWindow::set_properties_now(), x11GraphicsWindow::set_properties_now(), and size().

◆ set_title

void WindowProperties::set_title
inline

Specifies the title that should be assigned to the window.

Definition at line 110 of file windowProperties.h.

Referenced by add_properties(), and PandaFramework::get_default_window_props().

◆ set_undecorated

void WindowProperties::set_undecorated
inline

Specifies whether the window should be created with a visible title and border (false, the default) or not (true).

Definition at line 117 of file windowProperties.h.

Referenced by add_properties().

◆ set_z_order

void WindowProperties::set_z_order
inline

Specifies the relative ordering of the window with respect to other windows.

If the z_order is Z_top, the window will always be on top of other windows; if it is Z_bottom, it will always be below other windows. Most windows will want to be Z_normal, which allows the user to control the order.

Definition at line 191 of file windowProperties.h.

Referenced by add_properties().


The documentation for this class was generated from the following files: