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

mgMathBoxWndUser Class Reference

#include <MathBoxWndUser.h>

Inheritance diagram for mgMathBoxWndUser:

mgButtonListPanel mgExportDlg mgImportDlg mgMathMenu mgSolvePanel mgSymbolPanel mgCapitalGreekPanel mgSmallGreekPanel mgSpecialSymPanel List of all members.

Detailed Description

A little class which allow derived-classes to handle a single, fixed mgMathBox or the selected box inside a mgMathWnd, in a completely transparent way.

Derived classes should, in fact, just use the GetBox() function: mgMathBoxWndUser will provide a working pointer.

Definition at line 51 of file MathBoxWndUser.h.

Public Member Functions

 mgMathBoxWndUser (mgMathWnd *pWnd, mgMathBox *pBox)
 The constructor: derived classes should always contain among the parameters of their constructors the two parameters to pass to this function: pBox and pWnd.
void SendKeyEvent (wxObject *p, wxKeyEvent &ev)
 Sets appropriately the ID, event type and the originating object fields of the given wxKeyEvent class and then sends it to the client box.
void SendKeyEvent (wxObject *p, wxChar c)
void SendSpecialKeyEvent (wxObject *p, wxKeyEvent &ev)
void SendSpecialKeyEvent (wxObject *p, wxChar c)

Protected Member Functions

bool isUsingMathWnd ()
 Returns TRUE if this class has been linked with a mgMathWnd, FALSE if has been linked with a mgMathBox (see the constructors).
mgMathBoxGetBox ()
 Returns the box where the commands must be sent.
mgMathWndGetWnd ()
 Returns the pointer to the eventually previously set mgMathWnd.

Protected Attributes

mgMathWndm_pMathWnd
 The math window where all the commands are sent.
mgMathBoxm_pMathBox
 The math box where all the commands are sent.


Constructor & Destructor Documentation

mgMathBoxWndUser::mgMathBoxWndUser mgMathWnd pWnd,
mgMathBox pBox
[inline]
 

The constructor: derived classes should always contain among the parameters of their constructors the two parameters to pass to this function: pBox and pWnd.

If you want to use a fixed mgMathBox, pass a non-null pointer as pBox and a null pointer as pWnd, and viceversa.

Definition at line 86 of file MathBoxWndUser.h.

References m_pMathBox, and m_pMathWnd.


Member Function Documentation

mgMathBox * mgMathBoxWndUser::GetBox  )  [protected]
 

Returns the box where the commands must be sent.

This function checks which pointer is not NULL: m_pMath or m_pBox, and then use it to return a safe pointer to the mgMathBox which must receive commands.

Definition at line 61 of file MathBoxWndUser.cpp.

References mgResizeableBox::GetChild(), mgMathWnd::GetSelBox(), isUsingMathWnd(), m_pMathBox, and m_pMathWnd.

Referenced by mgExportDlg::BuildCtrls(), SendKeyEvent(), and mgSolvePanel::UpdateSolverList().

mgMathWnd* mgMathBoxWndUser::GetWnd  )  [inline, protected]
 

Returns the pointer to the eventually previously set mgMathWnd.

The returned value can be NULL (if no mgMathWnd are being used).

Definition at line 76 of file MathBoxWndUser.h.

References m_pMathWnd.

void mgMathBoxWndUser::SendKeyEvent wxObject *  p,
wxKeyEvent &  ev
 

Sets appropriately the ID, event type and the originating object fields of the given wxKeyEvent class and then sends it to the client box.

Parameters:
p The wxWidgets object which origins the event
ev The event to send.

Definition at line 70 of file MathBoxWndUser.cpp.

References GetBox().


Member Data Documentation

mgMathBox* mgMathBoxWndUser::m_pMathBox [protected]
 

The math box where all the commands are sent.

This variable is used only if m_pMath is NULL.

Definition at line 62 of file MathBoxWndUser.h.

Referenced by GetBox(), and mgMathBoxWndUser().

mgMathWnd* mgMathBoxWndUser::m_pMathWnd [protected]
 

The math window where all the commands are sent.

Commands are sent to this mgMathWnd only if it is not NULL. See the ctor for more details.

Definition at line 58 of file MathBoxWndUser.h.

Referenced by GetBox(), GetWnd(), isUsingMathWnd(), and mgMathBoxWndUser().


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 ]