Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/home/landauf/painter/miniproject/framewk/framewk.h File Reference

#include <assert.h>
#include <GL/glut.h>
#include "../image/imagergba.h"

Go to the source code of this file.

Functions

void keyboardCB (unsigned char key, float x, float y)
 Keyboard callback-function.

void specialCB (int key, float x, float y)
 Special-key keyboard callback-function.

void mouseCB (int button, int state, float x, float y)
 Mouse button callback-function.

void motionCB (float x, float y)
 Mouse motion callback-function.

void idleCB (void)
 Idle callback-function.

void fwkInit (int *argc, const char *argv[])
 Initializes the exercise framework.

void fwkMainLoop (void)
 Starts the application main-loop.

void fwkSetDisplayImage (const void *img)
 Sets the currently displayed image.

float fwkGetDisplayZoom (void)
 Gets the current zoom factor.

void fwkSetDisplayZoom (float zoom)
 Sets the current zoom factor.

void fwkPostRedisplay (void)
 Requests a redraw of the displayed image.


Function Documentation

float fwkGetDisplayZoom void   
 

Gets the current zoom factor.

Definition at line 410 of file framewk.cpp.

References displayZoom.

Referenced by keyboardCB(), and effect::useMenu().

void fwkInit int *    argc,
const char *    argv[]
 

Initializes the exercise framework.

Initializes GLUT and opens a GLUT window. See pgdocFramework for more details.

Parameters:
argc  A pointer to the unchanged argc argument of main().
argv  The unchanged argv argument of main().

Definition at line 342 of file framewk.cpp.

References fwkKeyboardCB(), fwkMotionCB(), fwkMouseCB(), fwkPassiveMotionCB(), fwkRedrawCB(), fwkSpecialCB(), and glutWindowId.

Referenced by main().

void fwkMainLoop void   
 

Starts the application main-loop.

(Actually starts the GLUT main-loop.)

See pgdocFramework for more details.

Definition at line 379 of file framewk.cpp.

Referenced by main().

void fwkPostRedisplay void   
 

Requests a redraw of the displayed image.

Call this function if the image content has changed.

Subsequent calls to fwkPostRedisplay() are cumulated. See fwUsageImageData for more details.

Definition at line 446 of file framewk.cpp.

References displayChanged.

Referenced by idleCB().

void fwkSetDisplayImage const void *    img
 

Sets the currently displayed image.

img can be a pointer to an ImageGray or ImageRGBA struct, as well. If img was not displayed before, a fwkPostRedisplay() is implicitly called. See fwUsageImageData for more details.

Parameters:
img  Pointer to an ImageGray or ImageRGBA struct.

Definition at line 390 of file framewk.cpp.

References glutWindowId.

Referenced by scroll::idleAction(), main(), and effect::refreshImage().

void fwkSetDisplayZoom float    zoom
 

Sets the current zoom factor.

Definition at line 415 of file framewk.cpp.

References displayZoom, and fwkPostRedisplayNoChange().

Referenced by keyboardCB(), and effect::useMenu().

void idleCB void   
 

Idle callback-function.

Definition at line 114 of file painter.cpp.

References fwkPostRedisplay(), effect::idle(), and effect::inAction.

void keyboardCB unsigned char    key,
float    x,
float    y
 

Keyboard callback-function.

Definition at line 41 of file painter.cpp.

References fwkGetDisplayZoom(), fwkSetDisplayZoom(), imageRgbaCopy(), imageRgbaWriteTIFF(), effect::img, effect::inAction, effect::key(), resetImage(), effect::setXY(), effect::temp, and effect::temp2.

Referenced by fwkKeyboardCB().

void motionCB float    x,
float    y
 

Mouse motion callback-function.

Definition at line 107 of file painter.cpp.

References effect::inAction, effect::move(), and effect::setXY().

Referenced by fwkMotionCB().

void mouseCB int    button,
int    state,
float    x,
float    y
 

Mouse button callback-function.

Definition at line 97 of file painter.cpp.

References effect::LB(), effect::RB(), and effect::setXY().

Referenced by fwkMouseCB().

void specialCB int    key,
float    x,
float    y
 

Special-key keyboard callback-function.

Definition at line 90 of file painter.cpp.

References effect::inAction, effect::setXY(), and effect::specialKey().

Referenced by fwkSpecialCB().


Generated on Mon Jan 30 09:13:03 2006 for Painter Framework by doxygen1.2.18