[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
5 Widget classes
There are set of “window” classes for making a window with MathGL graphics: mglWindow
and mglGLUT
for whole window, Fl_MathGL
and QMathGL
as widgets. All these classes allow user to show, rotate, export, and change view of the plot using keyboard. Most of them (except mglGLUT
) also have toolbar and menu for simplifying plot manipulation. All window classes have mostly the same set of functions.
For drawing you can use: NULL
pointer if you’ll update plot manually, global callback function of type int draw(
or HMGL
gr, void *
p)int draw(
, or instance of class derived from mglGraph *
gr)mglDraw
class. This class is defined in #include <mgl2/window.h>
and have only 2 methods:
class mglDraw { public: virtual int Draw(mglGraph *) { return 0; }; virtual void Reload() {}; };
You should inherit yours class from mglDraw
and re-implement one or both functions for drawing.
5.1 mglWindow class | ||
5.2 Fl_MathGL class | ||
5.3 QMathGL class | ||
5.4 wxMathGL class |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.