All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

DraftingInterfaces Interface CATIDftText

System.IUnknown
  |
  +---DraftingInterfaces.CATIDftAnnotation
    |
    +---CATIDftText
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIDftText

Manage texts by selection in this text.


Method Index


o GetString(wchar_t**)
Get the text of the current selection.
o GetSubSet(wchar_t*,IID,IUnknown**)
Returns an interface on a subset of the text.
o GetTextWidth(double*)
Read the text Wrapping width.
o GetWrappingMode(DftWrappingMode*)
Read the text Wrapping Mode.
o SetString(wchar_t*)
Modify the current selection with a new string.
o SetTextWidth(double)
Set the Wrapping Width.
o SetWrappingMode(DftWrappingMode)
Set or Unset the Wrapping Mode.

Methods


o GetString
public virtual HRESULT GetString(wchar_t** oStg) = 0
Get the text of the current selection.
Parameters:
ostg
The returned text
o GetSubSet
public virtual HRESULT GetSubSet( const wchar_t* iSubSetName,
const IID iItfName,
IUnknown** oSubSet) = 0
Returns an interface on a subset of the text.
Parameters:
iSubSetName
Can be for Texts :
"Global","Text","Selection","Leaders","WholeFrame"
iItfName
The interface id
oSubSet
The pointer on the asked interface. Can be NULL if the adhesion doesn't exists.
o GetTextWidth
public virtual HRESULT GetTextWidth(double* oWidth) = 0
Read the text Wrapping width.
Parameters:
oWidth
Wrapping width
Returns:
HRESULT S_OK : Operation is successful. E_FAIL or E_NOIMPL : the text cannot be wrapped.
o GetWrappingMode
public virtual HRESULT GetWrappingMode(DftWrappingMode* oMode) = 0
Read the text Wrapping Mode.
Parameters:
oMode
Wrapping Mode
Returns:
HRESULT S_OK : Operation is successful. E_FAIL or E_NOIMPL : the text cannot be wrapped.
o SetString
public virtual HRESULT SetString( const wchar_t* iStg) = 0
Modify the current selection with a new string.
Parameters:
iStg
Text to insert/replace.
If the selection is a cursor, the text will be inserted.
If not the slection will be replaced.
o SetTextWidth
public virtual HRESULT SetTextWidth(double iWidth) = 0
Set the Wrapping Width.
Parameters:
iWidth
Returns:
HRESULT S_OK : the text can be wrapped. E_FAIL or E_NOIMPL : the text cannot be wrapped.
o SetWrappingMode
public virtual HRESULT SetWrappingMode(DftWrappingMode imode= DftWrappingAuto) = 0
Set or Unset the Wrapping Mode.
Parameters:
imode
wrapping calculation mode = DftWrappingOn : set the wrapping width to iWidth = DftWrappingOff : unset the wrapping width = DftWrappingAuto : set the wrapping width to the longest text line (default)
Returns:
HRESULT S_OK : the text can be wrapped. E_FAIL or E_NOIMPL : the text cannot be wrapped.

This object is included in the file: CATIDftText.h
If needed, your Imakefile.mk should include the module: CATDraftingInterfaces

Copyright © 2003, Dassault Systèmes. All rights reserved.