InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILinguisticMgr Class Referenceabstract

#include <ILinguisticMgr.h>

Inheritance diagram for ILinguisticMgr:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ILINGUISTICMGR }
 
enum  Services { kHyphenation, kSpelling, kPhonetic, kThesaurus }
 

Public Member Functions

virtual IHyphenationServiceQuerySimpleHyphenationService ()=0
 
virtual IHyphenationServiceQueryHyphenationService (const ILanguage *pLanguage, ClassID nProvider=kDefaultLinguisticProvider)=0
 
virtual ISpellingServiceQuerySpellingService (const ILanguage *pLanguage, ClassID nProvider=kDefaultLinguisticProvider)=0
 
virtual IThesaurusServiceQueryThesaurusService (const ILanguage *pLanguage, ClassID nProvider=kDefaultLinguisticProvider)=0
 
virtual IUserDictServiceQueryUserDictService (const ILanguage *pLanguage, ClassID nProvider=kDefaultLinguisticProvider)=0
 
virtual int32 GetServicesCount (ILinguisticMgr::Services nWhich, const ILanguage *pLanguage) const =0
 
virtual ISpellingServiceQueryNthSpellingService (const ILanguage *pLanguage, int32 nService, PMString *pServiceName=nil) const =0
 
virtual IHyphenationServiceQueryNthHyphenationService (const ILanguage *pLanguage, int32 nService, PMString *pServiceName=nil) const =0
 
virtual IThesaurusServiceQueryNthThesaurusService (const ILanguage *pLanguage, int32 nService, PMString *pServiceName=nil) const =0
 
virtual uint32 GetLanguageCount () const =0
 
virtual ILanguageQueryNthLanguage (uint32 nNthLanguage)=0
 
virtual ILanguageQueryLanguage (const PMString &rLanguageName)=0
 
virtual IK2ServiceProviderQueryDefaultProvider ()=0
 
virtual IK2ServiceProviderQueryProviderByClassID (ClassID nClass)=0
 
virtual bool16 GetLanguageName (LanguageID nLanguage, PMString *pName, PMString *pPrimaryName=nil, PMString *pSubName=nil) const =0
 
virtual ILanguageQueryLanguageByID (LanguageID nLanguageID)=0
 
virtual int32 GetProviderCount () const =0
 
virtual IK2ServiceProviderQueryNthProvider (int32 nService)=0
 
virtual IK2ServiceProviderQueryDefaultService (ILinguisticMgr::Services nWhich, const ILanguage *pLanguage)=0
 
virtual IK2ServiceProviderQueryNthService (ILinguisticMgr::Services nWhich, const ILanguage *pLanguage, uint32 nNthService)=0
 
virtual bool16 SetDefaultService (ILinguisticMgr::Services nWhich, const ILanguage *pLanguage, const IK2ServiceProvider *pProvider)=0
 
virtual uint32 GetServiceCount (ILinguisticMgr::Services nWhich, const ILanguage *pLanguage) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

The LinguisticMgr is able to support many Linguistic systems (like Proximity and Info) at the same time. A Linguistic System contains a set of services: hyphenation, spelling, thesaurus and user dictionaries. To be able to mix the Linguistic Systems you should ask the LinguisticMgr for a particular service with a language specification. The connections between a language and a service will be administrated in the workspace of the application.

Member Function Documentation

virtual uint32 ILinguisticMgr::GetLanguageCount () const
pure virtual

Get count of languages in session ILanguageList

Returns
int32 count of languages
virtual bool16 ILinguisticMgr::GetLanguageName (LanguageID nLanguage,
PMStringpName,
PMStringpPrimaryName = nil,
PMStringpSubName = nil 
) const
pure virtual

Fills pName with the name that uses the languageid according to a hard coded list of names.

NOT RECOMMENDED - there can be multiple unique language names with the same language id Use name as unique identifier not languageid. Language IDs will hopefully be deprecated in the future and only name will be used.

Parameters
nLanguageIDcorresponds to ILanguage::GetLanguageID()
pNamelanguage name. corresponds to ILanguage::GetLanguageName()
pPrimaryNameprimary language name. corresponds to ILanguage::GetPrimaryLanguageName()
pSubNamesub language name. corresponds to ILanguage::GetSubLanguageName()
Returns
bool16 false if unknown.
virtual int32 ILinguisticMgr::GetServicesCount (ILinguisticMgr::Services nWhich,
const ILanguagepLanguage 
) const
pure virtual

Get count of services for a language

Parameters
nWhichwhich service to get a count of
pLanguagelanguage to get a count for
Returns
int32 count of services
virtual IK2ServiceProvider* ILinguisticMgr::QueryDefaultProvider ()
pure virtual

Get the default linguistic provider.

Parameters
IK2ServiceProviderlinguistic provider
virtual IHyphenationService* ILinguisticMgr::QueryHyphenationService (const ILanguagepLanguage,
ClassID nProvider = kDefaultLinguisticProvider 
)
pure virtual

Query for the associated hyphenation service of a language If nProvider is not kDefaultLinguisticProvider this provider is preferred.

Parameters
pLanguagelanguage to get hyphenation service for
nProviderIf nProvider is not kDefaultLinguisticProvider this provider is preferred
Returns
IHyphenationService hyphenation service
virtual ILanguage* ILinguisticMgr::QueryLanguage (const PMStringrLanguageName)
pure virtual

Query for language by name in session ILanguageList

Parameters
rLanguageNamename of language. corresponds to ILanguage::GetLanguageName().
Returns
ILanguage language with name
virtual ILanguage* ILinguisticMgr::QueryLanguageByID (LanguageID nLanguageID)
pure virtual

Returns the installed ILanguage for the LanguageID according to a hard coded list of names.

NOT RECOMMENDED - there can be multiple unique language names with the same language id Recommend using QueryLanguage(rLanguageName). Language IDs will hopefully be deprecated in the future and only name will be used.

Parameters
nLanguageIDcorresponds to ILanguage::GetLanguageID()
virtual IHyphenationService* ILinguisticMgr::QueryNthHyphenationService (const ILanguagepLanguage,
int32 nService,
PMStringpServiceName = nil 
) const
pure virtual

Query for nth hyphenation service for a specific language

Parameters
pLanguagelanguage to get hyphenation service for
nServiceFrom 0 to < GetServicesCount
pServiceNameOUT - String to place service name into.
Returns
IHyphenationService hyphenation service
virtual ILanguage* ILinguisticMgr::QueryNthLanguage (uint32 nNthLanguage)
pure virtual

Query for nth language in session ILanguageList

Parameters
nNthLanguagefrom 0 to < GetLanguageCount()
Returns
ILanguage nth language
virtual ISpellingService* ILinguisticMgr::QueryNthSpellingService (const ILanguagepLanguage,
int32 nService,
PMStringpServiceName = nil 
) const
pure virtual

Query for nth spelling service for a specific language

Parameters
pLanguagelanguage to get spelling service for
nServiceFrom 0 to < GetServicesCount
pServiceNameOUT - String to place service name into.
Returns
ISpellingService spelling service
virtual IThesaurusService* ILinguisticMgr::QueryNthThesaurusService (const ILanguagepLanguage,
int32 nService,
PMStringpServiceName = nil 
) const
pure virtual

Query for nth Thesaurus service for a specific language

Parameters
pLanguagelanguage to get Thesaurus service for
nServiceFrom 0 to < GetServicesCount
pServiceNameOUT - String to place service name into.
Returns
IThesaurusService Thesaurus service
virtual IK2ServiceProvider* ILinguisticMgr::QueryProviderByClassID (ClassID nClass)
pure virtual

Returns the installed kLinguisticService for the class id.

Parameters
nClassclass id of linguistic service
IK2ServiceProviderlinguistic provider
virtual IHyphenationService* ILinguisticMgr::QuerySimpleHyphenationService ()
pure virtual

Query for the simple hyphenation service The simple hyphenation service ranks MinTail, MinHead, hard hyphens and discretionary hyphens.

Returns
IHyphenationService hyphenation service
virtual ISpellingService* ILinguisticMgr::QuerySpellingService (const ILanguagepLanguage,
ClassID nProvider = kDefaultLinguisticProvider 
)
pure virtual

Query for the associated spelling service of a language If nProvider is not kDefaultLinguisticProvider this provider is preferred.

Parameters
pLanguagelanguage to get spelling service for
nProviderIf nProvider is not kDefaultLinguisticProvider this provider is preferred
Returns
ISpellingService spelling service
virtual IThesaurusService* ILinguisticMgr::QueryThesaurusService (const ILanguagepLanguage,
ClassID nProvider = kDefaultLinguisticProvider 
)
pure virtual

Query for the associated thesaurus service of a language If nProvider is not kDefaultLinguisticProvider this provider is preferred.

Parameters
pLanguagelanguage to get thesaurus service for
nProviderIf nProvider is not kDefaultLinguisticProvider this provider is preferred
Returns
IThesaurusService thesaurus service
virtual IUserDictService* ILinguisticMgr::QueryUserDictService (const ILanguagepLanguage,
ClassID nProvider = kDefaultLinguisticProvider 
)
pure virtual

Query for the associated user dictionary service of a language If nProvider is not kDefaultLinguisticProvider this provider is preferred.

Parameters
pLanguagelanguage to get user dictionary service for
nProviderIf nProvider is not kDefaultLinguisticProvider this provider is preferred
Returns
user dictionary service