00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef MMSWINDOWCLASS_H_
00034 #define MMSWINDOWCLASS_H_
00035
00036 #include "mmsgui/theme/mmsborderclass.h"
00037
00038
00039 namespace MMSGUI_WINDOW_ATTR {
00040
00041 #define MMSGUI_WINDOW_ATTR_ATTRDESC \
00042 { "alignment", TAFF_ATTRTYPE_STRING }, \
00043 { "dx", TAFF_ATTRTYPE_STRING }, \
00044 { "dy", TAFF_ATTRTYPE_STRING }, \
00045 { "w", TAFF_ATTRTYPE_STRING }, \
00046 { "h", TAFF_ATTRTYPE_STRING }, \
00047 { "bgcolor", TAFF_ATTRTYPE_COLOR }, \
00048 { "bgcolor.a", TAFF_ATTRTYPE_UCHAR }, \
00049 { "bgcolor.r", TAFF_ATTRTYPE_UCHAR }, \
00050 { "bgcolor.g", TAFF_ATTRTYPE_UCHAR }, \
00051 { "bgcolor.b", TAFF_ATTRTYPE_UCHAR }, \
00052 { "bgimage", TAFF_ATTRTYPE_STRING }, \
00053 { "bgimage.path", TAFF_ATTRTYPE_STRING }, \
00054 { "bgimage.name", TAFF_ATTRTYPE_STRING }, \
00055 { "opacity", TAFF_ATTRTYPE_UCHAR }, \
00056 { "fadein", TAFF_ATTRTYPE_BOOL }, \
00057 { "fadeout", TAFF_ATTRTYPE_BOOL }, \
00058 { "debug", TAFF_ATTRTYPE_BOOL }, \
00059 { "margin", TAFF_ATTRTYPE_UCHAR }, \
00060 { "up_arrow", TAFF_ATTRTYPE_STRING }, \
00061 { "down_arrow", TAFF_ATTRTYPE_STRING }, \
00062 { "left_arrow", TAFF_ATTRTYPE_STRING }, \
00063 { "right_arrow", TAFF_ATTRTYPE_STRING }, \
00064 { "navigate_up", TAFF_ATTRTYPE_STRING }, \
00065 { "navigate_down", TAFF_ATTRTYPE_STRING }, \
00066 { "navigate_left", TAFF_ATTRTYPE_STRING }, \
00067 { "navigate_right", TAFF_ATTRTYPE_STRING }, \
00068 { "own_surface", TAFF_ATTRTYPE_BOOL }, \
00069 { "movein", TAFF_ATTRTYPE_STRING }, \
00070 { "moveout", TAFF_ATTRTYPE_STRING }, \
00071 { "modal", TAFF_ATTRTYPE_BOOL }, \
00072 { "static_zorder", TAFF_ATTRTYPE_BOOL }, \
00073 { "always_on_top", TAFF_ATTRTYPE_BOOL }, \
00074 { "focusable", TAFF_ATTRTYPE_BOOL }, \
00075 { "backbuffer", TAFF_ATTRTYPE_BOOL }, \
00076 { "initial_load", TAFF_ATTRTYPE_BOOL }
00077
00078 #define MMSGUI_WINDOW_ATTR_IDS \
00079 MMSGUI_WINDOW_ATTR_IDS_alignment, \
00080 MMSGUI_WINDOW_ATTR_IDS_dx, \
00081 MMSGUI_WINDOW_ATTR_IDS_dy, \
00082 MMSGUI_WINDOW_ATTR_IDS_w, \
00083 MMSGUI_WINDOW_ATTR_IDS_h, \
00084 MMSGUI_WINDOW_ATTR_IDS_bgcolor, \
00085 MMSGUI_WINDOW_ATTR_IDS_bgcolor_a, \
00086 MMSGUI_WINDOW_ATTR_IDS_bgcolor_r, \
00087 MMSGUI_WINDOW_ATTR_IDS_bgcolor_g, \
00088 MMSGUI_WINDOW_ATTR_IDS_bgcolor_b, \
00089 MMSGUI_WINDOW_ATTR_IDS_bgimage, \
00090 MMSGUI_WINDOW_ATTR_IDS_bgimage_path, \
00091 MMSGUI_WINDOW_ATTR_IDS_bgimage_name, \
00092 MMSGUI_WINDOW_ATTR_IDS_opacity, \
00093 MMSGUI_WINDOW_ATTR_IDS_fadein, \
00094 MMSGUI_WINDOW_ATTR_IDS_fadeout, \
00095 MMSGUI_WINDOW_ATTR_IDS_debug, \
00096 MMSGUI_WINDOW_ATTR_IDS_margin, \
00097 MMSGUI_WINDOW_ATTR_IDS_up_arrow, \
00098 MMSGUI_WINDOW_ATTR_IDS_down_arrow, \
00099 MMSGUI_WINDOW_ATTR_IDS_left_arrow, \
00100 MMSGUI_WINDOW_ATTR_IDS_right_arrow, \
00101 MMSGUI_WINDOW_ATTR_IDS_navigate_up, \
00102 MMSGUI_WINDOW_ATTR_IDS_navigate_down, \
00103 MMSGUI_WINDOW_ATTR_IDS_navigate_left, \
00104 MMSGUI_WINDOW_ATTR_IDS_navigate_right, \
00105 MMSGUI_WINDOW_ATTR_IDS_own_surface, \
00106 MMSGUI_WINDOW_ATTR_IDS_movein, \
00107 MMSGUI_WINDOW_ATTR_IDS_moveout, \
00108 MMSGUI_WINDOW_ATTR_IDS_modal, \
00109 MMSGUI_WINDOW_ATTR_IDS_static_zorder, \
00110 MMSGUI_WINDOW_ATTR_IDS_always_on_top, \
00111 MMSGUI_WINDOW_ATTR_IDS_focusable, \
00112 MMSGUI_WINDOW_ATTR_IDS_backbuffer, \
00113 MMSGUI_WINDOW_ATTR_IDS_initial_load
00114
00115 typedef enum {
00116 MMSGUI_BASE_ATTR_IDS,
00117 MMSGUI_BORDER_ATTR_IDS,
00118 MMSGUI_WINDOW_ATTR_IDS
00119 } ids;
00120 }
00121
00122
00123 class MMSWindowClass {
00124 private:
00125 struct {
00126 bool isalignment;
00127 MMSALIGNMENT alignment;
00128 bool isdx;
00129 bool isdy;
00130 bool iswidth;
00131 bool isheight;
00132 bool isbgcolor;
00133 MMSFBColor bgcolor;
00134 bool isbgimagepath;
00135 bool isbgimagename;
00136 bool isopacity;
00137 unsigned int opacity;
00138 bool isfadein;
00139 bool fadein;
00140 bool isfadeout;
00141 bool fadeout;
00142 bool isdebug;
00143 bool debug;
00144 bool ismargin;
00145 unsigned int margin;
00146 bool isuparrow;
00147 bool isdownarrow;
00148 bool isleftarrow;
00149 bool isrightarrow;
00150 bool isnavigateup;
00151 bool isnavigatedown;
00152 bool isnavigateleft;
00153 bool isnavigateright;
00154 bool isownsurface;
00155 bool ownsurface;
00156 bool ismovein;
00157 MMSDIRECTION movein;
00158 bool ismoveout;
00159 MMSDIRECTION moveout;
00160
00161
00162 bool ismodal;
00163
00164
00165 bool modal;
00166
00167
00168 bool isstaticzorder;
00169
00170
00171 bool staticzorder;
00172
00173
00174 bool isalwaysontop;
00175
00176
00177 bool alwaysontop;
00178
00179
00180 bool isfocusable;
00181
00182
00183 bool focusable;
00184
00185
00186 bool isbackbuffer;
00187
00188
00189 bool backbuffer;
00190
00191
00192 bool isinitialload;
00193
00194
00195 bool initialload;
00196 } id;
00197
00198 struct {
00199 string *dx;
00200 string *dy;
00201 string *width;
00202 string *height;
00203 string *bgimagepath;
00204 string *bgimagename;
00205 string *uparrow;
00206 string *downarrow;
00207 string *leftarrow;
00208 string *rightarrow;
00209 string *navigateup;
00210 string *navigatedown;
00211 string *navigateleft;
00212 string *navigateright;
00213 } ed;
00214
00215
00216 void initAlignment();
00217 void initDx();
00218 void initDy();
00219 void initWidth();
00220 void initHeight();
00221 void initBgColor();
00222 void initBgImagePath();
00223 void initBgImageName();
00224 void initOpacity();
00225 void initFadeIn();
00226 void initFadeOut();
00227 void initDebug();
00228 void initMargin();
00229 void initUpArrow();
00230 void initDownArrow();
00231 void initLeftArrow();
00232 void initRightArrow();
00233 void initNavigateUp();
00234 void initNavigateDown();
00235 void initNavigateLeft();
00236 void initNavigateRight();
00237 void initOwnSurface();
00238 void initMoveIn();
00239 void initMoveOut();
00240 void initModal();
00241 void initStaticZOrder();
00242 void initAlwaysOnTop();
00243 void initFocusable();
00244 void initBackBuffer();
00245 void initInitialLoad();
00246
00247
00248 void freeAlignment();
00249 void freeDx();
00250 void freeDy();
00251 void freeWidth();
00252 void freeHeight();
00253 void freeBgColor();
00254 void freeBgImagePath();
00255 void freeBgImageName();
00256 void freeOpacity();
00257 void freeFadeIn();
00258 void freeFadeOut();
00259 void freeDebug();
00260 void freeMargin();
00261 void freeUpArrow();
00262 void freeDownArrow();
00263 void freeLeftArrow();
00264 void freeRightArrow();
00265 void freeNavigateUp();
00266 void freeNavigateDown();
00267 void freeNavigateLeft();
00268 void freeNavigateRight();
00269 void freeOwnSurface();
00270 void freeMoveIn();
00271 void freeMoveOut();
00272 void freeModal();
00273 void freeStaticZOrder();
00274 void freeAlwaysOnTop();
00275 void freeFocusable();
00276 void freeBackBuffer();
00277 void freeInitialLoad();
00278
00279
00280
00281
00282
00283
00284
00285 void setAttributesFromTAFF(MMSTaffFile *tafff, string *path = NULL, bool reset_paths = false);
00286
00287 public:
00288 MMSBorderClass border;
00289
00290 MMSWindowClass();
00291 ~MMSWindowClass();
00292 MMSWindowClass &operator=(const MMSWindowClass &c);
00293
00294 void unsetAll();
00295
00296 bool isAlignment();
00297 void unsetAlignment();
00298 void setAlignment(MMSALIGNMENT alignment);
00299 bool getAlignment(MMSALIGNMENT &alignment);
00300
00301 bool isDx();
00302 void unsetDx();
00303 void setDx(const string &dx);
00304 bool getDx(string &dx);
00305
00306 bool isDy();
00307 void unsetDy();
00308 void setDy(const string &dy);
00309 bool getDy(string &dy);
00310
00311 bool isWidth();
00312 void unsetWidth();
00313 void setWidth(const string &width);
00314 bool getWidth(string &width);
00315
00316 bool isHeight();
00317 void unsetHeight();
00318 void setHeight(const string &height);
00319 bool getHeight(string &height);
00320
00321 bool isBgColor();
00322 void unsetBgColor();
00323 void setBgColor(const MMSFBColor &bgcolor);
00324 bool getBgColor(MMSFBColor &bgcolor);
00325
00326 bool isBgImagePath();
00327 void unsetBgImagePath();
00328 void setBgImagePath(const string &bgimagepath);
00329 bool getBgImagePath(string &bgimagepath);
00330
00331 bool isBgImageName();
00332 void unsetBgImageName();
00333 void setBgImageName(const string &bgimagename);
00334 bool getBgImageName(string &bgimagename);
00335
00336 bool isOpacity();
00337 void unsetOpacity();
00338 void setOpacity(unsigned int opacity);
00339 bool getOpacity(unsigned int &opacity);
00340
00341 bool isFadeIn();
00342 void unsetFadeIn();
00343 void setFadeIn(bool fadein);
00344 bool getFadeIn(bool &fadein);
00345
00346 bool isFadeOut();
00347 void unsetFadeOut();
00348 void setFadeOut(bool fadeout);
00349 bool getFadeOut(bool &fadeout);
00350
00351 bool isDebug();
00352 void unsetDebug();
00353 void setDebug(bool debug);
00354 bool getDebug(bool &debug);
00355
00356 bool isMargin();
00357 void unsetMargin();
00358 void setMargin(unsigned int margin);
00359 bool getMargin(unsigned int &margin);
00360
00361
00362
00363
00364 bool isUpArrow();
00365
00366
00367 void unsetUpArrow();
00368
00369
00370
00371
00372
00373 void setUpArrow(const string &uparrow);
00374
00375
00376
00377
00378
00379
00380
00381 bool getUpArrow(string &uparrow);
00382
00383
00384
00385
00386 bool isDownArrow();
00387
00388
00389 void unsetDownArrow();
00390
00391
00392
00393
00394
00395 void setDownArrow(const string &downarrow);
00396
00397
00398
00399
00400
00401
00402 bool getDownArrow(string &downarrow);
00403
00404
00405
00406
00407 bool isLeftArrow();
00408
00409
00410 void unsetLeftArrow();
00411
00412
00413
00414
00415
00416 void setLeftArrow(const string &leftarrow);
00417
00418
00419
00420
00421
00422
00423 bool getLeftArrow(string &leftarrow);
00424
00425
00426
00427
00428 bool isRightArrow();
00429
00430
00431 void unsetRightArrow();
00432
00433
00434
00435
00436
00437 void setRightArrow(const string &rightarrow);
00438
00439
00440
00441
00442
00443
00444 bool getRightArrow(string &rightarrow);
00445
00446
00447
00448
00449 bool isNavigateUp();
00450
00451
00452 void unsetNavigateUp();
00453
00454
00455
00456
00457
00458 void setNavigateUp(const string &navigateup);
00459
00460
00461
00462
00463
00464
00465 bool getNavigateUp(string &navigateup);
00466
00467
00468
00469
00470 bool isNavigateDown();
00471
00472
00473 void unsetNavigateDown();
00474
00475
00476
00477
00478
00479 void setNavigateDown(const string &navigatedown);
00480
00481
00482
00483
00484
00485
00486 bool getNavigateDown(string &navigatedown);
00487
00488
00489
00490
00491 bool isNavigateLeft();
00492
00493
00494 void unsetNavigateLeft();
00495
00496
00497
00498
00499
00500 void setNavigateLeft(const string &navigateleft);
00501
00502
00503
00504
00505
00506
00507 bool getNavigateLeft(string &navigateleft);
00508
00509
00510
00511
00512 bool isNavigateRight();
00513
00514
00515 void unsetNavigateRight();
00516
00517
00518
00519
00520
00521 void setNavigateRight(const string &navigateright);
00522
00523
00524
00525
00526
00527
00528 bool getNavigateRight(string &navigateright);
00529
00530
00531 bool isOwnSurface();
00532 void unsetOwnSurface();
00533 void setOwnSurface(bool ownsurface);
00534 bool getOwnSurface(bool &ownsurface);
00535
00536
00537 bool isMoveIn();
00538 void unsetMoveIn();
00539 void setMoveIn(MMSDIRECTION movein);
00540 bool getMoveIn(MMSDIRECTION &movein);
00541
00542 bool isMoveOut();
00543 void unsetMoveOut();
00544 void setMoveOut(MMSDIRECTION moveout);
00545 bool getMoveOut(MMSDIRECTION &moveout);
00546
00547 bool isModal();
00548 void unsetModal();
00549 void setModal(bool modal);
00550 bool getModal(bool &modal);
00551
00552 bool isStaticZOrder();
00553 void unsetStaticZOrder();
00554 void setStaticZOrder(bool staticzorder);
00555 bool getStaticZOrder(bool &staticzorder);
00556
00557 bool isAlwaysOnTop();
00558 void unsetAlwaysOnTop();
00559 void setAlwaysOnTop(bool alwaysontop);
00560 bool getAlwaysOnTop(bool &alwaysontop);
00561
00562 bool isFocusable();
00563 void unsetFocusable();
00564 void setFocusable(bool focusable);
00565 bool getFocusable(bool &focusable);
00566
00567 bool isBackBuffer();
00568 void unsetBackBuffer();
00569 void setBackBuffer(bool backbuffer);
00570 bool getBackBuffer(bool &backbuffer);
00571
00572 bool isInitialLoad();
00573 void unsetInitialLoad();
00574 void setInitialLoad(bool initialload);
00575 bool getInitialLoad(bool &initialload);
00576
00577
00578 friend class MMSThemeManager;
00579 friend class MMSDialogManager;
00580 };
00581
00582 #endif