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

mcDoubleBufferedElement Class Reference

#include <MathLine.h>

Inheritance diagram for mcDoubleBufferedElement:

Inheritance graph
[legend]
List of all members.

Detailed Description

A simple abstract interface which defines those functions common to all elements which provide a double buffering system or which have children with double buffering.

Definition at line 85 of file MathLine.h.

Public Member Functions

 mcDoubleBufferedElement ()
virtual ~mcDoubleBufferedElement ()
Double buffering functions
The functions which handle double buffering system for better GUI performances.

virtual int gui_UpdateBmp (int x, int y, long flags, const wxPoint &p)=0
 Updates the bitmap in the mcMathLineHelpers structure, calling the mcMathMng::gui_Draw function.
virtual int gui_DrawBmp (wxDC &dc, int x, int y) const =0
 Draws this line on the given DC using the bitmap.
virtual int gui_ForceBmpUpdate (int x, int y, long flags, const wxPoint &p)=0
 Forces the update of the internal bitmap used for double buffering.
virtual bool gui_NeedsRefresh () const =0
 Returns TRUE if with the last call to gui_UpdateBmp or gui_ForceBmpUpdate, a redraw is required to keep the output up to date.
virtual void gui_SetMask (const wxColour &)=0
 Sets the given colour as the mask which will be used when blitting the bitmap in the given DC in a gui_DrawBmp call.
virtual void gui_SetBmpBackgroundBrush (const wxBrush &)=0
 Sets the background colour to use to clear the bitmap before each redrawing...


Constructor & Destructor Documentation

mcDoubleBufferedElement::mcDoubleBufferedElement  )  [inline]
 

Definition at line 88 of file MathLine.h.

virtual mcDoubleBufferedElement::~mcDoubleBufferedElement  )  [inline, virtual]
 

Definition at line 89 of file MathLine.h.


Member Function Documentation

virtual int mcDoubleBufferedElement::gui_DrawBmp wxDC &  dc,
int  x,
int  y
const [pure virtual]
 

Draws this line on the given DC using the bitmap.

Parameters:
dc The DC where the line will be drawn
memDC The memory DC to use to blit the bitmap
x The x-coord. where the line will be drawn
y The y-coord. where the line will be drawn
Returns:
The ID of the element currently under mouse cursor.

Implemented in mcMathLineHelpers, and mcMathSystemHelpers.

Referenced by mcMathSystemHelpers::gui_DrawBmp().

virtual int mcDoubleBufferedElement::gui_ForceBmpUpdate int  x,
int  y,
long  flags,
const wxPoint &  p
[pure virtual]
 

Forces the update of the internal bitmap used for double buffering.

All the parameters are the same of the gui_UpdateBmp function.

Implemented in mcMathLineHelpers, and mcMathSystemHelpers.

Referenced by mcMathSystemHelpers::gui_ForceBmpUpdate().

virtual bool mcDoubleBufferedElement::gui_NeedsRefresh  )  const [pure virtual]
 

Returns TRUE if with the last call to gui_UpdateBmp or gui_ForceBmpUpdate, a redraw is required to keep the output up to date.

Implemented in mcMathLineHelpers, and mcMathSystemHelpers.

Referenced by mcMathSystemHelpers::gui_NeedsRefresh().

virtual void mcDoubleBufferedElement::gui_SetBmpBackgroundBrush const wxBrush &   )  [pure virtual]
 

Sets the background colour to use to clear the bitmap before each redrawing...

the typical value is *wxWHITE_BRUSH.

Implemented in mcMathLineHelpers, and mcMathSystemHelpers.

Referenced by mcMathSystemHelpers::gui_SetBmpBackgroundBrush().

virtual void mcDoubleBufferedElement::gui_SetMask const wxColour &   )  [pure virtual]
 

Sets the given colour as the mask which will be used when blitting the bitmap in the given DC in a gui_DrawBmp call.

Implemented in mcMathLineHelpers, and mcMathSystemHelpers.

Referenced by mcMathSystemHelpers::gui_SetMask().

virtual int mcDoubleBufferedElement::gui_UpdateBmp int  x,
int  y,
long  flags,
const wxPoint &  p
[pure virtual]
 

Updates the bitmap in the mcMathLineHelpers structure, calling the mcMathMng::gui_Draw function.

Parameters:
memDC The memory DC to use as temporary DC (performance optimization: instead creating each time a new memory DC, allocate one once and then reuse it on each call to data_UpdateLineBmp).
x,y The position where this line is drawn.
p The mouse cursor position (in line coord.) or mcDRW_NONACTIVE, mcDRW_ALLACTIVE flags.
Returns:
The ID of the active element

Implemented in mcMathLineHelpers, and mcMathSystemHelpers.

Referenced by mcMathSystemHelpers::gui_UpdateBmp().


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

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

[ Top ]