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

#include <ScriptInfoDefs.h>

Public Types

enum  Capitalization { kUseDefaultCapitalization, kUpperCaseFirstCharOfWords, kAllLowerCaseExceptInterCaps, kAllUpperCase }
 
enum  Spacing { kUseDefaultSpacing, kRemoveSpaces, kReplaceSpacesWithUnderScore, kReplaceSpacesWithDash }
 

Public Member Functions

 FormatNamePolicy (Capitalization c, Spacing s, const PMString &prefix, const PMString &suffix)
 
Capitalization GetCapitalization () const
 
Spacing GetSpacing () const
 
const PMStringGetPrefix () const
 
const PMStringGetSuffix () const
 
bool16 operator== (const FormatNamePolicy &other) const
 
void FormatName (PMString &name) const
 

Detailed Description

Different clients have different expectations for how name identifiers are formatted.

See Also
IScriptManager

Member Enumeration Documentation

How to capitalize a formatted name
Enumerator
kUseDefaultCapitalization 

Don't change capitalization from the way it appears in the resource

kUpperCaseFirstCharOfWords 

Make first character of each word upper case if it's not already

kAllLowerCaseExceptInterCaps 

Lower case every character except first character of words after the first one

kAllUpperCase 

All characters are upper case

How to change the spacing when formatting a name
Enumerator
kUseDefaultSpacing 

Don't change spacing from the way it appears in the resource

kRemoveSpaces 

Remove any spaces between words

kReplaceSpacesWithUnderScore 

Replace all spaces with an underscore

kReplaceSpacesWithDash 

Replace all spaces with a dash

Member Function Documentation

void ScriptInfo::FormatNamePolicy::FormatName (PMStringname) const

Format a name according to this policy

Capitalization ScriptInfo::FormatNamePolicy::GetCapitalization () const
inline

Get the capitalization

const PMString& ScriptInfo::FormatNamePolicy::GetPrefix () const
inline

Get the prefix

Spacing ScriptInfo::FormatNamePolicy::GetSpacing () const
inline

Get the spacing

const PMString& ScriptInfo::FormatNamePolicy::GetSuffix () const
inline

Get the suffix