public abstract class TextEmbed extends Object
The application must derive its own embedded object class(es). It can insert instances of its object into a stream as it sees fit. Insertion creates a copy; the application continues to own its instance and the stream owns the copy. The application must delete its own instance but must not delete the copy in the stream.
| Modifier and Type | Field and Description |
|---|---|
static int |
EMBED_AT_BASELINE |
static int |
EMBED_AT_BOTTOM |
static int |
EMBED_AT_TOP |
| Constructor and Description |
|---|
TextEmbed()
Constructor.
|
TextEmbed(TextEmbed oSource)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract TextEmbed |
cloneEmbed()
Pure virtual: Create a new instance
The derived class must provide an implementation of Clone() that at least creates a new object of the correct (derived) type. |
void |
copyFrom(TextEmbed oSource)
Assignment operator
Copy the content of the embedded object, but not its containing stream association. |
int |
embedAt()
Overridable: Query the vertical placement rule for the object
When text and embedded objects are mixed in a stream, embedded objects tend to appear bottom-aligned on the text baseline. |
boolean |
enforceHeight()
Overridable: Query whether the object enforces its height
This is likely legacy functionality. |
TextContext |
getContext()
Get the object's text context.
|
abstract void |
gfxDraw(GFXEnv oEnv)
Pure virtual: Draw the object in the given graphic environment
This method is a call-back that AXTE framework calls to draw the object on a given graphic environment. |
void |
gfxSource(TextGfxSource oGfxSource)
Overridable: Set the object's graphic source
This method allows the derived class to cache graphics source information (attribute pools, font mapper) used by the stream containing the object. |
abstract UnitSpan |
height()
Pure virtual: Return the height of the object
|
abstract boolean |
isEqual(TextEmbed poCompare)
Pure virtual: Compare embedded objects
The derived class must implement this method. |
TextPosn |
position()
Query the object's position in its owning stream
An embedded object exists at some position in its containing stream. |
void |
setLegacyLevel(int eLevel)
Cascade the legacy level.
|
void |
update(boolean bEraseBkgnd)
Tell the base class that the object has changed
The derived class must support the ability to make changes through the derived object's API. |
abstract UnitSpan |
width()
Pure virtual: Return the width of the object
|
public static final int EMBED_AT_BASELINE
public static final int EMBED_AT_TOP
public static final int EMBED_AT_BOTTOM
public TextEmbed()
Create an embedded object that is not currently embedded in any stream.
public TextEmbed(TextEmbed oSource)
Create an embedded object by copying another embedded object. Note that the actual embed stream/position is not copied; the object is not initially embedded in any stream.
public void update(boolean bEraseBkgnd)
bEraseBkgnd - Optional: TRUE (default) if the object's
background is to be erased first; FALSE if not.public TextContext getContext()
public TextPosn position()
public void copyFrom(TextEmbed oSource)
oSource - Source embedded object to copypublic abstract boolean isEqual(TextEmbed poCompare)
poCompare - Pointer to object to compare against. The derived
class must cast this to its own type. As long as the derived class
follows the XTG jfObj convention for object types, it will never be
called with the wrong type.public abstract UnitSpan width()
public abstract UnitSpan height()
public boolean enforceHeight()
public abstract TextEmbed cloneEmbed()
public abstract void gfxDraw(GFXEnv oEnv)
oEnv - Graphic environment in which to draw the object.public void gfxSource(TextGfxSource oGfxSource)
oGfxSource - Graphic source used by the containing stream.public int embedAt()
public void setLegacyLevel(int eLevel)
This method allows the stream/object hierarchy to cascade the legacy level to embedded objects. The default implementation ignores the call.
eLevel - - New legacy level.Copyright © 2010 - 2020 Adobe. All Rights Reserved