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 MMSMENUWIDGETCLASS_H_
00034 #define MMSMENUWIDGETCLASS_H_
00035
00036 #include "mmsgui/theme/mmswidgetclass.h"
00037
00038
00039 namespace MMSGUI_MENUWIDGET_ATTR {
00040
00041 #define MMSGUI_MENUWIDGET_ATTR_ATTRDESC \
00042 { "item_width", TAFF_ATTRTYPE_STRING }, \
00043 { "item_height", TAFF_ATTRTYPE_STRING }, \
00044 { "item_hmargin", TAFF_ATTRTYPE_UCHAR }, \
00045 { "item_vmargin", TAFF_ATTRTYPE_UCHAR }, \
00046 { "cols", TAFF_ATTRTYPE_INT }, \
00047 { "dim_items", TAFF_ATTRTYPE_UCHAR }, \
00048 { "fixed_pos", TAFF_ATTRTYPE_INT }, \
00049 { "hloop", TAFF_ATTRTYPE_BOOL }, \
00050 { "vloop", TAFF_ATTRTYPE_BOOL }, \
00051 { "trans_items", TAFF_ATTRTYPE_UCHAR }, \
00052 { "dim_top", TAFF_ATTRTYPE_UCHAR }, \
00053 { "dim_bottom", TAFF_ATTRTYPE_UCHAR }, \
00054 { "dim_left", TAFF_ATTRTYPE_UCHAR }, \
00055 { "dim_right", TAFF_ATTRTYPE_UCHAR }, \
00056 { "trans_top", TAFF_ATTRTYPE_UCHAR }, \
00057 { "trans_bottom", TAFF_ATTRTYPE_UCHAR }, \
00058 { "trans_left", TAFF_ATTRTYPE_UCHAR }, \
00059 { "trans_right", TAFF_ATTRTYPE_UCHAR }, \
00060 { "zoomsel_width", TAFF_ATTRTYPE_STRING }, \
00061 { "zoomsel_height", TAFF_ATTRTYPE_STRING }, \
00062 { "zoomsel_shiftx", TAFF_ATTRTYPE_STRING }, \
00063 { "zoomsel_shifty", TAFF_ATTRTYPE_STRING }, \
00064 { "smooth_scrolling", TAFF_ATTRTYPE_SEQUENCE_MODE }, \
00065 { "parent_window", TAFF_ATTRTYPE_STRING }, \
00066 { "selimage", TAFF_ATTRTYPE_STRING }, \
00067 { "selimage.path", TAFF_ATTRTYPE_STRING }, \
00068 { "selimage.name", TAFF_ATTRTYPE_STRING }, \
00069 { "smooth_selection", TAFF_ATTRTYPE_SEQUENCE_MODE }, \
00070 { "smooth_delay", TAFF_ATTRTYPE_INT }
00071
00072 #define MMSGUI_MENUWIDGET_ATTR_IDS \
00073 MMSGUI_MENUWIDGET_ATTR_IDS_item_width, \
00074 MMSGUI_MENUWIDGET_ATTR_IDS_item_height, \
00075 MMSGUI_MENUWIDGET_ATTR_IDS_item_hmargin, \
00076 MMSGUI_MENUWIDGET_ATTR_IDS_item_vmargin, \
00077 MMSGUI_MENUWIDGET_ATTR_IDS_cols, \
00078 MMSGUI_MENUWIDGET_ATTR_IDS_dim_items, \
00079 MMSGUI_MENUWIDGET_ATTR_IDS_fixed_pos, \
00080 MMSGUI_MENUWIDGET_ATTR_IDS_hloop, \
00081 MMSGUI_MENUWIDGET_ATTR_IDS_vloop, \
00082 MMSGUI_MENUWIDGET_ATTR_IDS_trans_items, \
00083 MMSGUI_MENUWIDGET_ATTR_IDS_dim_top, \
00084 MMSGUI_MENUWIDGET_ATTR_IDS_dim_bottom, \
00085 MMSGUI_MENUWIDGET_ATTR_IDS_dim_left, \
00086 MMSGUI_MENUWIDGET_ATTR_IDS_dim_right, \
00087 MMSGUI_MENUWIDGET_ATTR_IDS_trans_top, \
00088 MMSGUI_MENUWIDGET_ATTR_IDS_trans_bottom, \
00089 MMSGUI_MENUWIDGET_ATTR_IDS_trans_left, \
00090 MMSGUI_MENUWIDGET_ATTR_IDS_trans_right, \
00091 MMSGUI_MENUWIDGET_ATTR_IDS_zoomsel_width, \
00092 MMSGUI_MENUWIDGET_ATTR_IDS_zoomsel_height, \
00093 MMSGUI_MENUWIDGET_ATTR_IDS_zoomsel_shiftx, \
00094 MMSGUI_MENUWIDGET_ATTR_IDS_zoomsel_shifty, \
00095 MMSGUI_MENUWIDGET_ATTR_IDS_smooth_scrolling, \
00096 MMSGUI_MENUWIDGET_ATTR_IDS_parent_window, \
00097 MMSGUI_MENUWIDGET_ATTR_IDS_selimage, \
00098 MMSGUI_MENUWIDGET_ATTR_IDS_selimage_path, \
00099 MMSGUI_MENUWIDGET_ATTR_IDS_selimage_name, \
00100 MMSGUI_MENUWIDGET_ATTR_IDS_smooth_selection, \
00101 MMSGUI_MENUWIDGET_ATTR_IDS_smooth_delay
00102
00103 #define MMSGUI_MENUWIDGET_ATTR_INIT { \
00104 MMSGUI_BASE_ATTR_ATTRDESC, \
00105 MMSGUI_BORDER_ATTR_ATTRDESC, \
00106 MMSGUI_WIDGET_ATTR_ATTRDESC, \
00107 MMSGUI_MENUWIDGET_ATTR_ATTRDESC, \
00108 { NULL, TAFF_ATTRTYPE_NONE } \
00109 }
00110
00111 typedef enum {
00112 MMSGUI_BASE_ATTR_IDS,
00113 MMSGUI_BORDER_ATTR_IDS,
00114 MMSGUI_WIDGET_ATTR_IDS,
00115 MMSGUI_MENUWIDGET_ATTR_IDS
00116 } ids;
00117 }
00118
00119 extern TAFF_ATTRDESC MMSGUI_MENUWIDGET_ATTR_I[];
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 class MMSMenuWidgetClass {
00132 private:
00133
00134 string className;
00135
00136
00137 MMSTaffFile *tafff;
00138
00139
00140 bool isitemwidth;
00141
00142
00143 string itemwidth;
00144
00145
00146 bool isitemheight;
00147
00148
00149 string itemheight;
00150
00151
00152 bool isitemhmargin;
00153
00154
00155 unsigned int itemhmargin;
00156
00157
00158 bool isitemvmargin;
00159
00160
00161 unsigned int itemvmargin;
00162
00163
00164 bool iscols;
00165
00166
00167 unsigned int cols;
00168
00169
00170 bool isdimitems;
00171
00172
00173 unsigned int dimitems;
00174
00175
00176 bool isfixedpos;
00177
00178
00179 unsigned int fixedpos;
00180
00181
00182 bool ishloop;
00183
00184
00185 unsigned int hloop;
00186
00187
00188 bool isvloop;
00189
00190
00191 unsigned int vloop;
00192
00193
00194 bool istransitems;
00195
00196
00197 unsigned int transitems;
00198
00199
00200 bool isdimtop;
00201
00202
00203 unsigned int dimtop;
00204
00205
00206 bool isdimbottom;
00207
00208
00209 unsigned int dimbottom;
00210
00211
00212 bool isdimleft;
00213
00214
00215 unsigned int dimleft;
00216
00217
00218 bool isdimright;
00219
00220
00221 unsigned int dimright;
00222
00223
00224 bool istranstop;
00225
00226
00227 unsigned int transtop;
00228
00229
00230 bool istransbottom;
00231
00232
00233 unsigned int transbottom;
00234
00235
00236 bool istransleft;
00237
00238
00239 unsigned int transleft;
00240
00241
00242 bool istransright;
00243
00244
00245 unsigned int transright;
00246
00247
00248 bool iszoomselwidth;
00249
00250
00251 string zoomselwidth;
00252
00253
00254 bool iszoomselheight;
00255
00256
00257 string zoomselheight;
00258
00259
00260 bool iszoomselshiftx;
00261
00262
00263 string zoomselshiftx;
00264
00265
00266 bool iszoomselshifty;
00267
00268
00269 string zoomselshifty;
00270
00271
00272 bool issmoothscrolling;
00273
00274
00275 MMSSEQUENCEMODE smoothscrolling;
00276
00277
00278 bool isparentwindow;
00279
00280
00281 string parentwindow;
00282
00283
00284 bool isselimagepath;
00285
00286
00287 string selimagepath;
00288
00289
00290 bool isselimagename;
00291
00292
00293 string selimagename;
00294
00295
00296 bool issmoothselection;
00297
00298
00299 MMSSEQUENCEMODE smoothselection;
00300
00301
00302 bool issmoothdelay;
00303
00304
00305 unsigned int smoothdelay;
00306
00307
00308
00309
00310
00311
00312
00313
00314 void setAttributesFromTAFF(MMSTaffFile *tafff, string *prefix = NULL, string *path = NULL,
00315 bool reset_paths = false);
00316
00317
00318
00319
00320
00321 void duplicateTAFF(MMSTaffFile *tafff);
00322
00323 public:
00324
00325 MMSWidgetClass widgetClass;
00326
00327
00328 MMSMenuWidgetClass();
00329
00330
00331 ~MMSMenuWidgetClass();
00332
00333
00334 void unsetAll();
00335
00336
00337
00338
00339
00340 MMSTaffFile *getTAFF();
00341
00342
00343
00344
00345
00346 void setClassName(string className);
00347
00348
00349
00350
00351
00352 string getClassName();
00353
00354
00355 bool isItemWidth();
00356
00357
00358
00359
00360
00361 void setItemWidth(string itemwidth);
00362
00363
00364 void unsetItemWidth();
00365
00366
00367
00368
00369
00370 string getItemWidth();
00371
00372
00373 bool isItemHeight();
00374
00375
00376
00377
00378
00379 void setItemHeight(string itemheight);
00380
00381
00382 void unsetItemHeight();
00383
00384
00385
00386
00387
00388 string getItemHeight();
00389
00390
00391 bool isItemHMargin();
00392
00393
00394
00395
00396
00397 void setItemHMargin(unsigned int itemhmargin);
00398
00399
00400 void unsetItemHMargin();
00401
00402
00403
00404
00405
00406 unsigned int getItemHMargin();
00407
00408
00409 bool isItemVMargin();
00410
00411
00412
00413
00414
00415 void setItemVMargin(unsigned int itemvmargin);
00416
00417
00418 void unsetItemVMargin();
00419
00420
00421
00422
00423
00424 unsigned int getItemVMargin();
00425
00426
00427 bool isCols();
00428
00429
00430
00431
00432
00433 void setCols(unsigned int cols);
00434
00435
00436 void unsetCols();
00437
00438
00439
00440
00441
00442 unsigned int getCols();
00443
00444
00445 bool isDimItems();
00446
00447
00448
00449
00450
00451 void setDimItems(unsigned int dimitems);
00452
00453
00454 void unsetDimItems();
00455
00456
00457
00458
00459
00460 unsigned int getDimItems();
00461
00462
00463 bool isFixedPos();
00464
00465
00466
00467
00468
00469 void setFixedPos(int fixedpos);
00470
00471
00472 void unsetFixedPos();
00473
00474
00475
00476
00477
00478 int getFixedPos();
00479
00480
00481 bool isHLoop();
00482
00483
00484
00485
00486
00487 void setHLoop(bool hloop);
00488
00489
00490 void unsetHLoop();
00491
00492
00493
00494
00495
00496 bool getHLoop();
00497
00498
00499 bool isVLoop();
00500
00501
00502
00503
00504
00505 void setVLoop(bool vloop);
00506
00507
00508 void unsetVLoop();
00509
00510
00511
00512
00513
00514 bool getVLoop();
00515
00516
00517 bool isTransItems();
00518
00519
00520
00521
00522
00523 void setTransItems(unsigned int transitems);
00524
00525
00526 void unsetTransItems();
00527
00528
00529
00530
00531
00532 unsigned int getTransItems();
00533
00534
00535 bool isDimTop();
00536
00537
00538
00539
00540
00541 void setDimTop(unsigned int dimtop);
00542
00543
00544 void unsetDimTop();
00545
00546
00547
00548
00549
00550 unsigned int getDimTop();
00551
00552
00553 bool isDimBottom();
00554
00555
00556
00557
00558
00559 void setDimBottom(unsigned int dimbottom);
00560
00561
00562 void unsetDimBottom();
00563
00564
00565
00566
00567
00568 unsigned int getDimBottom();
00569
00570
00571 bool isDimLeft();
00572
00573
00574
00575
00576
00577 void setDimLeft(unsigned int dimleft);
00578
00579
00580 void unsetDimLeft();
00581
00582
00583
00584
00585
00586 unsigned int getDimLeft();
00587
00588
00589 bool isDimRight();
00590
00591
00592
00593
00594
00595 void setDimRight(unsigned int dimright);
00596
00597
00598 void unsetDimRight();
00599
00600
00601
00602
00603
00604 unsigned int getDimRight();
00605
00606
00607 bool isTransTop();
00608
00609
00610
00611
00612
00613 void setTransTop(unsigned int transtop);
00614
00615
00616 void unsetTransTop();
00617
00618
00619
00620
00621
00622 unsigned int getTransTop();
00623
00624
00625 bool isTransBottom();
00626
00627
00628
00629
00630
00631 void setTransBottom(unsigned int transbottom);
00632
00633
00634 void unsetTransBottom();
00635
00636
00637
00638
00639
00640 unsigned int getTransBottom();
00641
00642
00643 bool isTransLeft();
00644
00645
00646
00647
00648
00649 void setTransLeft(unsigned int transleft);
00650
00651
00652 void unsetTransLeft();
00653
00654
00655
00656
00657
00658 unsigned int getTransLeft();
00659
00660
00661 bool isTransRight();
00662
00663
00664
00665
00666
00667 void setTransRight(unsigned int transright);
00668
00669
00670 void unsetTransRight();
00671
00672
00673
00674
00675
00676 unsigned int getTransRight();
00677
00678
00679 bool isZoomSelWidth();
00680 void setZoomSelWidth(string zoomselwidth);
00681 void unsetZoomSelWidth();
00682 string getZoomSelWidth();
00683 bool isZoomSelHeight();
00684 void setZoomSelHeight(string zoomselheight);
00685 void unsetZoomSelHeight();
00686 string getZoomSelHeight();
00687 bool isZoomSelShiftX();
00688 void setZoomSelShiftX(string zoomselshiftx);
00689 void unsetZoomSelShiftX();
00690 string getZoomSelShiftX();
00691 bool isZoomSelShiftY();
00692 void setZoomSelShiftY(string zoomselshifty);
00693 void unsetZoomSelShiftY();
00694 string getZoomSelShiftY();
00695
00696 bool isSmoothScrolling();
00697 void setSmoothScrolling(MMSSEQUENCEMODE smoothscrolling);
00698 void unsetSmoothScrolling();
00699 MMSSEQUENCEMODE getSmoothScrolling();
00700
00701 bool isParentWindow();
00702 void setParentWindow(string parentwindow);
00703 void unsetParentWindow();
00704 string getParentWindow();
00705
00706
00707 bool isSelImagePath();
00708 void setSelImagePath(string selimagepath);
00709 void unsetSelImagePath();
00710 string getSelImagePath();
00711
00712 bool isSelImageName();
00713 void setSelImageName(string selimagename);
00714 void unsetSelImageName();
00715 string getSelImageName();
00716
00717 bool isSmoothSelection();
00718 void setSmoothSelection(MMSSEQUENCEMODE smoothselection);
00719 void unsetSmoothSelection();
00720 MMSSEQUENCEMODE getSmoothSelection();
00721
00722 bool isSmoothDelay();
00723 void setSmoothDelay(unsigned int smoothdelay);
00724 void unsetSmoothDelay();
00725 unsigned int getSmoothDelay();
00726
00727
00728 friend class MMSThemeManager;
00729 friend class MMSDialogManager;
00730 };
00731
00732 #endif