#include <PnlGraph.h>
Collaboration diagram for PnlGraph:
Public Member Functions | |
double | calculate_ordinata (double y) |
Converts the given y absolute position to the respective ordinata. | |
double | calculate_ascissa (double x) |
Converts the given x absolute position to the respective ascissa. | |
wxMenu * | GetPopUp () |
Return the pop-up menu of the object. | |
PnlGraph (wxWindow *parent, wxWindowID id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxSIMPLE_BORDER, const wxString &name=_T("panel")) | |
Constructor. | |
void | SettingsClick (wxCommandEvent &event) |
Open the settings window DlgOpzioni. | |
Public Attributes | |
OpzGrafico | options |
Structure OpzGrafico that contains general options. | |
Private Member Functions | |
int | calculate_y (double ordinata) |
Converts the given ordinata to an y absolute position. | |
int | calculate_x (double ascissa) |
Converts the given ascissa to an x absolute position. | |
void | draw_function (rif *pointstructure, color colore, int width) |
Function that draws the entire scene. | |
void | draw_axis (void) |
Function that cartesian axis. | |
void | draw_grid (void) |
Function that draw the grid if enabled. | |
void | draw_steps (void) |
Function that draw the steps on the axis if enabled. | |
void | OnLeftUp (wxMouseEvent &event) |
Process the left up mouse event. | |
void | OnRightDown (wxMouseEvent &event) |
Process the right down mouse event. | |
void | OnMotion (wxMouseEvent &event) |
Process the on motion mouse event. | |
void | OnLeftDown (wxMouseEvent &event) |
Process the left down mouse event. | |
void | OnPaint (wxPaintEvent &event) |
Process the paint event to redraw the graph. | |
Private Attributes | |
wxPaintDC * | sheet |
Buffer for drawing functions. | |
wxMenu * | PopLista |
right-click popup menu |
PnlGraph class shows bidimensional graphs of inserted function it's derived from wxPanel
Definition at line 22 of file PnlGraph.h.
|
Constructor.
Definition at line 67 of file PnlGraph.cpp. References PopLista. |
|
Converts the given x absolute position to the respective ascissa.
Definition at line 51 of file PnlGraph.cpp. References options, OpzGrafico::xmax, and OpzGrafico::xmin. Referenced by PnlGraphFrame::PointerMoved(). |
|
Converts the given y absolute position to the respective ordinata.
Definition at line 59 of file PnlGraph.cpp. References options, OpzGrafico::ymax, and OpzGrafico::ymin. Referenced by PnlGraphFrame::PointerMoved(). |
|
Converts the given ascissa to an x absolute position.
Definition at line 42 of file PnlGraph.cpp. References options, OpzGrafico::xmax, and OpzGrafico::xmin. Referenced by draw_axis(), draw_function(), draw_grid(), and draw_steps(). |
|
Converts the given ordinata to an y absolute position.
Referenced by draw_axis(), draw_function(), draw_grid(), and draw_steps(). |
|
Function that cartesian axis.
Definition at line 112 of file PnlGraph.cpp. References calculate_x(), calculate_y(), options, sheet, OpzGrafico::xaxis, OpzGrafico::xmax, OpzGrafico::xmin, OpzGrafico::yaxis, OpzGrafico::ymax, and OpzGrafico::ymin. Referenced by OnPaint(). |
|
Function that draws the entire scene. The values to show are calculated by TParserValore
Definition at line 140 of file PnlGraph.cpp. References col::blue, TParserValore::CalcolaValore(), calculate_x(), calculate_y(), col::green, options, col::red, sheet, OpzGrafico::xmax, OpzGrafico::xmin, OpzGrafico::ymax, and OpzGrafico::ymin. Referenced by OnPaint(). |
|
Function that draw the grid if enabled.
Definition at line 175 of file PnlGraph.cpp. References calculate_x(), calculate_y(), OpzGrafico::nstepsx, OpzGrafico::nstepsy, options, sheet, OpzGrafico::xgrid, OpzGrafico::xmax, OpzGrafico::xmin, OpzGrafico::ygrid, OpzGrafico::ymax, and OpzGrafico::ymin. Referenced by OnPaint(). |
|
Function that draw the steps on the axis if enabled.
Definition at line 273 of file PnlGraph.cpp. References calculate_x(), calculate_y(), OpzGrafico::nstepsx, OpzGrafico::nstepsy, options, sheet, OpzGrafico::showstepsx, OpzGrafico::showstepsy, OpzGrafico::xmax, OpzGrafico::xmin, OpzGrafico::ymax, and OpzGrafico::ymin. Referenced by OnPaint(). |
|
Return the pop-up menu of the object.
Definition at line 346 of file PnlGraph.cpp. References PopLista. |
|
Process the left down mouse event.
Definition at line 213 of file PnlGraph.cpp. |
|
Process the left up mouse event.
Definition at line 240 of file PnlGraph.cpp. |
|
Process the on motion mouse event.
Definition at line 252 of file PnlGraph.cpp. |
|
Process the paint event to redraw the graph.
Definition at line 75 of file PnlGraph.cpp. References OpzGrafico::bgcolor, draw_axis(), draw_function(), draw_grid(), draw_steps(), TLista::ExtractColor(), TLista::ExtractDrawFlag(), TLista::ExtractStructure(), TLista::ExtractWidth(), OpzGrafico::functions, TLista::nelements, options, and sheet. |
|
Process the right down mouse event.
Definition at line 226 of file PnlGraph.cpp. References PopLista. |
|
Open the settings window DlgOpzioni.
Definition at line 337 of file PnlGraph.cpp. Referenced by MainFrm::BtnModificaClick(). |
|
Structure OpzGrafico that contains general options.
Definition at line 136 of file PnlGraph.h. Referenced by calculate_ascissa(), calculate_ordinata(), calculate_x(), PnlGraphFrame::CheckOptions(), draw_axis(), draw_function(), draw_grid(), draw_steps(), PnlObjTree::FillFunction(), OnPaint(), and PnlGraphFrame::TxtValueChanged(). |
|
right-click popup menu
Definition at line 35 of file PnlGraph.h. Referenced by GetPopUp(), OnRightDown(), and PnlGraph(). |
|
Buffer for drawing functions.
Definition at line 32 of file PnlGraph.h. Referenced by draw_axis(), draw_function(), draw_grid(), draw_steps(), and OnPaint(). |