00001 00002 // MathGUI = a WYSIWYG equation editor + a powerful math engine // 00003 // Copyright (C) 2003 by Francesco Montorsi // 00004 // // 00005 // This library is free software; you can redistribute it and/or // 00006 // modify it under the terms of the GNU Lesser General Public // 00007 // License as published by the Free Software Foundation; either // 00008 // version 2.1 of the License, or (at your option) any later // 00009 // version. // 00010 // // 00011 // This library is distributed in the hope that it will be useful, // 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 00014 // GNU Lesser General Public License for more details. // 00015 // // 00016 // You should have received a copy of the GNU Lesser General Public // 00017 // License along with this program; if not, write to the Free // 00018 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, // 00019 // MA 02111-1307, USA. // 00020 // // 00021 // For any comment, suggestion or feature request, please contact // 00022 // the administrator of the project at frm@users.sourceforge.net // 00023 // // 00030 00031 00032 00033 #ifndef SYMPROPPANEL_H 00034 #define SYMPROPPANEL_H 00035 00036 // this dialog uses wxListCtrls & mcSymbolArrays 00037 #include <wx/notebook.h> 00038 00039 // optimization for GCC compiler 00040 #ifdef __GNUG__ 00041 #pragma interface "SymbolDlg.h" 00042 #endif 00043 00044 00045 // IDs 00046 #define IDC_SYMPROP_ADD SYMPROP_BASEID+1 00047 #define IDC_SYMPROP_SET SYMPROP_BASEID+2 00048 00051 #define SYMCONSTPROP_MAX_VALUE_LENGHT 20 00052 00053 00054 00055 00058 class mgSymPropPanel : public wxPanel 00059 { 00060 protected: // member variables 00061 00062 mgMathBox *m_pNameBox; 00063 mcSymbolProperties *m_pSymbol; 00064 00065 mcFilter *mdata_pFilter; 00066 wxListCtrl *m_pList; 00067 00068 protected: // functions 00069 00070 virtual void BuildCtrls(); 00071 virtual void AddSpecificCtrlsSizer(wxSizer *p) = 0; 00072 00073 // event handlers 00074 void OnAddSymbolBtn(wxCommandEvent &event); 00075 void OnSetSymbolBtn(wxCommandEvent &event); 00076 00077 virtual void OnSetSymbol() = 0; 00078 virtual void OnAddSymbol() = 0; 00079 00080 public: 00081 // constructors and destructors 00082 mgSymPropPanel(wxWindow *parent, 00083 wxWindowID id = -1, 00084 const wxString &title = wxT("Properties"), 00085 const wxPoint& pos = wxDefaultPosition, 00086 const wxSize& size = wxDefaultSize, 00087 long style = 0); 00088 virtual ~mgSymPropPanel(); 00089 00090 virtual void LinkWithSymbol(mcSymbolProperties *s); 00091 virtual void LinkWithList(wxListCtrl *p); 00092 virtual void BuildAll(); 00093 00094 virtual void Update(); 00095 00096 wxString GetName(); 00097 00098 private: 00099 // used by wxWindow framework 00100 DECLARE_CLASS(mgSymPropPanel) 00101 DECLARE_EVENT_TABLE() 00102 }; 00103 00104 00105 00108 class mgSymVarPropPanel : public mgSymPropPanel 00109 { 00110 protected: // member variables 00111 00112 mgMathBox *m_pRangeBox; 00113 00114 protected: // functions 00115 00116 void AddSpecificCtrlsSizer(wxSizer *p); 00117 00118 void OnSetSymbol(); 00119 void OnAddSymbol(); 00120 00121 public: 00122 // constructors and destructors 00123 mgSymVarPropPanel(wxWindow *parent, 00124 wxWindowID id = -1, 00125 const wxString &title = wxT("Properties"), 00126 const wxPoint& pos = wxDefaultPosition, 00127 const wxSize& size = wxDefaultSize, 00128 long style = 0) : mgSymPropPanel(parent, id, title, pos, size, style) {} 00129 virtual ~mgSymVarPropPanel() {} 00130 00131 00132 private: 00133 // used by wxWindow framework 00134 DECLARE_CLASS(mgSymVarPropPanel) 00135 DECLARE_EVENT_TABLE() 00136 }; 00137 00138 00139 00142 class mgSymConstPropPanel : public mgSymPropPanel 00143 { 00144 protected: // member variables 00145 00146 //mgMathBox *m_pRangeBox; 00147 wxTextCtrl *m_pValue; 00148 wxString m_strValue; 00149 00150 protected: // functions 00151 00152 void AddSpecificCtrlsSizer(wxSizer *p); 00153 00154 00155 void OnSetSymbol(); 00156 void OnAddSymbol(); 00157 //void Update(); 00158 00159 public: 00160 // constructors and destructors 00161 mgSymConstPropPanel(wxWindow *parent, 00162 wxWindowID id = -1, 00163 const wxString &title = wxT("Properties"), 00164 const wxPoint& pos = wxDefaultPosition, 00165 const wxSize& size = wxDefaultSize, 00166 long style = 0) : mgSymPropPanel(parent, id, title, pos, size, style) {} 00167 virtual ~mgSymConstPropPanel() {} 00168 00169 //void LinkWithSymbol(mcSymbol *s); 00170 00171 void Update(); 00172 00173 private: 00174 // used by wxWindow framework 00175 DECLARE_CLASS(mgSymConstPropPanel) 00176 DECLARE_EVENT_TABLE() 00177 }; 00178 00179 00180 #endif // SYMPROPPANEL_H
[ Top ] |