Panda3D
 All Classes Functions Variables Enumerations
windowProperties.I
00001 // Filename: windowProperties.I
00002 // Created by:  drose (13Aug02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: WindowProperties::Copy Constructor
00018 //       Access: Published
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE WindowProperties::
00022 WindowProperties(const WindowProperties &copy) {
00023   (*this) = copy;
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: WindowProperties::Destructor
00028 //       Access: Published
00029 //  Description:
00030 ////////////////////////////////////////////////////////////////////
00031 INLINE WindowProperties::
00032 ~WindowProperties() {
00033 }
00034 
00035 ////////////////////////////////////////////////////////////////////
00036 //     Function: WindowProperties::operator !=
00037 //       Access: Published
00038 //  Description:
00039 ////////////////////////////////////////////////////////////////////
00040 INLINE bool WindowProperties::
00041 operator != (const WindowProperties &other) const {
00042   return !operator == (other);
00043 }
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 //     Function: WindowProperties::is_any_specified
00047 //       Access: Published
00048 //  Description: Returns true if any properties have been specified,
00049 //               false otherwise.
00050 ////////////////////////////////////////////////////////////////////
00051 INLINE bool WindowProperties::
00052 is_any_specified() const {
00053   return (_specified != 0);
00054 }
00055 
00056 ////////////////////////////////////////////////////////////////////
00057 //     Function: WindowProperties::set_origin
00058 //       Access: Published
00059 //  Description: Specifies the origin on the screen (in pixels,
00060 //               relative to the top-left corner) at which the window
00061 //               should appear.  This is the origin of the top-left
00062 //               corner of the useful part of the window, not
00063 //               including decorations.
00064 ////////////////////////////////////////////////////////////////////
00065 INLINE void WindowProperties::
00066 set_origin(int x_origin, int y_origin) {
00067   _x_origin = x_origin;
00068   _y_origin = y_origin;
00069   _specified |= S_origin;
00070 }
00071 
00072 ////////////////////////////////////////////////////////////////////
00073 //     Function: WindowProperties::get_x_origin
00074 //       Access: Published
00075 //  Description: Returns the x coordinate of the window's top-left
00076 //               corner, not including decorations.
00077 ////////////////////////////////////////////////////////////////////
00078 INLINE int WindowProperties::
00079 get_x_origin() const {
00080   nassertr(has_origin(), 0);
00081   return _x_origin;
00082 }
00083 
00084 ////////////////////////////////////////////////////////////////////
00085 //     Function: WindowProperties::get_y_origin
00086 //       Access: Published
00087 //  Description: Returns the y coordinate of the window's top-left
00088 //               corner, not including decorations.
00089 ////////////////////////////////////////////////////////////////////
00090 INLINE int WindowProperties::
00091 get_y_origin() const {
00092   nassertr(has_origin(), 0);
00093   return _y_origin;
00094 }
00095 
00096 ////////////////////////////////////////////////////////////////////
00097 //     Function: WindowProperties::has_origin
00098 //       Access: Published
00099 //  Description: Returns true if the window origin has been specified,
00100 //               false otherwise.
00101 ////////////////////////////////////////////////////////////////////
00102 INLINE bool WindowProperties::
00103 has_origin() const {
00104   return ((_specified & S_origin) != 0);
00105 }
00106 
00107 ////////////////////////////////////////////////////////////////////
00108 //     Function: WindowProperties::clear_origin
00109 //       Access: Published
00110 //  Description: Removes the origin specification from the properties.
00111 ////////////////////////////////////////////////////////////////////
00112 INLINE void WindowProperties::
00113 clear_origin() {
00114   _specified &= ~S_origin;
00115   _x_origin = 0;
00116   _y_origin = 0;
00117 }
00118 
00119 ////////////////////////////////////////////////////////////////////
00120 //     Function: WindowProperties::set_size
00121 //       Access: Published
00122 //  Description: Specifies the requested size of the window, in
00123 //               pixels.  This is the size of the useful part of the
00124 //               window, not including decorations.
00125 ////////////////////////////////////////////////////////////////////
00126 INLINE void WindowProperties::
00127 set_size(int x_size, int y_size) {
00128   _x_size = x_size;
00129   _y_size = y_size;
00130   _specified |= S_size;
00131 }
00132 
00133 ////////////////////////////////////////////////////////////////////
00134 //     Function: WindowProperties::get_x_size
00135 //       Access: Published
00136 //  Description: Returns size in pixels in the x dimension of the
00137 //               useful part of the window, not including decorations.
00138 //               That is, this is the window's width.
00139 ////////////////////////////////////////////////////////////////////
00140 INLINE int WindowProperties::
00141 get_x_size() const {
00142   nassertr(has_size(), 0);
00143   return _x_size;
00144 }
00145 
00146 ////////////////////////////////////////////////////////////////////
00147 //     Function: WindowProperties::get_y_size
00148 //       Access: Published
00149 //  Description: Returns size in pixels in the y dimension of the
00150 //               useful part of the window, not including decorations.
00151 //               That is, this is the window's height.
00152 ////////////////////////////////////////////////////////////////////
00153 INLINE int WindowProperties::
00154 get_y_size() const {
00155   nassertr(has_size(), 0);
00156   return _y_size;
00157 }
00158 
00159 ////////////////////////////////////////////////////////////////////
00160 //     Function: WindowProperties::has_size
00161 //       Access: Published
00162 //  Description: Returns true if the window size has been specified,
00163 //               false otherwise.
00164 ////////////////////////////////////////////////////////////////////
00165 INLINE bool WindowProperties::
00166 has_size() const {
00167   return ((_specified & S_size) != 0);
00168 }
00169 
00170 ////////////////////////////////////////////////////////////////////
00171 //     Function: WindowProperties::clear_size
00172 //       Access: Published
00173 //  Description: Removes the size specification from the properties.
00174 ////////////////////////////////////////////////////////////////////
00175 INLINE void WindowProperties::
00176 clear_size() {
00177   _specified &= ~S_size;
00178   _x_size = 0;
00179   _y_size = 0;
00180 }
00181 
00182 ////////////////////////////////////////////////////////////////////
00183 //     Function: WindowProperties::set_title
00184 //       Access: Published
00185 //  Description: Specifies the title that should be assigned to the
00186 //               window.
00187 ////////////////////////////////////////////////////////////////////
00188 INLINE void WindowProperties::
00189 set_title(const string &title) {
00190   _title = title;
00191   _specified |= S_title;
00192 }
00193 
00194 ////////////////////////////////////////////////////////////////////
00195 //     Function: WindowProperties::get_title
00196 //       Access: Published
00197 //  Description: Returns the window's title.
00198 ////////////////////////////////////////////////////////////////////
00199 INLINE const string &WindowProperties::
00200 get_title() const {
00201   nassertr(has_title(), _title);
00202   return _title;
00203 }
00204 
00205 ////////////////////////////////////////////////////////////////////
00206 //     Function: WindowProperties::has_title
00207 //       Access: Published
00208 //  Description: Returns true if the window title has been specified,
00209 //               false otherwise.
00210 ////////////////////////////////////////////////////////////////////
00211 INLINE bool WindowProperties::
00212 has_title() const {
00213   return ((_specified & S_title) != 0);
00214 }
00215 
00216 ////////////////////////////////////////////////////////////////////
00217 //     Function: WindowProperties::clear_title
00218 //       Access: Published
00219 //  Description: Removes the title specification from the properties.
00220 ////////////////////////////////////////////////////////////////////
00221 INLINE void WindowProperties::
00222 clear_title() {
00223   _specified &= ~S_title;
00224   _title = string();
00225 }
00226 
00227 ////////////////////////////////////////////////////////////////////
00228 //     Function: WindowProperties::set_undecorated
00229 //       Access: Published
00230 //  Description: Specifies whether the window should be created with a
00231 //               visible title and border (false, the default) or not
00232 //               (true).
00233 ////////////////////////////////////////////////////////////////////
00234 INLINE void WindowProperties::
00235 set_undecorated(bool undecorated) {
00236   if (undecorated) {
00237     _flags |= F_undecorated;
00238   } else {
00239     _flags &= ~F_undecorated;
00240   }
00241   _specified |= S_undecorated;
00242 }
00243 
00244 ////////////////////////////////////////////////////////////////////
00245 //     Function: WindowProperties::get_undecorated
00246 //       Access: Published
00247 //  Description: Returns true if the window has no border.
00248 ////////////////////////////////////////////////////////////////////
00249 INLINE bool WindowProperties::
00250 get_undecorated() const {
00251   return (_flags & F_undecorated) != 0;
00252 }
00253 
00254 ////////////////////////////////////////////////////////////////////
00255 //     Function: WindowProperties::has_undecorated
00256 //       Access: Published
00257 //  Description: Returns true if set_undecorated() has been specified.
00258 ////////////////////////////////////////////////////////////////////
00259 INLINE bool WindowProperties::
00260 has_undecorated() const {
00261   return ((_specified & S_undecorated) != 0);
00262 }
00263 
00264 ////////////////////////////////////////////////////////////////////
00265 //     Function: WindowProperties::clear_undecorated
00266 //       Access: Published
00267 //  Description: Removes the undecorated specification from the properties.
00268 ////////////////////////////////////////////////////////////////////
00269 INLINE void WindowProperties::
00270 clear_undecorated() {
00271   _specified &= ~S_undecorated;
00272   _flags &= ~F_undecorated;
00273 }
00274 
00275 ////////////////////////////////////////////////////////////////////
00276 //     Function: WindowProperties::set_fixed_size
00277 //       Access: Published
00278 //  Description: Specifies whether the window should be resizable by
00279 //               the user.
00280 ////////////////////////////////////////////////////////////////////
00281 INLINE void WindowProperties::
00282 set_fixed_size(bool fixed_size) {
00283   if (fixed_size) {
00284     _flags |= F_fixed_size;
00285   } else {
00286     _flags &= ~F_fixed_size;
00287   }
00288   _specified |= S_fixed_size;
00289 }
00290 
00291 ////////////////////////////////////////////////////////////////////
00292 //     Function: WindowProperties::get_fixed_size
00293 //       Access: Published
00294 //  Description: Returns true if the window cannot be resized by the
00295 //               user, false otherwise.
00296 ////////////////////////////////////////////////////////////////////
00297 INLINE bool WindowProperties::
00298 get_fixed_size() const {
00299   return (_flags & F_fixed_size) != 0;
00300 }
00301 
00302 ////////////////////////////////////////////////////////////////////
00303 //     Function: WindowProperties::has_fixed_size
00304 //       Access: Published
00305 //  Description: Returns true if set_fixed_size() has been specified.
00306 ////////////////////////////////////////////////////////////////////
00307 INLINE bool WindowProperties::
00308 has_fixed_size() const {
00309   return ((_specified & S_fixed_size) != 0);
00310 }
00311 
00312 ////////////////////////////////////////////////////////////////////
00313 //     Function: WindowProperties::clear_fixed_size
00314 //       Access: Published
00315 //  Description: Removes the fixed_size specification from the properties.
00316 ////////////////////////////////////////////////////////////////////
00317 INLINE void WindowProperties::
00318 clear_fixed_size() {
00319   _specified &= ~S_fixed_size;
00320   _flags &= ~F_fixed_size;
00321 }
00322 
00323 ////////////////////////////////////////////////////////////////////
00324 //     Function: WindowProperties::set_fullscreen
00325 //       Access: Published
00326 //  Description: Specifies whether the window should be opened in
00327 //               fullscreen mode (true) or normal windowed mode
00328 //               (false, the default).
00329 ////////////////////////////////////////////////////////////////////
00330 INLINE void WindowProperties::
00331 set_fullscreen(bool fullscreen) {
00332   if (fullscreen) {
00333     _flags |= F_fullscreen;
00334   } else {
00335     _flags &= ~F_fullscreen;
00336   }
00337   _specified |= S_fullscreen;
00338 }
00339 
00340 ////////////////////////////////////////////////////////////////////
00341 //     Function: WindowProperties::get_fullscreen
00342 //       Access: Published
00343 //  Description: Returns true if the window is in fullscreen mode.
00344 ////////////////////////////////////////////////////////////////////
00345 INLINE bool WindowProperties::
00346 get_fullscreen() const {
00347   return (_flags & F_fullscreen) != 0;
00348 }
00349 
00350 ////////////////////////////////////////////////////////////////////
00351 //     Function: WindowProperties::has_fullscreen
00352 //       Access: Published
00353 //  Description: Returns true if set_fullscreen() has been specified.
00354 ////////////////////////////////////////////////////////////////////
00355 INLINE bool WindowProperties::
00356 has_fullscreen() const {
00357   return ((_specified & S_fullscreen) != 0);
00358 }
00359 
00360 ////////////////////////////////////////////////////////////////////
00361 //     Function: WindowProperties::clear_fullscreen
00362 //       Access: Published
00363 //  Description: Removes the fullscreen specification from the properties.
00364 ////////////////////////////////////////////////////////////////////
00365 INLINE void WindowProperties::
00366 clear_fullscreen() {
00367   _specified &= ~S_fullscreen;
00368   _flags &= ~F_fullscreen;
00369 }
00370 
00371 ////////////////////////////////////////////////////////////////////
00372 //     Function: WindowProperties::set_foreground
00373 //       Access: Published
00374 //  Description: Specifies whether the window should be opened in
00375 //               the foreground (true), or left in the background
00376 //               (false).
00377 ////////////////////////////////////////////////////////////////////
00378 INLINE void WindowProperties::
00379 set_foreground(bool foreground) {
00380   if (foreground) {
00381     _flags |= F_foreground;
00382   } else {
00383     _flags &= ~F_foreground;
00384   }
00385   _specified |= S_foreground;
00386 }
00387 
00388 ////////////////////////////////////////////////////////////////////
00389 //     Function: WindowProperties::get_foreground
00390 //       Access: Published
00391 //  Description: Returns true if the window is in the foreground.
00392 ////////////////////////////////////////////////////////////////////
00393 INLINE bool WindowProperties::
00394 get_foreground() const {
00395   return (_flags & F_foreground) != 0;
00396 }
00397 
00398 ////////////////////////////////////////////////////////////////////
00399 //     Function: WindowProperties::has_foreground
00400 //       Access: Published
00401 //  Description: Returns true if set_foreground() has been specified.
00402 ////////////////////////////////////////////////////////////////////
00403 INLINE bool WindowProperties::
00404 has_foreground() const {
00405   return ((_specified & S_foreground) != 0);
00406 }
00407 
00408 ////////////////////////////////////////////////////////////////////
00409 //     Function: WindowProperties::clear_foreground
00410 //       Access: Published
00411 //  Description: Removes the foreground specification from the properties.
00412 ////////////////////////////////////////////////////////////////////
00413 INLINE void WindowProperties::
00414 clear_foreground() {
00415   _specified &= ~S_foreground;
00416   _flags &= ~F_foreground;
00417 }
00418 
00419 ////////////////////////////////////////////////////////////////////
00420 //     Function: WindowProperties::set_minimized
00421 //       Access: Published
00422 //  Description: Specifies whether the window should be created
00423 //               minimized (true), or normal (false).
00424 ////////////////////////////////////////////////////////////////////
00425 INLINE void WindowProperties::
00426 set_minimized(bool minimized) {
00427   if (minimized) {
00428     _flags |= F_minimized;
00429   } else {
00430     _flags &= ~F_minimized;
00431   }
00432   _specified |= S_minimized;
00433 }
00434 
00435 ////////////////////////////////////////////////////////////////////
00436 //     Function: WindowProperties::get_minimized
00437 //       Access: Published
00438 //  Description: Returns true if the window is minimized.
00439 ////////////////////////////////////////////////////////////////////
00440 INLINE bool WindowProperties::
00441 get_minimized() const {
00442   return (_flags & F_minimized) != 0;
00443 }
00444 
00445 ////////////////////////////////////////////////////////////////////
00446 //     Function: WindowProperties::has_minimized
00447 //       Access: Published
00448 //  Description: Returns true if set_minimized() has been specified.
00449 ////////////////////////////////////////////////////////////////////
00450 INLINE bool WindowProperties::
00451 has_minimized() const {
00452   return ((_specified & S_minimized) != 0);
00453 }
00454 
00455 ////////////////////////////////////////////////////////////////////
00456 //     Function: WindowProperties::clear_minimized
00457 //       Access: Published
00458 //  Description: Removes the minimized specification from the properties.
00459 ////////////////////////////////////////////////////////////////////
00460 INLINE void WindowProperties::
00461 clear_minimized() {
00462   _specified &= ~S_minimized;
00463   _flags &= ~F_minimized;
00464 }
00465 
00466 ////////////////////////////////////////////////////////////////////
00467 //     Function: WindowProperties::set_raw_mice
00468 //       Access: Published
00469 //  Description: Specifies whether the window should read the raw
00470 //               mouse devices.
00471 ////////////////////////////////////////////////////////////////////
00472 INLINE void WindowProperties::
00473 set_raw_mice(bool raw_mice) {
00474   if (raw_mice) {
00475     _flags |= F_raw_mice;
00476   } else {
00477     _flags &= ~F_raw_mice;
00478   }
00479   _specified |= S_raw_mice;
00480 }
00481 
00482 ////////////////////////////////////////////////////////////////////
00483 //     Function: WindowProperties::get_raw_mice
00484 //       Access: Published
00485 //  Description: Returns true if the window reads the raw mice.
00486 ////////////////////////////////////////////////////////////////////
00487 INLINE bool WindowProperties::
00488 get_raw_mice() const {
00489   return (_flags & F_raw_mice) != 0;
00490 }
00491 
00492 ////////////////////////////////////////////////////////////////////
00493 //     Function: WindowProperties::has_raw_mice
00494 //       Access: Published
00495 //  Description: Returns true if set_raw_mice() has been specified.
00496 ////////////////////////////////////////////////////////////////////
00497 INLINE bool WindowProperties::
00498 has_raw_mice() const {
00499   return ((_specified & S_raw_mice) != 0);
00500 }
00501 
00502 ////////////////////////////////////////////////////////////////////
00503 //     Function: WindowProperties::clear_raw_mice
00504 //       Access: Published
00505 //  Description: Removes the raw_mice specification from the properties.
00506 ////////////////////////////////////////////////////////////////////
00507 INLINE void WindowProperties::
00508 clear_raw_mice() {
00509   _specified &= ~S_raw_mice;
00510   _flags &= ~F_raw_mice;
00511 }
00512 
00513 ////////////////////////////////////////////////////////////////////
00514 //     Function: WindowProperties::set_open
00515 //       Access: Published
00516 //  Description: Specifies whether the window should be open.  It is
00517 //               legal to create a GraphicsWindow in the closed state,
00518 //               and later request it to open by changing this flag.
00519 ////////////////////////////////////////////////////////////////////
00520 INLINE void WindowProperties::
00521 set_open(bool open) {
00522   if (open) {
00523     _flags |= F_open;
00524   } else {
00525     _flags &= ~F_open;
00526   }
00527   _specified |= S_open;
00528 }
00529 
00530 ////////////////////////////////////////////////////////////////////
00531 //     Function: WindowProperties::get_open
00532 //       Access: Published
00533 //  Description: Returns true if the window is open.
00534 ////////////////////////////////////////////////////////////////////
00535 INLINE bool WindowProperties::
00536 get_open() const {
00537   return (_flags & F_open) != 0;
00538 }
00539 
00540 ////////////////////////////////////////////////////////////////////
00541 //     Function: WindowProperties::has_open
00542 //       Access: Published
00543 //  Description: Returns true if set_open() has been specified.
00544 ////////////////////////////////////////////////////////////////////
00545 INLINE bool WindowProperties::
00546 has_open() const {
00547   return ((_specified & S_open) != 0);
00548 }
00549 
00550 ////////////////////////////////////////////////////////////////////
00551 //     Function: WindowProperties::clear_open
00552 //       Access: Published
00553 //  Description: Removes the open specification from the properties.
00554 ////////////////////////////////////////////////////////////////////
00555 INLINE void WindowProperties::
00556 clear_open() {
00557   _specified &= ~S_open;
00558   _flags &= ~F_open;
00559 }
00560 
00561 ////////////////////////////////////////////////////////////////////
00562 //     Function: WindowProperties::set_cursor_hidden
00563 //       Access: Published
00564 //  Description: Specifies whether the mouse cursor should be visible.
00565 ////////////////////////////////////////////////////////////////////
00566 INLINE void WindowProperties::
00567 set_cursor_hidden(bool cursor_hidden) {
00568   if (cursor_hidden) {
00569     _flags |= F_cursor_hidden;
00570   } else {
00571     _flags &= ~F_cursor_hidden;
00572   }
00573   _specified |= S_cursor_hidden;
00574 }
00575 
00576 ////////////////////////////////////////////////////////////////////
00577 //     Function: WindowProperties::get_cursor_hidden
00578 //       Access: Published
00579 //  Description: Returns true if the mouse cursor is invisible.
00580 ////////////////////////////////////////////////////////////////////
00581 INLINE bool WindowProperties::
00582 get_cursor_hidden() const {
00583   return (_flags & F_cursor_hidden) != 0;
00584 }
00585 
00586 ////////////////////////////////////////////////////////////////////
00587 //     Function: WindowProperties::has_cursor_hidden
00588 //       Access: Published
00589 //  Description: Returns true if set_cursor_hidden() has been specified.
00590 ////////////////////////////////////////////////////////////////////
00591 INLINE bool WindowProperties::
00592 has_cursor_hidden() const {
00593   return ((_specified & S_cursor_hidden) != 0);
00594 }
00595 
00596 ////////////////////////////////////////////////////////////////////
00597 //     Function: WindowProperties::clear_cursor_hidden
00598 //       Access: Published
00599 //  Description: Removes the cursor_hidden specification from the properties.
00600 ////////////////////////////////////////////////////////////////////
00601 INLINE void WindowProperties::
00602 clear_cursor_hidden() {
00603   _specified &= ~S_cursor_hidden;
00604   _flags &= ~F_cursor_hidden;
00605 }
00606 
00607 ////////////////////////////////////////////////////////////////////
00608 //     Function: WindowProperties::set_icon_filename
00609 //       Access: Published
00610 //  Description: Specifies the file that contains the icon to
00611 //               associate with the window when it is minimized.
00612 ////////////////////////////////////////////////////////////////////
00613 INLINE void WindowProperties::
00614 set_icon_filename(const Filename &icon_filename) {
00615   _icon_filename = icon_filename;
00616   _specified |= S_icon_filename;
00617 }
00618 
00619 
00620 ////////////////////////////////////////////////////////////////////
00621 //     Function: WindowProperties::get_icon_filename
00622 //       Access: Published
00623 //  Description: Returns the icon filename associated with the window.
00624 ////////////////////////////////////////////////////////////////////
00625 INLINE const Filename &WindowProperties::
00626 get_icon_filename() const {
00627   return _icon_filename;
00628 }
00629 
00630 ////////////////////////////////////////////////////////////////////
00631 //     Function: WindowProperties::has_icon_filename
00632 //       Access: Published
00633 //  Description: Returns true if set_icon_filename() has been
00634 //               specified.
00635 ////////////////////////////////////////////////////////////////////
00636 INLINE bool WindowProperties::
00637 has_icon_filename() const {
00638   return ((_specified & S_icon_filename) != 0);
00639 }
00640 
00641 ////////////////////////////////////////////////////////////////////
00642 //     Function: WindowProperties::clear_icon_filename
00643 //       Access: Published
00644 //  Description: Removes the icon_filename specification from the
00645 //               properties.
00646 ////////////////////////////////////////////////////////////////////
00647 INLINE void WindowProperties::
00648 clear_icon_filename() {
00649   _specified &= ~S_icon_filename;
00650   _icon_filename = Filename();
00651 }
00652 
00653 ////////////////////////////////////////////////////////////////////
00654 //     Function: WindowProperties::set_cursor_filename
00655 //       Access: Published
00656 //  Description: Specifies the file that contains the icon to
00657 //               associate with the mouse cursor when it is within the
00658 //               window (and visible).
00659 ////////////////////////////////////////////////////////////////////
00660 INLINE void WindowProperties::
00661 set_cursor_filename(const Filename &cursor_filename) {
00662   _cursor_filename = cursor_filename;
00663   _specified |= S_cursor_filename;
00664 }
00665 
00666 ////////////////////////////////////////////////////////////////////
00667 //     Function: WindowProperties::get_cursor_filename
00668 //       Access: Published
00669 //  Description: Returns the icon filename associated with the mouse
00670 //               cursor.
00671 ////////////////////////////////////////////////////////////////////
00672 INLINE const Filename &WindowProperties::
00673 get_cursor_filename() const {
00674   return _cursor_filename;
00675 }
00676 
00677 ////////////////////////////////////////////////////////////////////
00678 //     Function: WindowProperties::has_cursor_filename
00679 //       Access: Published
00680 //  Description: Returns true if set_cursor_filename() has been
00681 //               specified.
00682 ////////////////////////////////////////////////////////////////////
00683 INLINE bool WindowProperties::
00684 has_cursor_filename() const {
00685   return ((_specified & S_cursor_filename) != 0);
00686 }
00687 
00688 ////////////////////////////////////////////////////////////////////
00689 //     Function: WindowProperties::clear_cursor_filename
00690 //       Access: Published
00691 //  Description: Removes the cursor_filename specification from the
00692 //               properties.
00693 ////////////////////////////////////////////////////////////////////
00694 INLINE void WindowProperties::
00695 clear_cursor_filename() {
00696   _specified &= ~S_cursor_filename;
00697   _cursor_filename = Filename();
00698 }
00699 
00700 ////////////////////////////////////////////////////////////////////
00701 //     Function: WindowProperties::set_z_order
00702 //       Access: Published
00703 //  Description: Specifies the relative ordering of the window with
00704 //               respect to other windows.  If the z_order is Z_top,
00705 //               the window will always be on top of other windows; if
00706 //               it is Z_bottom, it will always be below other
00707 //               windows.  Most windows will want to be Z_normal,
00708 //               which allows the user to control the order.
00709 ////////////////////////////////////////////////////////////////////
00710 INLINE void WindowProperties::
00711 set_z_order(WindowProperties::ZOrder z_order) {
00712   _z_order = z_order;
00713   _specified |= S_z_order;
00714 }
00715 
00716 ////////////////////////////////////////////////////////////////////
00717 //     Function: WindowProperties::get_z_order
00718 //       Access: Published
00719 //  Description: Returns the window's z_order.
00720 ////////////////////////////////////////////////////////////////////
00721 INLINE WindowProperties::ZOrder WindowProperties::
00722 get_z_order() const {
00723   return _z_order;
00724 }
00725 
00726 ////////////////////////////////////////////////////////////////////
00727 //     Function: WindowProperties::has_z_order
00728 //       Access: Published
00729 //  Description: Returns true if the window z_order has been specified,
00730 //               false otherwise.
00731 ////////////////////////////////////////////////////////////////////
00732 INLINE bool WindowProperties::
00733 has_z_order() const {
00734   return ((_specified & S_z_order) != 0);
00735 }
00736 
00737 ////////////////////////////////////////////////////////////////////
00738 //     Function: WindowProperties::clear_z_order
00739 //       Access: Published
00740 //  Description: Removes the z_order specification from the properties.
00741 ////////////////////////////////////////////////////////////////////
00742 INLINE void WindowProperties::
00743 clear_z_order() {
00744   _specified &= ~S_z_order;
00745   _z_order = Z_normal;
00746 }
00747 
00748 
00749 ////////////////////////////////////////////////////////////////////
00750 //     Function: WindowProperties::set_mouse_mode
00751 //       Access: Published
00752 //  Description: Specifies the mode in which the window is to operate
00753 //               its mouse pointer.  The default is M_absolute, which
00754 //               is the normal mode in which a mouse pointer operates;
00755 //               but you can also set M_relative, which is
00756 //               particularly useful for FPS-style mouse movements
00757 //               where you have hidden the mouse pointer and are are
00758 //               more interested in how fast the mouse is moving,
00759 //               rather than precisely where the pointer is hovering.
00760 //
00761 //               This has no effect on Windows, which does not
00762 //               have this concept; but is important to do on OSX
00763 //               and Unix/X11 to properly enable a smooth FPS-style
00764 //               mouselook mode.  On Unix/X11, this requires the
00765 //               Xxf86dga extension to be available.
00766 ////////////////////////////////////////////////////////////////////
00767 INLINE void WindowProperties::
00768 set_mouse_mode(MouseMode mode) {
00769   _mouse_mode=mode;
00770   _specified |= S_mouse_mode;
00771 }
00772 
00773 ////////////////////////////////////////////////////////////////////
00774 //     Function: WindowProperties::get_mouse_mode
00775 //       Access: Published
00776 //  Description: See set_mouse_mode().
00777 ////////////////////////////////////////////////////////////////////
00778 INLINE WindowProperties::MouseMode WindowProperties::
00779 get_mouse_mode() const {
00780  return _mouse_mode;
00781 }
00782 
00783 ////////////////////////////////////////////////////////////////////
00784 //     Function: WindowProperties::has_mouse_mode
00785 //       Access: Published
00786 //  Description: 
00787 ////////////////////////////////////////////////////////////////////
00788 INLINE bool WindowProperties::
00789 has_mouse_mode() const {
00790   return ((_specified & S_mouse_mode)!=0);
00791 }
00792 
00793 ////////////////////////////////////////////////////////////////////
00794 //     Function: WindowProperties::clear_mouse_mode
00795 //       Access: Published
00796 //  Description: Removes the mouse_mode specification from the properties.
00797 ////////////////////////////////////////////////////////////////////
00798 INLINE void WindowProperties::
00799 clear_mouse_mode() {
00800   _specified &= ~S_mouse_mode;
00801   _mouse_mode = M_absolute;
00802 }
00803 
00804 ////////////////////////////////////////////////////////////////////
00805 //     Function: WindowProperties::set_parent_window
00806 //       Access: Published
00807 //  Description: Specifies the window that this window should be
00808 //               attached to.  If this is NULL or unspecified, the
00809 //               window will be created as a toplevel window on the
00810 //               desktop; if this is non-NULL, the window will be
00811 //               bound as a child window to the indicated parent
00812 //               window.
00813 //
00814 //               You should use GraphicsPipe::make_window_handle() to
00815 //               create an instance of a WindowHandle object given an
00816 //               appropriate OS-specific window handle representation.
00817 //               Each OS-specific GraphicsPipe class defines a
00818 //               make_window_handle() method that returns an
00819 //               appropriate WindowHandle object to wrap the
00820 //               particular OS-specific representation.
00821 ////////////////////////////////////////////////////////////////////
00822 INLINE void WindowProperties::
00823 set_parent_window(WindowHandle *parent_window) {
00824   _parent_window = parent_window;
00825   _specified |= S_parent_window;
00826 }
00827 
00828 ////////////////////////////////////////////////////////////////////
00829 //     Function: WindowProperties::get_parent_window
00830 //       Access: Published
00831 //  Description: Returns the parent window specification, or NULL if
00832 //               there is no parent window specified.
00833 ////////////////////////////////////////////////////////////////////
00834 INLINE WindowHandle *WindowProperties::
00835 get_parent_window() const {
00836  return _parent_window;
00837 }
00838 
00839 ////////////////////////////////////////////////////////////////////
00840 //     Function: WindowProperties::has_parent_window
00841 //       Access: Published
00842 //  Description: Checks the S_parent_window specification from the properties.
00843 ////////////////////////////////////////////////////////////////////
00844 INLINE bool WindowProperties::
00845 has_parent_window() const {
00846   return ((_specified & S_parent_window)!=0);
00847 }
00848 
00849 ////////////////////////////////////////////////////////////////////
00850 //     Function: WindowProperties::clear_parent_window
00851 //       Access: Published
00852 //  Description: Removes the S_parent_window specification from the properties.
00853 ////////////////////////////////////////////////////////////////////
00854 INLINE void WindowProperties::
00855 clear_parent_window() {
00856   _specified &= ~S_parent_window;
00857   _parent_window = NULL;
00858 }
00859 
00860 
00861 INLINE ostream &
00862 operator << (ostream &out, const WindowProperties &properties) {
00863   properties.output(out);
00864   return out;
00865 }
00866 
00867 
 All Classes Functions Variables Enumerations