Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# text.hh File Reference

An AtkText C++ wrapper interface. More...

`#include <xfc/glib/type.hh>`
`#include <xfc/atk/util.hh>`
`#include <atk/atktext.h>`
`#include <vector>`
`#include <xfc/atk/inline/text.inl>`

## Namespaces

- namespace Xfc
- namespace Xfc::G
- namespace Xfc::Atk

## Classes

- class Xfc::Atk::Attribute
    A AtkAttribute C++ wrapper class. More...
- class Xfc::Atk::TextRectangle
    An AtkTextRectangle C++ wrapper class. More...
- class Xfc::Atk::TextRange
    A AtkTextRange C++ wrapper class. More...
- class Xfc::Atk::Text
    A AtkText C++ wrapper class. More...

## TextAttibute Methods

- TextAttribute text_attribute_register (const String &name)
    Associate name with a new TextAttribute.
- String text_attribute_get_name (TextAttribute attr)
    Gets the name corresponding to the TextAttribute.
- TextAttribute text_attribute_for_name (const String &name)
    Get the TextAttribute type corresponding to a text attribute name.
- String text_attribute_get_value (TextAttribute attr, int index)
    Gets the value for the index of the text attribute attr.

## Enumerations

- enum TextAttribute {
  TEXT_ATTR_INVALID = ATK_TEXT_ATTR_INVALID,
  TEXT_ATTR_LEFT_MARGIN = ATK_TEXT_ATTR_LEFT_MARGIN,
  TEXT_ATTR_RIGHT_MARGIN = ATK_TEXT_ATTR_RIGHT_MARGIN,
  TEXT_ATTR_INDENT = ATK_TEXT_ATTR_INDENT,
  TEXT_ATTR_INVISIBLE = ATK_TEXT_ATTR_INVISIBLE,
  TEXT_ATTR_EDITABLE = ATK_TEXT_ATTR_EDITABLE,
  TEXT_ATTR_PIXELS_ABOVE_LINES = ATK_TEXT_ATTR_PIXELS_ABOVE_LINES,
  TEXT_ATTR_PIXELS_BELOW_LINES = ATK_TEXT_ATTR_PIXELS_BELOW_LINES,
  TEXT_ATTR_PIXELS_INSIDE_WRAP = ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP,
  TEXT_ATTR_BG_FULL_HEIGHT = ATK_TEXT_ATTR_BG_FULL_HEIGHT,
  TEXT_ATTR_RISE = ATK_TEXT_ATTR_RISE,
  TEXT_ATTR_UNDERLINE = ATK_TEXT_ATTR_UNDERLINE,
  TEXT_ATTR_STRIKETHROUGH = ATK_TEXT_ATTR_STRIKETHROUGH,
  TEXT_ATTR_SIZE = ATK_TEXT_ATTR_SIZE,
  TEXT_ATTR_SCALE = ATK_TEXT_ATTR_SCALE,
  TEXT_ATTR_WEIGHT = ATK_TEXT_ATTR_WEIGHT,
  TEXT_ATTR_LANGUAGE = ATK_TEXT_ATTR_LANGUAGE,
  TEXT_ATTR_FAMILY_NAME = ATK_TEXT_ATTR_FAMILY_NAME,
  TEXT_ATTR_BG_COLOR = ATK_TEXT_ATTR_BG_COLOR,
  TEXT_ATTR_FG_COLOR = ATK_TEXT_ATTR_FG_COLOR,
  TEXT_ATTR_BG_STIPPLE = ATK_TEXT_ATTR_BG_STIPPLE,
  TEXT_ATTR_FG_STIPPLE = ATK_TEXT_ATTR_FG_STIPPLE,
  TEXT_ATTR_WRAP_MODE = ATK_TEXT_ATTR_WRAP_MODE,
  TEXT_ATTR_DIRECTION = ATK_TEXT_ATTR_DIRECTION,
  TEXT_ATTR_JUSTIFICATION = ATK_TEXT_ATTR_JUSTIFICATION,
  TEXT_ATTR_STRETCH = ATK_TEXT_ATTR_STRETCH,
  TEXT_ATTR_VARIANT = ATK_TEXT_ATTR_VARIANT,
  TEXT_ATTR_STYLE = ATK_TEXT_ATTR_STYLE,
  TEXT_ATTR_LAST_DEFINED = ATK_TEXT_ATTR_LAST_DEFINED
  }
    Describes the text attributes supported. More...
- enum TextBoundary {
  TEXT_BOUNDARY_CHAR = ATK_TEXT_BOUNDARY_CHAR,
  TEXT_BOUNDARY_WORD_START = ATK_TEXT_BOUNDARY_WORD_START,
  TEXT_BOUNDARY_WORD_END = ATK_TEXT_BOUNDARY_WORD_END,
  TEXT_BOUNDARY_SENTENCE_START = ATK_TEXT_BOUNDARY_SENTENCE_START,
  TEXT_BOUNDARY_SENTENCE_END = ATK_TEXT_BOUNDARY_SENTENCE_END,
  TEXT_BOUNDARY_LINE_START = ATK_TEXT_BOUNDARY_LINE_START,
  TEXT_BOUNDARY_LINE_END = ATK_TEXT_BOUNDARY_LINE_END
  }
    Specifies text boundary types to use when retrieving regions of text with get_text_after_offset(), get_text_at_offset() and get_text_before_offset(). More...
- enum TextClipType {
  TEXT_CLIP_NONE = ATK_TEXT_CLIP_NONE,
  TEXT_CLIP_MIN = ATK_TEXT_CLIP_MIN,
  TEXT_CLIP_MAX = ATK_TEXT_CLIP_MAX,
  ATK_TEXT_CLIP_BOTH = TEXT_CLIP_MAX
  }
    Describes the type of clipping required. More...

## Detailed Description

An AtkText C++ wrapper interface.

Provides Text, an interface implemented by components with text content.

## Enumeration Type Documentation

enum TextAttribute

Describes the text attributes supported.

Where appropriate each TextAttribute type lists all the possible values, in index order. The first value is 0, the second value is 1, and so on. This is the index you need to specify when constructing an Attribute. For example, for boolean values "false" is 0 and "true" is 1. For wrap mode "none" is 0, "char" is 1, and "word" is 2. You should be able to work the rest out.

Enumeration values:

  TEXT_ATTR_INVALID | Invalid attribute.
  TEXT_ATTR_LEFT_MARGIN | The pixel width of the left margin.
  TEXT_ATTR_RIGHT_MARGIN | The pixel width of the right margin.
  TEXT_ATTR_INDENT | The number of pixels that the text is indented.
  TEXT_ATTR_INVISIBLE | Either "false" or "true" indicating whether text is visible or not.
  TEXT_ATTR_EDITABLE | Either "false" or "true" indicating whether text is editable or not.
  TEXT_ATTR_PIXELS_ABOVE_LINES | Pixels of blank space to leave above each newline-terminated line.
  TEXT_ATTR_PIXELS_BELOW_LINES | Pixels of blank space to leave below each newline-terminated line.
  TEXT_ATTR_PIXELS_INSIDE_WRAP | Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).
  TEXT_ATTR_BG_FULL_HEIGHT | Either false" or "true" indicating whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.
  TEXT_ATTR_RISE | Number of pixels that the characters are risen above the baseline.
  TEXT_ATTR_UNDERLINE | The underline style, either "none", "single", "double" or "low".
  TEXT_ATTR_STRIKETHROUGH | Either "false" or "true" indicating whether the text is struck-through.
  TEXT_ATTR_SIZE | The size of the characters.
  TEXT_ATTR_SCALE | A string representation of a double indicating the scale of the characters.
  TEXT_ATTR_WEIGHT | The weight of the characters.
  TEXT_ATTR_LANGUAGE | The language used.
  TEXT_ATTR_FAMILY_NAME | The font family name.
  TEXT_ATTR_BG_COLOR | The background color; an RGB value of the format "%u,%u,%u".
  TEXT_ATTR_FG_COLOR | The foreground color; an RGB value of the format "%u,%u,%u".
  TEXT_ATTR_BG_STIPPLE | Either "false" or "true" indicating if a Gdk::Bitmap is set for stippling the background color.
  TEXT_ATTR_FG_STIPPLE | Either "false" or "true" indicating if a Gdk::Bitmap is set for stippling the foreground color.
  TEXT_ATTR_WRAP_MODE | The wrap mode of the text, if any; possible values are "none", "char" or "word".
  TEXT_ATTR_DIRECTION | The direction of the text, if set; possible values are "none", "ltr" or "rtl".
  TEXT_ATTR_JUSTIFICATION | The justification of the text, if set; possible values are "left", "right", "center" or "fill".
  TEXT_ATTR_STRETCH | The stretch of the text, if set; possible values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded".
  TEXT_ATTR_VARIANT | The capitalization variant of the text, if set; possible values are "normal" or "small_caps".
  TEXT_ATTR_STYLE | The slant style of the text, if set; possible values are "normal", "oblique" or "italic".
  TEXT_ATTR_LAST_DEFINED | Not a valid text attribute, used for finding the end of the enumeration.

enum TextBoundary

Specifies text boundary types to use when retrieving regions of text with get_text_after_offset(), get_text_at_offset() and get_text_before_offset().

Enumeration values:

  TEXT_BOUNDARY_CHAR | Use character boundaries.
  TEXT_BOUNDARY_WORD_START | Use word start boundaries.
  TEXT_BOUNDARY_WORD_END | Use word end boundaries.
  TEXT_BOUNDARY_SENTENCE_START | Use sentence start boundaries.
  TEXT_BOUNDARY_SENTENCE_END | Use sentence end boundaries.
  TEXT_BOUNDARY_LINE_START | Use line start boundaries.
  TEXT_BOUNDARY_LINE_END | Use line end boundaries.

enum TextClipType

Describes the type of clipping required.

Enumeration values:

  TEXT_CLIP_NONE | No clipping to be done.
  TEXT_CLIP_MIN | Text clipped by min coordinate is omitted.
  TEXT_CLIP_MAX | Text clipped by max coordinate is omitted.
  ATK_TEXT_CLIP_BOTH | Only text fully within mix/max bound is retained.

## Function Documentation

TextAttribute text_attribute_for_name | ( | const String & | name | ) |

Get the TextAttribute type corresponding to a text attribute name.

Parameters:

  | name | A string which is the (non-localized) name of a TextAttribute.

Returns:
  The TextAttribute enumerated type corresponding to the specified name, or TEXT_ATTR_INVALID if no matching text attribute is found.

String text_attribute_get_name | ( | TextAttribute | attr | ) |

Gets the name corresponding to the TextAttribute.

Parameters:

  | attr | The TextAttribute whose name is required.

Returns:
  A string containing the name.

String text_attribute_get_value | ( | TextAttribute | attr,
|  | int | index
| ) |

Gets the value for the index of the text attribute attr.

Parameters:

  | attr | The TextAttribute for which a value is required.
  | index | The index of the required value.

Returns:
  A String containing the value, or a null String if there are no values maintained for attr.

TextAttribute text_attribute_register | ( | const String & | name | ) |

Associate name with a new TextAttribute.

Parameters:

  | name | A name string.

Returns:
  The new TextAttribute associated with name.

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3