DialogBox Class Reference
[2D Graphical User Inteface]

Master DialogBox Class

This class is a virtual class. You need to use a class which inherit from it to do a dialogbox. More...

#include <DialogBox.hh>

Inheritance diagram for DialogBox:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DialogBox (const uint x, const uint y, const uint w, const uint h, SDL_Surface *screen, const string filename)
ushort mousebuttonup ()
 Method to do an action when the mouse button is up.
virtual ushort mousebuttondown (const uint mousex, const uint mousey)
 Virtual Method to do an action when the mouse button is down.
ushort mousemotion (const uint mousex, const uint mousey, const uint xrel, const uint yrel)
 Method to do an action when the mouse is moved.
void mousemotion (const uint mousex, const uint mousey)
 virtual method to do something when the mouse is moved
virtual void draw ()=0
 Virtual Method to draw the dialogbox.
void addButton (ImageButton *new_button)
 Method to add a button in button list.
ushort getnbButton ()
 Method to return the number of buttons in list_button.

Protected Member Functions

void refresh ()
 Method to redraw the dialogbox.
void erase ()
 Method to erase dialogbox.
ushort insidetitle (const uint mx, const uint my)

Protected Attributes

SDL_Surface * dialog_box_surf_sav
SDL_Surface * image
vector< ImageButton * > list_button
bool move_dialog

Detailed Description

Master DialogBox Class

This class is a virtual class. You need to use a class which inherit from it to do a dialogbox.

Author:
poltuiu
Date:
2006-03-15


Member Function Documentation

void DialogBox::addButton ( ImageButton new_button  ) 

Method to add a button in button list.

Parameters:
new_button is the button to add

void DialogBox::erase (  )  [protected]

Method to erase dialogbox.

replace dialogbox clip by previous sav screen

Reimplemented from Widget.

ushort DialogBox::insidetitle ( const uint  mx,
const uint  my 
) [protected]

Parameters:
mx is the mouse pointer x coordinate
my is the mouse pointer y coordinate
Returns:
1 if in and 0 else

ushort DialogBox::mousebuttondown ( const uint  mousex,
const uint  mousey 
) [virtual]

Virtual Method to do an action when the mouse button is down.

Parameters:
mousex is the mouse pointer x coordinate
mousey is the mouse pointer y coordinate
Returns:
1 if do something, 0 else

Reimplemented from Widget.

Reimplemented in DInfo.

ushort DialogBox::mousebuttonup (  ) 

Method to do an action when the mouse button is up.

Returns:
1 if do something, 0 else

void DialogBox::mousemotion ( const uint  mousex,
const uint  mousey 
) [inline, virtual]

virtual method to do something when the mouse is moved

Parameters:
mousex is the mouse pointer x coordinate
mousey is the mouse pointer y coordinate

Implements Widget.

ushort DialogBox::mousemotion ( const uint  mousex,
const uint  mousey,
const uint  xrel,
const uint  yrel 
)

Method to do an action when the mouse is moved.

Note:
this function has twho way :
  • if the dialogbox is in move mode, then move it
  • if not, look at if its widgets must react
Parameters:
mousex is the mouse pointer x coordinate
mousey is the mouse pointer y coordinate
xrel is the relative motion in x direction
yrel is the relative motion in y direction
Returns:
1 if do something, 0 else


The documentation for this class was generated from the following files:
Generated on Sat Jun 23 16:10:19 2007 for Stechec/TBT by  doxygen 1.4.7