win_base Class Reference

Common properties for each win_base's object. More...

#include <win_base.h>

Inheritance diagram for win_base:

Inheritance graph
[legend]
Collaboration diagram for win_base:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 win_base ()
 Default constructor:
  • not visible
  • x,y equals to 0
  • not focus
  • not activate
  • not brightness
  • not transluency
  • can be selected
  • alignement is ALIGN_NONE.

s_int16 x () const
 Return the relative horizontal position of the win_*.
s_int16 y () const
 Return the relative vertical position of the win_*.
s_int16 & pad_x ()
 Return the pad horizontal position of the win_*.
s_int16 & pad_y ()
 Return the pad vertical position of the win_*.
s_int16 real_x () const
 Return the horizontal position of the win_*.
s_int16 real_y () const
 Return the vertical position of the win_*.
virtual void move (s_int16 tx, s_int16 ty)
 Move the win_*.
virtual void resize (u_int16 tl, u_int16 th)
 Rezise the win_*.
bool is_visible () const
 Test if win_* is visible.
void set_visible (const bool b)
 Set the visible parameter.
bool is_activate () const
 Test if win_* is activated.
void set_activate (const bool b)
 Set the activate parameter When a win_* is setup on, the keys queue is cleared.
bool is_focus () const
 Test if win_* has focus on.
void set_focus (const bool b)
 Set the focus parameter.
bool is_trans () const
 Test if win_* has focus on.
virtual void set_trans (const bool b)
 Set the transluency parameter.
bool is_brightness () const
 Test if win_* is in brightness.
virtual void set_brightness (const bool b)
 Set the transluency parameter.
void set_align (const u_int8 a)
 Set alignement of win_*.
u_int8 align () const
 Return alignment of win_*.
bool is_can_be_selected () const
 Test if win_* can be selected.
void set_can_be_selected (const bool b)
 Set the object to be selected A win_obj can be selectable or not when it is inside a win_select.
virtual bool update ()
 Update process.
virtual bool draw ()
 Draw process.
virtual bool input_update ()
 Input Update process @.
void set_manager (win_manager *)

Static Public Attributes

static const u_int8 ALIGN_NONE = 0
static const u_int8 ALIGN_LEFT = 1
static const u_int8 ALIGN_CENTER = 2
static const u_int8 ALIGN_RIGHT = 3

Protected Member Functions

virtual void update_position ()
void update_align ()
void set_container (win_container *wc)

Protected Attributes

s_int16 x_
s_int16 y_
s_int16 pad_x_
s_int16 pad_y_
u_int8 align_
bool visible_
bool focus_
bool activate_
bool brightness_
bool trans_
bool can_be_selected_
win_container * wb_father_
win_managermanager_

Friends

class win_container
class win_scroll
class win_select


Detailed Description

Common properties for each win_base's object.

Bug:
It's currently impossible to render a windowed object anywhere else than the screen. Windows should be capable of being assigned a target parameter, which is a pointer to the surface they should be drawn.

Definition at line 47 of file win_base.h.


Constructor & Destructor Documentation

win_base::win_base (  ) 

Default constructor:

  • not visible
  • x,y equals to 0
  • not focus
  • not activate
  • not brightness
  • not transluency
  • can be selected
  • alignement is ALIGN_NONE.

Definition at line 20 of file win_base.cc.


Member Function Documentation

s_int16 win_base::x (  )  const [inline]

Return the relative horizontal position of the win_*.

Returns:
horizontal position of the win_*.

Reimplemented from drawing_area.

Definition at line 68 of file win_base.h.

s_int16 win_base::y (  )  const [inline]

Return the relative vertical position of the win_*.

Returns:
vertical position of the win_*.

Reimplemented from drawing_area.

Definition at line 76 of file win_base.h.

s_int16& win_base::pad_x (  )  [inline]

Return the pad horizontal position of the win_*.

Returns:
the pad horizontal position of the win_*.

Definition at line 84 of file win_base.h.

s_int16& win_base::pad_y (  )  [inline]

Return the pad vertical position of the win_*.

Returns:
the pad vertical position of the win_*.

Definition at line 92 of file win_base.h.

s_int16 win_base::real_x (  )  const [inline]

Return the horizontal position of the win_*.

Returns:
the horizontal position of the win_*.

Definition at line 100 of file win_base.h.

s_int16 win_base::real_y (  )  const [inline]

Return the vertical position of the win_*.

Returns:
the vertical position of the win_*.

Definition at line 108 of file win_base.h.

void win_base::move ( s_int16  tx,
s_int16  ty 
) [virtual]

Move the win_*.

Parameters:
tx new horizontal position.
ty new vertical position.

Reimplemented from drawing_area.

Definition at line 71 of file win_base.cc.

void win_base::resize ( u_int16  tl,
u_int16  th 
) [virtual]

Rezise the win_*.

Parameters:
tl new horizontal position.
th new vertical position.

Reimplemented from drawing_area.

Definition at line 81 of file win_base.cc.

bool win_base::is_visible (  )  const [inline]

Test if win_* is visible.

Returns:
true if visible else false

Definition at line 129 of file win_base.h.

void win_base::set_visible ( const bool  b  )  [inline]

Set the visible parameter.

Parameters:
b true if the win_* should be visible, false otherwise

Definition at line 136 of file win_base.h.

bool win_base::is_activate (  )  const [inline]

Test if win_* is activated.

Returns:
true if activate else false

Definition at line 143 of file win_base.h.

void win_base::set_activate ( const bool  b  )  [inline]

Set the activate parameter When a win_* is setup on, the keys queue is cleared.

Parameters:
b true if the win_* should be visible, false otherwise

Definition at line 152 of file win_base.h.

bool win_base::is_focus (  )  const [inline]

Test if win_* has focus on.

Returns:
true if focus on else false

Definition at line 159 of file win_base.h.

void win_base::set_focus ( const bool  b  )  [inline]

Set the focus parameter.

Parameters:
b true if the win_* should be focus on, false otherwise

Definition at line 166 of file win_base.h.

bool win_base::is_trans (  )  const [inline]

Test if win_* has focus on.

Returns:
true if focus on else false

Definition at line 173 of file win_base.h.

virtual void win_base::set_trans ( const bool  b  )  [inline, virtual]

Set the transluency parameter.

Parameters:
b true if the win_* should be ins transluency, false otherwise

Definition at line 180 of file win_base.h.

bool win_base::is_brightness (  )  const [inline]

Test if win_* is in brightness.

Returns:
true if in brightness else false

Definition at line 187 of file win_base.h.

virtual void win_base::set_brightness ( const bool  b  )  [inline, virtual]

Set the transluency parameter.

Parameters:
b true if the win_* should be in transluency, false otherwise

Definition at line 194 of file win_base.h.

void win_base::set_align ( const u_int8  a  )  [inline]

Set alignement of win_*.

Parameters:
a can be, ALIGN_NONE, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT

Definition at line 201 of file win_base.h.

u_int8 win_base::align (  )  const [inline]

Return alignment of win_*.

Returns:
align_ parameter

Definition at line 208 of file win_base.h.

bool win_base::is_can_be_selected (  )  const [inline]

Test if win_* can be selected.

Returns:
true if it can be selected, false otherwise

Definition at line 214 of file win_base.h.

void win_base::set_can_be_selected ( const bool  b  )  [inline]

Set the object to be selected A win_obj can be selectable or not when it is inside a win_select.

Parameters:
b true if the object can be selected inside a win_select., false otherwise

Definition at line 222 of file win_base.h.

bool win_base::update (  )  [virtual]

Update process.

Returns:
true if update is successful, false otherwise

Reimplemented in data_screen, dialog_screen, and text_bubble.

Definition at line 90 of file win_base.cc.

bool win_base::draw (  )  [virtual]

Draw process.

Returns:
true if draw is successful, false otherwise

Definition at line 107 of file win_base.cc.

bool win_base::input_update (  )  [virtual]

Input Update process @.

Definition at line 102 of file win_base.cc.


The documentation for this class was generated from the following files:

Generated on Sun Mar 1 09:57:16 2009 for Adonthell by  doxygen 1.5.8