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


Xfc Namespace Reference

The primary namespace for the Xfce Foundation Classes. More...

Namespaces

Classes

Functions

String conversion functions



GetText Methods



IntegerObject equality operators



Smart pointer C++-style casting functions



String i/o stream operators



StringIterator comparison operators



String concatenation operators



String comparison operators




Detailed Description

The primary namespace for the Xfce Foundation Classes.

Provides simple user interaction functions, like error, warning and confirm dialogs.

GtkPrintOperation interface.

Interface builder in GTK that have about the same function as libglade.

Loads a xml description from a file (or memory) and convert this to an interface, that the application can hook into and use.

This came in GTK version 2.12


Function Documentation

const char* Xfc::_ ( const String &  str,
const char *  domain 
)

Convenient wrapper for GNU dgettext.

Parameters:
str A String to be passed to dgettext().
domain The name of translation domain; will always be a string literal.
Returns:
The translation of str if it's available in domain.

GNU gettext does two things. First, it marks a string as translable so xgettext() will find it when it scans your sources. The second thing it does is actually return the translated string. If no translation of str is available the str itself is returned. Libraries must specify the domain because the global domain is reserved for use by applications. Libraries use this method instead of defining a _ macro that calls dgettext(). When you run xgettext() don't forget to specify the '--keyword=_' option. This option tells xgettext that translatable strings are marked with an underscore instead of the word gettext.

const char* Xfc::_ ( const String &  str  ) 

Convenient wrapper for GNU gettext.

Parameters:
str A String to be passed to gettext().
Returns:
The translation of str if it's available in the current domain.

GNU gettext does two things. First, it marks a string as translable so xgettext() will find it when it scans your sources. The second thing it does is actually return the translated string. If no translation of str is available the str itself is returned. Applications should use this method instead of defining a _ macro that calls gettext(). When you run xgettext() don't forget to specify the '--keyword=_' option. This option tells xgettext that translatable strings are marked with an underscore instead of the word gettext.

std::vector<String> Xfc::array_to_vector_of_string ( const char *const *  strs  ) 

A convenience function that converts an array of C strings into a vector of String.

Parameters:
strs A null-terminated string array containing the C strings to be converted.
Returns:
A vector of String containing the converted C strings.
template<typename To , typename From >
Pointer<To> Xfc::cast_const ( const Pointer< From > &  from  )  [inline]

Removes the const qualifier from a managed const dumb pointer.

Parameters:
from A Pointer that manages a const dumb pointer.
Returns:
A new Pointer that manages the non-const dumb pointer.

Calls const_cast on the dumb pointer and returns the non-const pointer as a new Pointer.

References Xfc::Pointer< T >::get().

template<typename To , typename From >
Pointer<To> Xfc::cast_dynamic ( const Pointer< From > &  from  )  [inline]

Casts a managed polymophic dumb pointer down or across its inheritance heirarchy.

Parameters:
from A Pointer managing a polymophic dumb pointer of type From.
Returns:
A new Pointer managing the dumb pointer as a base or sibling pointer of type To.

Calls dynmaic_cast to safely cast a managed polymophic dumb pointer of type From to a base, derived or sibling class pointer of type To.

References Xfc::Pointer< T >::get().

template<typename To , typename From >
Pointer<To> Xfc::cast_static ( const Pointer< From > &  from  )  [inline]

Casts a managed dumb pointer to a pointer to a related type.

Parameters:
from A Pointer managing a dumb pointer of type From.
Returns:
A new Pointer managing the dumb pointer as a pointer of type To.

Calls static_cast to cast a dumb pointer of type From to a pointer of type To.

References Xfc::Pointer< T >::get().

template<typename IntegerType >
bool Xfc::operator!= ( IntegerType  lhs,
const IntegerObject< IntegerType > &  rhs 
) [inline]

Inequality operator.

Parameters:
lhs A value of type IntegerType.
rhs An IntegerObject.
Returns:
true if the value of rhs is equal to lhs.

References Xfc::IntegerObject< IntegerType >::equal().

template<typename IntegerType >
bool Xfc::operator!= ( const IntegerObject< IntegerType > &  lhs,
IntegerType  rhs 
) [inline]

Inequality operator.

Parameters:
lhs An IntegerObject.
rhs A value of type IntegerType.
Returns:
true if the value of lhs is equal to rhs.

References Xfc::IntegerObject< IntegerType >::equal().

bool Xfc::operator<= ( const StringIterator &  lhs,
const StringIterator &  rhs 
) [inline]

Returns true if lhs points to a character in a string that is before the character or is the same character pointed to by rhs.

template<typename IntegerType >
bool Xfc::operator== ( IntegerType  lhs,
const IntegerObject< IntegerType > &  rhs 
) [inline]

Equality operator.

Parameters:
lhs A value of type IntegerType.
rhs An IntegerObject.
Returns:
true if the value of rhs is equal to lhs.

References Xfc::IntegerObject< IntegerType >::equal().

template<typename IntegerType >
bool Xfc::operator== ( const IntegerObject< IntegerType > &  lhs,
IntegerType  rhs 
) [inline]

Equality operator.

Parameters:
lhs An IntegerObject.
rhs A value of type IntegerType.
Returns:
true if the value of lhs is equal to rhs.

References Xfc::IntegerObject< IntegerType >::equal().

bool Xfc::operator>= ( const StringIterator &  lhs,
const StringIterator &  rhs 
) [inline]

Returns true if lhs points to a character in a string that is the same character or after the character pointed to by rhs.

char** Xfc::vector_of_string_to_array ( const std::vector< String > &  strings  ) 

A convenience function that converts a vector of String into an array of C strings.

Parameters:
strings A vector of String to convert into an array of C strings.
Returns:
A null-terminated array of C strings; this array must be deleted when no longer required.

The returned C string array is allocated with operator new [] and must be deleted with operator delete [] when no longer required.

Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3