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 #ifndef SPECIALSYM_H
00033 #define SPECIALSYM_H
00034
00035
00036 #include "mg/PaletteDlg.h"
00037 #ifdef mgUSE_PALETTEFRM
00038 #include <wx/palettefrm.h>
00039 #endif
00040
00041
00042
00043 #ifdef __GNUG__
00044 #pragma interface "SpecialSymDlg.h"
00045 #endif
00046
00047
00048
00049 #define SPECIALSYMDLG_NUM_BUTTONS 6
00050 #define SPECIALSYMDLG_COLUMNS 6
00051 #define SPECIALSYMDLG_ROWS 1 //SPECIALSYMDLG_NUM_BUTTONS/GetColCount()
00052
00053 #define SPECIALSYMDLG_FONT_POINTSIZE 16
00054
00056 #define IDC_SPECIALSYMDLG_BUTTONS mgSPECIALSYMDLG_BASEID
00057
00058
00059
00060
00063 class mgSpecialSymPanel : public mgButtonListPanel
00064 {
00066 static wxString strSymbols;
00067
00069 static wxString strSymbolsTooltip[SPECIALSYMDLG_NUM_BUTTONS];
00070
00071 void OnButtons( wxCommandEvent &event );
00072 void BuildButtons();
00073
00074 wxString GetButtonLabel(int i)
00075 { return strSymbols.GetChar(i); }
00076
00077 wxString GetButtonTooltip(int i)
00078 { return strSymbolsTooltip[i]; }
00079
00080 public:
00081
00088 mgSpecialSymPanel(
00089 wxWindow *parent,
00090 wxWindow *client,
00091 mgMathWnd *mathwnd,
00092 mgMathBox *mathbox,
00093 wxWindowID id = -1,
00094 const wxPoint& pos = wxDefaultPosition,
00095 const wxSize& size = wxDefaultSize,
00096 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
00097
00098 virtual ~mgSpecialSymPanel() {}
00099
00100 private:
00101 DECLARE_EVENT_TABLE()
00102 };
00103
00104
00105
00107 class mgSpecialSymPalette : public wxPaletteFrame
00108 {
00109 protected:
00110
00113 void Build(wxWindow *client, mgMathWnd *mathwnd, mgMathBox *mathbox);
00114
00115 public:
00116
00117 mgSpecialSymPalette(
00118 wxMainFrame *parent,
00119 wxWindow *client,
00120 mgMathWnd *mathwnd,
00121 mgMathBox *mathbox,
00122 wxWindowID id = -1,
00123 const wxString &title = wxT("Special symbols"),
00124 const wxPoint &pos = wxDefaultPosition,
00125 const wxSize &size = wxDefaultSize,
00126 long style = wxPALETTEFRM_DEFAULT_STYLE,
00127 const wxString &name = wxT("mgSpecialSymPalette"))
00128 : wxPaletteFrame(parent, id, title, pos, size, style, name) {
00129
00130
00131 Build(client ? client : parent, mathwnd, mathbox);
00132 }
00133
00134 virtual ~mgSpecialSymPalette() {}
00135 };
00136
00137
00138 #endif // SPECIALSYM_H
00139