Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Gtk::TextAttributes Class Reference

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

#include <xfc/gtk/texttag.hh>

Inheritance diagram for Xfc::Gtk::TextAttributes:
Xfc::G::Boxed Xfc::Object Xfc::Trackable

List of all members.

Public Member Functions

Constructors

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().

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.


Constructor & Destructor Documentation

Xfc::Gtk::TextAttributes::TextAttributes ( GtkTextAttributes *  values) [explicit]

Constructs a TextAttributes object from an existing GtkTextAttributes.

Parameters:
valuesA 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. The TextAttributes object is created with a reference count of 1 that the caller owns.

Xfc::Gtk::TextAttributes::TextAttributes ( GtkTextAttributes *  values,
bool  copy 
)

Constructs a TextAttributes from an existing GtkTextAttributes.

Parameters:
valuesA pointer to a GtkTextAttributes.
copyWhether 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. The TextAttributes object is created with a reference count of 1 that the caller owns.

Copy constructor.

Parameters:
srcThe source attributes.

Member Function Documentation

Gets whether the background color fills the entire line height or only the height of the tagged characters.

PangoLanguage* Xfc::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& Xfc::Gtk::TextAttributes::operator= ( const TextAttributes src)

Assignment operator.

Parameters:
srcThe source attributes.

Sets whether the background color fills the entire line height or only the height of the tagged characters.

Parameters:
settingtrue if the background color fills the entire line height.

Sets the text direction.

Parameters:
directionOne of the values from the TextDirection enumeration.

Sets whether the text is hidden.

Parameters:
settingtrue if the text is hidden.

Sets the justification of the text.

Parameters:
justificationOne of the values from the Justification enumeration.
void Xfc::Gtk::TextAttributes::set_language ( PangoLanguage *  language)

Sets the language the text is in, as an ISO code.

Parameters:
languageThe 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.

Set the left text margin.

Parameters:
marginThe width of the left margin in pixels.
void Xfc::Gtk::TextAttributes::set_margins ( int  left_margin,
int  right_margin 
)

Set the text margins.

Parameters:
left_marginThe width of the left margin in pixels.
right_marginThe width of the right margin in pixels.
void Xfc::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_linesThe number of pixels of blank space above a paragraph.
pixels_below_linesThe number of pixels of blank space below a paragraph.
pixels_inside_wrapThe number of pixels of blank space between wrapped lines in a paragraph.

Sets the amount blank space above a paragraph.

Parameters:
pixelsThe number of pixels of blank space.

Sets the amount blank space below a paragraph.

Parameters:
pixelsThe number of pixels of blank space.

Sets the amount blank space between wrapped lines in a paragraph.

Parameters:
pixelsThe number of pixels of blank space.

Set the right text margin.

Parameters:
marginThe width of the right margin in pixels.

Sets the custom tabs for the text.

Parameters:
tabsThe array of tab stops for the text.

Sets the current wrap mode: never, at word boundaries, or at character boundaries.

Parameters:
wrap_modeOne of the values from the WrapMode enumeration.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC