00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef WINDOWPROPERTIES_H
00020 #define WINDOWPROPERTIES_H
00021
00022 #include "pandabase.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA WindowProperties {
00032 PUBLISHED:
00033 WindowProperties();
00034 INLINE WindowProperties(const WindowProperties ©);
00035 void operator = (const WindowProperties ©);
00036 INLINE ~WindowProperties();
00037
00038 bool operator == (const WindowProperties &other) const;
00039 INLINE bool operator != (const WindowProperties &other) const;
00040
00041 void clear();
00042 INLINE bool is_any_specified() const;
00043
00044 INLINE void set_origin(int x_origin, int y_origin);
00045 INLINE int get_x_origin() const;
00046 INLINE int get_y_origin() const;
00047 INLINE bool has_origin() const;
00048 INLINE void clear_origin();
00049
00050 INLINE void set_size(int x_size, int y_size);
00051 INLINE int get_x_size() const;
00052 INLINE int get_y_size() const;
00053 INLINE bool has_size() const;
00054 INLINE void clear_size();
00055
00056 INLINE void set_title(const string &title);
00057 INLINE const string &get_title() const;
00058 INLINE bool has_title() const;
00059 INLINE void clear_title();
00060
00061 INLINE void set_undecorated(bool undecorated);
00062 INLINE bool get_undecorated() const;
00063 INLINE bool has_undecorated() const;
00064 INLINE void clear_undecorated();
00065
00066 INLINE void set_fullscreen(bool fullscreen);
00067 INLINE bool get_fullscreen() const;
00068 INLINE bool has_fullscreen() const;
00069 INLINE void clear_fullscreen();
00070
00071 INLINE void set_foreground(bool foreground);
00072 INLINE bool get_foreground() const;
00073 INLINE bool has_foreground() const;
00074 INLINE void clear_foreground();
00075
00076 INLINE void set_minimized(bool minimized);
00077 INLINE bool get_minimized() const;
00078 INLINE bool has_minimized() const;
00079 INLINE void clear_minimized();
00080
00081 INLINE void set_open(bool open);
00082 INLINE bool get_open() const;
00083 INLINE bool has_open() const;
00084 INLINE void clear_open();
00085
00086 INLINE void set_cursor_hidden(bool cursor_hidden);
00087 INLINE bool get_cursor_hidden() const;
00088 INLINE bool has_cursor_hidden() const;
00089 INLINE void clear_cursor_hidden();
00090
00091 void add_properties(const WindowProperties &other);
00092
00093 void output(ostream &out) const;
00094
00095 private:
00096
00097
00098
00099 enum Specified {
00100 S_origin = 0x0001,
00101 S_size = 0x0002,
00102 S_title = 0x0004,
00103 S_undecorated = 0x0008,
00104 S_fullscreen = 0x0010,
00105 S_foreground = 0x0020,
00106 S_minimized = 0x0040,
00107 S_open = 0x0080,
00108 S_cursor_hidden = 0x0100,
00109 };
00110
00111
00112
00113
00114 enum Flags {
00115 F_undecorated = S_undecorated,
00116 F_fullscreen = S_fullscreen,
00117 F_foreground = S_foreground,
00118 F_minimized = S_minimized,
00119 F_open = S_open,
00120 F_cursor_hidden = S_cursor_hidden,
00121 };
00122
00123 int _specified;
00124 int _x_origin;
00125 int _y_origin;
00126 int _x_size;
00127 int _y_size;
00128 string _title;
00129 int _flags;
00130 };
00131
00132 INLINE ostream &operator << (ostream &out, const WindowProperties &properties);
00133
00134 #include "windowProperties.I"
00135
00136 #endif