00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 INLINE WindowProperties::
00022 WindowProperties(const WindowProperties ©) {
00023 (*this) = copy;
00024 }
00025
00026
00027
00028
00029
00030
00031 INLINE WindowProperties::
00032 ~WindowProperties() {
00033 }
00034
00035
00036
00037
00038
00039
00040 INLINE bool WindowProperties::
00041 operator != (const WindowProperties &other) const {
00042 return !operator == (other);
00043 }
00044
00045
00046
00047
00048
00049
00050
00051 INLINE bool WindowProperties::
00052 is_any_specified() const {
00053 return (_specified != 0);
00054 }
00055
00056
00057
00058
00059
00060
00061
00062
00063
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
00074
00075
00076
00077
00078 INLINE int WindowProperties::
00079 get_x_origin() const {
00080 nassertr(has_origin(), 0);
00081 return _x_origin;
00082 }
00083
00084
00085
00086
00087
00088
00089
00090 INLINE int WindowProperties::
00091 get_y_origin() const {
00092 nassertr(has_origin(), 0);
00093 return _y_origin;
00094 }
00095
00096
00097
00098
00099
00100
00101
00102 INLINE bool WindowProperties::
00103 has_origin() const {
00104 return ((_specified & S_origin) != 0);
00105 }
00106
00107
00108
00109
00110
00111
00112 INLINE void WindowProperties::
00113 clear_origin() {
00114 _specified &= ~S_origin;
00115 _x_origin = 0;
00116 _y_origin = 0;
00117 }
00118
00119
00120
00121
00122
00123
00124
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
00135
00136
00137
00138
00139
00140 INLINE int WindowProperties::
00141 get_x_size() const {
00142 nassertr(has_size(), 0);
00143 return _x_size;
00144 }
00145
00146
00147
00148
00149
00150
00151
00152
00153 INLINE int WindowProperties::
00154 get_y_size() const {
00155 nassertr(has_size(), 0);
00156 return _y_size;
00157 }
00158
00159
00160
00161
00162
00163
00164
00165 INLINE bool WindowProperties::
00166 has_size() const {
00167 return ((_specified & S_size) != 0);
00168 }
00169
00170
00171
00172
00173
00174
00175 INLINE void WindowProperties::
00176 clear_size() {
00177 _specified &= ~S_size;
00178 _x_size = 0;
00179 _y_size = 0;
00180 }
00181
00182
00183
00184
00185
00186
00187
00188 INLINE void WindowProperties::
00189 set_title(const string &title) {
00190 _title = title;
00191 _specified |= S_title;
00192 }
00193
00194
00195
00196
00197
00198
00199 INLINE const string &WindowProperties::
00200 get_title() const {
00201 nassertr(has_title(), _title);
00202 return _title;
00203 }
00204
00205
00206
00207
00208
00209
00210
00211 INLINE bool WindowProperties::
00212 has_title() const {
00213 return ((_specified & S_title) != 0);
00214 }
00215
00216
00217
00218
00219
00220
00221 INLINE void WindowProperties::
00222 clear_title() {
00223 _specified &= ~S_title;
00224 _title = string();
00225 }
00226
00227
00228
00229
00230
00231
00232
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
00246
00247
00248
00249 INLINE bool WindowProperties::
00250 get_undecorated() const {
00251 return (_flags & F_undecorated) != 0;
00252 }
00253
00254
00255
00256
00257
00258
00259 INLINE bool WindowProperties::
00260 has_undecorated() const {
00261 return ((_specified & S_undecorated) != 0);
00262 }
00263
00264
00265
00266
00267
00268
00269 INLINE void WindowProperties::
00270 clear_undecorated() {
00271 _specified &= ~S_undecorated;
00272 _flags &= ~F_undecorated;
00273 }
00274
00275
00276
00277
00278
00279
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
00293
00294
00295
00296
00297 INLINE bool WindowProperties::
00298 get_fixed_size() const {
00299 return (_flags & F_fixed_size) != 0;
00300 }
00301
00302
00303
00304
00305
00306
00307 INLINE bool WindowProperties::
00308 has_fixed_size() const {
00309 return ((_specified & S_fixed_size) != 0);
00310 }
00311
00312
00313
00314
00315
00316
00317 INLINE void WindowProperties::
00318 clear_fixed_size() {
00319 _specified &= ~S_fixed_size;
00320 _flags &= ~F_fixed_size;
00321 }
00322
00323
00324
00325
00326
00327
00328
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
00342
00343
00344
00345 INLINE bool WindowProperties::
00346 get_fullscreen() const {
00347 return (_flags & F_fullscreen) != 0;
00348 }
00349
00350
00351
00352
00353
00354
00355 INLINE bool WindowProperties::
00356 has_fullscreen() const {
00357 return ((_specified & S_fullscreen) != 0);
00358 }
00359
00360
00361
00362
00363
00364
00365 INLINE void WindowProperties::
00366 clear_fullscreen() {
00367 _specified &= ~S_fullscreen;
00368 _flags &= ~F_fullscreen;
00369 }
00370
00371
00372
00373
00374
00375
00376
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
00390
00391
00392
00393 INLINE bool WindowProperties::
00394 get_foreground() const {
00395 return (_flags & F_foreground) != 0;
00396 }
00397
00398
00399
00400
00401
00402
00403 INLINE bool WindowProperties::
00404 has_foreground() const {
00405 return ((_specified & S_foreground) != 0);
00406 }
00407
00408
00409
00410
00411
00412
00413 INLINE void WindowProperties::
00414 clear_foreground() {
00415 _specified &= ~S_foreground;
00416 _flags &= ~F_foreground;
00417 }
00418
00419
00420
00421
00422
00423
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
00437
00438
00439
00440 INLINE bool WindowProperties::
00441 get_minimized() const {
00442 return (_flags & F_minimized) != 0;
00443 }
00444
00445
00446
00447
00448
00449
00450 INLINE bool WindowProperties::
00451 has_minimized() const {
00452 return ((_specified & S_minimized) != 0);
00453 }
00454
00455
00456
00457
00458
00459
00460 INLINE void WindowProperties::
00461 clear_minimized() {
00462 _specified &= ~S_minimized;
00463 _flags &= ~F_minimized;
00464 }
00465
00466
00467
00468
00469
00470
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
00484
00485
00486
00487 INLINE bool WindowProperties::
00488 get_raw_mice() const {
00489 return (_flags & F_raw_mice) != 0;
00490 }
00491
00492
00493
00494
00495
00496
00497 INLINE bool WindowProperties::
00498 has_raw_mice() const {
00499 return ((_specified & S_raw_mice) != 0);
00500 }
00501
00502
00503
00504
00505
00506
00507 INLINE void WindowProperties::
00508 clear_raw_mice() {
00509 _specified &= ~S_raw_mice;
00510 _flags &= ~F_raw_mice;
00511 }
00512
00513
00514
00515
00516
00517
00518
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
00532
00533
00534
00535 INLINE bool WindowProperties::
00536 get_open() const {
00537 return (_flags & F_open) != 0;
00538 }
00539
00540
00541
00542
00543
00544
00545 INLINE bool WindowProperties::
00546 has_open() const {
00547 return ((_specified & S_open) != 0);
00548 }
00549
00550
00551
00552
00553
00554
00555 INLINE void WindowProperties::
00556 clear_open() {
00557 _specified &= ~S_open;
00558 _flags &= ~F_open;
00559 }
00560
00561
00562
00563
00564
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
00578
00579
00580
00581 INLINE bool WindowProperties::
00582 get_cursor_hidden() const {
00583 return (_flags & F_cursor_hidden) != 0;
00584 }
00585
00586
00587
00588
00589
00590
00591 INLINE bool WindowProperties::
00592 has_cursor_hidden() const {
00593 return ((_specified & S_cursor_hidden) != 0);
00594 }
00595
00596
00597
00598
00599
00600
00601 INLINE void WindowProperties::
00602 clear_cursor_hidden() {
00603 _specified &= ~S_cursor_hidden;
00604 _flags &= ~F_cursor_hidden;
00605 }
00606
00607
00608
00609
00610
00611
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
00622
00623
00624
00625 INLINE const Filename &WindowProperties::
00626 get_icon_filename() const {
00627 return _icon_filename;
00628 }
00629
00630
00631
00632
00633
00634
00635
00636 INLINE bool WindowProperties::
00637 has_icon_filename() const {
00638 return ((_specified & S_icon_filename) != 0);
00639 }
00640
00641
00642
00643
00644
00645
00646
00647 INLINE void WindowProperties::
00648 clear_icon_filename() {
00649 _specified &= ~S_icon_filename;
00650 _icon_filename = Filename();
00651 }
00652
00653
00654
00655
00656
00657
00658
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
00668
00669
00670
00671
00672 INLINE const Filename &WindowProperties::
00673 get_cursor_filename() const {
00674 return _cursor_filename;
00675 }
00676
00677
00678
00679
00680
00681
00682
00683 INLINE bool WindowProperties::
00684 has_cursor_filename() const {
00685 return ((_specified & S_cursor_filename) != 0);
00686 }
00687
00688
00689
00690
00691
00692
00693
00694 INLINE void WindowProperties::
00695 clear_cursor_filename() {
00696 _specified &= ~S_cursor_filename;
00697 _cursor_filename = Filename();
00698 }
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
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
00718
00719
00720
00721 INLINE WindowProperties::ZOrder WindowProperties::
00722 get_z_order() const {
00723 return _z_order;
00724 }
00725
00726
00727
00728
00729
00730
00731
00732 INLINE bool WindowProperties::
00733 has_z_order() const {
00734 return ((_specified & S_z_order) != 0);
00735 }
00736
00737
00738
00739
00740
00741
00742 INLINE void WindowProperties::
00743 clear_z_order() {
00744 _specified &= ~S_z_order;
00745 _z_order = Z_normal;
00746 }
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767 INLINE void WindowProperties::
00768 set_mouse_mode(MouseMode mode) {
00769 _mouse_mode=mode;
00770 _specified |= S_mouse_mode;
00771 }
00772
00773
00774
00775
00776
00777
00778 INLINE WindowProperties::MouseMode WindowProperties::
00779 get_mouse_mode() const {
00780 return _mouse_mode;
00781 }
00782
00783
00784
00785
00786
00787
00788 INLINE bool WindowProperties::
00789 has_mouse_mode() const {
00790 return ((_specified & S_mouse_mode)!=0);
00791 }
00792
00793
00794
00795
00796
00797
00798 INLINE void WindowProperties::
00799 clear_mouse_mode() {
00800 _specified &= ~S_mouse_mode;
00801 _mouse_mode = M_absolute;
00802 }
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
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
00830
00831
00832
00833
00834 INLINE WindowHandle *WindowProperties::
00835 get_parent_window() const {
00836 return _parent_window;
00837 }
00838
00839
00840
00841
00842
00843
00844 INLINE bool WindowProperties::
00845 has_parent_window() const {
00846 return ((_specified & S_parent_window)!=0);
00847 }
00848
00849
00850
00851
00852
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