|
Public Methods |
| SimpleWindow (const string &WindowTitle, float Width=DefaultWidth, float Height=DefaultHeight, const Position &WindowPosition=LogicalOrigin) |
| Initializes the member variables.
|
| SimpleWindow (const char *WindowTitle="Untitled", float Width=DefaultWidth, float Height=DefaultHeight, const Position &WindowPosition=LogicalOrigin) |
| SimpleWindow (const SimpleWindow &CopyWindow) |
| Displays an alert box and terminates the program.
|
virtual | ~SimpleWindow () |
| Closes the window.
|
SimpleWindow | operator= (const SimpleWindow &NewWindow) |
| Displays an alert box and terminates the program.
|
WindowStatus | Open () |
| Creates the graphical window and displays it.
|
WindowStatus | Close () |
| Stops the timer if it is active, destroys the window, and removes it from the display.
|
WindowStatus | GetStatus () const |
| Returns the status of the window.
|
void | DrawBitMap (const Pixmap &PixelMap, const Position &UpperLeft, const Position &Size) |
| Draws a bitmap in the window.
|
void | Erase (const Position &UpperLeft, float Width, float Height) |
| Draws a rectangle to cover up something in the window.
|
void | RenderRectangle (const Position &UpperLeft, const Position &LowerRight, const color &FillColor, const bool Border=false) |
| Draws a rectangle with a black border.
|
void | RenderLine (const Position &Base, const Position &Endpoint, const color &Color, const float LineWidth) |
| Draws a line.
|
void | RenderEllipse (const Position &UpperLeft, const Position &LowerRight, const color &FillColor, const bool Border=false) |
| Draws an ellipse with a black border.
|
void | RenderPolygon (const Position PolyPoints[], int NbrPoints, const color &FillColor, const bool Border=false) |
| Draws a polygon with a black border - Parameters: -# The first parameter specifies an array of logical locations that make up the vertices of the polygon.
|
void | RenderPolygon (const vector< Position > &PolyPoints, int NPoints, const color &Color, const bool Border=false) |
| Draws a polygon with a black border.
|
void | RenderText (const Position LabelCenter, const string &Message=DefaultMessage, const color &TextColor=Black, const color &BackgroundColor=DefaultColor) |
| Draws text.
|
void | RenderText (const Position LabelCenter, const char *Message=DefaultMessage.c_str(), const color &TextColor=Black, const color &BackgroundColor=DefaultColor) |
void | RenderText (const Position &UpperLeft, const Position &LowerRight, const string &Message=DefaultMessage, const color &TextColor=Black, const color &BackgroundColor=DefaultColor) |
| Draws text.
|
void | RenderText (const Position &UpperLeft, const Position &LowerRight, const char *Message=DefaultMessage.c_str(), const color &TextColor=Black, const color &BackgroundColor=DefaultColor) |
void | Message (const string &Message=DefaultMessage) |
| Generates an alert box with the message passed as a parameter.
|
float | GetWidth () const |
| Returns the logical width of the window.
|
float | GetHeight () const |
| Returns the logical height of the window.
|
float | GetXPosition () const |
| Returns the logical x coordinate of the upper left corner of the window.
|
float | GetYPosition () const |
| Returns the logical y coordinate of the upper left corner of the window.
|
Position | GetCenter () const |
| Returns the logical position of the center of the window.
|
Position | GetPosition () const |
| Returns the logical position of the upper left corner of the window.
|
bool | StartTimer (int Interval) |
| Starts the interval timer associated with this window.
|
void | StopTimer () |
| Stops the interval timer associated with this window.
|
void | SetQuitCallback (const QuitCallbackFunction &Callback) |
| Sets the function that will be called when the window is closed.
|
void | SetTimerCallback (const TimerTickCallbackFunction &Callback) |
| Sets the function that will be called when the timer expires.
|
void | SetRefreshCallback (const RefreshCallbackFunction &Callback) |
| Sets the function that will be called when the window is damaged.
|
void | SetMouseClickCallback (const MouseClickCallbackFunction &Callback) |
| Sets the function that will be called when a mouse click occurs.
|
Protected Methods |
virtual Bool | QuitEvent () |
| Calls the function associated with the window closing.
|
virtual Bool | RefreshEvent () |
| Calls the function assoicated with the window being exposed.
|
virtual Bool | TimerEvent () |
| Calls the function associated with the timer expiring.
|
virtual Bool | MouseClickEvent (const Position &MousePosn) |
| Calls the function associated with mouse clicks.
|
Private Methods |
void | CheckTimer () |
void | ConfigureEvent (const XEvent &Report) |
Private Attributes |
Window | window |
Pixmap | ScreenBuffer |
string | Title |
WindowStatus | WinStatus |
RefreshCallbackFunction | RefreshCallback |
QuitCallbackFunction | QuitCallback |
TimerTickCallbackFunction | TimerCallback |
MouseClickCallbackFunction | MouseClickCallback |
Bool | TimerActive |
unsigned long int | AlarmTime |
long | OldTime |
int | WinX |
int | WinY |
int | WinWidth |
int | WinHeight |
float | LogX |
float | LogY |
float | LogWidth |
float | LogHeight |
Friends |
class | WindowManager |