/** A structure containing a substring and the start and end offsets in the enclosing string. IAccessibleText::newTextandIAccessibleText::oldTextreturnthisstruct.
*/ typedefstruct IA2TextSegment {
BSTR text; ///< A copy of a segment of text taken from an enclosing paragraph.
long start; ///< Index of the first character of the segment in the enclosing text.
long end; ///< Index of the character following the last character of the segment in the enclosing text.
} IA2TextSegment;
/** This enum defines values which specify a text boundary type.
enum IA2TextBoundaryType { /** Typically, a single character is returned. In some cases more than one characterisreturned,forexample,whenadocumentcontainsfielddatasuch asafieldcontainingadate,time,orfootnotereference.Inthiscase thecaretcanmoveoverseveralcharactersinonemovementofthecaret. Note,thatafterthecaretmoves,thecaretoffsetchangesbythenumberof charactersinthefield,e.g.by8charactersinthefollowingdate:03/26/07.
*/
IA2_TEXT_BOUNDARY_CHAR,
/** The range provided matches the range observed when the application processestheCtrl+leftarrowandCtrl+rightarrowkeysequences. Typicallythisisfromthestartofonewordtothestartofthenext,but variousapplicationsareinconsistentinthehandlingoftheendofaline.
*/
IA2_TEXT_BOUNDARY_WORD,
/** Range is from start of one sentence to the start of another sentence.
*/
IA2_TEXT_BOUNDARY_SENTENCE,
/** Range is from start of one paragraph to the start of another paragraph.
*/
IA2_TEXT_BOUNDARY_PARAGRAPH,
/** Range is from start of one line to the start of another line. This often meansthatanend-of-linecharacterwillappearattheendoftherange. Howeverinthecaseofsomeapplicationsanend-of-linecharacterindicates theendofaparagraphandthelinescomposingtheparagraph,otherthan thelastline,donotcontainanendoflinecharacter.
*/
IA2_TEXT_BOUNDARY_LINE,
/** <b>Deprecated.</b> Using this value will cause all text to be returned. Note:IAccessibleText::textshouldbeusedinstead.
*/
IA2_TEXT_BOUNDARY_ALL
};
/** @brief This interface gives read-only access to text.
/** @brief Returns the bounding box of the specified position. Thevirtualcharacterafterthelastcharacteroftherepresented text,i.e.theoneatpositionlengthisaspecialcase.Itrepresentsthe currentinputpositionandwillthereforetypicallybequeriedbyATmore oftenthanotherpositions.Becauseitdoesnotrepresentanexistingcharacter itsboundingboxisdefinedinrelationtoprecedingcharacters.Itshouldbe roughlyequivalenttotheboundingboxofsomecharacterwheninsertedatthe endofthetext.Itsheighttypicallybeingthemaximalheightofallthe charactersinthetextortheheightoftheprecedingcharacter,itswidthbeing atleastonepixelsothattheboundingboxisnotdegenerate.
Notethattheindex'length'isnotalwaysvalid.Whetheritisornotis implementationdependent.Ittypicallyiswhentextiseditableorotherwise whenonthescreenthecaretcanbeplacedbehindthetext.Youcanbesure thattheindexisvalidafteryouhavereceiveda::IA2_EVENT_TEXT_CARET_MOVED eventforthisindex. @param[in]offset Indexofthecharacterforwhichtoreturnitsboundingbox.Thevalidrange is0..length.Referto@ref_specialOffsets "SpecialOffsetsforuseintheIAccessibleTextandIAccessibleEditableTextMethods" forinformationaboutspecialoffsetsthatcanbeusedin%IAccessibleTextmethods. @param[in]coordType Specifiesifthecoordinatesarerelativetothescreenortotheparentwindow. @param[out]x Xcoordinateofthetopleftcorneroftheboundingboxofthereferencedcharacter. @param[out]y Ycoordinateofthetopleftcorneroftheboundingboxofthereferencedcharacter. @param[out]width Widthoftheboundingboxofthereferencedcharacter. @param[out]height Heightoftheboundingboxofthereferencedcharacter. @retvalS_OK @retvalE_INVALIDARGifbad[in]passed
*/
[propget] HRESULT characterExtents
(
[in] long offset,
[in] enum IA2CoordinateType coordType,
[out] long *x,
[out] long *y,
[out] long *width,
[out, retval] long *height
);
/** @brief Returns the number of active non-contiguous selections @param[out]nSelections @retvalS_OK
*/
[propget] HRESULT nSelections
(
[out, retval] long *nSelections
);
/** @brief Returns the text position for the specified screen position. Givenapointreturnthezero-basedindexofthecharacterunderthat point.Thesamefunctionalitycouldbeachievedbyusingthebounding boxesforeachcharacterasreturnedbyIAccessibleText::characterExtents. ThemethodIAccessibleText::offsetAtPoint,however,canbeimplemented moreefficiently. @param[in]x Theposition'sxvalueforwhichtolookuptheindexofthecharacterthat isrenderedontothedisplayatthatpoint. @param[in]y Theposition'syvalueforwhichtolookuptheindexofthecharacterthat isrenderedontothedisplayatthatpoint. @param[in]coordType Screencoordinatesorwindowcoordinates. @param[out]offset Indexofthecharacterunderthegivenpointor-1ifthepoint isinvalidorthereisnocharacterunderthepoint. @retvalS_OK @retvalS_FALSEifnothingtoreturn,[out]valueis-1
@retvalE_INVALIDARGifbad[in]passed
*/
[propget] HRESULT offsetAtPoint
(
[in] long x,
[in] long y,
[in] enum IA2CoordinateType coordType,
[out, retval] long *offset
);
/** @brief Returns the character offsets of Nth active text selection
/** @brief Returns a text portion before the given position. Returnsthesubstringofthespecifiedtexttypethatislocatedbeforethe givencharacteranddoesnotincludeit.Theresultofthismethodshouldbe sameasaresultforIAccessibleText::textAtOffsetwithasuitablydecreased indexvalue.
/** @brief Returns a text portion after the given position. Returnsthesubstringofthespecifiedtexttypethatislocatedafterthe givencharacteranddoesnotincludeit.Theresultofthismethodshouldbe sameasaresultforIAccessibleText::textAtOffsetwithasuitablyincreased indexvalue.
/** @brief Unselects a range of text. @param[in]selectionIndex Indexofselectiontoremove(0based). @retvalS_OK @retvalE_INVALIDARGifbad[in]passed
*/
HRESULT removeSelection
(
[in] long selectionIndex
);
/** @brief Makes a specific part of string visible on screen. @param[in]startIndex 0basedcharacteroffset. @param[in]endIndex 0basedcharacteroffset-theoffsetofthecharacterjustpastthelastcharacterofthestring. @param[in]scrollType Defineswheretheobjectshouldbeplacedonthescreen. @retvalS_OK @retvalE_INVALIDARGifbad[in]passed @noteReferto@ref_specialOffsets "SpecialOffsetsforuseintheIAccessibleTextandIAccessibleEditableTextMethods" forinformationaboutspecialoffsetsthatcanbeusedin%IAccessibleTextmethods.
*/
HRESULT scrollSubstringTo
(
[in] long startIndex,
[in] long endIndex,
[in] enum IA2ScrollType scrollType
);
/** @brief Moves the top left of a substring to a specified location.
@param[in]startIndex 0basedcharacteroffset. @param[in]endIndex 0basedcharacteroffset-theoffsetofthecharacterjustpastthelastcharacterofthestring. @param[in]coordinateType Specifieswhetherthecoordinatesarerelativetothescreenortheparentobject. @param[in]x Definesthexcoordinate. @param[in]y Definestheycoordinate. @retvalS_OK @retvalS_FALSEiftheobjectisalreadyatthespecifiedlocation. @retvalE_INVALIDARGifbad[in]passed @noteReferto@ref_specialOffsets "SpecialOffsetsforuseintheIAccessibleTextandIAccessibleEditableTextMethods" forinformationaboutspecialoffsetsthatcanbeusedin%IAccessibleTextmethods.
*/
HRESULT scrollSubstringToPoint
(
[in] long startIndex,
[in] long endIndex,
[in] enum IA2CoordinateType coordinateType,
[in] long x,
[in] long y
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.