![]() |
![]() |
Particular types of attributes derive this class. It holds the range in which the value in the type-specific part of the attribute applies.
Attributed text is used in a number of places in pango. It is used as the input to the itemization process and also when creating a Pango::Layout.
Public Member Functions | |
Attribute (PangoAttribute* castitem, bool take_copy=true) | |
Attribute (const Attribute& src) | |
Attribute () | |
Constructs an invalid attribute. | |
bool | equal (const Attribute& attr2) const |
Compare two attributes for equality. | |
unsigned int | get_end_index () const |
Gets the end index of the range. | |
unsigned int | get_start_index () const |
Gets the start index of the range. | |
AttrType | get_type () const |
Gets the type ID for this attribute. | |
PangoAttribute* const | gobj () const |
Provides access to the underlying C GObject. | |
PangoAttribute* | gobj () |
Provides access to the underlying C GObject. | |
Attribute& | operator= (const Attribute& src) |
void | set_end_index (const unsigned int& value) |
Sets the end index of the range. | |
void | set_start_index (const unsigned int& value) |
Sets the start index of the range. | |
~Attribute () | |
Static Public Member Functions | |
static AttrColor | create_attr_background (guint16 red, guint16 green, guint16 blue) |
Create a new background color attribute. | |
static AttrString | create_attr_family (const Glib::ustring& family) |
Create a new font family attribute. | |
static AttrFontDesc | create_attr_font_desc (const FontDescription& desc) |
Create a new font description attribute. | |
static AttrColor | create_attr_foreground (guint16 red, guint16 green, guint16 blue) |
Create a new foreground color attribute. | |
static AttrLanguage | create_attr_language (const Language& language) |
Create a new language tag attribute. | |
static AttrInt | create_attr_rise (int rise) |
Create a new baseline displacement attribute. | |
static AttrFloat | create_attr_scale (double scale_factor) |
Create a new font size scale attribute. | |
static AttrShape | create_attr_shape (const Rectangle& ink_rect, const Rectangle& logical_rect) |
Create a new shape attribute. | |
static AttrInt | create_attr_size (int size) |
Create a new font-size attribute. | |
static AttrInt | create_attr_stretch (Stretch stretch) |
Create a new font stretch attribute. | |
static AttrInt | create_attr_strikethrough (bool strikethrough) |
Create a new font strike-through attribute. | |
static AttrInt | create_attr_style (Style style) |
Create a new font slant style attribute. | |
static AttrInt | create_attr_underline (Underline underline) |
Create a new underline-style object. | |
static AttrInt | create_attr_variant (Variant variant) |
Create a new font variant attribute (normal or small caps). | |
static AttrInt | create_attr_weight (Weight weight) |
Create a new font weight attribute. | |
static AttrType | register_type (const Glib::ustring& name) |
Allocate a new attribute type ID. | |
Protected Attributes | |
PangoAttribute* | gobject_ |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const Attribute& lhs, const Attribute& rhs) |
bool | operator== (const Attribute& lhs, const Attribute& rhs) |
Pango::Attribute | wrap (PangoAttribute* object, bool take_copy=false) |
|
Constructs an invalid attribute.
|
|
|
|
|
|
|
|
Create a new background color attribute.
|
|
Create a new font family attribute.
|
|
Create a new font description attribute. This attribute allows setting family, style, weight, variant, stretch, and size simultaneously.
|
|
Create a new foreground color attribute.
|
|
Create a new language tag attribute.
|
|
Create a new baseline displacement attribute.
|
|
Create a new font size scale attribute. The base font for the affected text will have its size multiplied by scale_factor.
|
|
Create a new shape attribute. A shape is used to impose a particular ink and logical rect on the result of shaping a particular glyph. This might be used, for instance, for embedding a picture or a widget inside a PangoLayout.
|
|
Create a new font-size attribute.
|
|
Create a new font stretch attribute.
|
|
Create a new font strike-through attribute.
|
|
Create a new font slant style attribute.
|
|
Create a new underline-style object.
|
|
Create a new font variant attribute (normal or small caps).
|
|
Create a new font weight attribute.
|
|
Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
|
|
Gets the end index of the range. The character at this index is not included in the range.
|
|
Gets the start index of the range.
|
|
Gets the type ID for this attribute.
|
|
Provides access to the underlying C GObject.
Reimplemented in Pango::AttrString, Pango::AttrLanguage, Pango::AttrColor, Pango::AttrInt, Pango::AttrFloat, Pango::AttrFontDesc, and Pango::AttrShape. |
|
Provides access to the underlying C GObject.
Reimplemented in Pango::AttrString, Pango::AttrLanguage, Pango::AttrColor, Pango::AttrInt, Pango::AttrFloat, Pango::AttrFontDesc, and Pango::AttrShape. |
|
|
|
Allocate a new attribute type ID.
|
|
Sets the end index of the range. The character at this index is not included in the range.
|
|
Sets the start index of the range.
|
|
|
|
|
|
|
|
|