Adonthell  0.4
label_input Class Reference
Inheritance diagram for label_input:
Collaboration diagram for label_input:

List of all members.

Public Member Functions

 label_input ()
 Constructor Initialize to : cursor_moveable, cursor_visible and editable.
void set_editable (const bool)
 Set the label input in editable.
bool input_update ()
 Input update.
- Public Member Functions inherited from label
 label ()
 Constructor by default, cursor is not moveable, cursor is not visible, and the form is set as NOTHING, the default size is (0, 0)
 ~label ()
 Destructor.
void set_font (win_font &font)
 Set the font.
void set_text (const string &text)
 Set the text.
void add_text (const string &text)
 Add text.
void set_form (const u_int8 form)
 Set the form of the display NOTHING, AUTO_SIZE, AUTO_HEIGHT.
void set_cursor_visible (const bool b)
 Set visible cursor.
void set_cursor_moveable (const bool b)
 Set if the cursor can be moved with arrow key.
bool update ()
 Update the label.
const string text_string () const
 Get the text in string.
const char * text_char () const
 Get the text in char.
void resize (u_int16 l, u_int16 h)
 Resize the label.
- Public Member Functions inherited from image
 image ()
 Default constructor.
 image (u_int16 l, u_int16 h, bool mode=true)
 Creates an image with a specified size.
 image (SDL_Surface *s, const SDL_Color &color)
 Create image from SDL_Surface.
 ~image ()
 Destructor.
void clear ()
 Resets the image to it's initial state, that is totally empty.
imageoperator= (const image &src)
 Image copy (similar to copy ()).
void copy (const image &src)
 Synonym of operator = to guarantee its access from Python.
s_int8 get (igzstream &file)
 Loads an image from an opened file, saved in game internal format, with alpha and mask values.
s_int8 load (string fname)
 Loads an image from a file name, in game internal format, with alpha and mask values.
s_int8 get_raw (igzstream &file)
 Loads an image from an opened file, saved in game internal format, without alpha and mask values.
s_int8 load_raw (string fname)
 Loads an image from a file name, in game internal format, without alpha and mask values.
s_int8 get_pnm (SDL_RWops *file)
 Loads an image from an opened file, in PNM format, without alpha and mask values.
s_int8 load_pnm (string fname)
 Loads an image from a file name, in PNM format, without alpha and mask values.
s_int8 put (ogzstream &file) const
 Saves an image into an opened file, in game format, with alpha and mask values.
s_int8 save (string fname) const
 Saves an image into an file, in game format, with alpha and mask values.
s_int8 put_raw (ogzstream &file) const
 Saves an image into an opened file, in game format, without alpha and mask values.
s_int8 save_raw (string fname) const
 Saves an image into an file, in game format, without alpha and mask values.
s_int8 put_pnm (SDL_RWops *file) const
 Saves an image into an opened file, in PNM format, without alpha and mask values.
s_int8 save_pnm (string fname) const
 Saves an image into an file, in PNM format, without alpha and mask values.
void zoom (const surface &src)
 Zooms a surface.
void zoom (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
 Zooms a surface.
void zoom_to (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
 Synonym of zoom () to guarantee its access from Python.
void tile (const surface &src)
 Tiles a surface.
void tile (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
 Tiles a surface.
void tile_to (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
 Synonym of tile () to guarantee its access from Python.
void brightness (const surface &src, u_int8 cont, bool proceed_mask=false)
 Applies a "brightness" to a surface.
- Public Member Functions inherited from surface
 surface (bool mode=true)
 Default constructor.
virtual ~surface ()
 Destructor.
surfaceoperator= (surface &src)
 Surface copy (similar to copy ()).
void copy (surface &src)
 Synonym of operator = to guarantee its access from Python.
bool is_masked () const
 Returns whether a surface is masked or not.
void set_mask (bool m)
 Sets the mask parameter of the surface.
u_int8 alpha () const
 Returns the alpha value of the surface.
void set_alpha (u_int8 a)
 Sets the alpha value of the surface.
bool is_dbl_mode () const
void set_dbl_mode (bool mode)
void draw (s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const
 Draw the surface.
void draw (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area *da_opt=NULL, surface *target=NULL) const
 Draw a part of the surface.
void draw_part (s_int16 x, s_int16 y, s_int16 sx, s_int16 sy, u_int16 sl, u_int16 sh, const drawing_area *da_opt=NULL, surface *target=NULL) const
 Synonym of draw () to guarantee its access from Python.
void fillrect (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int32 col, drawing_area *da_opt=NULL)
 Fills an area of the surface with a given color.
void fillrect (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int8 r, u_int8 g, u_int8 b, drawing_area *da_opt=NULL)
 Fills an area of the surface with a given color.
void fillrect_rgb (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int8 r, u_int8 g, u_int8 b, drawing_area *da_opt=NULL)
 Synonym of fillrect () to guarantee its access from Python.
void lock () const
 Locks the surface.
void unlock () const
 Unlock the surface after you've worked on it's pixels with the get_pix () and put_pix () methods.
void put_pix (u_int16 x, u_int16 y, u_int32 col)
 Puts a pixel of a given color.
void put_pix (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b)
 Puts a pixel of a given color.
void put_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b)
 Synonym of put_pix () to guarantee its access from Python.
void get_pix (u_int16 x, u_int16 y, u_int32 &col) const
 Gets a pixel from the surface.
void get_pix (u_int16 x, u_int16 y, u_int8 &r, u_int8 &g, u_int8 &b) const
 Gets a pixel from a surface.
void get_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) const
 Synonym of get_pix () to guarantee its access from Python.
- Public Member Functions inherited from drawable
 drawable ()
 Default constructor.
virtual ~drawable ()
 Destructor.
u_int16 length () const
 Returns the length of the drawable.
u_int16 height () const
 Returns the height of the drawable.

Protected Attributes

bool editable_
- Protected Attributes inherited from label
win_fontmy_font_
string my_text_
string new_text_
u_int8 my_form_
bool visible_cursor_
bool moveable_cursor_
u_int16 cursor_cur_blink_
Scursor my_cursor_
Scursor my_old_cursor_
vector< Sline_textmy_vect_
u_int16 start_line_

Additional Inherited Members

- Static Public Attributes inherited from label
static const u_int8 NOTHING = 0
static const u_int8 AUTO_HEIGHT = 1
static const u_int8 AUTO_SIZE = 2
static const SDLKey KEY_CURSOR_NEXT = SDLK_RIGHT
static const SDLKey KEY_CURSOR_PREVIOUS = SDLK_LEFT
- Protected Member Functions inherited from label
u_int16 ucd (u_int16 &idx)
void init_vec_cursor ()
 Init vector and cursor, don't erase my_text_.
void build (const bool erase_all)
 Build label.
void build_form_nothing ()
 Build the label when the form set top nothing.
void build_form_auto_height ()
void build_form_auto_size ()
void clean_surface (const bool erase_all)
u_int8 find_word (u_int16 &index, u_int16 &wlength, u_int16 &wlengthpix, const u_int16 rlength)
void draw_string (const bool at_cursor)
void update_cursor ()
void cursor_next ()
void cursor_previous ()
void cursor_draw ()
void cursor_undraw ()
bool last_letter (u_int16 idx)
- Static Protected Attributes inherited from label
static u_int16 cursor_blink_cycle = 75

Detailed Description

Definition at line 20 of file label_input.h.


Constructor & Destructor Documentation

label_input::label_input ( )

Constructor Initialize to : cursor_moveable, cursor_visible and editable.

Definition at line 17 of file label_input.cc.


Member Function Documentation

void label_input::set_editable ( const bool  b)

Set the label input in editable.

Definition at line 24 of file label_input.cc.

bool label_input::input_update ( )
virtual

Input update.

Reimplemented from label.

Definition at line 29 of file label_input.cc.


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