manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ 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(HMGL gr, void *p) or int draw(mglGraph *gr), or instance of class derived from 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.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 21, 2014 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.