#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.c:

Go to the source code of this file.
Project driver module. | |
Revisions:
| |
| FILE * | drvOpenFile (char *mode) |
| This function prompts the user for a file name and opens the file. | |
| void | drvResize (int width, int height, void *h) |
| Callback function for canvas resize event (see VGL documentation). | |
| void | drvRedisplay (void *h) |
| Callback function for canvas redisplay event (see VGL documentation). | |
| void | drvMouseBt (int bt, int mode, float x, float y, void *data) |
| Callback function for mouse button event on canvas (see VGL documentation). | |
| void | drvMouseMv (int bt, float x, float y, void *data) |
| Callback function for mouse movement event on canvas (see VGL documentation). | |
| int | drvSetHeightFac (Ihandle *val, double fac) |
| Callback function for primitive height valuator event (see IUP documentation). | |
| 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. | |
| Ihandle * | Omain |
| Main dialog handle. | |
| Ihandle * | Otopmsg |
| Handle to top message label. | |
| Ihandle * | Oheightval |
| Handle to height valuator. | |
| int | cv_height |
| canvas vertical size in pixels | |
| int | cv_width |
| canvas horizontal size in pixels | |
| int | doing_help = 0 |
| Flag for doing help. | |
| 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 286 of file drv.c. References doing_help, drvOpenFile(), Otopmsg, prjFit(), prjInfo(), prjManipMode(), prjNavigMode(), prjOpenModel(), prjOrtho(), prjPersp(), prjProjX(), prjProjY(), prjProjZ(), prjQuit(), prjResetView(), prjZbufferSnapShot(), prjZoomMode(), and vglcanvas. Referenced by main(). |
|
||||||||||||||||||||||||
|
Callback function for mouse button event on canvas (see VGL documentation).
Definition at line 197 of file drv.c. References cv_height, cv_width, doing_help, Oheightval, Otopmsg, prjGetHeightFac(), prjRaster2WorldXY(), and prjSelectPrm(). Referenced by main(). |
|
||||||||||||||||||||
|
Callback function for mouse movement event on canvas (see VGL documentation). In this implementation it does nothing.
Definition at line 242 of file drv.c. Referenced by main(). |
|
|
This function prompts the user for a file name and opens the file.
Definition at line 83 of file drv.c. 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 170 of file drv.c. References doing_help, Otopmsg, prjHelp(), prjRedisplay(), and prmFirst(). 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 154 of file drv.c. References cv_height, cv_width, Odatascreen, and prjResize(). 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 267 of file drv.c. References prjSetHeightFac(). 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 398 of file drv.c. References drvKeyCrtl(), drvMouseBt(), drvMouseMv(), drvRedisplay(), drvResize(), drvSetHeightFac(), Odatascreen, Oheightval, Omain, Otopmsg, prjInit(), and vglcanvas. |
|
|
canvas vertical size in pixels
Definition at line 59 of file drv.c. Referenced by drvMouseBt(), and drvResize(). |
|
|
canvas horizontal size in pixels
Definition at line 61 of file drv.c. Referenced by drvMouseBt(), and drvResize(). |
|
|
Flag for doing help.
Definition at line 63 of file drv.c. Referenced by drvKeyCrtl(), drvMouseBt(), and drvRedisplay(). |
|
|
String that holds the current opened file name.
Definition at line 65 of file drv.c. Referenced by drvOpenFile(). |
|
|
Handle to height valuator.
Definition at line 57 of file drv.c. Referenced by drvMouseBt(), and main(). |
|
|
Main dialog handle.
Definition at line 53 of file drv.c. Referenced by main(). |
|
|
Handle to top message label.
Definition at line 55 of file drv.c. Referenced by drvKeyCrtl(), drvMouseBt(), drvRedisplay(), and main(). |
1.2.18