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


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.

Constructors

Public Member Functions

Accessors
Methods

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

Xfc::Gtk::TextAttributes::TextAttributes ( const TextAttributes src  )  [explicit]

Copy constructor.

Parameters:
src The source attributes.


Member Function Documentation

TextAttributes& Xfc::Gtk::TextAttributes::operator= ( const TextAttributes src  ) 

Assignment operator.

Parameters:
src The source attributes.

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.

void Xfc::Gtk::TextAttributes::set_justification ( Justification  justification  ) 

Sets the justification of the text.

Parameters:
justification One of the values from the Justification enumeration.

void Xfc::Gtk::TextAttributes::set_direction ( TextDirection  direction  ) 

Sets the text direction.

Parameters:
direction One of the values from the TextDirection enumeration.

void Xfc::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 Xfc::Gtk::TextAttributes::set_left_margin ( int  margin  ) 

Set the left text margin.

Parameters:
margin The width of the left margin in pixels.

void Xfc::Gtk::TextAttributes::set_right_margin ( int  margin  ) 

Set the right text margin.

Parameters:
margin The 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_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 Xfc::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 Xfc::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 Xfc::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 Xfc::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 Xfc::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.

void Xfc::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 Xfc::Gtk::TextAttributes::set_invisible ( bool  setting  ) 

Sets whether the text is hidden.

Parameters:
setting true if the text is hidden.

void Xfc::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.


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