Detailed Description
- See also:
- Class Animatable.
- Description:
- This is the text shape object interface. This class gives
access to the standard 3ds Max text object. It allows the text
objects font, string, and style bits to be retrieved and set. All
methods of this class are implemented by the system.
To get a pointer to an ITextObject interface given a
pointer to a object, use the following macro (defined in
AnimatableInterfaceIDs.h ). Using this macro, given any Animatable, it is easy to ask
for the text object interface.
#define
GetTextObjectInterface(anim)
((ITextObject*)anim->GetInterface(I_TEXTOBJECT))
A plug-in developer may use this macro as follows:
ITextObject
*ito =
GetTextObjectInterface(anim);
This return value will either be NULL or a pointer to a valid text
object interface. You may then use this pointer to call methods of
this class to retrieve and modify the object data. For
example:
ito->SetUnderline(TRUE);
Note: Some aspects of the text are controlled by its parameter
block. Developers can access the parameter block by calling
ito->GetParamBlock(). The following are the indices into
the parameter block used to access the size, kerning and leading
parameters:
TEXT_SIZE
TEXT_KERNING
TEXT_LEADING
#include <istdplug.h>
List of all
members.
Member Function Documentation
virtual BOOL ChangeText |
( |
MSTR |
string |
) |
[pure virtual] |
- Parameters:
- MSTR string
The new text string.
- Returns:
- TRUE if the string is changed; otherwise FALSE.
virtual BOOL ChangeFont |
( |
MSTR |
name, |
|
|
DWORD |
flags |
|
) |
|
[pure virtual] |
- Parameters:
- MSTR name
The name of the font.
DWORD flags
One or more of the following values:
TEXTOBJ_ITALIC
TEXTOBJ_UNDERLINE
- Returns:
- TRUE if the font was successfully changed; otherwise
FALSE.
virtual MSTR GetFont |
( |
|
) |
[pure virtual] |
virtual MSTR GetString |
( |
|
) |
[pure virtual] |
virtual BOOL GetItalic |
( |
|
) |
[pure virtual] |
virtual BOOL GetUnderline |
( |
|
) |
[pure virtual] |
virtual void SetItalic |
( |
BOOL |
sw |
) |
[pure virtual] |
- Parameters:
- BOOL sw
TRUE if the text should be italicized; FALSE if not.
virtual void SetUnderline |
( |
BOOL |
sw |
) |
[pure virtual] |
- Parameters:
- BOOL sw
TRUE if the text should be underlined; FALSE if not.
virtual BOOL SetAlignment |
( |
int |
type |
) |
[pure virtual] |
virtual int GetAlignment |
( |
|
) |
[pure virtual] |
ITextObject ITextObject ITextObject
ITextObject ITextObject ITextObject ITextObject ITextObject
ITextObject ITextObject
ITextObject ITextObject ITextObject
ITextObject ITextObject ITextObject ITextObject ITextObject
ITextObject ITextObject