Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

uiobject_c Class Reference

generic gui object More...

#include <gui.h>

Inheritance diagram for uiobject_c:

uibutton_c uiedit_c uilabel_c uislider_c uiwindow_c uicheckbutton_c

Public Methods

virtual void add_child (uiobject_c *obj)
 add a child object

virtual void remove_child (uiobject_c *obj)
 remove a child object

virtual void bring_child_to_front (uiobject_c *obj)
 bring a child to top of z order

virtual list_c< uiobject_c > * get_children ()
 get children list

uiobject_c * get_object (ulong id)
 get a specific sub object

uiobject_c * find_mouse_object (ushort mx, ushort my)
 < find mouse object

void draw (image_c *dst)
 draws the object to dst image

void refresh ()
 paint() and draw() subobjects

virtual void paint ()
 fill the object's screenbuffer

virtual void move (sshort x, sshort y)
 move object somewhere else

virtual void resize (ushort w, ushort h)
 change object's size

sshort get_posx ()
 get x position

sshort get_posy ()
 get y position

ushort get_width ()
 get width

ushort get_height ()
 get height

void set_id (ulong i)
 set identifier

ulong get_id ()
 get identifier

void set_visible (bool v)
 show or hide object

bool is_visible ()
 get visibility

void set_enabled (bool e)
 enable or disable object

bool is_enabled ()
 is object enabled?

void set_growth (sshort x, sshort y, sshort w, sshort h)
 set resize params

void set_bgcolor (color_t color)
 set fill color

color_t get_bgcolor ()
 get fill color

void set_style (ulong style)
 set styleflags

ulong get_style ()
 get styleflags

virtual ushort get_cursor ()
 get cursor shape for object

virtual void set_text (const char *txt)
 set object's text

sshort get_screenposx ()
 get objects position in

sshort get_screenposy ()
 screen coordinates

virtual void event (uievent_s *eve)
 send an event to object

virtual const char * get_classname ()
 get class name of object

void set_needs_refresh ()
 refresh object asap


Protected Attributes

font_sfnt
 buffer for the fonts

char * classname
 name of object class

ulong id
 user definable id

sshort posy
 position

ushort height
 and size

image_cimg
 the object's screenbuffer

list_c< uiobject_c > * children
 subobjects

uiobject_c * parent
 parent object (if any)

bool needsrefresh
 need refresh() to be called

bool visible
 the object is visible on screen

bool disabled
 the object doesnt want input

ulong styleflags
 borders etc.

char * text
 text to display

sshort growth [4]
 resizing parameters

color_t bgcolor
 background color

bool movable
 object can be moved (window etc.)

bool mousedrag
 mouse is dragging

slong dragdowny
 begin position of drag

ushort cursor
 cursor shape for this object


Detailed Description

This is a basic gui object. All other objects are based on it

Definition at line 312 of file gui.h.


The documentation for this class was generated from the following files:
Generated on Wed Dec 18 15:48:49 2002 for omicron engine by doxygen1.2.18