Public Member Functions | Private Member Functions | Private Attributes | Friends

gui2::ttip Class Reference

The tips of day structure. More...

#include <tips.hpp>

Inheritance diagram for gui2::ttip:
Inheritance graph
[legend]
Collaboration diagram for gui2::ttip:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const t_stringtext () const
const t_stringsource () const
 ttip ()
void set_window_id (const std::string &window_id)
void set_message (const t_string &message)
void set_mouse (const tpoint &mouse)

Private Member Functions

 ttip (const t_string &text, const t_string &source, const std::string &unit_filter)
virtual const std::string & window_id () const
 Inherited from tpopup.
void pre_show (CVideo &video, twindow &window)
 Inherited from tpopup.

Private Attributes

t_string text_
 The text of the tip.
t_string source_
 The source of the tip.
std::vector< std::string > unit_filter_
 List of units to filter the tip upon.
std::string window_id_
 The id of the window to use to show the tip.
t_string message_
 The message to show.
tpoint mouse_
 The position of the mouse.

Friends

std::vector< ttiptips::load (const config &)
std::vector< ttiptips::shuffle (const std::vector< ttip > &tips)

Detailed Description

The tips of day structure.

Class to show the tips.

At the moment two kinds of tips are known: * tooltip * helptip

Definition at line 54 of file tips.hpp.


Constructor & Destructor Documentation

gui2::ttip::ttip ( const t_string text,
const t_string source,
const std::string &  unit_filter 
) [private]

Definition at line 21 of file tips.cpp.

References ttip().

Here is the call graph for this function:

gui2::ttip::ttip (  )  [inline]

Definition at line 72 of file tip.cpp.

Referenced by ttip().

Here is the caller graph for this function:


Member Function Documentation

void gui2::ttip::pre_show ( CVideo video,
twindow window 
) [private, virtual]

Inherited from tpopup.

Reimplemented from gui2::tpopup.

Definition at line 114 of file tip.cpp.

References message_, mouse_, gui2::set_label(), gui2::tpoint::x, and gui2::tpoint::y.

Here is the call graph for this function:

void gui2::ttip::set_message ( const t_string message  )  [inline]

Definition at line 85 of file tip.cpp.

References message_.

void gui2::ttip::set_mouse ( const tpoint mouse  )  [inline]

Definition at line 90 of file tip.cpp.

References mouse_.

void gui2::ttip::set_window_id ( const std::string &  window_id  )  [inline]

Definition at line 80 of file tip.cpp.

References window_id_.

const t_string& gui2::ttip::source (  )  const [inline]

Definition at line 59 of file tips.hpp.

References source_.

Referenced by gui2::ttitle_screen::pre_show().

Here is the caller graph for this function:

const t_string& gui2::ttip::text (  )  const [inline]

Definition at line 58 of file tips.hpp.

References text_.

Referenced by gui2::ttitle_screen::pre_show().

Here is the caller graph for this function:

const std::string & gui2::ttip::window_id (  )  const [private, virtual]

Inherited from tpopup.

Implements gui2::tpopup.

Definition at line 122 of file tip.cpp.

References window_id_.


Friends And Related Function Documentation

std::vector<ttip> tips::load ( const config  )  [friend]
std::vector<ttip> tips::shuffle ( const std::vector< ttip > &  tips  )  [friend]

Member Data Documentation

The message to show.

Definition at line 101 of file tip.cpp.

Referenced by pre_show(), and set_message().

The position of the mouse.

Definition at line 104 of file tip.cpp.

Referenced by pre_show(), and set_mouse().

The source of the tip.

Definition at line 72 of file tips.hpp.

Referenced by source().

The text of the tip.

Definition at line 69 of file tips.hpp.

Referenced by text().

std::vector<std::string> gui2::ttip::unit_filter_ [private]

List of units to filter the tip upon.

If the list is empty the tip is shown. Else the unit must have encountered at least one of the units in the list.

Definition at line 81 of file tips.hpp.

std::string gui2::ttip::window_id_ [private]

The id of the window to use to show the tip.

Definition at line 98 of file tip.cpp.

Referenced by set_window_id(), and window_id().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:50 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs