Home You are here: Home > Support > Reference v1.0

Change language: German

XmStrTbl Class Reference

List of all members.

Detailed Description

Small utility class to support multilingual strings.

An instance of this class manage the resource handling of multilingual strings. Every string, which should be handled, have to be added to an XmStrTbl instance by calling SetStr() in the constructor of a derived instance. The integer id within SetStr() is used for accessing a string item within the application. The string id is used for the mapping the string item within the info files to their native representation.

The integer label and the string id should be the same. Its recommended to derive from XmStrTbl and add the string items within the constructor of the derived class.

To combine native text and application specific arguments you can use XmPlaceholderText.


Public Member Functions

void RegisterStrTbl (const char *name)
 Register the string table with a unique id name.
const XmStringoperator[] (int index)
 Return the native representation of a string item with the given index.
const XmStringoperator[] (const char *idStr)
 Return the native representation of a string item with the given idStr.

Protected Member Functions

bool SetStr (const char *idStr, int id, const char *defaultStr=NULL)
 Register a string to the string stable.


Member Function Documentation

const XmString& operator[] int  index  ) 
 

Return the native representation of a string item with the given index.

If no native representation exist, a string contaning the index will be returned.

const XmString& operator[] const char *  idStr  ) 
 

Return the native representation of a string item with the given idStr.

If no native representation exist, a string set to idStr will be returned.

bool SetStr const char *  idStr,
int  id,
const char *  defaultStr = NULL
[protected]
 

Register a string to the string stable.

The string token and the id label should be identical, for constistant string handling within source code and info files.


Copyright © 2006 Praetz Software Development - www.exomware.com