FFL  1.0
Finfly Foundation Library
registry.h
00001 /* $Id: registry.h 2925 2013-01-28 19:03:19Z roma $ */
00002 
00003 #include "credential.h"
00004 
00005 class registry:public wxListCtrl
00006 {
00007 public:
00008 
00009         class editor:public wxDialog
00010         {
00011         public:
00012 
00013                 editor(wxWindow* _w, const wxString& _t, const wxString& _id);
00014 
00015         private:
00016 
00017                 wxTextCtrl* Id;
00018 
00019                 wxTextCtrl* Info;
00020 
00021                 wxTextCtrl* Host;
00022 
00023                 wxTextCtrl* Service;
00024 
00025                 wxTextCtrl* User;
00026 
00027                 wxTextCtrl* Password;
00028 
00029                 wxTextCtrl* IOTimeout;
00030 
00031                 wxTextCtrl* RqTimeout;
00032 
00033                 wxCheckBox* Trace;
00034 
00035                 DECLARE_EVENT_TABLE()
00036 
00037                 void on_save(wxCommandEvent& _e);
00038 
00039                 void error(const std::string& _m) throw();
00040 
00041                 void close(int _c) throw();
00042 
00043         protected:
00044 
00045                 virtual void save(const cssc::client::connection::configuration& _c, const std::map<std::string, cssc::client::connection::configuration>& l) throw(){}
00046 
00047         };
00048 
00049         class inserter:public editor
00050         {
00051         public:
00052                 
00053                 inserter(wxWindow* _w);
00054 
00055         private:
00056 
00057                 void save(const cssc::client::connection::configuration& _c, const std::map<std::string, cssc::client::connection::configuration>& _l) throw(...);
00058 
00059         };
00060 
00061         class updater:public editor
00062         {
00063         public:
00064 
00065                 updater(wxWindow* _w, const std::string& _id);
00066 
00067         private:
00068 
00069                 void save(const cssc::client::connection::configuration& _c, const std::map<std::string, cssc::client::connection::configuration>& _l) throw(...);
00070 
00071         };
00072 
00073         class test:public credential
00074         {
00075         public:
00076 
00077                 test(wxWindow* _w, const std::string& _id);
00078 
00079         private:
00080 
00081                 void ok(const std::string& _u, const std::string& _p) throw(...);
00082 
00083                 std::string Id;
00084 
00085         };
00086 
00087         registry(wxWindow* _w, wxWindowID _id);
00088 
00089         void insert() throw();
00090 
00091         void update(const std::string& _id) throw();
00092 
00093         void update() throw(){update(focus());}
00094 
00095         void remove(const std::string& _id) throw();
00096 
00097         void remove() throw(){remove(focus());}
00098 
00099         std::string focus() throw();
00100 
00101         static wxMenu* menu() throw();
00102 
00103         void update(wxUpdateUIEvent& _e) throw();
00104 
00105 private:
00106 
00107         DECLARE_EVENT_TABLE()
00108 
00109         void on_create_registry_entry(wxCommandEvent& _e) throw();
00110 
00111         void on_update_registry_entry(wxCommandEvent& _e) throw();
00112 
00113         void on_remove_registry_entry(wxCommandEvent& _e) throw();
00114 
00115         void on_activate_registry_entry(wxListEvent& _e) throw();
00116 
00117         void on_right_click_registry_entry(wxMouseEvent& _e) throw();
00118 
00119         long insert(const cssc::client::connection::configuration& _c) throw();
00120 
00121         void update(long _i, const cssc::client::connection::configuration& _c) throw();
00122 };
00123 
00124 BEGIN_DECLARE_EVENT_TYPES()
00125         DECLARE_EVENT_TYPE(EVT_REGISTRY_CREATE_ENTRY, -1)
00126         DECLARE_EVENT_TYPE(EVT_REGISTRY_UPDATE_ENTRY, -1)
00127         DECLARE_EVENT_TYPE(EVT_REGISTRY_REMOVE_ENTRY, -1)
00128 END_DECLARE_EVENT_TYPES()
 Указатель Классы Пространства имен Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы