00001 #ifndef EDVB_CFGEDIT_H 00002 #define EDVB_CFGEDIT_H 00003 #include "TQObject.h" 00004 #include "RQ_OBJECT.h" 00005 #include "TGFrame.h" 00006 #include "Config/ConfigEditor.h" 00007 #include <vector> 00008 #include <string> 00009 class TGCanvas; 00010 class TGMainFrame; 00011 class TGCompositeFrame; 00012 class TGGroupFrame; 00013 class TGMatrixLayout; 00014 class TGLayoutHints; 00015 class TGLabel; 00016 class TGTextButton; 00017 class TGTextEntry; 00018 class TGVScrollBar; 00019 namespace cfg { class Config; } 00020 00021 namespace evdb { 00023 class ParamFrame { 00024 RQ_OBJECT("evdb::ParamFrame"); 00025 00026 private: 00027 TGGroupFrame *fFrame; 00028 TGCanvas *fCanvas; 00029 TGMatrixLayout *fML; 00030 00031 public: 00032 ParamFrame(const TGWindow *p, cfg::Config* cfg, 00033 std::vector<std::string>& names, 00034 std::vector<std::string>& tags, 00035 std::vector<std::string>& comments, 00036 std::vector<TGTextEntry*>& fT2 00037 ); 00038 virtual ~ParamFrame() { delete fFrame; } 00039 00040 TGGroupFrame *GetFrame() const { return fFrame; } 00041 00042 void SetCanvas(TGCanvas *canvas) { fCanvas = canvas; } 00043 void HandleMouseWheel(Event_t *event); 00044 00045 int GetHeight() const; 00046 int GetWidth() const; 00047 00048 }; 00049 } 00050 00051 //...................................................................... 00052 00053 namespace evdb { 00055 class CfgEdit : public cfg::ConfigEditor, public TGTransientFrame { 00056 RQ_OBJECT("evdb::CfgEdit"); 00057 public: 00058 CfgEdit(cfg::Config* cfg, TGMainFrame* mf); 00059 ~CfgEdit(); 00060 00061 int EditConfig(cfg::Config& cfg); 00062 00063 void Apply(); 00064 void Cancel(); 00065 void Done(); 00066 void CloseWindow(); 00067 00068 private: 00069 TGCompositeFrame* fF1; 00070 ParamFrame* fParam; 00071 TGCanvas* fCanvas; 00072 TGCompositeFrame* fF3; 00073 TGLayoutHints* fLH1; 00074 TGLayoutHints* fLH2; 00075 TGLayoutHints* fLH3; 00076 TGLayoutHints* fLH4; 00077 TGLabel* fL1; 00078 TGLabel* fL2; 00079 TGTextButton* fB3; 00080 TGTextButton* fB4; 00081 TGTextButton* fB5; 00082 std::vector<TGTextEntry*> fT2; 00083 std::vector<std::string> fName; 00084 std::vector<std::string> fTag; 00085 std::vector<std::string> fComment; 00086 00087 ClassDef(evdb::CfgEdit,0) 00088 }; 00089 } 00090 #endif // EDVB_CFGEDIT_H
1.3.5