Logo Search packages:      
Sourcecode: adonthell version File versions  Download package

text_bubble Class Reference

#include <text_bubble.h>

Inheritance diagram for text_bubble:

win_base drawing_area drawing_area image image

List of all members.


Detailed Description

Displays neat little text speech bubbles.

This class makes text bubbles designed to stay visible a short amount of time (just enough to be read).

Definition at line 42 of file text_bubble.h.


Public Member Functions

void add_text (const string &str)
void add_text (const string &text)
u_int8 align () const
u_int8 align () const
void assign_drawing_area (const drawing_area *da)
drawing_areaassigned_drawing_area () const
void clear ()
void copy (surface &src)
void copy (const image &src)
void destroy ()
void destroy ()
void destroy ()
void detach_drawing_area ()
void draw (drawing_area *da=NULL)
void draw (drawing_area *da)
bool draw ()
u_int16 height () const
u_int16 height () const
u_int16 height_border ()
u_int16 height_border ()
bool input_update ()
bool is_activate () const
bool is_activate () const
bool is_brightness () const
bool is_brightness () const
bool is_can_be_selected () const
bool is_can_be_selected () const
bool is_focus () const
bool is_focus () const
bool is_trans () const
bool is_trans () const
bool is_visible () const
bool is_visible () const
u_int16 length () const
u_int16 length () const
u_int16 length_border ()
u_int16 length_border ()
void load (char *)
void load (char *, char *)
virtual void move (s_int16 tx, s_int16 ty)
virtual void move (s_int16 tx, s_int16 ty)
void pack ()
s_int16 & pad_x ()
s_int16 & pad_x ()
s_int16 & pad_y ()
s_int16 & pad_y ()
void py_signal_connect (PyObject *pyfunc, int signal, PyObject *args=NULL)
void py_signal_connect (PyObject *pyfunc, int signal, PyObject *args=NULL)
s_int16 real_x () const
s_int16 real_x () const
s_int16 real_y () const
s_int16 real_y () const
u_int16 remaining ()
virtual void resize (u_int16 tl, u_int16 th)
void resize (const u_int16 l, const u_int16 h)
void resize (u_int16 l, u_int16 h)
void set_activate (const bool b)
void set_activate (const bool b)
void set_align (const u_int8 a)
void set_align (const u_int8 a)
void set_auto_refresh (bool b)
void set_background (win_theme &)
void set_background (win_theme &wt)
void set_background (win_background &)
void set_border (win_theme &wth, u_int8 size=win_border::NORMAL)
void set_border (win_theme &wth, u_int8 size=win_border::NORMAL)
void set_border (win_border &)
void set_brightness (bool b)
void set_brightness_background (bool b)
void set_brightness_background (bool b)
void set_brightness_border (bool b)
void set_brightness_border (bool b)
void set_callback_destroy (const Functor0wRet< bool > &func)
void set_callback_quit (const Functor1< int > &func)
void set_can_be_selected (const bool b)
void set_can_be_selected (const bool b)
void set_cursor_moveable (const bool b)
void set_cursor_moveable (const bool b)
void set_cursor_visible (const bool b)
void set_cursor_visible (const bool b)
void set_focus (const bool b)
void set_focus (const bool b)
void set_font (win_font &font)
void set_font (win_font &font)
void set_form (const u_int8)
void set_form (const u_int8 form)
void set_manager (win_manager *)
void set_return_code (int rc)
void set_return_code (int rc)
void set_signal_connect (const Functor0 &func, u_int8 signal)
void set_text (string str)
void set_text (const string &text)
void set_trans (bool b)
void set_trans_background (bool b)
void set_trans_background (bool b)
void set_trans_border (bool b)
void set_trans_border (bool b)
void set_visible (const bool b)
void set_visible (const bool b)
void set_visible_background (bool b)
void set_visible_background (bool b)
void set_visible_border (bool b)
void set_visible_border (bool b)
SDL_Rect setup_rects () const
 text_bubble (const string &text, const string &textcolor, const string &themename, u_int16 len=110)
const char * text_char ()
const char * text_char () const
const string & text_string ()
const string text_string () const
bool update ()
s_int16 x () const
s_int16 x () const
s_int16 y () const
s_int16 y () const
 ~text_bubble ()
Settings.
These methods sets the parameters of the surface.

u_int8 alpha () const
bool is_dbl_mode () const
bool is_masked () const
void set_alpha (u_int8 a)
void set_dbl_mode (bool mode)
void set_mask (bool m)
Special FX Methods.
Allows you to put fantasy in your image manipulations! Can eventually even be usefull...

void brightness (const surface &src, u_int8 cont, bool proceed_mask=false)
void tile (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
void tile (const surface &src)
void tile_to (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
void zoom (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
void zoom (const surface &src)
void zoom_to (const surface &src, u_int16 l, u_int16 h, u_int16 x=0, u_int16 y=0)
Drawing Methods.
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
void draw (s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const
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
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)
void fillrect (s_int16 x, s_int16 y, u_int16 l, u_int16 h, u_int32 col, drawing_area *da_opt=NULL)
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)
Loading / Saving Methods.
These methods allows you to load and save an image in different formats.

s_int8 get (igzstream &file)
s_int8 get_pnm (SDL_RWops *file)
s_int8 get_raw (igzstream &file)
s_int8 load (string fname)
s_int8 load_pnm (string fname)
s_int8 load_raw (string fname)
s_int8 put (ogzstream &file) const
s_int8 put_pnm (SDL_RWops *file) const
s_int8 put_raw (ogzstream &file) const
s_int8 save (string fname) const
s_int8 save_pnm (string fname) const
s_int8 save_raw (string fname) const
Pixel manipulation Methods.
Use these methods to directly and quickly manipulate pixels from a surface.

void get_pix (u_int16 x, u_int16 y, u_int8 &r, u_int8 &g, u_int8 &b) const
void get_pix (u_int16 x, u_int16 y, u_int32 &col) const
void get_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b) const
void lock () const
void put_pix (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b)
void put_pix (u_int16 x, u_int16 y, u_int32 col)
void put_pix_rgb (u_int16 x, u_int16 y, u_int8 r, u_int8 g, u_int8 b)
void unlock () const

Public Attributes

SDL_Surface * vis

Static Public Attributes

static const u_int8 ACTIVATE = 1
static const u_int8 ACTIVATE_KEY = 6
static const u_int8 ALIGN_CENTER = 2
static const u_int8 ALIGN_LEFT = 1
static const u_int8 ALIGN_NONE = 0
static const u_int8 ALIGN_RIGHT = 3
static const u_int8 AUTO_HEIGHT = 1
static const u_int8 AUTO_SIZE = 2
static const u_int8 CLOSE = 14
static const u_int8 DESTROY = 15
static const u_int8 DRAW = 4
static const u_int8 DRAW_ON_VISIBLE = 5
static const SDLKey KEY_CURSOR_NEXT = SDLK_RIGHT
static const SDLKey KEY_CURSOR_PREVIOUS = SDLK_LEFT
static const u_int8 KEYBOARD = 9
static const u_int8 MINI = 0
static const u_int8 NEXT = 12
static const u_int8 NORMAL = 1
static const u_int8 NOTHING = 0
static const u_int8 PREVIOUS = 13
static const u_int8 SCROLL_DOWN = 11
static const u_int8 SCROLL_UP = 10
static const u_int8 SELECT = 7
static const u_int8 UNACTIVATE = 2
static const u_int8 UNSELECT = 8
static const u_int8 UPDATE = 3

Protected Member Functions

void build (const bool erase_all)
void build_form_auto_height ()
void build_form_auto_size ()
void build_form_nothing ()
void check_form ()
void clean_surface (const bool erase_all)
void cursor_draw ()
void cursor_next ()
void cursor_next ()
void cursor_previous ()
void cursor_previous ()
void cursor_undraw ()
void double_size (const surface &src)
void draw_string (const bool at_cursor)
void find_word (u_int16 &begin, u_int16 &length, u_int16 &size_pix)
u_int8 find_word (u_int16 &index, u_int16 &wlength, u_int16 &wlengthpix, const u_int16 rlength)
void form_auto_height ()
void form_auto_size ()
void form_nothing ()
void get_pix_aux (u_int16 x, u_int16 y, u_int32 &col) const
void half_size (const surface &src)
void init_vec_cursor ()
bool last_letter (u_int16 idx)
virtual void on_activate ()
virtual void on_activate ()
virtual void on_activate_key ()
virtual void on_activate_key ()
virtual void on_down ()
virtual void on_down ()
virtual void on_draw ()
virtual void on_draw ()
virtual void on_draw_visible ()
virtual void on_draw_visible ()
virtual void on_next ()
virtual void on_next ()
virtual void on_previous ()
virtual void on_previous ()
virtual void on_select ()
virtual void on_select ()
virtual void on_unactivate ()
virtual void on_unactivate ()
virtual void on_unselect ()
virtual void on_unselect ()
virtual void on_up ()
virtual void on_up ()
virtual void on_update ()
virtual void on_update ()
void put_pix_aux (u_int16 x, u_int16 y, u_int32 col)
void resize_aux (u_int16 l, u_int16 h)
void set_container (win_container *wc)
void set_container (win_container *wc)
void set_height (u_int16 h)
void set_length (u_int16 l)
u_int16 ucd (u_int16 &idx)
void update_align ()
void update_align ()
void update_cursor ()
virtual void update_position ()
virtual void update_position ()
u_int8 word_place (u_int16 &cur_line_size, u_int16 &word_size)

Protected Attributes

bool activate_
u_int8 align_
bool brightness_
Functor0 callback_ [20]
Functor0wRet< bool > callback_destroy_
Functor1< int > callback_quit_
bool can_be_selected_
bool changed
bool cursor_
u_int16 cursor_blink_cur_
u_int16 cursor_cur_blink_
bool cursor_moveable_
u_int16 cursor_pos_
bool cursor_visible_
bool dbl_mode
 double mode
bool focus_
win_font * font_
u_int8 form_
win_managermanager_
bool moveable_cursor_
Scursor my_cursor_
win_font * my_font_
u_int8 my_form_
Scursor my_old_cursor_
string my_text_
vector< Sline_text > my_vect_
string new_text_
s_int16 pad_x_
s_int16 pad_y_
vector< py_callback * > py_callbacks
int return_code_
u_int16 start_line_
string text_
bool text_eot_
u_int16 text_index_begin_
u_int16 text_index_end_
u_int16 text_size_
bool trans_
bool visible_
bool visible_cursor_
win_container * wb_father_
s_int16 x_
s_int16 y_

Static Protected Attributes

static u_int16 cursor_blink_cycle = 75
static u_int16 cursor_blink_speed_

Private Attributes

u_int16 remain

Friends

class win_container
class win_scroll
class win_select

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

Generated by  Doxygen 1.6.0   Back to index