InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PMLocaleId Class Reference

#include <PMLocaleId.h>

Public Types

typedef base_type data_type
 

Public Member Functions

 PMLocaleId ()
 
 PMLocaleId (int32 combinedId)
 
 PMLocaleId (int16 featureSetId, int16 userInterfaceId)
 
bool16 operator== (const PMLocaleId &other) const
 
bool16 operator!= (const PMLocaleId &other) const
 
bool16 Match (const PMLocaleId &other) const
 
int32 operator* () const
 
void ReadWrite (IPMStream *s)
 
int16 GetFeatureSetId () const
 
int16 GetProductFS () const
 
int16 GetLanguageFS () const
 
int16 GetUserInterfaceId () const
 
int16 GetDefaultLanguageId () const
 
bool16 IsProductFS (const int16 productFS) const
 
bool16 IsLanguageFS (const int16 languageFS) const
 
int32 GetFeatureSetScript () const
 
int32 GetUIScript () const
 
ID_ICU_NAMESPACE::Locale GetUserInterfaceICULocale () const
 
bool16 IsRightToLeftUI () const
 
void SetUserInterface (ID_ICU_NAMESPACE::Locale newLocale)
 
bool operator< (const PMLocaleId &other) const
 

Detailed Description

The purpose of this class is to encapsulate a locale, which we've defined to be a combination of three things: 1) Product feature set (i.e. kInDesignProductFS -

See Also
FeatureSets.h) 2) Language feature set (i.e. kRomanLanguageFS -
FeatureSets.h) 3) UI language (i.e. k_enUS
PMLocaleIds.h)

Constructor & Destructor Documentation

PMLocaleId::PMLocaleId ()
inline

Various constructors for PMLocaleId

Member Function Documentation

int16 PMLocaleId::GetDefaultLanguageId () const
inline

Get the default language. UI may be English but default language is Hebrew (i.e. k_enIL.

See Also
PMLocaleIds.h)
Returns
UI Language ID.
int16 PMLocaleId::GetFeatureSetId () const
inline

The Feature set ID is partitioned into a high byte for product feature sets and a low byte for language feature sets.

See Also
FeatureSets.h
Returns
combined Feature set ID.
int32 PMLocaleId::GetFeatureSetScript () const

Get the cooltype script associated with the LanguageFS + UI language for this PMLocaleId

Returns
script for the LanguageFS + UI language combination contained in this PMLocaleId, in the form of a kCT*Script
int16 PMLocaleId::GetLanguageFS () const
inline

Get just the Language feature set ID (i.e. kRomanLanguageFS.

See Also
FeatureSets.h)
Returns
Language Feature set ID.
int16 PMLocaleId::GetProductFS () const
inline

Get just the product feature set ID (i.e. kInDesignProductFS.

See Also
FeatureSets.h)
Returns
Product Feature set ID.
int32 PMLocaleId::GetUIScript () const

Get the cooltype script associated with the UI language for this PMLocaleId

Returns
script for the UI language contained in this PMLocaleId, in the form of a kCT*Script
ID_ICU_NAMESPACE::Locale PMLocaleId::GetUserInterfaceICULocale () const

Get the ICU Locale associated with the UI language for this PMLocaleId

Returns
ICU Locale for the UI language contained in this PMLocaleId
int16 PMLocaleId::GetUserInterfaceId () const
inline

Get just the UI Language ID (i.e. k_enUS.

See Also
PMLocaleIds.h)
Returns
UI Language ID.
bool16 PMLocaleId::IsLanguageFS (const int16 languageFS) const
inline

Check if this PMLocaleId matches the given language FS. Will match wildcards.

Parameters
languageFSthe constant for the language FS that you'd like to know if this PMLocaleId matches.
Returns
kTrue if this PMLocaleId matches the passed in language FS
bool16 PMLocaleId::IsProductFS (const int16 productFS) const
inline

Check if this PMLocaleId matches the given product FS. Will match wildcards.

Parameters
productFSthe constant for the product FS that you'd like to know if this PMLocaleId matches.
Returns
kTrue if this PMLocaleId matches the passed in product FS
bool16 PMLocaleId::IsRightToLeftUI () const
inline

True if UI is right to left like Arabic and Hebrew

Returns
kTrue if UI is right to left.
bool16 PMLocaleId::Match (const PMLocaleIdother) const

Checks if one PMLocaleId matches another one. Considers wildcards to be a match(i.e. kWild == any UI language, kAllLanguagesFS == any language FS, kAllProductsFS == any product FS)

Parameters
otherThe PMLocaleId we're comparing this one to.
Returns
kTrue if the PMLocaleId matches this one.
bool16 PMLocaleId::operator!= (const PMLocaleIdother) const
inline

Inequality operator. Does not check for wildcards

Parameters
otherThe PMLocaleId we're comparing this one to.
Returns
kTrue if the PMLocaleId does not exactly match this one.
int32 PMLocaleId::operator* () const
inline

Combines the FeatureSetId and UserInterfaceId into a single Id. The feature set is stored in the upper word of a long and the UI is stored in the lower word.

Returns
combined FeatureSet + UI language merged into an int32.
bool16 PMLocaleId::operator== (const PMLocaleIdother) const
inline

Equality operator. Does not check for wildcards

Parameters
otherThe PMLocaleId we're comparing this one to.
Returns
kTrue if the PMLocaleId exactly matches this one.
void PMLocaleId::ReadWrite (IPMStreams)
inline

Streams in/out a PMLocaleId.

Parameters
sthe stream to read/write from/to
void PMLocaleId::SetUserInterface (ID_ICU_NAMESPACE::Locale newLocale)

Set the UI language for this PMLocaleId

Parameters
newLocaleICU Locale to set PMLocaleId to