Class is FLTK widget which display MathGL graphics. It is defined in #include <mgl2/Fl_MathGL.h>
.
Fl_MathGL
: void
set_draw (int
(*draw)(HMGL
gr, void *
p))
¶Fl_MathGL
: void
set_draw (int
(*draw)(mglGraph *
gr))
¶Fl_MathGL
: void
set_draw (mglDraw *
draw)
¶Sets drawing function as global function or as one from a class mglDraw
. There is support of a list of plots (frames). So as one can prepare a set of frames at first and redraw it fast later (but it requires more memory). Function should return positive number of frames for the list or zero if it will plot directly. Parameter par contains pointer to data for the plotting function draw.
Fl_MathGL
: mglDraw *
get_class
() ¶Get pointer to mglDraw
class or NULL
if absent.
Fl_MathGL
: void
update ()
¶Update (redraw) plot.
Fl_MathGL
: void
set_angle (mreal
t, mreal
p)
¶Set angles for additional plot rotation
Fl_MathGL
: void
set_flag (int
f)
¶Set bitwise flags for general state (1-Alpha, 2-Light)
Fl_MathGL
: void
set_state (bool
r, bool
z)
¶Set flags for handling mouse:
z=true
allow zooming,
r=true
allow rotation/shifting/perspective and so on.
Fl_MathGL
: void
set_zoom (mreal
X1, mreal
Y1, mreal
X2, mreal
Y2)
¶Set zoom in/out region
Fl_MathGL
: void
get_zoom (mreal *
X1, mreal *
Y1, mreal *
X2, mreal *
Y2)
¶Get zoom in/out region
Fl_MathGL
: void
set_popup (const Fl_Menu_Item *
pmenu, Fl_Widget *
w, void *
v)
¶Set popup menu pointer
Fl_MathGL
: void
set_graph (HMGL
gr)
¶Fl_MathGL
: void
set_graph (mglGraph *
gr)
¶Set new grapher instead of built-in one. Note that Fl_MathGL will automatically delete this object at destruction or at new set_graph()
call.
Fl_MathGL
: HMGL
get_graph ()
¶Get pointer to grapher.
Fl_MathGL
: void
set_show_warn (bool
val)
¶Show window with warnings after script parsing.
Fl_MathGL
: void
stop (bool
stop=true
)
¶Ask to stop of script parsing.
Fl_MathGL
: void
set_handle_key (bool
val)
¶Enable/disable key handling as in mglview (default is false).
Fl_MathGL
: int
get_last_id ()
¶Get id of last clicked object.
Fl_MathGL
: bool
running ()
¶Check if script is parsing now or not.
Fl_MathGL
: Fl_Valuator *
tet_val ¶Pointer to external tet-angle validator.
Fl_MathGL
: Fl_Valuator *
phi_val ¶Pointer to external phi-angle validator.