#include <stdlib.h>#include <stdio.h>#include <string.h>#include "iup.h"#include "iupkey.h"#include "iupgl.h"#include "iupcontrols.h"#include "prj.h"#include "prm.h"Include dependency graph for drv.cpp:
Go to the source code of this file.
Revisions:
| |
| static FILE * | drvOpenFile (char *mode) |
| This function prompts the user for a file name and opens the file. | |
| static void | drvResize (int width, int height, void *h) |
| Callback function for canvas resize event (see VGL documentation). | |
| static void | drvRedisplay (void *h) |
| Callback function for canvas redisplay event (see VGL documentation). | |
| static void | drvMouseBt (int bt, int mode, float x, float y, void *data) |
| Callback function for mouse button event on canvas (see VGL documentation). | |
| static void | drvMouseMv (int bt, float x, float y, void *data) |
| Callback function for mouse movement event on canvas (see VGL documentation). | |
| static int | drvSetHeightFac (Ihandle *val, double fac) |
| Callback function for primitive height valuator event (see IUP documentation). | |
| static int | drvKeyCrtl (Ihandle *dg, int key) |
| Callback function for keyboard event (see IUP documentation). | |
| int | main (int argc, char *argv[]) |
| This is the main driver of the program. | |
| static Ihandle * | Omain |
| Main dialog handle. | |
| static Ihandle * | Otopmsg |
| Handle to top message label. | |
| static Ihandle * | Oheightval |
| Handle to height valuator. | |
| static int | cv_height |
| canvas vertical size in pixels | |
| static int | cv_width |
| canvas horizontal size in pixels | |
| int | doing_help = 0 |
| Flag for doing help. | |
| static char | file_name [256] |
| String that holds the current opened file name. | |
|
||||||||||||
|
Callback function for keyboard event (see IUP documentation). This function takes an appropriate action according to the given key that was pressed by the user and passed as a parameter.
Definition at line 291 of file drv.cpp. References doing_help, drvOpenFile(), Prj::Fit(), Prj::Info(), Prj::ManipMode(), Prj::NavigMode(), Prj::OpenModel(), Prj::Ortho(), Otopmsg, Prj::Persp(), Prj::ProjX(), Prj::ProjY(), Prj::ProjZ(), Prj::Quit(), Prj::ResetView(), Prj::vglcanvas, Prj::ZbufferSnapShot(), and Prj::ZoomMode(). Referenced by main(). |
|
||||||||||||||||||||||||
|
Callback function for mouse button event on canvas (see VGL documentation).
Definition at line 202 of file drv.cpp. References cv_height, cv_width, doing_help, Prj::GetHeightFac(), Oheightval, Otopmsg, Prj::Raster2WorldXY(), and Prj::SelectPrm(). Referenced by main(). |
|
||||||||||||||||||||
|
Callback function for mouse movement event on canvas (see VGL documentation). In this implementation it does nothing.
Definition at line 247 of file drv.cpp. Referenced by main(). |
|
|
This function prompts the user for a file name and opens the file.
Definition at line 88 of file drv.cpp. References file_name. Referenced by drvKeyCrtl(). |
|
|
Callback function for canvas redisplay event (see VGL documentation). It redisplays the model or the help message on the canvas.
Definition at line 175 of file drv.cpp. References doing_help, Prm::First(), Prj::Help(), Otopmsg, and Prj::Redisplay(). Referenced by main(). |
|
||||||||||||||||
|
Callback function for canvas resize event (see VGL documentation). It changes the visualization parameters according to the given canvas sizes.
Definition at line 159 of file drv.cpp. References cv_height, cv_width, Prj::Odatascreen, and Prj::Resize(). Referenced by main(). |
|
||||||||||||
|
Callback function for primitive height valuator event (see IUP documentation). This function sets the new value for the current selected primitive height according to the given height factor.
Definition at line 272 of file drv.cpp. References Prj::SetHeightFac(). Referenced by main(). |
|
||||||||||||
|
This is the main driver of the program. The program launches an user interface window on the screen and waits for an user action.
Definition at line 403 of file drv.cpp. References drvKeyCrtl(), drvMouseBt(), drvMouseMv(), drvRedisplay(), drvResize(), drvSetHeightFac(), Prj::Init(), Prj::Odatascreen, Oheightval, Omain, Otopmsg, and Prj::vglcanvas. |
|
|
canvas vertical size in pixels
Definition at line 64 of file drv.cpp. Referenced by drvMouseBt(), and drvResize(). |
|
|
canvas horizontal size in pixels
Definition at line 66 of file drv.cpp. Referenced by drvMouseBt(), and drvResize(). |
|
|
Flag for doing help.
Definition at line 68 of file drv.cpp. Referenced by drvKeyCrtl(), drvMouseBt(), and drvRedisplay(). |
|
|
String that holds the current opened file name.
Definition at line 70 of file drv.cpp. Referenced by drvOpenFile(). |
|
|
Handle to height valuator.
Definition at line 62 of file drv.cpp. Referenced by drvMouseBt(), and main(). |
|
|
Main dialog handle.
Definition at line 58 of file drv.cpp. Referenced by main(). |
|
|
Handle to top message label.
Definition at line 60 of file drv.cpp. Referenced by drvKeyCrtl(), drvMouseBt(), drvRedisplay(), and main(). |
1.4.2-20050421