Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

SpecialSymDlg.h

Go to the documentation of this file.
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 #ifndef SPECIALSYM_H
00033 #define SPECIALSYM_H
00034 
00035 // both mgButtonListPanel & wxPaletteFrame classes are used...
00036 #include "mg/PaletteDlg.h"
00037 #ifdef mgUSE_PALETTEFRM
00038    #include <wx/palettefrm.h>
00039 #endif
00040 
00041 
00042 // optimization for GCC compiler
00043 #ifdef __GNUG__
00044 #pragma interface "SpecialSymDlg.h"
00045 #endif
00046 
00047 
00048 // the number of columns in the dialog
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       // build everything...
00131       Build(client ? client : parent, mathwnd, mathbox);
00132    }
00133 
00134    virtual ~mgSpecialSymPalette() {}
00135 };
00136 
00137 
00138 #endif   // SPECIALSYM_H
00139 


Documentation generated with Doxygen on Sun Feb 6 17:19:26 2005
Visit MathStudio home page for more info

[ Top ]