Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::TextAttributes Class Reference

A GtkTextAttributes C++ wrapper class. More...

`#include <inti/gtk/texttag.h>`

Inheritance diagram for Inti::Gtk::TextAttributes:

List of all members.

## Public Member Functions

Constructors

- TextAttributes ()
    Construct a TextAttributes.
- TextAttributes (GtkTextAttributes *values)
    Construct a TextAttributes from an existing GtkTextAttributes.
- TextAttributes (GtkTextAttributes *values, bool copy)
    Construct a TextAttributes from an existing GtkTextAttributes.
- TextAttributes (const TextAttributes &src)
    Copy constructor.
- ~TextAttributes ()
    Destructor.
- TextAttributes & operator= (const TextAttributes &src)
    Assignment operator.

Accessors

- GtkTextAttributes * gtk_text_attributes () const
    Get a pointer to the GtkTextAttributes structure.
- operator GtkTextAttributes * () const
    Conversion operator; safely converts a TextAttributes to a GtkTextAttributes pointer.
- TextAppearance & appearance () const
    Obtains the appearance attributes of some text.
- Justification justification () const
    Returns the current text justification: left, right, or center.
- TextDirection direction () const
    Returns the current text direction.
- Pointer< Pango::FontDescription > font () const
    Gets the font description for the some text.
- double font_scale () const
    Gets the font size as a scale factor relative to the default font size.
- int left_margin () const
    Gets the width of the left margin in pixels.
- int indent () const
    Gets the amount to indent the paragraph, in pixels.
- int right_margin () const
    Gets the width of the right margin in pixels.
- int pixels_above_lines () const
    Gets the number of pixels of blank space above paragraphs.
- int pixels_below_lines () const
    Gets the number of pixels of blank space below paragraphs.
- int pixels_inside_wrap () const
    Gets the number of pixels of blank space between wrapped lines in a paragraph.
- Pointer< Pango::TabArray > tabs () const
    Gets the custom tabs for the text.
- WrapMode wrap_mode () const
    Returns the current wrap mode: never, at word boundaries, or at character boundaries.
- PangoLanguage * language () const
    Gets the language the text is in, as an ISO code.
- bool invisible () const
    Gets whether the text is hidden. Not implemented in GTK 2.0.
- bool bg_full_height () const
    Gets whether the background color fills the entire line height or only the height of the tagged characters.
- bool editable () const
    Gets whether the text can be modified by the user.
- bool realized () const
    Gets whether the TextAttribute's colors have been allocated.

Methods

- void set_justification (Justification justification)
    Sets the justification of the text.
- void set_direction (TextDirection direction)
    Sets the text direction.
- void set_margins (int left_margin, int right_margin)
    Set the text margins.
- void set_left_margin (int margin)
    Set the left text margin.
- void set_right_margin (int margin)
    Set the right text margin.
- void set_indent (int indent)
    Set the paragraph indent in pixels.
- void set_pixels (int pixels_above_lines, int pixels_below_lines, int pixels_inside_wrap)
    Sets the amount blank space in and around a paragraph.
- void set_pixels_above_lines (int pixels)
    Sets the amount blank space above a paragraph.
- void set_pixels_below_lines (int pixels)
    Sets the amount blank space below a paragraph.
- void set_pixels_inside_wrap (int pixels)
    Sets the amount blank space between wrapped lines in a paragraph.
- void set_tab_array (Pango::TabArray &tabs)
    Sets the custom tabs for the text.
- void set_wrap_mode (WrapMode wrap_mode)
    Sets the current wrap mode: never, at word boundaries, or at character boundaries.
- void set_language (PangoLanguage *language)
    Sets the language the text is in, as an ISO code.
- void set_invisible (bool setting)
    Sets whether the text is hidden.
- void set_bg_full_height (bool setting)
    Sets whether the background color fills the entire line height or only the height of the tagged characters.
- void set_editable (bool setting)
    Sets whether the text is editable.

## Detailed Description

A GtkTextAttributes C++ wrapper class.

TextAttributes describes a set of properties on some text. Using TextAttributes directly should rarely be necessary. It's primarily useful with Gtk::TextIter::get_attributes().

## Constructor & Destructor Documentation

Inti::Gtk::TextAttributes::TextAttributes | ( | GtkTextAttributes * | values | ) | `[explicit]`

  | Construct a TextAttributes from an existing GtkTextAttributes. Parameters:
  values | A pointer to a GtkTextAttributes.
The values can be a newly created GtkTextAttributes or an existing GtkTextAttributes. The TextAttributes object created is a temporary object. It doesn't take over the ownership of GtkTextAttributes and GtkTextAttributes is not freed by the destructor.

Inti::Gtk::TextAttributes::TextAttributes | ( | GtkTextAttributes * | values,
|  | bool | copy
| ) |

  | Construct a TextAttributes from an existing GtkTextAttributes. Parameters:
  values | A pointer to a GtkTextAttributes.
  copy | Whether the TextAttributes object should make a copy of GtkTextAttributes or not.
The values can be a newly created GtkTextAttributes or an existing GtkTextAttributes. If copy is true TextAttributes will make a copy of GtkTextAttributes. If copy is false TextAttributes wont make a copy but instead takes over the ownership of GtkTextAttributes. Either way, the destructor will free GtkTextAttributes when the TextAttributes object is destroyed. This constructor is used by G::Boxed::wrap() to wrap GtkTextAttributes objects in a C++ wrapper.

Inti::Gtk::TextAttributes::TextAttributes | ( | const TextAttributes & | src | ) | `[explicit]`

  | Copy constructor. Parameters:
  src | The source attributes.

## Member Function Documentation

PangoLanguage* Inti::Gtk::TextAttributes::language | ( |  | ) | const

| Gets the language the text is in, as an ISO code. Pango can use this as a hint when rendering the text. If you don't understand this parameter, you probably don't need it.

TextAttributes& Inti::Gtk::TextAttributes::operator= | ( | const TextAttributes & | src | ) |

  | Assignment operator. Parameters:
  src | The source attributes.

void Inti::Gtk::TextAttributes::set_bg_full_height | ( | bool | setting | ) |

  | Sets whether the background color fills the entire line height or only the height of the tagged characters. Parameters:
  setting | true if the background color fills the entire line height.

void Inti::Gtk::TextAttributes::set_direction | ( | TextDirection | direction | ) |

  | Sets the text direction. Parameters:
  direction | One of the values from the TextDirection enumeration.

void Inti::Gtk::TextAttributes::set_invisible | ( | bool | setting | ) |

  | Sets whether the text is hidden. Parameters:
  setting | true if the text is hidden.

void Inti::Gtk::TextAttributes::set_justification | ( | Justification | justification | ) |

  | Sets the justification of the text. Parameters:
  justification | One of the values from the Justification enumeration.

void Inti::Gtk::TextAttributes::set_language | ( | PangoLanguage * | language | ) |

  | Sets the language the text is in, as an ISO code. Parameters:
  language | The Pango language code.
Pango can use this as a hint when rendering the text. If you don't understand this parameter, you probably don't need it.

void Inti::Gtk::TextAttributes::set_left_margin | ( | int | margin | ) |

  | Set the left text margin. Parameters:
  margin | The width of the left margin in pixels.

void Inti::Gtk::TextAttributes::set_margins | ( | int | left_margin,
|  | int | right_margin
| ) |

  | Set the text margins. Parameters:
  left_margin | The width of the left margin in pixels.
  right_margin | The width of the right margin in pixels.

void Inti::Gtk::TextAttributes::set_pixels | ( | int | pixels_above_lines,
|  | int | pixels_below_lines,
|  | int | pixels_inside_wrap
| ) |

  | Sets the amount blank space in and around a paragraph. Parameters:
  pixels_above_lines | The number of pixels of blank space above a paragraph.
  pixels_below_lines | The number of pixels of blank space below a paragraph.
  pixels_inside_wrap | The number of pixels of blank space between wrapped lines in a paragraph.

void Inti::Gtk::TextAttributes::set_pixels_above_lines | ( | int | pixels | ) |

  | Sets the amount blank space above a paragraph. Parameters:
  pixels | The number of pixels of blank space.

void Inti::Gtk::TextAttributes::set_pixels_below_lines | ( | int | pixels | ) |

  | Sets the amount blank space below a paragraph. Parameters:
  pixels | The number of pixels of blank space.

void Inti::Gtk::TextAttributes::set_pixels_inside_wrap | ( | int | pixels | ) |

  | Sets the amount blank space between wrapped lines in a paragraph. Parameters:
  pixels | The number of pixels of blank space.

void Inti::Gtk::TextAttributes::set_right_margin | ( | int | margin | ) |

  | Set the right text margin. Parameters:
  margin | The width of the right margin in pixels.

void Inti::Gtk::TextAttributes::set_tab_array | ( | Pango::TabArray & | tabs | ) |

  | Sets the custom tabs for the text. Parameters:
  tabs | The array of tab stops for the text.

void Inti::Gtk::TextAttributes::set_wrap_mode | ( | WrapMode | wrap_mode | ) |

  | Sets the current wrap mode: never, at word boundaries, or at character boundaries. Parameters:
  wrap_mode | One of the values from the WrapMode enumeration.

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

- texttag.h

Main Page - Footer