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

OptBtnPanel.cpp

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 
00033 // optimization for GCC compiler
00034 #if defined(__GNUG__) && !defined(__APPLE__)
00035    #pragma implementation "OptBtnPanel.h"
00036 #endif
00037 
00038 // includes
00039 #include "mg/mgprec.h"
00040 
00041 #ifndef mgPRECOMP
00042    #include "mg/OptBtnPanel.h"
00043    #include "mg/OptDlg.h"
00044 #endif
00045 
00046 
00047 // no handlers in this class. The event handlers for the button panel
00048 // is in the parent class: mgOptDlg
00049 
00050 IMPLEMENT_CLASS( mgOptionsBtnPanel, wxPanel )
00051 BEGIN_EVENT_TABLE( mgOptionsBtnPanel,wxPanel )
00052 END_EVENT_TABLE()
00053 
00054 
00055 
00056 // --------------------------------------------
00057 // mcOPTIONSBTNPANEL
00058 // --------------------------------------------
00059 
00060 mgOptionsBtnPanel::mgOptionsBtnPanel( wxWindow* parent )
00061                 : wxPanel( parent )
00062 {
00063   // creates a wxBoxSizer in which the three buttons are laid out
00064   // the handlers for the buttons are in the parent window (see
00065   // mgOptOptionsDialog class)
00066   wxBoxSizer *sizer = new wxBoxSizer( wxHORIZONTAL );
00067 
00068   sizer->Add(
00069      new wxButton( this, OPTIONSDLG_BTN_OK, wxT("OK") ),
00070      5,           // make horizontally stretchable
00071      wxGROW | wxALL | wxALIGN_CENTER_VERTICAL,       // make border all around (implicit top alignment)
00072      5 );        // set border width to 5
00073 
00074   sizer->Add(
00075      10, 10,
00076      1,           // stretchable spacer
00077      wxGROW | wxALL | wxALIGN_CENTER_VERTICAL,
00078      0 );        // set border width
00079 
00080   sizer->Add(
00081      new wxButton( this, OPTIONSDLG_BTN_CANCEL, wxT("Cancel") ),
00082      5,           // make horizontally stretchable
00083      wxGROW | wxALL | wxALIGN_CENTER_VERTICAL,       // make border all around (implicit top alignment)
00084      5 );        // set border width to 5
00085 
00086   sizer->Add(
00087      10, 10,
00088      1,           // stretchable spacer
00089      wxGROW | wxALL | wxALIGN_CENTER_VERTICAL,
00090      0 );        // set border width
00091 
00092   sizer->Add(
00093      new wxButton( this, OPTIONSDLG_BTN_APPLY, wxT("Apply") ),
00094      5,           // make horizontally stretchable
00095      wxGROW | wxALL | wxALIGN_CENTER_VERTICAL,       // make border all around (implicit top alignment)
00096      5 );        // set border width to 5
00097 
00098   SetSizer( sizer );      // use the sizer for layout
00099   sizer->SetSizeHints( this );   // set size hints to honour minimum size
00100 }
00101 
00102 mgOptionsBtnPanel::~mgOptionsBtnPanel()
00103 {
00104    // nothing to do...
00105 }
00106 


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

[ Top ]