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 MMSDIALOGMANAGER_H_
00034 #define MMSDIALOGMANAGER_H_
00035
00036 #include "mmsgui/mmswindow.h"
00037 #include "mmsgui/mmschildwindow.h"
00038 #include "mmsgui/mmscanvaswidget.h"
00039
00040
00041 #define searchForWidget findWidget
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 class MMSDialogManager {
00053 private:
00054
00055
00056 bool leave_window;
00057
00058
00059 MMSWindow *rootWindow;
00060
00061
00062 bool rootWindow_is_mine;
00063
00064
00065 vector<MMSChildWindow*> childWins;
00066
00067
00068 string filename;
00069
00070
00071 MMSDescriptionClass description;
00072
00073
00074 vector<MMSWidget*> namedWidgets;
00075
00076 void insertNamedWidget(MMSWidget *widget);
00077
00078 void throughDoc(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow,
00079 MMSTheme *theme, bool only_first_child = false);
00080
00081 void getDescriptionValues(MMSTaffFile *tafff, MMSTheme *theme);
00082
00083 void getMainWindowValues(MMSTaffFile *tafff, MMSTheme *theme);
00084 void getPopupWindowValues(MMSTaffFile *tafff, MMSTheme *theme);
00085 void getRootWindowValues(MMSTaffFile *tafff, MMSTheme *theme);
00086 void getChildWindowValues(MMSTaffFile *tafff, MMSWindow *rootWindow, MMSTheme *theme);
00087 string getTemplateValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00088 string getVBoxValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00089 string getHBoxValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00090 string getLabelValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00091 string getButtonValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00092 string getCanvasValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00093 string getImageValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00094 string getProgressBarValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00095 string getMenuValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00096 string getTextBoxValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00097 string getArrowValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00098 string getSliderValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00099 string getInputValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00100 string getCheckBoxValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00101 string getGapValues(MMSTaffFile *tafff, MMSWidget *currentWidget, MMSWindow *rootWindow, MMSTheme *theme);
00102
00103 void updateTAFFAttributes(MMSTaffFile *tafff, MMSWidget *widget, string &widgetName);
00104
00105 public:
00106 MMSDialogManager(bool leave_window = false);
00107 MMSDialogManager(MMSWindow *rootWindow);
00108 ~MMSDialogManager();
00109 bool isLoaded();
00110 MMSWindow* loadDialog(string filename, MMSTheme *theme = NULL);
00111 MMSChildWindow* loadChildDialog(string filename, MMSTheme *theme = NULL);
00112 MMSWidget* findWidget(string name);
00113 MMSWidget* operator[](string name);
00114 MMSWindow* getWindow();
00115
00116 MMSDescriptionClass getDescription();
00117 };
00118
00119 MMS_CREATEERROR(MMSDialogManagerError);
00120
00121 #endif