#if (__midl >= 501) midl_pragma warning( disable: 2400 2401 ) // file already imported midl_pragma warning( disable: 2209 ) // ignored redundant attr #endif import "oaidl.idl"; import "ocidl.idl"; import "dispex.idl"; import "basetsd.h"; interface IRanges; interface IBookmarks; interface IMarkers; interface ISyntax; interface IScope; interface IView; interface IViews; interface IMenuObject; [ uuid(9BB2963C-6859-4499-B1C3-6A13B2EE2472), version(1.0), helpstring("HEEditorLib 1.0 Type Library") ] library HEEditorLib { importlib("stdole2.tlb"); //module HE_LIB_CONSTANTS //{ typedef long LINE_T; typedef long POS_T; typedef [uuid(486931A2-918F-40EB-A615-168294218E22), helpstring("Defines Word Wrap modes for editor.")] enum ecWordWrapModes { [helpstring("Word Wrap is disabled.")] ecWordWrapModeDisabled, [helpstring("Word Wrap done by window edge.")] ecWordWrapModeWindowEdge, [helpstring("Word Wrap done after specified column (See method SetWordWrapPos).")] ecWordWrapModeColumnNum, [helpstring("Word Wrap done after specified column inserting Hard Break ('Enter') in wrap position.")] ecWordWrapModeColumnNumInsHB } ecWordWrapModes; typedef [uuid(378FEEF9-AB2B-4258-B857-00289667E57A), helpstring("Defines Pretty Print Mode for inserted Tabs and Spaces.")] enum ecTabModes { [helpstring("Determine mode from content.")] ecTabModeAuto, [helpstring("Keep tabs and spaces as they typed.")] ecTabModeAsTyped, [helpstring("Convert typed Tabs into Spaces.")] ecTabModeTabsToSpaces, [helpstring("Convert typed Spaces into Tabs.")] ecTabModeSpacesToTabs } ecTabModes; typedef [uuid(DB543AB1-3906-4336-A2D9-FEACFCEFD95B), helpstring("Defines modes for typed keywords Case Correction.")] enum ecCaseModes { [helpstring("Keep case of keywords as it typed.")] ecCaseModeAsTyped, [helpstring("Convert keywords to uppercase.")] ecCaseModeUppercase, [helpstring("Convert keywords to lowercase.")] ecCaseModeLowercase, [helpstring("Capitalize keywords.")] ecCaseModeCapital, [helpstring("Convert to case of keyword defined in syntax schema.")] ecCaseModeLikeInDict } ecCaseModes; typedef [uuid(87FD2D83-3CEE-4556-889E-89ECA88DC1A3), helpstring("Defines type of image to be created.")] enum eImageType { [helpstring("Image to be displayed on selection margin (as bookmark etc).")] ecImageTypeMarkerImg, [helpstring("Image to be displayed in Completion list.")] ecImageTypeCompletionImg } eImageType; typedef [uuid(80553850-284E-4662-91FF-103C80A1F498), helpstring("Types of the Undo Actions.")] enum HE_ACTION { [helpstring("Unknown Action")] HE_ACTION_UNKNOWN, [helpstring("Text Pasted")] HE_ACTION_PASTE, [helpstring("Selection deleted")] HE_ACTION_DELSEL, [helpstring("Selection Cuted")] HE_ACTION_CUT, [helpstring("Text Typed")] HE_ACTION_TYPING, [helpstring("Text deleted with BackSpace")] HE_ACTION_BACKSPACE, [helpstring("Text Indented")] HE_ACTION_INDENT, [helpstring("Drag and Drop executed")] HE_ACTION_DRAGDROP, [helpstring("Text Replaced")] HE_ACTION_REPLACE, [helpstring("Text deleted")] HE_ACTION_DELETE, [helpstring("Auto Indent of text executed")] HE_ACTION_AUTOINDENT, [helpstring("Text auto completed")] HE_ACTION_AUTOCOMPLETE, [helpstring("Template expanded")] HE_ACTION_AUTOEXPAND, [helpstring("Text converted to lower case")] HE_ACTION_LOWERCASE, [helpstring("Text converted to upper case")] HE_ACTION_UPPERCASE, [helpstring("Text case swaped")] HE_ACTION_SWAPCASE, [helpstring("Text capitalized")] HE_ACTION_CAPITALIZE, [helpstring("Text adopted to sentence like")] HE_ACTION_SENTENCIZE, [helpstring("Case of keyword corected")] HE_ACTION_CORRECTCASE, [helpstring("Closed brace added")] HE_ACTION_ADDBRACE, [helpstring("Misspelled word corrected from autocorrection dictionary")] HE_ACTION_AUTOCORRECT, [helpstring("CapsLock is corrected")] HE_ACTION_CORRECTCAPS, [helpstring("Typed Spaces converted to Tabs")] HE_ACTION_SPACETOTABS, [helpstring("Typed Tabs converted to Spaces")] HE_ACTION_TABSTOSPACE, [helpstring("Selected lines are joined in one")] HE_ACTION_JOINLINES, [helpstring("Text is wrapped by Hard Wrap")] HE_ACTION_WRAP, [helpstring("Tab character replaced by correct indent")] HE_ACTION_SMARTTAB, [helpstring("Selected text is commented")] HE_ACTION_COMMENT, [helpstring("Selected text is uncommented")] HE_ACTION_UNCOMMENT, [helpstring("Selected lines are sorted")] HE_ACTION_SORTLINES, [helpstring("Selected text formatted")] HE_ACTION_FORMAT, [helpstring("Selected line was trasposed")] HE_ACTION_LINE_TRANSPOSE, [helpstring("Selected line was duplicated")] HE_ACTION_LINE_DUPLICATE, [helpstring("Selected line was moved")] HE_ACTION_LINE_MOVE_UP, HE_ACTION_SMART_COMMENT, HE_ACTION_LINE_ABOVE, HE_ACTION_LINE_BELOW, HE_ACTION_PASTE_AS_HTML, HE_ACTION_VIRTUAL_SPACE, HE_ACTION_REPLACE_ALL, HE_ACTION_LINE_CUT, HE_ACTION_LINE_DELETE, HE_ACTION_LINE_DELETE_TILL_END, HE_ACTION_LINE_MOVE_DOWN, HE_ACTION_CRLF_MODE, HE_ACTION_ENCODING, HE_ACTION_SYNTAX, HE_ACTION_COPY_SELECTION, HE_ACTION_MOVE_SELECTION, HE_ACTION_DELETE_DUPLICATES, HE_ACTION_REMOVEBRACE, HE_ACTION_BOOKMARKED_LINES_DELETE, HE_ACTION_BOOKMARKED_LINES_CUT, HE_ACTION_CONVERT_SYMBOL, HE_ACTION_INSERT_FILE, HE_ACTION_TRIM_WHITE_SPACE, HE_ACTION_TOOL_COMMAND, HE_ACTION_LAST } HE_ACTION; typedef [uuid(4C6AE688-6A82-4D7C-A3A7-42FC0498D67F), helpstring("Line Break types")] enum eCRLFStyle { eCRLFStyleMixed = -2, eCRLFStyleAuto = -1, eCRLFStyleDOS = 0, eCRLFStyleOther = 1, eCRLFStyleUnix = 2, eCRLFStyleMac = 3, eCRLFStyleIBM = 4, eCRLFStyleNone = 5, eCRLFStyleLast } eCRLFStyle; typedef [uuid(1FF7477D-5325-4883-AA2C-AFD8E7E62CE1), helpstring("Status message types.")] enum eMessageType { [helpstring("Standard status message.")] eMessageTypeNone, [helpstring("Information status message.")] eMessageTypeInfo, [helpstring("Warning status message.")] eMessageTypeWarning, [helpstring("Error status message.")] eMessageTypeError, [helpstring("Last status message (do not use)")] eMessageTypeLast } eMessageType; typedef [uuid(C1CCB649-B3F1-4692-A5A1-1B7DD58A3A12), helpstring("Label context types.")] enum eLabelContext { [helpstring("No context exist.")] eLabelContextNone, [helpstring("Used for break, continue statements.")] eLabelContextExitScope, [helpstring("Used for return statements.")] eLabelContextExitGlobal, [helpstring("Last context value (do not use)")] eLabelContextLast } eLabelContext; typedef [uuid(E89E9B4F-5D8E-4bc2-9DCD-5E46D75CE6FE), helpstring("Marker types.")] enum eMarker { [helpstring("Marker type is undefined.")] eMarkerUndefined, [helpstring("Marker type is Unknown.")] eMarkerUnknown, [helpstring("Marker is Breakpoint.")] eMarkerBreakpoint, [helpstring("Marker is Bookmark")] eMarkerBookmark, [helpstring("Marker is Numbered Bookmark")] eMarkerBookmarkNum, [helpstring("Marker is Execution Line")] eMarkerExecution, [helpstring("Marker is Anchor Position")] eMarkerPosition, [helpstring("Marker is Error Line")] eMarkerError, [helpstring("Last marker type value (do not use)")] eMarkerLast } eMarker; //}; [ object, pointer_default(unique), helpstring("Name-Value pair"), uuid(2B889031-F6C1-4C32-BF79-2F4F7CB42B7B), dual, nonextensible ] interface INameValue : IDispatch { [propget, id(1), helpstring("Name")] HRESULT Name([out, retval] BSTR* psName); [propput, id(1), helpstring("Name")] HRESULT Name([in] BSTR sName); [propget, id(2), helpstring("Value")] HRESULT Value([out, retval] VARIANT* pVal); [propput, id(2), helpstring("Value")] HRESULT Value([in] VARIANT val); }; [ object, pointer_default(unique), helpstring("INameValue Collection Interface"), uuid(6C5C0E29-244D-4AF1-85C5-CB13FC1F373B), dual, nonextensible ] interface INameValues : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] INameValue** ppNameValue); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; /************************************************************************/ /* ISettingsStorage object */ /************************************************************************/ [ object, uuid(E1C48487-5CDD-4f80-8FC5-AB851142D4E6), dual, helpstring("Service object for data/settings storage"), pointer_default(unique) ] interface ISettingsStorage : IDispatchEx { [propget, id(10), helpstring("Returns storage name")] HRESULT Name([out, retval] BSTR* strName); [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] ISettingsStorage** ppObject); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); [id(0x00000002), propget, helpstring("Gets name value pairs collection")] HRESULT Values([out, retval] VARIANT* pVal); [id(0x00000003), helpstring("Adds new storage object to collection")] HRESULT Add([in] BSTR strName, [out, retval] ISettingsStorage** ppObject); [id(0x00000004), helpstring("Remove child storage object from collection")] HRESULT Remove([in] long Index); [id(0x00000005), helpstring("Gets child storage object by name")] HRESULT Get([in] BSTR strName, [in] VARIANT_BOOL bCreate, [out, retval] ISettingsStorage** ppObject); [id(0x00000006), helpstring("Remove children and attributes")] HRESULT RemoveAll([in, optional, defaultvalue(-1)] VARIANT_BOOL bNodes, [in, optional, defaultvalue(-1)] VARIANT_BOOL bAttributes); [id(0x00000007), helpstring("Copy contents of another storage object")] HRESULT Copy([in] VARIANT storage); [id(20), helpstring("Reads object from storage")] HRESULT read([in] BSTR strValueName, [out, retval] VARIANT* pVar); [id(21), helpstring("Writes object to storage")] HRESULT write([in] BSTR strValueName, [in] VARIANT pVar); }; [ object, uuid(3E259B29-2171-47ca-9CD4-14757403BC0F), dual, helpstring("IStyle"), pointer_default(unique) ] interface IStyle : IDispatchEx { typedef [uuid(212D44DB-D7A3-4D9E-B94F-5D67CE5A7971), helpstring("Text underlining style")] enum eUnderlineStyle { [helpstring("No text underlining.")] eUnderlineStyleNone, [helpstring("Solid line text underlining.")] eUnderlineStylePlain, [helpstring("Diagonal text underlining.")] eUnderlineStyleDiagonal, [helpstring("Wave text underlining.")] eUnderlineStyleSquiggle, [helpstring("T-like text underlining.")] eUnderlineStyleTT, } eUnderlineStyle; typedef [uuid(4C33ACE3-FDB3-439c-AD5D-ADB1D6D3A44E), helpstring("Text box style")] enum eBoxStyle { [helpstring("No text box.")] eBoxStyleNone, [helpstring("Rectangular text box.")] eBoxStyleRect, [helpstring("Round rectangular text box.")] eBoxStyleRoundRect, [helpstring("Vertically bounded box.")] eBoxStyleVertBounded, [helpstring("Horiyontally bounded box.")] eBoxStyleHorizBounded, } eBoxStyle; [propget, id(1), helpstring("ID property")] HRESULT ID([out, retval] BSTR* psID); [propget, id(2), helpstring("Name property")] HRESULT Name([out, retval] BSTR* psName); [propput, id(2), helpstring("Name property")] HRESULT Name([in] BSTR sName); [propget, id(3), helpstring("Description property")] HRESULT Description([out, retval] BSTR* psDescription); [propput, id(3), helpstring("Description property")] HRESULT Description([in] BSTR sDescription); [propget, id(4), helpstring("Image property")] HRESULT Image([out, retval] long* pnImage); [propput, id(4), helpstring("Image property")] HRESULT Image([in] long nImage); [propget, id(5), helpstring("Syntax property")] HRESULT Syntax([out, retval] ISyntax** ppSyntax); [propget, id(6), helpstring("ForeColor property")] HRESULT ForeColor([out, retval] VARIANT* pclrForeColor); [propput, id(6), helpstring("ForeColor property")] HRESULT ForeColor([in] VARIANT clrForeColor); [propget, id(7), helpstring("BackColor property")] HRESULT BackColor([out, retval] VARIANT* pclrBackColor); [propput, id(7), helpstring("BackColor property")] HRESULT BackColor([in] VARIANT clrBackColor); [propget, id(8), helpstring("UnderlineColor property")] HRESULT UnderlineColor([out, retval] VARIANT* pclrUnderlineColor); [propput, id(8), helpstring("UnderlineColor property")] HRESULT UnderlineColor([in] VARIANT clrUnderlineColor); [propget, id(19), helpstring("BoxColor property")] HRESULT BoxColor([out, retval] VARIANT* pclrColor); [propput, id(19), helpstring("BoxColor property")] HRESULT BoxColor([in] VARIANT clrColor); [propget, id(20), helpstring("BoxBackColor property")] HRESULT BoxBackColor([out, retval] VARIANT* pclrColor); [propput, id(20), helpstring("BoxBackColor property")] HRESULT BoxBackColor([in] VARIANT clrColor); [propget, id(9), helpstring("Text property")] HRESULT Text([out, retval] long* pbText); [propput, id(9), helpstring("Text property")] HRESULT Text([in] long bText); [propget, id(10), helpstring("Bold property")] HRESULT Bold([out, retval] long* pbBold); [propput, id(10), helpstring("Bold property")] HRESULT Bold([in] long bBold); [propget, id(11), helpstring("Italic property")] HRESULT Italic([out, retval] long* pbItalic); [propput, id(11), helpstring("Italic property")] HRESULT Italic([in] long bItalic); [propget, id(12), helpstring("Underline property")] HRESULT Underline([out, retval] long* pbUnderline); [propput, id(12), helpstring("Underline property")] HRESULT Underline([in] long bUnderline); [propget, id(13), helpstring("StrikeOut property")] HRESULT StrikeOut([out, retval] long* pbStrikeOut); [propput, id(13), helpstring("StrikeOut property")] HRESULT StrikeOut([in] long bStrikeOut); [propget, id(14), helpstring("HotSpot property")] HRESULT HotSpot([out, retval] long* pbHotSpot); [propput, id(14), helpstring("HotSpot property")] HRESULT HotSpot([in] long bHotSpot); [propget, id(15), helpstring("Overview property")] HRESULT Overview([out, retval] long* pbOverview); [propput, id(15), helpstring("Overview property")] HRESULT Overview([in] long bOverview); [propget, id(21), helpstring("Abstract property")] HRESULT Abstract([out, retval] VARIANT_BOOL* pbVal); [propput, id(21), helpstring("Abstract property")] HRESULT Abstract([in] VARIANT_BOOL bVal); [propget, id(22), helpstring("Changeable property")] HRESULT Changeable([out, retval] long* pbVal); [propput, id(22), helpstring("Changeable property")] HRESULT Changeable([in] long bVal); [propget, id(23), helpstring("Visible property")] HRESULT Visible([out, retval] long* pbVal); [propput, id(23), helpstring("Visible property")] HRESULT Visible([in] long bVal); [propget, id(16), helpstring("UnderlineStyle property")] HRESULT UnderlineStyle([out, retval] eUnderlineStyle* peUnderlineStyle); [propput, id(16), helpstring("UnderlineStyle property")] HRESULT UnderlineStyle([in] eUnderlineStyle eUnderlineStyle); [propget, id(17), helpstring("BoxStyle property")] HRESULT BoxStyle([out, retval] eBoxStyle* pnBoxStyle); [propput, id(17), helpstring("BoxStyle property")] HRESULT BoxStyle([in] eBoxStyle nBoxStyle); [propget, id(18), helpstring("Include style")] HRESULT IncludeStyle([out, retval] IStyle** ppStyle); [id(30), helpstring("Check, if word is known keyword")] HRESULT IsKeyword([in] BSTR szWord, [out, retval] VARIANT_BOOL* pResult); }; [ object, pointer_default(unique), helpstring("IStyles Interface"), uuid(961A2A63-6531-4861-A634-CEA1E99B8259), dual, nonextensible ] interface IStyles : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IStyle** ppStyle); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, uuid(3AAA18D9-E7D6-4d14-A3BA-8D35DFE77DE2), dual, helpstring("ISyntax"), pointer_default(unique) ] interface ISyntax : IDispatchEx { [propget, id(1), helpstring("ID property")] HRESULT ID([out, retval] BSTR* psID); [propget, id(2), helpstring("Name property")] HRESULT Name([out, retval] BSTR* psName); [propget, id(3), helpstring("Description property")] HRESULT Description([out, retval] BSTR* psDescription); [propget, id(4), helpstring("Specification file path property")] HRESULT SpecFilePath([out, retval] BSTR* psVal); [propget, id(5), helpstring("User file path property")] HRESULT UserFilePath([out, retval] BSTR* psVal); [propget, id(6), helpstring("Loaded property")] HRESULT Loaded([out, retval] VARIANT_BOOL* pbVal); [propget, id(7), helpstring("Parent syntax property")] HRESULT Parent([out, retval] ISyntax** ppSyntax); [propget, id(8), helpstring("Keyword count")] HRESULT KeywordCount([out, retval] long* pnCount); [propget, id(9), helpstring("Returns syntax style collection")] HRESULT Styles([out, retval] IStyles** ppStyles); [propget, id(10), helpstring("Return file pattern string")] HRESULT FilePattern([out, retval] BSTR* psPattern); [propget, id(11), helpstring("Reads Tab Size")] HRESULT TabSize([out, retval] long* pnVal); [propput, id(11), helpstring("Sets Tab Size")] HRESULT TabSize([in] long nVal); [propget, id(12), helpstring("Reads Tab/Space Mode")] HRESULT TabMode([out, retval] ecTabModes* pnVal); [propput, id(12), helpstring("Sets Tab/Space Mode")] HRESULT TabMode([in] ecTabModes nVal); [propget, id(13), helpstring("Reads Page Width (in characters)")] HRESULT PageWidth([out, retval] long* pnVal); [propput, id(13), helpstring("Sets Page Width (in characters)")] HRESULT PageWidth([in] long nVal); [propget, id(14), helpstring("Reads Maximum Line Length (in characters)")] HRESULT MaxLineLength([out, retval] long* pnVal); [propput, id(14), helpstring("Sets Maximum Line Length (in characters)")] HRESULT MaxLineLength([in] long nVal); [propget, id(15), helpstring("Reads Word Wrap mode for syntax")] HRESULT WordWrap([out, retval] ecWordWrapModes* pnVal); [propput, id(15), helpstring("Sets Word Wrap mode for syntax")] HRESULT WordWrap([in] ecWordWrapModes nVal); [id(20), helpstring("Returns style by style ID")] HRESULT GetStyle([in] BSTR sID, [out, retval] IStyle** ppStyle); [id(21), helpstring("Check, if word is known keyword")] HRESULT IsKeyword([in] BSTR szWord, [out, retval] VARIANT_BOOL* pResult); [id(22), helpstring("Check, if syntax is inherited from another syntax")] HRESULT IsInheritedFrom([in] BSTR szSyntax, [out, retval] VARIANT_BOOL* pResult); }; [ object, pointer_default(unique), helpstring("ISyntax Collection Interface"), uuid(1B9CB163-448A-48b6-A52C-3EDCE28B5CB0), dual, nonextensible ] interface ISyntaxes : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] ISyntax** ppStyle); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IPoint Interface"), uuid(2949BC75-703F-4223-BF03-01700FDF2DDF), dual, nonextensible ] interface IPoint : IDispatch { [propget, id(1), helpstring("x")] HRESULT x([out, retval] long* pnVal); [propput, id(1), helpstring("x")] HRESULT x([in] long nVal); [propget, id(2), helpstring("y")] HRESULT y([out, retval] long* pnVal); [propput, id(2), helpstring("y")] HRESULT y([in] long nVal); }; [ object, pointer_default(unique), helpstring("IPosition Interface"), uuid(3B3B8139-9BF7-414a-87FB-A5BD36ACAA66), dual, nonextensible ] interface IPosition : IDispatch { [propget, id(1), helpstring("Line")] HRESULT Line([out, retval] LINE_T* pnVal); [propput, id(1), helpstring("Line")] HRESULT Line([in] LINE_T nVal); [propget, id(2), helpstring("Position")] HRESULT Pos([out, retval] POS_T* pnVal); [propput, id(2), helpstring("Position")] HRESULT Pos([in] POS_T nVal); [propget, id(3), helpstring("Check if document position is valid (line and position is bigger then 0)")] HRESULT IsValid([out, retval] VARIANT_BOOL* pbVal); }; [ object, pointer_default(unique), helpstring("IPositions Collection Interface"), uuid(4D1F2AB8-0DA6-47c3-9D63-2B1601A0A309), dual, nonextensible ] interface IPositions : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IPositions** pRange); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IRange Interface"), uuid(186173F0-8084-4365-8E51-3DDA3E67DC9B), dual ] interface IRange : IDispatch { [propget, id(1), helpstring("Left")] HRESULT Left([out, retval] POS_T* pnVal); [propput, id(1), helpstring("Left")] HRESULT Left([in] POS_T nVal); [propget, id(2), helpstring("Top")] HRESULT Top([out, retval] LINE_T* pnVal); [propput, id(2), helpstring("Top")] HRESULT Top([in] LINE_T nVal); [propget, id(3), helpstring("Right")] HRESULT Right([out, retval] POS_T* pnVal); [propput, id(3), helpstring("Right")] HRESULT Right([in] POS_T nVal); [propget, id(4), helpstring("Bottom")] HRESULT Bottom([out, retval] LINE_T* pnVal); [propput, id(4), helpstring("Bottom")] HRESULT Bottom([in] LINE_T nVal); [propget, id(5), helpstring("Returns difference between Bottom and Top")] HRESULT Height([out, retval] LINE_T* pnVal); [propget, id(6), helpstring("Return difference between Right and Left")] HRESULT Width([out, retval] POS_T* pnVal); [propget, id(7), helpstring("Check if range is empty (Height and Width equals 0)")] HRESULT IsEmpty([out, retval] VARIANT_BOOL* pbVal); [propget, id(8), helpstring("Check if range is normalized (TopLeft point less or equal to BottomRight)")] HRESULT IsNormalized([out, retval] VARIANT_BOOL* pbVal); [propget, id(9), helpstring("Range start position")] HRESULT Start([out, retval] IPosition** ppPosition); [propput, id(9), helpstring("Range start position")] HRESULT Start([in] IPosition* pPosition); [propget, id(10), helpstring("Range end position")] HRESULT End([out, retval] IPosition** ppPosition); [propput, id(10), helpstring("Range end position")] HRESULT End([in] IPosition* pPosition); [id(20), helpstring("Normalizes the range")] HRESULT Normalize(); [id(21), helpstring("Inflate range")] HRESULT Inflate([in]POS_T nLeft, [in]LINE_T nTop, [in]POS_T nRight, [in]LINE_T nBottom); [id(22), helpstring("Checks if position is inside of range (greater or equal start and less than end position)")] HRESULT IsInside([in]IPosition* pPosition, [out, retval] VARIANT_BOOL* pbResult); [id(23), helpstring("Checks if position intersects range (greater or equal start and less or equal than end position)")] HRESULT IsIntersects([in]IPosition* pPosition, [out, retval] VARIANT_BOOL* pbResult); [id(24), helpstring("Checks if other range is inside of range (greater or equal start and less than end position)")] HRESULT IsRangeInside([in]IRange* pRange, [out, retval] VARIANT_BOOL* pbResult); [id(25), helpstring("Checks if other range intersects range (greater or equal start and less or equal than end position)")] HRESULT IsRangeIntersects([in]IRange* pRange, [out,retval]VARIANT_BOOL* pbResult); }; [ object, pointer_default(unique), helpstring("ISelection Interface"), uuid(A8E95A79-4E74-4838-A95D-9C8872EE8C0C), dual ] interface ISelection : IRange { [propget, id(100), helpstring("Block/Column mode")] HRESULT Block([out, retval] VARIANT_BOOL* pbVal); [propput, id(100), helpstring("Block/Column mode")] HRESULT Block([in] VARIANT_BOOL bVal); }; [ object, pointer_default(unique), helpstring("IRange Collection Interface"), uuid(2213C29F-FADE-498c-9EE7-355BDB132883), dual, nonextensible ] interface IRanges : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IRange** pRange); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IStyleRange Interface"), uuid(2EA04473-31F6-4774-B231-5D0E932CB451), dual, nonextensible ] interface IStyleRange : IDispatch { [propget, id(1), helpstring("Returns Style")] HRESULT Style([out, retval] IStyle** ppStyle); [propget, id(2), helpstring("Returns Range")] HRESULT Range([out, retval] IRange** ppRange); }; [ object, pointer_default(unique), helpstring("ILabelInfo Interface"), uuid(B7C96405-1BFD-4FA8-949C-5E5046320812), dual, nonextensible ] interface ILabelInfo : IDispatch { [propget, id(1), helpstring("Connected Syntax")] HRESULT Syntax([out, retval] ISyntax** ppSyntax); [propget, id(2), helpstring("Style container list")] HRESULT Containers([out, retval] IStyles** ppStyles); [propget, id(3), helpstring("Connected Style")] HRESULT Style([out, retval] IStyle** ppStyle); [propget, id(4), helpstring("Label group")] HRESULT Group([out, retval] BSTR* psVal); [propget, id(5), helpstring("Label context")] HRESULT Context([out, retval] eLabelContext* pnVal); [propget, id(6), helpstring("Navigation relevant flag")] HRESULT Navigation([out, retval] VARIANT_BOOL* pbVal); [propget, id(7), helpstring("Display label in UI")] HRESULT Visible([out, retval] VARIANT_BOOL* pbVal); [propget, id(8), helpstring("Match regular expression")] HRESULT Match([out, retval] BSTR* psVal); [propget, id(9), helpstring("Description match regular expression")] HRESULT DescriptionMatch([out, retval] BSTR* psVal); [propget, id(10), helpstring("Name regular expression replace string")] HRESULT Name([out, retval] BSTR* psVal); [propget, id(11), helpstring("Description regular expression replace string")] HRESULT Description([out, retval] BSTR* psVal); [propget, id(12), helpstring("Highlight regular expression replace string")] HRESULT Highlight([out, retval] BSTR* psVal); }; [ object, pointer_default(unique), helpstring("ILabel Interface"), uuid(ACAF9213-DA7E-4B18-B468-5073348445D6), dual, nonextensible ] interface ILabel : IDispatch { [propget, id(1), helpstring("Label definition information")] HRESULT Info([out, retval] ILabelInfo** ppInfo); [propget, id(2), helpstring("Connected Scope")] HRESULT Scope([out, retval] IScope** ppScope); [propget, id(3), helpstring("Label range")] HRESULT Range([out, retval] IRange** ppRange); [propget, id(4), helpstring("Name")] HRESULT Name([out, retval] BSTR* psVal); [propget, id(5), helpstring("Description")] HRESULT Description([out, retval] BSTR* psVal); [propget, id(6), helpstring("Highlight")] HRESULT Highlight([out, retval] BSTR* psVal); [propget, id(7), helpstring("Image")] HRESULT Image([out, retval] long* pnVal); [propget, id(8), helpstring("SubImage")] HRESULT SubImage([out, retval] long* pnVal); [propget, id(9), helpstring("Marker")] HRESULT Marker([out, retval] long* pnVal); }; [ object, pointer_default(unique), helpstring("ILabels Collection Interface"), uuid(E379C156-7389-4A32-8A72-AF8510B76465), dual, nonextensible ] interface ILabels : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] ILabel** ppLabel); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); [id(0x00000002), helpstring("Find Label from point")] HRESULT FromPoint([in] IPosition* pPos, [out, retval] ILabel** ppVal); [id(0x00000003), helpstring("Find Labels from range")] HRESULT FromRange([in] IRange* pRange, [out, retval] ILabels** ppVal); [id(0x00000004), propget, helpstring("Scope list version")] HRESULT Version([out, retval] ULONG* pnVersion); }; [ object, pointer_default(unique), helpstring("IScopeTagInfo Interface"), uuid(2DE1149C-937F-4aa4-A1D2-22CF76F54DAA), dual, nonextensible ] interface IScopeTagInfo : IDispatch { [propget, id(1), helpstring("Tag text")] HRESULT Text([out, retval] BSTR* psText); [propget, id(2), helpstring("Strict Mode")] HRESULT Strict([out, retval] VARIANT_BOOL* pbVal); [propget, id(3), helpstring("Sentence Start Mode")] HRESULT SentenceStart([out, retval] VARIANT_BOOL* pbVal); }; [ object, pointer_default(unique), helpstring("IScopeTagInfo Collection Interface"), uuid(DD15851F-2A36-4926-B7D6-E22E6B1271E4), dual, nonextensible ] interface IScopeTagInfos : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IScopeTagInfo** ppScopeTagInfo); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IScopeInfo Interface"), uuid(541215AA-DBC0-49F7-8816-BC262A8DF661), dual, nonextensible ] interface IScopeInfo : IDispatch { [propget, id(1), helpstring("Connected Syntax")] HRESULT Syntax([out, retval] ISyntax** ppSyntax); [propget, id(2), helpstring("Open style container list")] HRESULT OpenContainers([out, retval] IStyles** ppStyles); [propget, id(3), helpstring("Middle style container list")] HRESULT MiddleContainers([out, retval] IStyles** ppStyles); [propget, id(4), helpstring("Close style container list")] HRESULT CloseContainers([out, retval] IStyles** ppStyles); [propget, id(5), helpstring("Open tag")] HRESULT OpenTag([out, retval] IScopeTagInfo** ppTag); [propget, id(6), helpstring("Middle tag collection")] HRESULT MiddleTags([out, retval] IScopeTagInfos** ppTags); [propget, id(7), helpstring("Close tag collection")] HRESULT CloseTags([out, retval] IScopeTagInfos** ppTags); [propget, id(8), helpstring("Show separator")] HRESULT Separator([out, retval] VARIANT_BOOL* pbVal); [propget, id(9), helpstring("Indicates that the scope is only for decoration, and not influence syntax")] HRESULT Decoration([out, retval] VARIANT_BOOL* pbVal); }; [ object, pointer_default(unique), helpstring("IScope Interface"), uuid(C99E568B-AB3E-4CBB-A7BD-68AF0387B85E), dual, nonextensible ] interface IScope : IDispatch { [propget, id(1), helpstring("Scope definition information")] HRESULT Info([out, retval] IScopeInfo** ppInfo); [propget, id(2), helpstring("Connected Style")] HRESULT Style([out, retval] IStyle** ppStyle); [propget, id(3), helpstring("Connected Label")] HRESULT Label([out, retval] ILabel** ppLabel); [propget, id(4), helpstring("Name")] HRESULT Name([out, retval] BSTR* psName); [propget, id(5), helpstring("Collapsed state")] HRESULT Collapsed([out, retval] VARIANT_BOOL* pbVal); [propget, id(6), helpstring("Open tag range")] HRESULT Open([out, retval] IRange** ppRange); [propget, id(7), helpstring("Close tag range")] HRESULT Close([out, retval] IRange** ppRange); [propget, id(8), helpstring("Middle tags ranges")] HRESULT Middle([out, retval] IRanges** ppRanges); [propget, id(9), helpstring("Header end position")] HRESULT HeaderEnd([out, retval] IPosition** ppPosition); [propget, id(10), helpstring("Hierarchy level")] HRESULT Level([out, retval] ULONG* pnLevel); [propget, id(11), helpstring("Outer scope range")] HRESULT Outer([out, retval] IRange** ppRange); [propget, id(12), helpstring("Inner scope range")] HRESULT Inner([out, retval] IRange** ppRange); }; [ object, pointer_default(unique), helpstring("IScope Collection Interface"), uuid(D072416F-BFEC-47e2-874C-F7E5D64C8C81), dual, nonextensible ] interface IScopes : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IScope** ppScope); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); [id(0x00000002), helpstring("Find Scope from point")] HRESULT FromPoint([in] IPosition* pPos, [out, retval] IScope** ppVal); [id(0x00000003), helpstring("Find Scopes from range")] HRESULT FromRange([in] IRange* pRange, [out, retval] IScopes** ppVal); [id(0x00000004), helpstring("Find Scope parent")] HRESULT Parent([in] IScope* pScope, [out, retval] IScope** ppParent); [id(0x00000005), helpstring("Find Scope children")] HRESULT Children([in] IScope* pScope, [out, retval] IScopes** ppChildren); [id(0x00000006), propget, helpstring("Scope list version")] HRESULT Version([out, retval] ULONG* pnVersion); }; [ object, uuid(65E87E40-5E95-4F8F-A3F9-A70CF237B0EA), dual, helpstring("IDocumentStructure Interface"), pointer_default(unique) ] interface IDocumentStructure : IDispatchEx { typedef [uuid(FA5F8192-BDD0-444c-93B0-E0B3CDEAB377), helpstring("Scope kind for retrival")] enum eScopeKind { [helpstring("Closest surrounding scope, even comments etc")] eScopeKindAny, [helpstring("Closest surrounding scope, but not comments")] eScopeKindCode, [helpstring("Closest surrounding scope, that has name or label assigned")] eScopeKindNamed, [helpstring("Closest syntax surrounding scope")] eScopeKindSyntax, [helpstring("Scope with nesting level 0")] eScopeKindTopLevel, } eScopeKind; [propget, id(1), helpstring("Scope data version")] HRESULT ScopeDataVersion([out, retval] ULONG* pnVal); [propget, id(2), helpstring("True if scope data is valid")] HRESULT ScopeDataValid([out, retval] VARIANT_BOOL* pVal); [propget, id(3), helpstring("True if label data is valid")] HRESULT LabelDataValid([out, retval] VARIANT_BOOL* pVal); [propget, id(4), helpstring("Scopes collection")] HRESULT Scopes([out, retval] IScopes** ppScopes); [propget, id(5), helpstring("Not Closed Scopes collection")] HRESULT NotClosedScopes([out, retval] IScopes** ppScopes); [propget, id(6), helpstring("Not Open Scopes collection")] HRESULT NotOpenScopes([out, retval] IScopes** ppScopes); [propget, id(7), helpstring("Embedded styles")] HRESULT EmbeddedScopes([out, retval] IScopes** ppScopes); [propget, id(8), helpstring("Embedded styles")] HRESULT OverviewScopes([out, retval] IScopes** ppScopes); [propget, id(9), helpstring("Labels collection")] HRESULT Labels([out, retval] ILabels** ppLabels); [id(10), helpstring("Find Scope from point")] HRESULT FindScope([in] IPosition* pPos, [in, optional, defaultvalue(eScopeKindAny)] eScopeKind nScopeKind, [out, retval] IScope** ppScope); [id(11), helpstring("Find Scopes from range")] HRESULT FindScopes([in] IRange* pRange, [in, optional, defaultvalue(0)] VARIANT_BOOL bIncludeParents, [out, retval] IScopes** ppScopes); [id(12), helpstring("Find Label from point")] HRESULT FindLabel([in] IPosition* pPos, [out, retval] ILabel** ppLabel); [id(13), helpstring("Find Labels from range")] HRESULT FindLabels([in] IRange* pRange, [out, retval] ILabels** ppLabels); [id(14), helpstring("Forces re-start of the specific job. nLineFrom = 0, nLineTo = -1 - process whole document")] HRESULT ForceJob([in] BSTR sJobID, [in, optional, defaultvalue(0)] LINE_T nLineFrom, [in, optional, defaultvalue(-1)] LINE_T nLineTo); [id(15), helpstring("Checks if specific is still running (so its results are not up-to-date)")] HRESULT IsJobRunning([in] BSTR sJobID, [out, retval] VARIANT_BOOL* pbVal); }; [ object, uuid(588568CE-63A6-49d3-9B57-456488C737A9), dual, helpstring("Document Read-Only interface"), pointer_default(unique) ] interface IDocumentData : IDocumentStructure { typedef [ helpstring("Document coordinates") ] struct _POINT_T { long Line; long Pos; } POINT_T; typedef [ uuid(84F1DA56-95C5-42B0-82D7-1A215D50CD20), v1_enum, helpstring("Search modes, can be combined")] enum FIND { [helpstring("Takes into account case when searching")] FIND_MATCH_CASE = 0x0001, [helpstring("Searches whole word only, can not be combined with regular expression search")]FIND_WHOLE_WORD = 0x0002, [helpstring("Regular expression search")] FIND_REGEXP = 0x0004, [helpstring("Extend current selection till found position")] FIND_EXTENDED_SEL = 0x0008, [helpstring("Search from current position up")] FIND_DIRECTION_UP = 0x0010, [helpstring("Search hidden (collapsed) text also")] FIND_HIDDEN_TEXT = 0x0020, [helpstring("Higlight matching results")] FIND_HIGHLIGHT = 0x0040, [helpstring("Use incremental search")] FIND_INCREMENTAL = 0x0080, [helpstring("Close search dialog when found")] FIND_CLOSE_ON_FOUND = 0x0100, [helpstring("Wrap search, when end of document reached")] FIND_WRAP = 0x0200, [helpstring("Do not display any messages during search")] FIND_SILENT = 0x0400, [helpstring("If set, search dialog is displayed")] FIND_INTERACTIVE = 0x0800, [helpstring("Redirect results also to find results pane")] FIND_OUTPUT_RESULTS = 0x1000, [helpstring("Interpret given text as hex value")] FIND_HEX = 0x2000, [helpstring("Bookmark found lines")] FIND_BOOKMARK = 0x4000 } FIND; typedef [uuid(1E2B009A-A495-4902-8612-F5250E25C5BA), helpstring("Extended modes, used for multi file search; can be combined")] enum FIND_EX { [helpstring("Recursively searches subfoldes also")] FIND_EX_RECURSIVE = 0x0001, [helpstring("Include hidden files in search")] FIND_EX_INLCUDE_HIDDEN = 0x0002, [helpstring("Collect only file names")] FIND_EX_FILENAMES_ONLY = 0x0004 } FIND_EX; typedef [uuid(0C6E6C82-4EE6-4EC3-8542-8AFF377E52AD), helpstring("Possible search actions")] enum eSearchAction { [helpstring("Undefined search action")] eSearchActionNone, [helpstring("Single search action")] eSearchActionFind, [helpstring("Cumulative search action")] eSearchActionFindAll, [helpstring("Cumulative replace action")] eSearchActionReplaceAll, [helpstring("Interactive Search action")] eSearchActionConfigureFind, [helpstring("Interactive Replace action")] eSearchActionConfigureReplace } eSearchAction; typedef [uuid(3A7BA458-8A25-436F-94F7-FD021B4B7EA1), helpstring("Registered search types")] enum eSearchType { [helpstring("Undefined search type")] eSearchTypeUndefined, [helpstring("Search in current document")] eSearchTypeCurrentDocument, [helpstring("Search inside text selection of current document")] eSearchTypeSelection, [helpstring("Generic search in files")] eSearchTypeFolders, [helpstring("Search in directory of the current file")] eSearchTypeCurrentFileDir, [helpstring("Search in project")] eSearchTypeProject, [helpstring("Search among open documents")] eSearchTypeOpenDocuments, [helpstring("Search among recent files")] eSearchTypeRecentFiles, [helpstring("Search in favorite directories")] eSearchTypeFavoriteDir, [helpstring("Search bookmarked lines of current document")] eSearchTypeCurrentDocumentBookmarks, [helpstring("Search in current scope of the current document")] eSearchTypeScope, [helpstring("External Search Type")] eSearchTypeExternal, [helpstring("Last search type marker")] eSearchTypeLast } eSearchType; typedef [uuid(FF7A8DB0-9B57-4033-A5EC-A5FD3B152F30), helpstring("Registered search result types")] enum eSearchResultType { [helpstring("No search result output")] eSearchResultTypeNone = -1, [helpstring("Search results are forwarded in standard search result window")] eSearchResultTypeOutput, [helpstring("Search results are forwarded in new document")] eSearchResultTypeNewFile, [helpstring("Search results are only counted")] eSearchResultTypeCountOnly } eSearchResultType; [propget, id(20), helpstring("Content Version")] HRESULT Version([out, retval] ULONG* pVersion); [propget, id(21), helpstring("Document file path")] HRESULT Path([out, retval] BSTR* strPath); [propget, id(22), helpstring("Document title")] HRESULT Title([out, retval] BSTR* strTitle); [propput, id(22), helpstring("Document title")] HRESULT Title([in] BSTR strTitle); [propget, id(23), helpstring("Read-Only state")] HRESULT ReadOnly([out, retval] VARIANT_BOOL* pbReadOnly); [propput, id(23), helpstring("Read-Only state")] HRESULT ReadOnly([in] VARIANT_BOOL bReadOnly); [propget, id(24), helpstring("Modified state")] HRESULT Modified([out, retval] VARIANT_BOOL* pbModified); [propget, id(25), helpstring("Document active syntax property")] HRESULT Syntax([out, retval] ISyntax** ppSyntax); [propput, id(25), helpstring("Document active syntax property")] HRESULT Syntax([in] ISyntax* pSyntax); [propget, id(26), helpstring("Line count property")] HRESULT LineCount([out, retval] LINE_T* nCount); [propget, id(27), helpstring("Slow document property")] HRESULT Slow([out, retval] VARIANT_BOOL* pbSlow); [propget, id(28), helpstring("Document encoding")] HRESULT Encoding([out, retval] long* pnEncoding); [propput, id(28), helpstring("Document encoding")] HRESULT Encoding([in] long nEncoding); [propget, id(29), helpstring("Bookmark Collection")] HRESULT Bookmarks([out, retval] IBookmarks** ppBookmarks); [propget, id(43), helpstring("Default Line Break Style")] HRESULT LineBreak([out, retval] BSTR* pstrChars); [propput, id(43), helpstring("Default Line Break Style")] HRESULT LineBreak([in] BSTR strChars); [propget, id(48), helpstring("Indicates that tabs are used in document")] HRESULT TabUsed([out, retval] VARIANT_BOOL* pbVal); [propget, id(49), helpstring("Return default indent for document")] HRESULT IndentSize([out, retval] long* pnVal); [propget, id(53), helpstring("Return document size in characters")] HRESULT Size([out, retval] long* pnVal); [propget, id(59), helpstring("Return maximum line length")] HRESULT MaxLineLength([out, retval] long* pnVal); [propget, id(60), helpstring("Markers Collection")] HRESULT Markers([out, retval] IMarkers** ppMarkers); [id(30), helpstring("Returns copy of document line chars")] HRESULT GetLine([in] LINE_T nLine, [out, retval] BSTR* strChars); [id(31), helpstring("Returns line break chars")] HRESULT GetLineBreak([in] LINE_T nLine, [out, retval] BSTR* strChars); [id(32), helpstring("Returns line length")] HRESULT GetLineLength([in] LINE_T nLine, [out, retval] long* pnLength); [id(54), helpstring("Returns line actual (expanded tabs) length")] HRESULT GetLineActualLength([in] LINE_T nLine, [out, retval] long* pnLength); [id(55), helpstring("Returns true, if line has been modified")] HRESULT IsLineModified([in] LINE_T nLine, [out, retval] VARIANT_BOOL* pbValue); [id(56), helpstring("Returns true, if line has been modified and saved")] HRESULT IsLineSaved([in] LINE_T nLine, [out, retval] VARIANT_BOOL* pbValue); [id(57), helpstring("Returns true, if line is hidden (inside of collapsed area)")] HRESULT IsLineHidden([in] LINE_T nLine, [out, retval] VARIANT_BOOL* pbValue); [id(34), helpstring("Returns top style with ranges from position")] HRESULT GetStyleFromPos([in] IPosition* pt, [in, optional, defaultvalue(-1)] VARIANT_BOOL bRangesOnly, [out, retval] IStyleRange** ppStyleRange); [id(35), helpstring("Returns style stack from position")] HRESULT GetStylesFromPos([in] IPosition* pt, [out, retval] IStyles** ppStyles); [id(36), helpstring("Check, if word exist in document, using statistic data")] HRESULT IsKnownTerm([in]IStyle* pStyle, [in] BSTR szWord, [out, retval] VARIANT_BOOL* pResult); [id(37), helpstring("Returns copy of text")] HRESULT GetText([in, optional] VARIANT pRange, [out, retval] BSTR* strChars); [id(51), helpstring("Returns lines of range")] HRESULT GetLines([in, optional] VARIANT pRange, [in, optional, defaultvalue(-1)] VARIANT_BOOL bLineBreak, [out, retval] VARIANT* ppLines); [id(52), helpstring("Returns the character to the right of the position (absolute)")] HRESULT GetChar([in] POS_T nAbsolute, [out, retval] long* pnCharCode); [id(38), helpstring("Check, if document point inside of protected area")] HRESULT IsProtected([in]IPosition* pt, [out, retval] VARIANT_BOOL* pResult); [id(58), helpstring("Mark line as protected")] HRESULT ProtectLine([in]LINE_T nFirstLine, [in, optional, defaultvalue(1)] LINE_T nCount, [in, optional, defaultvalue(-1)] VARIANT_BOOL bVal); [id(39), helpstring("Finds text in the document")] HRESULT Find([in] IPosition* ptStart, [in] BSTR strText, [in, optional, defaultvalue(0)] long dwFlags, [in, optional] VARIANT pRange, [out, retval] IRange** pResult); [id(40), helpstring("Finds all matches text in the document")] HRESULT FindAll([in] BSTR strText, [in, optional, defaultvalue(0)] long dwFlags, [in, optional] VARIANT pRange, [out, retval] IRanges** ppRanges); [id(41), helpstring("Moves position")] HRESULT MovePosition([in] IPosition* pPosition, [in] POS_T nDelta, [out, retval] VARIANT_BOOL* pbResult); [id(42), helpstring("Moves position line")] HRESULT MovePositionLine([in] IPosition* pPosition, [in] LINE_T nDelta, [out, retval] VARIANT_BOOL* pbResult); [id(61), helpstring("Adopts white space in provided text to correspond the document settings")] HRESULT AdoptWhiteSpace([in]BSTR sTextIn, [out, retval] BSTR* sTextOut); [id(62), helpstring("Returns desired line indent")] HRESULT GetDesiredLineIndent([in]IPosition* pPos, [in, optional, defaultvalue(-1)] VARIANT_BOOL bByScope, [out, retval] LONG *pnValue); [id(44), helpstring("Convert Text Position to Absolute Position")] HRESULT TextToAbsolute([in] IPosition* pPosition, [out, retval] POS_T *pnAbsolute); [id(45), helpstring("Convert Absolute Position to Text Position")] HRESULT AbsoluteToText([in] POS_T nAbsolute, [out, retval] IPosition** ppPosition); [id(50), helpstring("Calculate absolute distance between text positions")] HRESULT AbsoluteDistance([in] IPosition* pStart, [in] IPosition* pEnd, [in, optional, defaultvalue(eCRLFStyleAuto)] eCRLFStyle nLBStyle, [out, retval] POS_T *pnAbsolute); [id(46), helpstring("Convert Line Offset to Text Position")] HRESULT OffsetToText([in] LINE_T nLine, [in] POS_T nPos, [out, retval] IPosition** ppPosition); [id(47), helpstring("Convert Text Position to Line Offset")] HRESULT TextToOffset([in] IPosition* pPosition, [out, retval] POS_T* pnOffset); }; [ object, pointer_default(unique), helpstring("IFileRanges Interface"), uuid(CC311A5B-E7A0-4d87-880D-5D93C776422E), dual, nonextensible ] interface IFileRanges : IDispatchEx { [propget, id(1), helpstring("Document file path/name")] HRESULT Name([out, retval] BSTR* strName); [propget, id(2), helpstring("Text ranges collection")] HRESULT Ranges([out, retval] IRanges** ppRanges); }; [ object, pointer_default(unique), helpstring("IFilesRanges Interface"), uuid(5C20F516-2F13-499a-B504-8BFFD00312A5), dual, nonextensible ] interface IFilesRanges : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IFileRanges** ppFileRanges); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, uuid(19C41A76-F5D9-4988-87BD-EC3A74821C88), dual, helpstring("Document Editable interface"), pointer_default(unique) ] interface IDocument : IDocumentData { [propget, id(100), helpstring("Checks if undo action possible")] HRESULT CanUndo([out, retval] VARIANT_BOOL* pbCan); [propget, id(101), helpstring("Checks if redo action possible")] HRESULT CanRedo([out, retval] VARIANT_BOOL* pbCan); [propget, id(102), helpstring("Returns active view of the document")] HRESULT ActiveView([out, retval] IView** ppView); [propget, id(103), helpstring("Returns document view collection")] HRESULT Views([out, retval] IViews** ppViews); [propget, id(104), helpstring("Reads document Tab Size")] HRESULT TabSize([out, retval] long* pnVal); [propput, id(104), helpstring("Sets document Tab Size")] HRESULT TabSize([in] long nVal); [id(120), helpstring("Activates the document")] HRESULT Activate(); [id(121), helpstring("Closes the document")] HRESULT Close([in, optional, defaultvalue(0)] VARIANT_BOOL bModifiedCheck); [id(122), helpstring("Saves the document")] HRESULT Save([in, optional, defaultvalue("")] BSTR strPath); [id(123), helpstring("Inserts text in specific position")] HRESULT InsertText([in] IPosition* ptStart, [in] BSTR strChars, [in, optional, defaultvalue(HE_ACTION_UNKNOWN)] UINT nAction, [out, retval] IPosition** ptEnd); [id(124), helpstring("Deletes text from specific range")] HRESULT DeleteText([in] IRange* pRange, [in, optional, defaultvalue(HE_ACTION_UNKNOWN)] UINT nAction); [id(140), helpstring("Inserts text in specific position in Block Mode")] HRESULT InsertTextBlock([in] IPosition* ptStart, [in] BSTR strChars, [in, optional, defaultvalue(HE_ACTION_UNKNOWN)] UINT nAction, [out, retval] IPosition** ptEnd); [id(141), helpstring("Deletes text from specific range in Block Mode")] HRESULT DeleteTextBlock([in] IRange* pRange, [in, optional, defaultvalue(HE_ACTION_UNKNOWN)] UINT nAction); [id(125), helpstring("Replace text in specific range")] HRESULT ReplaceText([in] IRange* pRange, [in] BSTR strChars, [in, optional, defaultvalue(HE_ACTION_UNKNOWN)] UINT nAction, [out, retval] IPosition** ptEnd); [id(139), helpstring("Adopts indentation of selected range to fit desired level")] HRESULT AdoptIndent([in]IRange* pRange, [out, retval] IRange** ppResult); [id(126), helpstring("Updates all connected views, cleaning all buffers from line nLine")] HRESULT Update([in] LINE_T nLine); [id(127), helpstring("Start undo group or merge with previous")] HRESULT BeginUndoGroup([in, optional, defaultvalue(0)] VARIANT_BOOL bMerge, [in, optional, defaultvalue(0)] UINT nActionType); [id(128), helpstring("Flush last undo group")] HRESULT FlushUndoGroup([out, retval] long* pnPosition); [id(129), helpstring("Insert abstract undo step for informing registered listener")] HRESULT InsertUndoRecord([in] UINT nActionType, [out, retval] long* pnPosition); [id(130), helpstring("Undo of the last editing steps until nNewPosition, if nNewPosition == -1 - until last begin of undo group")] HRESULT Undo([in, optional, defaultvalue(-1)] long nPosition); [id(131), helpstring("Redo of the last editing steps until nNewPosition, if nNewPosition == -1 - until last begin of undo group")] HRESULT Redo([in, optional, defaultvalue(-1)] long nPosition); [id(142), helpstring("Add Style Range")] HRESULT AddStyleRange([in] IRange* pRange, [in] IStyle* pStyle, [in, optional, defaultvalue(-1)] VARIANT_BOOL bMerge, [out, retval] IStyleRange** ppStyleRange); [id(143), helpstring("Remove Style Ranges")] HRESULT RemoveStyleRanges([in, optional] VARIANT pRange, [in, optional] VARIANT pStyle, [in, optional, defaultvalue(-1)] VARIANT_BOOL bSplit); [id(132), helpstring("Sets bookmark for specific line")] HRESULT SetBookmark([in] LINE_T nLine, [in, optional, defaultvalue(-1)] long nBookmark, [in, optional, defaultvalue(0)] VARIANT_BOOL bToggle); [id(133), helpstring("Disables bookmark for specific line")] HRESULT DisableBookmark([in] LINE_T nLine, [in, optional, defaultvalue(0)] VARIANT_BOOL bToggle); [id(134), helpstring("Reads bookmark from specific line")] HRESULT GetBookmark([in] LINE_T nLine, [in, optional, defaultvalue(-1)] long nBookmark, [out, retval] VARIANT_BOOL* pbResult); [id(135), helpstring("Inserts or overwrites a string at the current cursor position")] HRESULT write([in] BSTR strText); [id(136), helpstring("Inserts or overwrites a string and a new line at the current cursor position")] HRESULT writeln([in] BSTR strText); [id(137), helpstring("Appends text to the end of document")] HRESULT append([in] BSTR strText); [id(138), helpstring("Appends text and new line to the end of document")] HRESULT appendln([in] BSTR strText); }; [ object, pointer_default(unique), helpstring("Document collection Interface"), uuid(D6E0CEE6-E643-417e-8771-AA365F3A9BF2), dual, nonextensible ] interface IDocuments : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IDocument** ppDocument); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IMarker Interface"), uuid(FE866A10-2887-4f73-8AE7-E591EF0FE7D8), dual ] interface IMarker : IDispatch { [propget, id(1), helpstring("Document")] HRESULT Document([out, retval] IDocument** ppDocument); [propget, id(2), helpstring("Position")] HRESULT Position([out, retval] IPosition** ppPosition); [propget, id(3), helpstring("Name")] HRESULT Name([out, retval] BSTR* psName); [propget, id(4), helpstring("Type")] HRESULT Type([out, retval] eMarker* pnType); [propget, id(5), helpstring("Image")] HRESULT Image([out, retval] long* pnImage); [propget, id(6), helpstring("Description")] HRESULT Description([out, retval] BSTR* psName); }; [ object, pointer_default(unique), helpstring("IBookmark Interface"), uuid(6121F881-AE18-442b-8F14-8A755AE2B2F4), dual ] interface IBookmark : IMarker { [propget, id(11), helpstring("Enabled")] HRESULT Enabled([out, retval] VARIANT_BOOL* pbVal); [propput, id(11), helpstring("Enabled")] HRESULT Enabled([in] VARIANT_BOOL bVal); [propget, id(12), helpstring("Number")] HRESULT Number([out, retval] long* pnVal); [id(20), helpstring("Navigate to bookmark")] HRESULT Navigate(); }; [ object, pointer_default(unique), helpstring("IBookmark Collection Interface"), uuid(4BFAD73B-1BC7-493f-9167-DAF995FE444C), dual, nonextensible ] interface IBookmarks : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IBookmark** ppBookmark); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IMarker Collection Interface"), uuid(7E777269-2B43-440e-B247-31AA452790DC), dual, nonextensible ] interface IMarkers : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IMarker** ppMarker); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, pointer_default(unique), helpstring("IListBoxItem Interface"), uuid(66F1A2C8-20EA-46a1-A0B6-B5BD0D4E93EB), dual ] interface IListBoxItem : IDispatchEx { [propget, id(1), helpstring("Type")] HRESULT Type([out, retval] long* pnType); [propget, id(2), helpstring("Title")] HRESULT Title([out, retval] BSTR* pbstrTitle); [propget, id(3), helpstring("Image")] HRESULT Image([out, retval] long* pnImage); [propget, id(4), helpstring("Description")] HRESULT Description([out, retval] BSTR* psName); [propget, id(5), helpstring("Style")] HRESULT Style([out, retval] IStyle** ppStyle); [propget, id(6), helpstring("Group")] HRESULT Group([out, retval] VARIANT_BOOL* pbVal); [id(10), helpstring("Executed after item selection")] HRESULT onSelect(); }; [ object, pointer_default(unique), helpstring("IListBoxItem Collection Interface"), uuid(ACBB857D-B4BB-42fe-BDC4-9D07075C4D40), dual, nonextensible ] interface IListBoxItems : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IListBoxItem** ppItem); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, uuid(62B8E678-8989-4820-BE85-F8A40CEAC59E), dual, helpstring("Document View interface"), pointer_default(unique) ] interface IView : IDispatchEx { [propget, id(1), helpstring("Document associated with view")] HRESULT Document([out, retval] IDocument** ppDocument); [propget, id(2), helpstring("Returns View window handle")] HRESULT Window([out, retval] HANDLE_PTR* phWnd); [propget, id(3), helpstring("Returns current cursor position")] HRESULT Position([out, retval] IPosition** ppt); [propput, id(3), helpstring("Set current cursor position")] HRESULT Position([in] IPosition* pt); [propget, id(4), helpstring("Returns current cursor position")] HRESULT Selection([out, retval] ISelection** ppSelection); [propput, id(4), helpstring("Set current cursor position")] HRESULT Selection([in] IRange* pRange); [propget, id(5), helpstring("State Version")] HRESULT Version([out, retval] ULONG* pVersion); [propget, id(6), helpstring("Get current word range")] HRESULT CurrentWord([out, retval] IRange** pRange); [propget, id(7), helpstring("Get visible text range")] HRESULT VisibleArea([out, retval] IRange** pRange); [id(20), helpstring("Activates the view")] HRESULT Activate(); [id(21), helpstring("Ensures that window is not intersects with provided area")] HRESULT EnsureRangeVisible([in] HANDLE_PTR hWnd, [in] IRange* pRange); [id(22), helpstring("Ensures that text point is withing view area")] HRESULT EnsureVisible([in] IPosition* pt, [in, optional, defaultvalue(0)] VARIANT_BOOL bSmoothScroll); [id(23), helpstring("Centers position in view area")] HRESULT CenterLine([in] IPosition* pt, [in, optional, defaultvalue(0)] VARIANT_BOOL bSmoothScroll); [id(24), helpstring("Navigates to specific line")] HRESULT GoToLine([in] LINE_T nLine); [id(25), helpstring("Navigates to place in document, with flexible syntax, similar to one used in GoTo dialog")] HRESULT GoTo([in] BSTR sPos, [in, optional, defaultvalue(-1)] VARIANT_BOOL bSetAnchor); [id(26), helpstring("Marks the text position")] HRESULT MarkPosition([in] IPosition* pt); [id(27), helpstring("Selects provided text range")] HRESULT Select([in] IRange* pRange, [in, optional, defaultvalue(0)] VARIANT_BOOL bBlock, [in, optional, defaultvalue(0)] VARIANT_BOOL bMerge); [id(28), helpstring("Converts text coordinates to client coordinates")] HRESULT TextToClient([in] IPosition* ptText, [out, retval] IPoint** ppt); [id(29), helpstring("Converts client coordinates into text coordinates")] HRESULT ClientToText([in] long nX, [in] long nY, [out, retval] IPosition** pptText); [id(30), helpstring("Converts client coordinates (defined as IPoint) into text coordinates")] HRESULT ClientPointToText([in] IPoint* pPoint, [out, retval] IPosition** pptText); [id(31), helpstring("Returns style stack from position")] HRESULT GetStylesFromPos([in] IPosition* ppt, [out, retval] IStyles** ppStyles); [id(32), helpstring("Creates a popup menu and returns a newly created Menu Object")] HRESULT CreatePopupMenu([out, retval] IMenuObject** ppMenu); [id(33), helpstring("Shows quick info tooltip")] HRESULT ShowQuickInfo([in] BSTR strText, [in, defaultvalue(0)] DWORD dwFlags, [in, optional] VARIANT* pPosition); [id(35), helpstring("Returns range of word intersecting the position")] HRESULT GetWordFromPos([in]IPosition* pt, [out, retval] IRange** ppRange); [id(34), helpstring("Insert template in specific position")] HRESULT InsertTemplate([in] IRange* rgSelection, [in] BSTR strText, [in] UINT nAction, [in, optional, defaultvalue(0)] VARIANT_BOOL bNoIndent, [out, retval] IPosition** pptEnd); [id(36), helpstring("Show Completion list")] HRESULT ShowCompletionList([in] IRange* rgSelection, [in, optional] VARIANT pItems, [in, optional, defaultvalue(-1)] VARIANT_BOOL bAdd); [id(37), helpstring("Hide Completion list")] HRESULT HideCompletionList(); }; [ object, pointer_default(unique), helpstring("View collection Interface"), uuid(F10E90DE-A37D-41b4-8DB8-0AFAA6AC7D1B), dual, nonextensible ] interface IViews : IDispatchEx { [id(DISPID_NEWENUM), propget] HRESULT _NewEnum([out, retval] IUnknown** ppUnk); [id(DISPID_VALUE), propget] HRESULT Item([in] long Index, [out, retval] IView** ppView); [id(0x00000001), propget] HRESULT Count([out, retval] long * pVal); }; [ object, uuid(AAB8D3EB-F7C6-45ff-A05D-AC6BAB7E35D3), dual, helpstring("IStyle Collector"), pointer_default(unique) ] interface IStyleCollector : IDispatch { [id(1), helpstring("Add style to collection")] HRESULT Add([in] IStyle* pStyle, [in] long nLine, [in, optional, defaultvalue(0)] long nPosFrom, [in, optional, defaultvalue(-1)] long nPosTo); }; [ object, uuid(8AECD524-FCFC-46ae-83BD-D83E4EE435D6), dual, helpstring("Document Style informer plugin interface"), pointer_default(unique) ] interface IStyleInformer : IDispatch { [propget, id(1), helpstring("Returns informer job name/id")] HRESULT JobID([out, retval] BSTR* psID); [id(10), helpstring("Called to initialize informer before processing job")] HRESULT OnJobStart([in] IDocumentData* pDocument, [in, out] LINE_T* nLineFrom, [in, out] LINE_T* nLineTo, [in, out] HANDLE_PTR* pUserData); [id(11), helpstring("Called for every invalidated line")] HRESULT ProcessLine([in] LINE_T nLine, [in] BSTR sLine, [in] IStyleCollector* pCollector, [in] HANDLE_PTR* pUserData); [id(12), helpstring("Called to de-initialize informer after job")] HRESULT OnJobEnd([in] VARIANT_BOOL bCanceled, [in]IStyleCollector* pCollector, [in]HANDLE_PTR* pUserData); }; [ object, uuid(13E65099-62B4-47a5-B0F7-0FEB0153803F), dual, helpstring("Factory class for style informers"), pointer_default(unique) ] interface IStyleInformerCreator : IDispatch { [id(1), helpstring("Creates Style Informer instance for a document")] HRESULT Create([in] ISyntax* pSyntax, [out, retval] IStyleInformer** pInformer); }; [ object, uuid(4D573524-76FA-4a88-849F-D381B2E4855C), dual, helpstring("Command interface"), pointer_default(unique) ] interface ICommandHandler : IDispatchEx { [propget, id(1), helpstring("Returns command name/id")] HRESULT Name([out, retval] BSTR* psID); [propget, id(2), helpstring("Enabled")] HRESULT Enabled([out, retval] VARIANT_BOOL* pbEnabled); [propput, id(2), helpstring("Enabled")] HRESULT Enabled([in, defaultvalue(-1)] VARIANT_BOOL bEnabled); [propget, id(3), helpstring("Checked")] HRESULT Checked([out, retval] long* pnChecked); [propput, id(3), helpstring("Checked")] HRESULT Checked([in, defaultvalue(1)] long nChecked); [propget, id(4), helpstring("Radio")] HRESULT Radio([out, retval] VARIANT_BOOL* pbRadio); [propput, id(4), helpstring("Radio")] HRESULT Radio([in, defaultvalue(-1)] VARIANT_BOOL bRadio); [propget, id(5), helpstring("Title")] HRESULT Title([out, retval] BSTR* pbstrTitle); [propput, id(5), helpstring("Title")] HRESULT Title([in] BSTR strTitle); [propget, id(6), helpstring("Prompt string")] HRESULT Prompt([out, retval] BSTR* pbstrPrompt); [propput, id(6), helpstring("Prompt string")] HRESULT Prompt([in] BSTR bstrPrompt); [propget, id(7), helpstring("Image index")] HRESULT Image([out, retval] long* pnImage); [propput, id(7), helpstring("Image index")] HRESULT Image([in] long nImage); [propget, id(8), helpstring("Text Color")] HRESULT TextColor([out, retval] OLE_COLOR* pclr); [propput, id(8), helpstring("Text Color")] HRESULT TextColor([in] OLE_COLOR clr); [propget, id(9), helpstring("Background Color")] HRESULT BackColor([out, retval] OLE_COLOR* pclr); [propput, id(9), helpstring("Background Color")] HRESULT BackColor([in] OLE_COLOR clr); [id(11), helpstring("Execute command")] HRESULT Execute(); }; [ object, uuid(585313E3-CC99-45da-926F-8917718C2E38), dual, helpstring("Command Listener interface"), pointer_default(unique) ] interface ICommandHandlerListener : IDispatch { [id(1), helpstring("Before command execute")] HRESULT onBeforeExecute([in]BSTR strCommandName, [out,retval] VARIANT_BOOL* pbContinue); [id(2), helpstring("After command execute")] HRESULT onAfterExecute([in]BSTR strCommandName, [out,retval] VARIANT_BOOL* pbContinue); }; [ object, uuid(A992FB5C-3027-4C23-9BD8-E791F6ACADB4), dual, helpstring("Code Template Handler interface"), pointer_default(unique) ] interface ICodeTemplateHandler : IDispatchEx { [propget, id(1), helpstring("Returns if template is active")] HRESULT Enabled([out, retval] VARIANT_BOOL* pbEnabled); [propget, id(2), helpstring("Indicates that template can be used for surrounding")] HRESULT Surrounder([out, retval] VARIANT_BOOL* pbSurrounder); [propput, id(2), helpstring("Sets that template can be used for surrounding")] HRESULT Surrounder([in] VARIANT_BOOL bSurrounder); [id(10), helpstring("Execute command")] HRESULT Execute([in] IView* pView, [in] IRange* pRange); [id(11), helpstring("Returns Code template description")] HRESULT GetDescription([out, retval] BSTR* pstrDescription); [id(12), helpstring("Returns Code template expanded text. Called if Execute fails.")] HRESULT GetText([out, retval] BSTR* pstrText); }; [ object, uuid(CB0F62C2-752B-43b6-ACC0-F0E9EB332948), dual, helpstring("ShortKey Handler interface"), pointer_default(unique) ] interface IShortKeyHandler : IDispatchEx { [id(10), helpstring("Execute Handler")] HRESULT Execute([in] IView* pView, [in] long nKey, [in] VARIANT_BOOL bUp, [in] VARIANT_BOOL bShift, [in] VARIANT_BOOL bCtrl, [in] VARIANT_BOOL bAlt, [out, retval] VARIANT_BOOL* pbProcessed); }; /************************************************************************/ /* Menu handling */ /************************************************************************/ [ object, uuid(624048C8-1AA4-4a20-A421-90071BE5A840), dual, helpstring("Menu location object"), pointer_default(unique), nonextensible ] interface IMenuLocation : IDispatch { [propget, id(1), helpstring("Returns Menu object item belongs")] HRESULT Menu([out, retval] IMenuObject** ppSubMenu); [propget, id(2), helpstring("Returns item position")] HRESULT Position([out, retval] long* pnPos); }; [ object, uuid(15C42499-220B-40ba-8ABA-CCE80D97EF8F), dual, helpstring("Menu object"), pointer_default(unique) ] interface IMenuObject : IDispatchEx { typedef [uuid(6D88CBDC-EE82-4E68-807E-16DA9A3CE144), helpstring("Menu item relative position")] enum eItemPos { [helpstring("Top position in the menu")] eItemPosTop, [helpstring("Middle position in the menu")] eItemPosDesigned, [helpstring("Bottom position in the menu")] eItemPosBottom, } eItemPos; [propget, id(1), helpstring("Returns native HANDLE_PTR handle")] HRESULT Handle([out, retval] HANDLE_PTR* pHandle); [propget, id(2), helpstring("Returns items count")] HRESULT ItemCount([out, retval] ULONG* pnCount); [id(10), helpstring("Adds new context menu handler or separator when handler is NULL")] HRESULT AddItem([in, optional, defaultvalue("")] BSTR sName, [in, optional] VARIANT pHandler, [in, optional, defaultvalue(eItemPosDesigned)] eItemPos ePos); [id(11), helpstring("Adds sub menu")] HRESULT AddSubMenu([in] BSTR sName, [in, optional, defaultvalue(eItemPosDesigned)] eItemPos ePos, [out, retval] IMenuObject** ppSubMenu); [id(12), helpstring("Insert sub menu")] HRESULT InsertSubMenu([in] long nPosition, [in] BSTR sName, [out, retval] IMenuObject** ppSubMenu); [id(13), helpstring("Sets default menu item (bold)")] HRESULT SetDefaultItem([in] ICommandHandler* pHandler); [id(14), helpstring("Inserts new context menu handler or separator when handler is NULL")] HRESULT InsertItem([in] long nPosition, [in, optional, defaultvalue("")] BSTR sName, [in, optional] VARIANT pHandler); [id(15), helpstring("Finds menu position by command name")] HRESULT GetMenuItemPos([in] BSTR strCommandName, [out, retval] IMenuLocation** ppLocation); [id(16), helpstring("Returns command handler from position")] HRESULT GetCommand([in] long nPosition, [out, retval] ICommandHandler** ppHandler); [id(17), helpstring("Delete item by position")] HRESULT DeleteItem([in] long nPosition); [id(18), helpstring("Returns sub menu from position")] HRESULT GetSubMenu([in] long nPosition, [out, retval] IMenuObject** ppSubMenu); [id(19), helpstring("Track menu object or from cursor or mouse position and returns selected handler")] HRESULT Track([in, optional, defaultvalue(-1)] VARIANT_BOOL bFromMousePosition, [out, retval] ICommandHandler** ppHandler); }; [ object, uuid(64A1F25A-7C4B-4074-B6F4-BC1FD87D9ED9), dual, helpstring("Context Menu Handler"), pointer_default(unique) ] interface IContextMenuHandler : IDispatch { typedef [uuid(9B538154-DCE9-4DD2-AA19-F20578F898ED), helpstring("Context Menu style style")] enum eCMS { [helpstring("Normal editor context menu.")] eCMSNormal, [helpstring("Context menu for Read-Only document.")] eCMSReadOnly, [helpstring("Formatting Context Menu (when called with CTRL pressed).")] eCMSFormat, [helpstring("Context menu click on margin (area between left margin and text).")] eCMSMargin, [helpstring("Context menu click on left margin (indicator margin).")] eCMSLeftMargin, [helpstring("Context menu click on right margin (wrap indicators area).")] eCMSRightMargin, [helpstring("Context menu click on top margin (horizontal ruler).")] eCMSTopMargin, [helpstring("Context menu click on bottom margin.")] eCMSBottomMargin, [helpstring("Context menu click on document frame/tab.")] eCMSFrame, } eCMS; [id(1), helpstring("Called before display of context menu")] HRESULT Init([in] IMenuObject* pMenu, [in]eCMS eStyle, [in]IView* pView, [in] long nLine, [in] long nPos); }; }