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


Public Member Functions
Xfc::Pango::Attribute Class Reference

A PangoAttriubte C++ wrapper class. More...

#include <xfc/pango/attributes.hh>

Inheritance diagram for Xfc::Pango::Attribute:
Xfc::Object Xfc::Trackable Xfc::Pango::AttrColor Xfc::Pango::AttrEmbossed Xfc::Pango::AttrFloat Xfc::Pango::AttrFontDesc Xfc::Pango::AttrInt Xfc::Pango::AttrLanguage Xfc::Pango::AttrShape Xfc::Pango::AttrSize Xfc::Pango::AttrStipple Xfc::Pango::AttrString

List of all members.

Public Member Functions

Constructors

Detailed Description

A PangoAttriubte C++ wrapper class.

Attribute and its derived classes are used to represent and manipulate sets of attributes applied to a portion of text. 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.


Constructor & Destructor Documentation

Xfc::Pango::Attribute::Attribute ( PangoAttribute *  attr,
bool  copy 
) [explicit]

Construct a new attribute from an existing PangoAttribute.

Parameters:
attrA PangoAttribute.
copySet true if a copy of attr should be used.

If copy is true attr is copied. If false attr is assumed to be a valid attribute that must be freed. Either way Attribute will own the PangoAttribute and free it when it's no longer required.

Copy constructor.

Parameters:
srcThe source attribute.

Member Function Documentation

unsigned int Xfc::Pango::Attribute::end_index ( ) const

Returns the end byte index of the range this attribute applies to (the character at this index is not included in the range).

bool Xfc::Pango::Attribute::equal ( const Attribute other) const

Compares this attribute with other for equality.

Parameters:
otherThe attribute to compare with.
Returns:
true if the two attributes have the same value.

This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

bool Xfc::Pango::Attribute::operator!= ( const Attribute other) const

Inequality operator; compares this attribute with other for inequality.

Parameters:
otherThe attribute to compare with.
Returns:
true if the two attributes have different values.

This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

Attribute& Xfc::Pango::Attribute::operator= ( const Attribute src)

Assignment operator.

Parameters:
srcThe source attribute.
bool Xfc::Pango::Attribute::operator== ( const Attribute other) const

Equality operator; compares this attribute with other for equality.

Parameters:
otherThe attribute to compare with.
Returns:
true if the two attributes have the same value.

This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

void Xfc::Pango::Attribute::set_end_index ( unsigned int  end)

Set the end byte index for the range this attribute applies to.

Parameters:
endThe end index.
void Xfc::Pango::Attribute::set_index ( unsigned int  start,
unsigned int  end 
)

Set the start and end byte index for the range this attribute applies to.

Parameters:
startThe start index.
endThe end index.
void Xfc::Pango::Attribute::set_start_index ( unsigned int  start)

Set the starting byte index for the range this attribute applies to.

Parameters:
startThe start index.

Returns the attribute type.

Note: GDK registers AttrStiple and AttrBitmap as new attribute types so ATTR_INVALID will be returned for these attributes.


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