Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

FXPlotBase Class Reference

Abstract base class for a plot. More...

#include <FXPlotBase.h>

Inheritance diagram for FXPlotBase:

FXPlot2D FXSPC List of all members.

Public Member Functions

 FXPlotBase (FXComposite *parent, FXString Name)
 Create a new FXPlotBase, must be called by classes inheriting from this class.
virtual ~FXPlotBase ()
 Virtual destructor, releases the double buffer data.
void setGridPen (const FXPlotPen &pen)
 Set the grid pen.
void setCommonPen (const FXPlotPen &pen)
 Set the common pen.
FXbool saveImage (const FXString &file)
 Save the image drawed by drawSelf() to the file named file.
virtual void drawSelf (FXDC *p, FXint rootx=0, FXint rooty=0)
 Function called to draw the contents of this plot.
void create (void)
long onPaint (FXObject *, FXSelector, void *ptr)
long onSave (FXObject *, FXSelector, void *ptr)

Protected Member Functions

 FXPlotBase ()

Protected Attributes

FXImage * img
 Double buffering image.
FXString name
 Plot title.
FXPlotPen grid
 The grid pen.
FXPlotPen comm
 The commom pen.
FXColor bg
 Background color.

Detailed Description

Abstract base class for a plot.

The FXFXPlotBase class provides some base functionalities like: exporting or printing the plot to file, double buffering mechanism, etc. Furthermore, this class try to wrap the graphical library functions being used (FOX-toolkit) making this library easy to port to other libraries with not much effort.

To create a plot widget, simply subclass FXPlotBase and provide a implementation for the virtual function drawSelf();

See also:

Definition at line 188 of file FXPlotBase.h.

Member Function Documentation

virtual void FXPlotBase::drawSelf FXDC *  p,
FXint  rootx = 0,
FXint  rooty = 0
[inline, virtual]

Function called to draw the contents of this plot.

All classes inheriting from FXPlotBase should provide a implementation for this function. The default implementation does nothing.

Reimplemented in FXPlot2D, and FXSPC.

Definition at line 227 of file FXPlotBase.h.

The documentation for this class was generated from the following file:
Generated on Tue Jan 31 10:55:30 2006 for FXPlot by  doxygen 1.4.4