00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00030
00031
00032
00033 #ifndef SYMBOLDLG_H
00034 #define SYMBOLDLG_H
00035
00036
00037 #include <wx/notebook.h>
00038 #include <wx/listctrl.h>
00039 #include "mc/Symbol.h"
00040 #include "mg/PaletteDlg.h"
00041 #ifdef mgUSE_PALETTEFRM
00042 #include <wx/palettefrm.h>
00043 #endif
00044
00045
00046
00047 #ifdef __GNUG__
00048 #pragma interface "SymbolDlg.h"
00049 #endif
00050
00051
00052
00053 #define IDC_SYMBOLDLG_LIST mgSYMBOLDLG_BASEID+1
00054 #define IDC_SYMBOLDLG_DELETE mgSYMBOLDLG_BASEID+3
00055
00056 #define IDC_SYMLISTPAGE_LISTCTRL mgSYMBOLDLG_BASEID+4
00057
00058 #define SYMPROP_BASEID mgSYMBOLDLG_BASEID+5
00059
00060
00061 class mgSymPropPanel;
00062
00063
00070 class mgSymListPage : public wxPanel
00071 {
00072 protected:
00073
00074 mgSymPropPanel *m_pPropPanel;
00075 mcSymbolArray *m_pArray;
00076
00077 wxListCtrl *m_pList;
00078
00079
00080
00081 protected:
00082
00083 virtual void BuildCtrls();
00084 virtual void BuildAll();
00085
00086
00087
00088 void OnSelectionChanged(wxListEvent &);
00089
00090 public:
00091
00092 mgSymListPage(wxWindow *parent,
00093 mgSymPropPanel *prop,
00094 mcSymbolArray *arr,
00095 wxWindowID id = -1,
00096 const wxString &title = wxT("Symbols"),
00097 const wxPoint& pos = wxDefaultPosition,
00098 const wxSize& size = wxDefaultSize,
00099 long style = 0);
00100
00101 virtual ~mgSymListPage() {}
00102
00103 mgSymPropPanel *GetLinkedPropPanel() {
00104 return m_pPropPanel;
00105 }
00106
00107 private:
00108 DECLARE_CLASS(mgSymListPage)
00109 DECLARE_EVENT_TABLE()
00110 };
00111
00112
00113
00114
00117 class mgSymbolPanel : public wxPanel, public mgMathBoxWndUser
00118 {
00119 protected:
00120
00123 wxNotebook *m_pList;
00124
00126
00127 wxStaticBoxSizer *m_pPropertySizer;
00128
00130 wxTextCtrl *m_pText;
00131
00133 mcSymbolArray *m_pArray;
00134
00135
00136 protected:
00137
00138 void BuildAll();
00139 void BuildCtrls();
00140
00141 int GetBaseID() const { return mgSYMBOLDLG_BASEID; }
00142
00143
00144 void OnDeleteSymbol( wxCommandEvent &event );
00145 void OnPageChanged(wxNotebookEvent &ev);
00146
00147
00148 int GetDefaultWidth() { return 100; }
00149 int GetDefaultHeight() { return 100;}
00150
00151 wxString GetButtonLabel(int n) { return wxT(""); }
00152 wxString GetButtonTooltip(int n) { return wxT(""); }
00153
00154
00155 int GetColCount() const { return 1; }
00156 int GetRowCount() const { return 1; }
00157
00158
00159 public:
00160
00161 mgSymbolPanel(
00162 wxWindow *parent,
00163 mgMathWnd *mathwnd,
00164 mgMathBox *mathbox,
00165 mcSymbolArray *,
00166 wxWindowID id = -1,
00167 const wxString &title = wxT("Symbols"),
00168 const wxPoint& pos = wxDefaultPosition,
00169 const wxSize& size = wxDefaultSize,
00170 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
00171 virtual ~mgSymbolPanel();
00172
00173
00174
00175 void Sync();
00176 void AddDefaultLists();
00177
00178
00179 private:
00180
00181 DECLARE_CLASS(mgSymbolPanel)
00182 DECLARE_EVENT_TABLE()
00183 };
00184
00185
00187 class mgSymbolPalette : public wxPaletteFrame
00188 {
00189 public:
00190
00191 #ifndef mgUSE_PALETTEFRM
00192 wxPanel *m_pPanel;
00193
00194
00195 void SetSizeHintsUsingClientHints() {}
00196 #endif
00197
00198 public:
00199
00200 mgSymbolPalette(
00201 wxMainFrame *parent,
00202 wxWindow *client,
00203 mgMathWnd *mathwnd,
00204 mgMathBox *mathbox,
00205 mcSymbolArray *arr,
00206 wxWindowID id = -1,
00207 const wxString &title = wxT("Symbols"),
00208 const wxPoint &pos = wxDefaultPosition,
00209 const wxSize &size = wxDefaultSize,
00210 long style = wxPALETTEFRM_DEFAULT_STYLE,
00211 const wxString &name = wxT("mgSymbolPalette"));
00212
00213 virtual ~mgSymbolPalette() {}
00214
00215
00217 mgSymbolPanel *GetPanel();
00218
00219 };
00220
00221
00222 #endif // SYMBOLDLG_H
00223