Canvas Class Reference
[Graphics]
Area in a window that can be drawn to.
More...
#include <Canvas.hpp>
List of all members.
Public Member Functions |
| Canvas (int width=CANVAS_WIDTH, int height=CANVAS_HEIGHT) |
void | addListener (CanvasListener *listener, int type) |
void | clear () |
void | check () |
void | fireEvent (int type) |
virtual void | flush ()=0 |
Camera * | getCamera () |
int | getHeight () |
int | getWidth () |
virtual void | refresh ()=0 |
virtual void | primeStart ()=0 |
virtual void | primeFinish ()=0 |
virtual void | setAutomaticallyRefresh (bool automaticRefresh)=0 |
virtual void | write (const string &text, int x=15, int y=30)=0 |
Protected Attributes |
bool | automaticallyRefresh |
bool | started |
bool | isMouseButtonPressed |
CanvasState | state |
Private Attributes |
int | height |
int | width |
Camera | camera |
list< CanvasListener * > | listeners [CANVAS_EVENT_TYPE_SIZE] |
Detailed Description
Area in a window that can be drawn to.
Constructor & Destructor Documentation
Canvas |
( |
int |
width = CANVAS_WIDTH , |
|
|
int |
height = CANVAS_HEIGHT | |
|
) |
| | |
Initializes the size of the widget.
Member Function Documentation
void addListener |
( |
CanvasListener * |
listener, |
|
|
int |
type | |
|
) |
| | |
Registers an object to receive updates from the canvas.
Checks if there were any errors.
void fireEvent |
( |
int |
type |
) |
|
Sends an event of the appropriate type.
Camera * getCamera |
( |
|
) |
[inline] |
- Returns:
- Pointer to the canvas's camera.
int getHeight |
( |
|
) |
[inline] |
- Returns:
- Height of the canvas.
int getWidth |
( |
|
) |
[inline] |
- Returns:
- Width of the canvas.
The documentation for this class was generated from the following files: