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

mgOptGeneralPanel Class Reference

#include <OptGeneral.h>

Inheritance diagram for mgOptGeneralPanel:

mgOptBasePanel List of all members.

Detailed Description

The panel containing the general options which can be customized by the user:.

All the previous variables are STATIC, so this panel doesn't need to own an instance of each class.

Definition at line 68 of file OptGeneral.h.

Protected Member Functions

virtual mgOptDlg::mgOptChangedType CommitChanges (wxConfig *config)
 Commits the changes made by the user.
virtual void Setup (const wxString &itemLabel)
 The alter ego of the constructor.
void BuildCtrls ()
 Creates all the controls whose pointers are stored in member variables for fast access.


Member Function Documentation

mgOptDlg::mgOptChangedType mgOptGeneralPanel::CommitChanges wxConfig *  config  )  [protected, virtual]
 

Commits the changes made by the user.

The virtual function is called with a pointer to a wxConfig object by the mgOptDlg::CommitChanges function when the user clicks the OK or Apply button.

The function should change the variables used by MathCore and MathGUI in order to reflect changes in the configuration. In other words, if the user changed the font family and / or size this function should delete the font object used by the application and replace it with a new font ehich caracteristics are those specified by the user and store the pointer of the newly created font object in the MathCore library.

There is no need for the function to store the settings in the configuration objevt because they will be stored automatically at program exit in CMathApp::OnExit() function.

In order to refresh the application apareance when the user changes options settings (such as a font), the function returns a constant value, which is an enum, that represent what aspect of the application is to be refreshed. It is the caller responsability to do the actual work.

See also:
mgOptDlg::CommitChanges mgOptDlg::mgOptChangedType

Implements mgOptBasePanel.

Definition at line 84 of file OptGeneral.cpp.

void mgOptGeneralPanel::Setup const wxString &  itemLabel  )  [protected, virtual]
 

The alter ego of the constructor.

This function is the real ctor of the class. It is called from mgOptDlg::CreatePanel function just after the dynamic istantiation of the class and after calling wxPanel::Create.

As you cannot set properies for the panel such as fonts, background color atc. in the class's ctor you have to set them in this function.

The itemLabel string contains the label of the treelist's item associated with this option's panel.

The default implementation of this class just creates a wxStaticBoxSizer equal to the size of the panel and sets its label as the treelist's item's label. Specialized derived classes should construct the child controls and the sizer or layout constarints objects to be bounded to childs.

Implements mgOptBasePanel.

Definition at line 66 of file OptGeneral.cpp.

References BuildCtrls().


The documentation for this class was generated from the following files:

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

[ Top ]