A text object is drawn such that the shape's (x,y) coordinate defines the lower-left corner of the text area. More...
#include <text.h>
Public Member Functions | |
PAPYRUS_DRAWABLE (Text) | |
virtual | ~Text () |
const Glib::ustring & | font_family () |
Cairo::FontSlant | font_slant () |
Cairo::FontWeight | font_weight () |
void | set_font_face (const Glib::ustring &family, Cairo::FontSlant slant, Cairo::FontWeight weight) |
const Cairo::FontOptions & | font_options () |
void | set_font_options (const Cairo::FontOptions &font_options) |
double | size () |
void | set_size (double) |
Glib::ustring | text () const |
void | set_text (const Glib::ustring) |
virtual void | draw_shape (Context &cairo) const |
sigc::signal< void > | signal_text () |
sigc::signal< void > | signal_font () |
Static Public Member Functions | |
static Text::pointer | create (const Glib::ustring &text=Glib::ustring(), double size=12.0, const Glib::ustring &family=Glib::ustring(), Cairo::FontSlant slant=Cairo::FONT_SLANT_NORMAL, Cairo::FontWeight weight=Cairo::FONT_WEIGHT_NORMAL, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
static Text::pointer | create (const Glib::ustring &id, const Glib::ustring &text=Glib::ustring(), double size=12.0, const Glib::ustring &family=Glib::ustring(), Cairo::FontSlant slant=Cairo::FONT_SLANT_NORMAL, Cairo::FontWeight weight=Cairo::FONT_WEIGHT_NORMAL, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Protected Member Functions | |
Text (const Glib::ustring &id, const Glib::ustring &text, double size, const Glib::ustring &family, Cairo::FontSlant slant, Cairo::FontWeight weight, Fill::pointer fill, Stroke::pointer stroke) | |
Protected Attributes | |
Glib::ustring | m_text |
double | m_size |
Glib::ustring | m_family |
Cairo::FontSlant | m_slant |
Cairo::FontWeight | m_weight |
Cairo::FontOptions | m_font_options |
sigc::signal< void > | m_signal_text |
sigc::signal< void > | m_signal_font |
A text object is drawn such that the shape's (x,y) coordinate defines the lower-left corner of the text area.
Text
Papyrus::Text::Text | ( | const Glib::ustring & | id, | |
const Glib::ustring & | text, | |||
double | size, | |||
const Glib::ustring & | family, | |||
Cairo::FontSlant | slant, | |||
Cairo::FontWeight | weight, | |||
Fill::pointer | fill, | |||
Stroke::pointer | stroke | |||
) | [protected] |
Papyrus::Text::~Text | ( | ) | [virtual] |
Text::pointer Papyrus::Text::create | ( | const Glib::ustring & | id, | |
const Glib::ustring & | text = Glib::ustring() , |
|||
double | size = 12.0 , |
|||
const Glib::ustring & | family = Glib::ustring() , |
|||
Cairo::FontSlant | slant = Cairo::FONT_SLANT_NORMAL , |
|||
Cairo::FontWeight | weight = Cairo::FONT_WEIGHT_NORMAL , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
References PAPYRUS_CREATE.
Text::pointer Papyrus::Text::create | ( | const Glib::ustring & | text = Glib::ustring() , |
|
double | size = 12.0 , |
|||
const Glib::ustring & | family = Glib::ustring() , |
|||
Cairo::FontSlant | slant = Cairo::FONT_SLANT_NORMAL , |
|||
Cairo::FontWeight | weight = Cairo::FONT_WEIGHT_NORMAL , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
References PAPYRUS_CREATE.
void Papyrus::Text::draw_shape | ( | Context & | cairo | ) | const [virtual] |
Implements Papyrus::Shape.
References m_family, m_font_options, m_size, m_slant, m_text, and m_weight.
const Glib::ustring & Papyrus::Text::font_family | ( | ) |
References m_family.
const Cairo::FontOptions & Papyrus::Text::font_options | ( | ) |
References m_font_options.
Cairo::FontSlant Papyrus::Text::font_slant | ( | ) |
References m_slant.
Cairo::FontWeight Papyrus::Text::font_weight | ( | ) |
References m_weight.
Papyrus::Text::PAPYRUS_DRAWABLE | ( | Text | ) |
void Papyrus::Text::set_font_face | ( | const Glib::ustring & | family, | |
Cairo::FontSlant | slant, | |||
Cairo::FontWeight | weight | |||
) |
References m_family, m_signal_font, m_slant, m_weight, and Papyrus::Shape::shape_changed().
void Papyrus::Text::set_font_options | ( | const Cairo::FontOptions & | font_options | ) |
References m_font_options, m_signal_font, and Papyrus::Shape::shape_changed().
void Papyrus::Text::set_size | ( | double | size | ) |
References m_signal_font, m_size, and Papyrus::Shape::shape_changed().
void Papyrus::Text::set_text | ( | const Glib::ustring | text | ) |
References m_signal_text, m_text, and Papyrus::Shape::shape_changed().
sigc::signal< void > Papyrus::Text::signal_font | ( | ) |
References m_signal_font.
sigc::signal< void > Papyrus::Text::signal_text | ( | ) |
References m_signal_text.
double Papyrus::Text::size | ( | ) |
References m_size.
Glib::ustring Papyrus::Text::text | ( | ) | const |
References m_text.
Glib::ustring Papyrus::Text::m_family [protected] |
Referenced by draw_shape(), font_family(), and set_font_face().
Cairo::FontOptions Papyrus::Text::m_font_options [protected] |
Referenced by draw_shape(), font_options(), and set_font_options().
sigc::signal<void> Papyrus::Text::m_signal_font [protected] |
Referenced by set_font_face(), set_font_options(), set_size(), and signal_font().
sigc::signal<void> Papyrus::Text::m_signal_text [protected] |
Referenced by set_text(), and signal_text().
double Papyrus::Text::m_size [protected] |
Referenced by draw_shape(), set_size(), and size().
Cairo::FontSlant Papyrus::Text::m_slant [protected] |
Referenced by draw_shape(), font_slant(), and set_font_face().
Glib::ustring Papyrus::Text::m_text [protected] |
Referenced by draw_shape(), set_text(), and text().
Cairo::FontWeight Papyrus::Text::m_weight [protected] |
Referenced by draw_shape(), font_weight(), and set_font_face().