el h / SimpleGUI

Fork of SimpleGUI by Duncan McIntyre

Embed: (wiki syntax)

« Back to documentation index

Widget Class Reference

A basic widget draws itself in a rectangular area. More...

#include <Widget.h>

Inherits EventListener.

Inherited by BitmapWidget, TextWidget, and Window.

Public Member Functions

virtual void setOffset (int x, int y)
 const Rectangle &Widget::outer() { return _outer; }
virtual void setPadding (int pixels)
 Set the amount of padding between the border and a widget edge.
virtual void draw ()
 Cause the widget to redraw itself if is is dirty or damaged.
virtual void handleEvent (Event e)
 Implementation of EventListener.
void dirty ()
 Mark the widget as needing to be redrawn.
virtual void dirtyAll ()
 Mark the widget and all its children as dirty.
void damage ()
 Mark the widget as having changed dimensions or location.
GraphicsDisplay * display ()
 Convenience method.

Protected Member Functions

bool _isEventTarget (Event e)
 Methods to help with event handling.

Detailed Description

A basic widget draws itself in a rectangular area.

Definition at line 15 of file Widget.h.


Member Function Documentation

bool _isEventTarget ( Event  e ) [protected]

Methods to help with event handling.

Definition at line 188 of file Widget.cpp.

void damage (  )

Mark the widget as having changed dimensions or location.

Definition at line 253 of file Widget.cpp.

void dirty (  )

Mark the widget as needing to be redrawn.

Definition at line 235 of file Widget.cpp.

void dirtyAll (  ) [virtual]

Mark the widget and all its children as dirty.

Definition at line 248 of file Widget.cpp.

GraphicsDisplay * display (  )

Convenience method.

Definition at line 274 of file Widget.cpp.

void draw (  ) [virtual]

Cause the widget to redraw itself if is is dirty or damaged.

Definition at line 144 of file Widget.cpp.

void handleEvent ( Event  e ) [virtual]

Implementation of EventListener.

Definition at line 197 of file Widget.cpp.

void setOffset ( int  x,
int  y 
) [virtual]

const Rectangle &Widget::outer() { return _outer; }

const Rectangle &Widget::inner() { return _inner; }

Definition at line 89 of file Widget.cpp.

void setPadding ( int  pixels ) [virtual]

Set the amount of padding between the border and a widget edge.

Definition at line 127 of file Widget.cpp.