The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gui::dialog_textbox Class Reference

#include <construct_dialog.hpp>

Inheritance diagram for gui::dialog_textbox:
Inheritance graph

Public Member Functions

 dialog_textbox (label *const label_widget, CVideo &video, int width, const std::string &text="", bool editable=true, size_t max_size=256, int font_size=font::SIZE_PLUS, double alpha=0.4, double alpha_focus=0.2)
 
virtual ~dialog_textbox ()
 
labelget_label () const
 
sdl_handler_vector handler_members ()
 
- Public Member Functions inherited from gui::textbox
 textbox (CVideo &video, int width, const std::string &text="", bool editable=true, size_t max_size=256, int font_size=font::SIZE_PLUS, double alpha=0.4, double alpha_focus=0.2, const bool auto_join=true)
 
virtual ~textbox ()
 
const std::string text () const
 
void set_text (const std::string &text, const SDL_Color &color=font::NORMAL_COLOR)
 
void append_text (const std::string &text, bool auto_scroll=false, const SDL_Color &color=font::NORMAL_COLOR)
 
void clear ()
 
void set_selection (const int selstart, const int selend)
 
void set_cursor_pos (const int cursor_pos)
 
void set_editable (bool value)
 
bool editable () const
 
int font_size () const
 
void set_font_size (int fs)
 
void scroll_to_bottom ()
 
void set_wrap (bool val)
 
void set_edit_target (textbox *target)
 
- Public Member Functions inherited from gui::scrollarea
 scrollarea (CVideo &video, bool auto_join=true)
 Create a zone with automatic handling of scrollbar. More...
 
virtual void hide (bool value=true)
 
- Public Member Functions inherited from gui::widget
SDL_Rect const & location () const
 
virtual void set_location (SDL_Rect const &rect)
 
void set_location (int x, int y)
 
void set_width (int w)
 
void set_height (int h)
 
void set_measurements (int w, int h)
 
int width () const
 
int height () const
 
bool focus (const SDL_Event *event)
 
void set_focus (bool focus)
 
bool hidden () const
 
virtual void enable (bool new_val=true)
 
bool enabled () const
 
void set_clip_rect (const SDL_Rect &rect)
 
void set_volatile (bool val=true)
 
void set_dirty (bool dirty=true)
 
bool dirty () const
 
const std::stringid () const
 
void set_id (const std::string &id)
 
void set_help_string (const std::string &str)
 
void set_tooltip_string (const std::string &str)
 
virtual void process_help_string (int mousex, int mousey)
 
virtual void process_tooltip_string (int mousex, int mousey)
 
- Public Member Functions inherited from events::sdl_handler
virtual void join ()
 
virtual void join (context &c)
 
virtual void join_same (sdl_handler *parent)
 
virtual void leave ()
 
virtual void join_global ()
 
virtual void leave_global ()
 

Private Member Functions

 dialog_textbox (const dialog_textbox &)
 
void operator= (const dialog_textbox &)
 

Private Attributes

labellabel_
 

Additional Inherited Members

- Protected Member Functions inherited from gui::textbox
virtual void draw_contents ()
 
virtual void update_location (SDL_Rect const &rect)
 
virtual void set_inner_location (SDL_Rect const &)
 
virtual void scroll (unsigned int pos)
 
- Protected Member Functions inherited from gui::scrollarea
virtual void process_event ()
 
SDL_Rect inner_location () const
 
unsigned scrollbar_width () const
 
unsigned get_position () const
 
unsigned get_max_position () const
 
void set_position (unsigned pos)
 
void adjust_position (unsigned pos)
 
void move_position (int dep)
 
void set_shown_size (unsigned h)
 
void set_full_size (unsigned h)
 
void set_scroll_rate (unsigned r)
 
bool has_scrollbar () const
 
- Protected Member Functions inherited from gui::widget
 widget (widget const &o)
 
 widget (CVideo &video, const bool auto_join=true)
 
virtual ~widget ()
 
void bg_register (SDL_Rect const &rect)
 
void bg_restore () const
 
void bg_restore (SDL_Rect const &rect) const
 
void bg_update ()
 
void bg_cancel ()
 
CVideovideo () const
 
virtual void draw ()
 
const SDL_Rect * clip_rect () const
 
virtual sdl_handler_vector member_handlers ()
 
virtual void handle_window_event (SDL_Event const &event)
 
bool mouse_locked () const
 
void aquire_mouse_lock ()
 
void free_mouse_lock ()
 
- Protected Member Functions inherited from events::sdl_handler
 sdl_handler (const bool auto_join=true)
 
virtual ~sdl_handler ()
 
- Protected Attributes inherited from gui::widget
bool focus_
 

Detailed Description

Definition at line 94 of file construct_dialog.hpp.

Constructor & Destructor Documentation

gui::dialog_textbox::dialog_textbox ( label *const  label_widget,
CVideo video,
int  width,
const std::string text = "",
bool  editable = true,
size_t  max_size = 256,
int  font_size = font::SIZE_PLUS,
double  alpha = 0.4,
double  alpha_focus = 0.2 
)
inline

Definition at line 96 of file construct_dialog.hpp.

gui::dialog_textbox::~dialog_textbox ( )
virtual

Definition at line 68 of file construct_dialog.cpp.

References label_.

gui::dialog_textbox::dialog_textbox ( const dialog_textbox )
private

Member Function Documentation

label* gui::dialog_textbox::get_label ( ) const
inline
sdl_handler_vector gui::dialog_textbox::handler_members ( )
inlinevirtual

Reimplemented from gui::scrollarea.

Definition at line 104 of file construct_dialog.hpp.

References h, gui::scrollarea::handler_members(), and label_.

void gui::dialog_textbox::operator= ( const dialog_textbox )
private

Member Data Documentation

label* gui::dialog_textbox::label_
private

Definition at line 114 of file construct_dialog.hpp.

Referenced by get_label(), handler_members(), and ~dialog_textbox().


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