In file uta/programmer.doc:

namespace uta class Widget : public SigC Object, public Rect

Widget Baseclass

Inheritance:


Public Fields

SigC::Signal0 <void> deleted
SigC::Signal0 <void> exposed
SigC::Signal0 <void> hidden
SigC::Signal0 <void> enabled
SigC::Signal0 <void> disabled
SigC::Signal0 <void> gainedMouse
SigC::Signal0 <void> lostMouse
SigC::Signal0 <void> gainedKeyboard
SigC::Signal0 <void> lostKeyboard

Public Methods

Widget()
Widget(Widget* parent, int x, int y, int w, int h)
virtual ~Widget()
void setBackground(const Surface* backgrnd, bool tileIt = true)
Set background image
void setColor(const Color &color)
setting background color.
void setDisabledColor(const Color& color)
to set the background colour when the widget is disabled
void setAlpha(unsigned char)
void setDisabledAlpha(unsigned char)
void setAutoDelete(bool yes)
Set autodelete flag
void setTransparency(bool flag)
virtual void update()
screen update
void show()
show up this widget and itīs childs.
void hide()
hide this widget and itīs childs.
void close()
close this widget and itīs childs.
void enable()
enable this widget tree
void disable()
disable this widget tree
void forceUpdate(int)
virtual void blit()
just blit to the parentīs surface
bool handleEvent(const Event*)
virtual bool processEvent(const Event*)
bool needsUpdate()
widget content has changed
bool isHidden() const
bool isClosed() const
bool isEnabled() const
bool hasFocus() const
bool isAutoDelete() const
Surface* insertChild(Widget* child)
insert a child widget
void removeChild(Widget* child)
void deParent()
like removeChild, but the other way
Rect getRect()
return geometry
Rect globalCoord(Rect)
convert rect coords to global rect coords
Rect localCoord(Rect)
convert global rect coords to local rect coords
void addUpdateRects(std::list<Rect> &updateRects)
bool releaseFocus()
bool grabFocus()
void setClickToFocus(bool val)
void setPointToFocus(bool val)
void nextFocus()
void prevFocus()

Protected Fields

Widget* parent_
the parent
Rect rect_
destination rectangle
Rect window_
window rect
const Surface* backgrnd_
background image
Surface* surface_
surface buffer
Surface* parentSurface_
destination surface
Surface* backBuffer_
backbuffer
Color color_
background color.
bool haveFocus_
true when the mouse is over this widget
bool drawBackground_
have we got a background surface ?
bool needsUpdate_
true if this widgets needs to be reblitted to itīs parentīs surface
bool needsReblit_
bool hidden_
bool hideRequest_
bool closed_
bool disabled_
bool disableRequest_
bool destroyWidget_
self delete when closing ?
std::list <Widget*> childs_
child list.
std::list <Rect> dirtyRects_
list of dirty rects
bool tileBackground_
bool autoDelete_
shall the widget be deleted, when closed ? default = yes
bool activateOnMouse_
bool activateOnClick_
std::list <Widget*> focusList_
std::list <Widget*> ::iterator currentFocus_
bool mouseFocus_

Protected Methods

virtual void create()
create the widget and childs
virtual void initMembers()
virtual void blit_complete(Surface*)
blit whole widget
virtual void blit_dirty(Surface*)
blit only dirty rects
void createChild()
create child widget
bool acceptsFocus() const

Inherited from Rect:

Public Fields

static Rect invalid
static Rect empty

Public Methods

bool isEmpty() const
bool isValid() const
bool contains( const Point &p ) const
bool contains( const Rect &r ) const
virtual void translate( int dx, int dy )
virtual void warp(const Point &newUpperLeft)
virtual void resize(int w, int h)
Rect unite( const Rect &r ) const
Rect intersect( const Rect &r) const
const Point& upperLeft() const
const Point& lowerRight() const
int width() const
int height() const
friend bool operator==(const Rect &p, const Rect &q)
friend bool operator<(const Rect &p, const Rect &q)
friend ostream& operator<<(ostream& s, const Rect& p)

Protected Fields

Point upperLeft_
Point lowerRight_

Documentation

Widget Baseclass
Widget()

Widget(Widget* parent, int x, int y, int w, int h)

virtual ~Widget()

SigC::Signal0 <void> deleted

SigC::Signal0 <void> exposed

SigC::Signal0 <void> hidden

SigC::Signal0 <void> enabled

SigC::Signal0 <void> disabled

SigC::Signal0 <void> gainedMouse

SigC::Signal0 <void> lostMouse

SigC::Signal0 <void> gainedKeyboard

SigC::Signal0 <void> lostKeyboard

void setBackground(const Surface* backgrnd, bool tileIt = true)
Set background image. The surface is NOT copied. you will have to ensure it is accesible as long as this widget lives. (use Resources...) If tileIt is true, the image will be tiled if the surface is smaller than the widget; otherwise it gets scaled to fit the size.

void setColor(const Color &color)
setting background color.

void setDisabledColor(const Color& color)
to set the background colour when the widget is disabled

void setAlpha(unsigned char)

void setDisabledAlpha(unsigned char)

void setAutoDelete(bool yes)
Set autodelete flag. Normally if a widget gets deleted its constructor automatically deletes all its childs. If the autodelete flag is set false the widget gets not deleted upon its parent's destruction.

void setTransparency(bool flag)

virtual void update()
screen update

void show()
show up this widget and itīs childs.

void hide()
hide this widget and itīs childs.

void close()
close this widget and itīs childs.

void enable()
enable this widget tree

void disable()
disable this widget tree. The widget tree gets greyed and the member ignore any events.

void forceUpdate(int)

virtual void blit()
just blit to the parentīs surface

bool handleEvent(const Event*)

virtual bool processEvent(const Event*)

bool needsUpdate()
widget content has changed. this is called by the mainloop or parentwidget to test, whether this widget or one of itīs childs have to be reblitted.

bool isHidden() const

bool isClosed() const

bool isEnabled() const

bool hasFocus() const

bool isAutoDelete() const

Surface* insertChild(Widget* child)
insert a child widget. this is only to be called from the constructor of a childwidget. it will return the surface the child has to blit its own surface to

void removeChild(Widget* child)

void deParent()
like removeChild, but the other way

Rect getRect()
return geometry

Rect globalCoord(Rect)
convert rect coords to global rect coords

Rect localCoord(Rect)
convert global rect coords to local rect coords

void addUpdateRects(std::list<Rect> &updateRects)

bool releaseFocus()

bool grabFocus()

void setClickToFocus(bool val)

void setPointToFocus(bool val)

void nextFocus()

void prevFocus()

virtual void create()
create the widget and childs. must be overloaded by derived classes to implemented their own grafx, etc. (each derived class may call the baseclassīs create to handle the basic stuff like background painting)

virtual void initMembers()

virtual void blit_complete(Surface*)
blit whole widget. descendants may overwrite this in order to implement special blits. This methode gets called, if the whole widget needs to be redrawn to the screen. The target is usually the screenbuffer.

virtual void blit_dirty(Surface*)
blit only dirty rects. descendants may overwrite this in order to implement special blits. Check dirtyRects to see what parts need to be reblitted. The target is usually the screenbuffer.

Widget* parent_
the parent. if NULL this widget is toplevel

Rect rect_
destination rectangle. the coords are relative to the parentīs coords.

Rect window_
window rect. if local surface is bigger than destination rect; only this window is blitted.

const Surface* backgrnd_
background image. may be NULL

Surface* surface_
surface buffer

Surface* parentSurface_
destination surface. this widgets blits to this surface, whenever show is called

Surface* backBuffer_
backbuffer. stores background of transparent widgets.

Color color_
background color.

bool haveFocus_
true when the mouse is over this widget

bool drawBackground_
have we got a background surface ?

bool needsUpdate_
true if this widgets needs to be reblitted to itīs parentīs surface. a derived widget simply set this to true in order to get redrawn. This is handled completely by the baseclass.

bool needsReblit_

bool hidden_

bool hideRequest_

bool closed_

bool disabled_

bool disableRequest_

bool destroyWidget_
self delete when closing ?

void createChild()
create child widget

std::list <Widget*> childs_
child list.

std::list <Rect> dirtyRects_
list of dirty rects. this is used for faster redrawing; especially if the toplevel- widgets is big and only a small child-widgets needs to be redrawn.

bool tileBackground_

bool autoDelete_
shall the widget be deleted, when closed ? default = yes

bool activateOnMouse_

bool activateOnClick_

std::list <Widget*> focusList_

std::list <Widget*> ::iterator currentFocus_

bool acceptsFocus() const

bool mouseFocus_


Direct child classes:
RootWindow
Movie
ListBox
LineEdit
Label
Dialog

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de