mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Added a sub window to the windows propery object..
This commit is contained in:
parent
4d949e95a6
commit
70222eaeda
@ -573,6 +573,7 @@ set_icon_filename(const Filename &icon_filename) {
|
||||
_specified |= S_icon_filename;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WindowProperties::get_icon_filename
|
||||
// Access: Published
|
||||
@ -744,6 +745,48 @@ clear_mouse_mode() {
|
||||
_mouse_mode=MOUSE_absolute;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WindowProperties::set_parent_window
|
||||
// Access: Published
|
||||
// Description: Removes the z_order specification from the properties.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void WindowProperties::
|
||||
set_parent_window(size_t parent) {
|
||||
_parent_window=parent;
|
||||
_specified |= S_parent_window;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WindowProperties::get_parent_window
|
||||
// Access: Published
|
||||
// Description: Removes the parent Window
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE size_t WindowProperties::
|
||||
get_parent_window() const {
|
||||
return _parent_window;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WindowProperties::has_parent_window
|
||||
// Access: Published
|
||||
// Description: Checks the S_parent_window specification from the properties.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool WindowProperties::
|
||||
has_parent_window() const {
|
||||
return ((_specified & S_parent_window)!=0);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: WindowProperties::clear_parent_window
|
||||
// Access: Published
|
||||
// Description: Removes the S_parent_window specification from the properties.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void WindowProperties::
|
||||
clear_parent_window() {
|
||||
_specified &= ~S_parent_window;
|
||||
_parent_window=NULL;
|
||||
}
|
||||
|
||||
|
||||
INLINE ostream &
|
||||
operator << (ostream &out, const WindowProperties &properties) {
|
||||
|
@ -48,6 +48,7 @@ operator = (const WindowProperties ©) {
|
||||
_z_order = copy._z_order;
|
||||
_flags = copy._flags;
|
||||
_mouse_mode = copy._mouse_mode;
|
||||
_parent_window = copy._parent_window;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -145,6 +146,7 @@ clear() {
|
||||
_z_order = Z_normal;
|
||||
_flags = 0;
|
||||
_mouse_mode = MOUSE_absolute;
|
||||
_parent_window = 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -195,9 +197,15 @@ add_properties(const WindowProperties &other) {
|
||||
if (other.has_z_order()) {
|
||||
set_z_order(other.get_z_order());
|
||||
}
|
||||
|
||||
if (other.has_mouse_mode()) {
|
||||
set_mouse_mode(other.get_mouse_mode());
|
||||
}
|
||||
|
||||
if (other.has_parent_window()) {
|
||||
set_parent_window(other.get_parent_window());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -251,6 +259,10 @@ output(ostream &out) const {
|
||||
if (has_mouse_mode()) {
|
||||
out << get_mouse_mode() << " ";
|
||||
}
|
||||
if (has_parent_window()) {
|
||||
out << get_parent_window() << " ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ostream &
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "pandabase.h"
|
||||
#include "filename.h"
|
||||
#include "pnotify.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : WindowProperties
|
||||
// Description : A container for the various kinds of properties we
|
||||
@ -32,6 +32,8 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDA WindowProperties {
|
||||
PUBLISHED:
|
||||
|
||||
|
||||
enum ZOrder {
|
||||
Z_bottom,
|
||||
Z_normal,
|
||||
@ -129,6 +131,12 @@ PUBLISHED:
|
||||
INLINE bool has_z_order() const;
|
||||
INLINE void clear_z_order();
|
||||
|
||||
|
||||
INLINE void set_parent_window(size_t parent);
|
||||
INLINE size_t get_parent_window() const;
|
||||
INLINE bool has_parent_window() const;
|
||||
INLINE void clear_parent_window();
|
||||
|
||||
void add_properties(const WindowProperties &other);
|
||||
|
||||
void output(ostream &out) const;
|
||||
@ -152,6 +160,7 @@ private:
|
||||
S_icon_filename = 0x0800,
|
||||
S_cursor_filename = 0x1000,
|
||||
S_mouse_mode = 0x2000,
|
||||
S_parent_window = 0x4000,
|
||||
};
|
||||
|
||||
// This bitmask represents the true/false settings for various
|
||||
@ -178,6 +187,7 @@ private:
|
||||
Filename _icon_filename;
|
||||
ZOrder _z_order;
|
||||
int _flags;
|
||||
size_t _parent_window; // a HWND or WindowRef or .. what ever it is on X win...
|
||||
};
|
||||
|
||||
EXPCL_PANDA ostream &
|
||||
|
Loading…
x
Reference in New Issue
Block a user