#include <IWaxRunShape.h>
|
| virtual void | GetInkBounds (PMRect *pInkBounds, Text::DrawPassInfoList *passList) const =0 |
| |
| virtual void | GetWaxBounds (int32 offset, int32 length, K2Vector< PMPolygon4 > *pSetOfBounds) const =0 |
| |
| virtual bool16 | GetHighlightBounds (int32 offset, int32 length, K2Vector< PMPolygon4 > *pSetOfBounds, PMRect &highlightAdjust, const PMLineSeg &maxTopBottom) const =0 |
| |
| virtual bool16 | GetHighlightBoundsME (int32 runGlyphStartIndex, int32 start, int32 startInner, int32 end, int32 endInner, K2Vector< PMPolygon4 > *pSetOfBounds, PMRect &highlightAdjust, const PMLineSeg &maxTopBottom) const =0 |
| |
| virtual bool16 | GetSelectionLine (PMLineSeg *pSelectionLine) const =0 |
| |
| virtual bool16 | GetHighlightLine (PMLineSeg *pHighlightLine, const PMLineSeg &maxTopBottom) const =0 |
| |
| virtual void | GetCaretLineAt (int32 offset, PMLineSeg *pCaretLine, const PMLineSeg &maxTopBottom) const =0 |
| |
| virtual int32 | GetSelectionMode () const =0 |
| |
| virtual void | SetSelectionMode (int32 mode)=0 |
| |
| virtual int32 | GetFlags () const =0 |
| |
| virtual void | SetFlags (int32 flags)=0 |
| |
| virtual void | GetBorderShadingHeight (int32 mode, PMLineSeg *pShadingHeight) const =0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
|
| enum IWaxRunShape:: { ... } | WaxRunFlags |
| |
Interface for accessing the shape of the wax run. I.e. it's various bounds and related flags. Used mostly for selection and highlighting.
- See Also
- CWaxRunShape, IWaxLineShape
WaxRun flags
| Enumerator |
|---|
| kFlag_IsFirstStacked | Run is in a stacked collection and is the first in the collection |
| kFlag_IsLastStacked | Run is in a stacked collection and is the last in the collection |
| kFlag_ReservedForImplementors | Area in which 3rd parties can add flags. |
| virtual void IWaxRunShape::GetBorderShadingHeight | ( | int32 | mode, | | | PMLineSeg * | pShadingHeight | | ) | | const |
| pure virtual |
Returns the shading height for this wax run based on the input shading mode.
- Parameters
- See Also
- IWaxLineShape::ShadingHeightMode - different modes for determining shading height.
- Parameters
| pShadingHeight | OUT - pointer to the line segment containing shading height. |
Implemented in CWaxRunShape.
| virtual void IWaxRunShape::GetCaretLineAt | ( | int32 | offset, | | | PMLineSeg * | pCaretLine, | | | const PMLineSeg & | maxTopBottom | | ) | | const |
| pure virtual |
Returns the caret bounds at the given position. I.e. the bounds of the caret.
- Parameters
| offset | A valid offset in to the wax, relative to this run. |
| pCaretLine | The returned bounds of the caret. See IWaxLineShape::GetCaretLineAt() for more details. |
| maxTopBottom | Constraint on the caret height - pCaretLine will be trimmed to maxTopBottom (if DeltaY() is non-zero). |
- See Also
- IWaxLineShape
Implemented in CWaxRunShape, and CWaxCollectionShape.
| virtual int32 IWaxRunShape::GetFlags | ( | | ) | const |
| pure virtual |
| virtual bool16 IWaxRunShape::GetHighlightBounds | ( | int32 | offset, | | | int32 | length, | | | K2Vector< PMPolygon4 > * | pSetOfBounds, | | | PMRect & | highlightAdjust, | | | const PMLineSeg & | maxTopBottom | | ) | | const |
| pure virtual |
Get the set of polygons representing the area to be highlighted when the given range of text is highlighted, taking
into consideration the context of the run. (i.e. convert TextRange to Bounding box)
- Parameters
| offset | IN where in the run to start the computation for the highlight (0 for the start of the waxRun) |
| length | IN the length of the text to highlight (-1 can be used to denote the rest of the text to the end of the waxRun) |
| pSetOfBounds | OUT the resulting set of bounds. There may be none, one, or many bounds that apply to this run. |
| highlightAdjust | IN Used to indicate that an amount should be shaved off the highlight on the indicated side (used to prevent double XOR problems when two (adjacent) waxRun's highlights touch). |
| maxTopBottom | IN is used to prevent double XOR problems when waxRuns are too close together.- any highlight should be trimmed to these bounds (if DeltaY() is non-zero).
|
- Returns
- kTrue if you can use XOR to highlight the text.
- Note
- See notes in GetWaxBounds for the difference between waxBounds and highlightBounds.
Implemented in CWaxCollectionShape, and CWaxRunShape.
| virtual bool16 IWaxRunShape::GetHighlightLine | ( | PMLineSeg * | pHighlightLine, | | | const PMLineSeg & | maxTopBottom | | ) | | const |
| pure virtual |
Get the highlight line (top/bottom) for this run within its collection.
- Note
- : this depends on the collection having processed each run's Selection Line (which is presented to this run as maxTopBottom).
- Parameters
| maxTopBottom | Constraint on the caret height - pHighlightLine will be trimmed to maxTopBottom (if DeltaY() is non-zero). |
- Returns
- kTrue if you can use XOR to highlight the text.
- Note
- See notes in GetWaxBounds for the difference between waxBounds (in this case, selectionLine) and highlightBounds (in this case, highlightLine).
Implemented in CWaxRunShape, and CWaxCollectionShape.
Retrieve the Ink Bounds for this wax run. Called by IWaxLineShape. For more details on parameters and description, see IWaxLineShape.
- Parameters
| pInkBounds | OUT The overall bounds of this run. |
| passList | OUT The list of Draw() passes that this Run requires to draw. This includes the text, local adornments and OPTIONAL global adornments.- The only IGlobalTextAdornment that need to be added in this list are those whose CheckCouldDraw() method returns kTrue AND whose CheckGetCheckIsActive() method return kTrue. (there is no reason for the WaxRuns and WaxLines to save pass information for global adornments that are not optional - the containing parcel has access to the same information through the ITextSessionData interface)
|
When called, the passList may not be empty so it is important to avoid creating duplicates or redundant pass information. The rule is that a required pass always overrides one or more optional passes. However, lacking a required pass, any number of optional passes may simultaneous exist. I.e. use the following pattern:
if (passList->Location(required) == -1)
passList->Append(required);
if (passList->Location(required) == -1)
passList->Append(optional);
- See Also
- IWaxLineShape, IGlobalTextAdornment, ITextAdornment, IWaxRunText
Implemented in CWaxCollectionShape, and CWaxRunShape.
| virtual bool16 IWaxRunShape::GetSelectionLine | ( | PMLineSeg * | pSelectionLine | ) | const |
| pure virtual |
Get the selection line (top/bottom) for THIS run.
- Note
- : this is NOT necessarily the actual highlight line - that is determined by looking at all the runs in the collection.
- Parameters
| pSelectionLine | OUT the calculated line. |
- Returns
- kTrue if you can use XOR to highlight the text.
- Note
- See notes in GetWaxBounds for the difference between waxBounds (in this case, selectionLine) and highlightBounds (in this case, highlightLine).
Implemented in CWaxRunShape, and CWaxCollectionShape.
| virtual int32 IWaxRunShape::GetSelectionMode | ( | | ) | const |
| pure virtual |
| virtual void IWaxRunShape::GetWaxBounds | ( | int32 | offset, | | | int32 | length, | | | K2Vector< PMPolygon4 > * | pSetOfBounds | | ) | | const |
| pure virtual |
Get the set of polygons representing the area of the wax representing the glyphs representing the text.
(i.e. convert TextRange to Bounding box)
- Parameters
| offset | IN where in the run to start the computation for the highlight (0 for the start of the waxRun) |
| length | IN the length of the text to highlight (-1 can be used to denote the rest of the text to the end of the waxRun) |
| pSetOfBounds | OUT the resulting set of bounds. There may be none, one, or many bounds that apply to this run. |
- Note
- The Wax Bounds represents the true area of the run.
- : the DIFFERENCE between the wax bounds and the highlight bounds is that the latter can be modified due to the context of the waxRun. E.g. if the leading is too small the wax bounds can overlap, so the higher level code restricts the top/bottom of the highlight. Also, if the font is smaller in this run, the upper level code may ask for consistent highlighting and can expand the bounds. Super/Subscripts are another example. (and Drop Caps are another issue entirely.)
Implemented in CWaxCollectionShape, and CWaxRunShape.
| virtual void IWaxRunShape::SetFlags | ( | int32 | flags | ) | |
| pure virtual |
Property Accessor for WaxRunFlags in this interface. - Caller must do any ANDing or ORing.
Implemented in CWaxRunShape.
| virtual void IWaxRunShape::SetSelectionMode | ( | int32 | mode | ) | |
| pure virtual |