%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% % % % AsmEdit control - Documentation % % Copyright © Tomasz Grysztar % % Modifications by Tommy Lillehagen % % % %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% % History % %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% ----------------------------------------------------------------------------- Version 1.4.5 [31.01.2004] Tommy Lillehagen [+] Added message AEM_READONLY and AEM_SETFOCUSLINE. [-] Setting focus line will now scoll and place the focus line in middle of the window (only if not the line is in the window). [-] Changed the parameters of AEM_READONLY. [-] Added focus line colors to the AETHEME structure. [-] Some minor fixes. ----------------------------------------------------------------------------- Version 1.4.4 [10.01.2004] John Found [-] Changed behaviour of the message AEM_GETWORDATCARET. byte [wparam+2] - if =0 the "." will be included in the word <>0 the "." will be not included in the word Returns: lo word of eax - position of the left edge of the word hi word of eax - position of the right edge of the word ----------------------------------------------------------------------------- Version 1.4.3 [06.01.2004] John Found [+] Added message AEM_GETCARETXY and AECARETXY structure. ----------------------------------------------------------------------------- Version 1.4.2 fixes [14.12.2003] Tommy Lillehagen [-] Using DrawIconEx to draw the marks instead of a imagelist [+] Added AEM_SETBOOKMARKICON to set the icon for bookmarks. ----------------------------------------------------------------------------- Version 1.4.2 [14.12.2003] Tommy Lillehagen [-] The bookmarks is now cleared during the creation of the control [-] Using bitmap to mark bookmarks ----------------------------------------------------------------------------- Version 1.4.1 [24.11.2003] John Found [+] Added message: AEM_SETLINEDATA - opposite to AEM_GETLINEDATA with same parameters. [+] Added message: AEM_GETLINEPTR - returns the pointer to the given line ----------------------------------------------------------------------------- Version 1.4 fixes [15.11.2003] John Found [+] Changes in behaviour of right mouse button. Now it moves the cursor on the position on WM_RBUTTONDOWN ----------------------------------------------------------------------------- Version 1.4 [10.09.03 - 09:07] ----------------------------------------------------------------------------- [+] Support for comment/uncomment/indent/outdent lines [+] Added dymamic bookmark system (see messages reference for more info) [-] Minor bug fixes Version 1.3 [11.08.03 - 16:15] ----------------------------------------------------------------------------- [-] AEM_LOAD and AEM_SAVE are not a part of the library anymore [-] Minor bug fixes Version 1.2 [11.08.03 - 14:10] ----------------------------------------------------------------------------- [+] Different cursor in margin [+] AsmEdit in source, not via DLL [-] Changes in the AEM_SETTHEME (new name) message (see the messages reference) [-] Changes in the AEM_SETSYNTAXHIGHLIGHT message (see the messages reference) [-] Removed an unnecessary API call in AEM_LOAD [-] Removed the fasm_syntax procedure from the library Version 1.1 [10.08.03 - 20:08] ----------------------------------------------------------------------------- [+] Now you select the whole line by double-click in the left-margin [-] Fixed "caret-in-margin" bug [-] Fixed default font Version 1.0 [10.08.03 - 12:12] ----------------------------------------------------------------------------- [+] Added messages for file handling (AEM_LOAD, AEM_SAVE) [+] Added support for left-margin (AEM_SETMARGINWIDTH, AEM_SETMARGINCOLOR) [+] Popup-menu is now supported (AEM_SETPOPUPMENU) %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% % Todo /bugs % %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% * Highlight of lines (breakpoint/error etc.) %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% % Available styles and notifications % %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% Styles: AES_AUTOINDENT, AES_SMARTTABS, AES_OPTIMALFILL, AES_SECURESEL, AES_AUTOBRACKETS, AES_CONSOLECARET, AES_INDENTSEL, AES_LINESELECT Notifications: AEN_SETFOCUS, AEN_KILLFOCUS, AEN_TEXTCHANGE, AEN_POSCHANGE, AEN_MODECHANGE, AEN_OUTOFMEMORY, AEN_MARGINDBLCLK %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% % Messages reference % %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&% WM_COPY WM_CUT WM_PASTE WM_CLEAR WM_SETTEXT WM_GETTEXTLENGTH WM_GETTEXT WM_SETFONT WM_GETFONT WM_UNDO / EM_UNDO EM_CANUNDO EM_EMPTYUNDOBUFFER EM_REPLACESEL Parameters: As for standard messages of those names. Return: As for standard messages of those names. ----------------------------------------------------------------------------- AEM_SETMODE Parameters: wparam = new mode value lparam = ignored, should be zero Return: Always returns zero. Remarks: Mode value can be zero or any combination of the following constants: AEMODE_OVERWRITE - overwrite mode AEMODE_VERTICALSEL - vertical selection mode ----------------------------------------------------------------------------- AEM_GETMODE Parameters: wparam = ignored, should be zero lparam = ignored, should be zero Return: Current mode value. ----------------------------------------------------------------------------- AEM_SETSYNTAXHIGHLIGHT Parameters: wparam = pointer to table of syntax colors lparam = pointer to syntax highlight procedure or 0 Return: Always returns zero. Remarks: Syntax procedure is SyntaxProc(lpLine,lpColors), both parameters are pointers to buffer of length 256. First is the pointer to the data of line that has to be syntax highlighted (it is padded with spaces to the maximum length), second is the pointer to colors for the each character in line, initially filled with zeros. Each color value occupies one byte and is index to the table of syntax colors (each field in that table is the standard 32-bit color value, table is indexed from 1) or zero for the unhighlighed color. If wparam equals to zero, the table of syntax colors will be as it is. ----------------------------------------------------------------------------- AEM_GETLINEDATA Parameters: wparam = line number lparam = pointer to buffer for the line data Return: Always returns zero. Remarks: If line number is zero, current line is selected, if it's -1, the last line is selected. Buffer should have length of 256 bytes. ----------------------------------------------------------------------------- AEM_SETPOS Parameters: wparam = pointer to AEPOS structure lparam = ignored, should be zero Return: Always returns zero. Remarks: Fields of AEPOS should be set to the following values: caretLine = number of line in which caret has to be placed, zero means current line, -1 means last line caretPosition = position in line where caret has to be placed, zero means current position, 257 is the maximum selectionLine = number of line where the selection has to begin, zero means current line, -1 means last line the end of selection is marked by caret position selectionPosition = position in line where selection has to begin, zero means current position, 257 is the maximum ----------------------------------------------------------------------------- AEM_GETPOS Parameters: wparam = pointer to AEPOS structure lparam = ignored, should be zero Return: Always returns zero. Remarks: Fields of AEPOS are filled with the following information: caretLine = number of line in which caret is placed caretPosition = position in line where caret is placed selectionLine = number of line where the selection begins selectionPosition = position in line where selection begins ----------------------------------------------------------------------------- AEM_FINDFIRST Parameters: wparam = search flags lparam = pointer to string to search for Return: TRUE if string was found, FALSE otherwise. Remarks: Flags can be zero or any combination of the following values: AEFIND_CASESENSITIVE - case sensitive search AEFIND_WHOLEWORDS - accept whole words only AEFIND_BACKWARD - search backward from current position ----------------------------------------------------------------------------- AEM_FINDNEXT Parameters: wparam = ignored, should be zero lparam = ignored, should be zero Return: TRUE if string was found, FALSE otherwise. Remarks: AEM_FINDFIRST has to be called first. ----------------------------------------------------------------------------- AEM_CANFINDNEXT Parameters: wparam = ignored, should be zero lparam = ignored, should be zero Return: TRUE if there is some search to be completed, FALSE otherwise. ----------------------------------------------------------------------------- AEM_GETWORDATCARET Parameters: word [wparam] = size of buffer word [wparam+2] = flag -> TRUE -> point is not in word. FALSE ->point is in the word. lparam = pointer to buffer Return: Always returns zero. Remarks: The buffer is filled with the string containing word in which the caret is placed. ----------------------------------------------------------------------------- AEM_SETTEXTCOLOR Parameters: wparam = color for text lparam = color for text background Return: Always returns zero. ----------------------------------------------------------------------------- AEM_SETSELCOLOR Parameters: wparam = color for selected text lparam = color for selected background Return: Always returns zero. ----------------------------------------------------------------------------- AEM_SETPOPUPMENU Parameters: wparam = ignored, should be zero lparam = handle of popup menu Return: Always returns zero. ----------------------------------------------------------------------------- AEM_SETMARGINCOLOR Parameters: wparam = color for margin background lparam = color for margin border Return: Always returns zero. ----------------------------------------------------------------------------- AEM_SETMARGINWIDTH Parameters: wparam = gap between border and text lparam = width of margin Return: Always returns zero. ----------------------------------------------------------------------------- AEM_SETTHEME Parameters: wparam = ignored, should be zero lparam = pointer to AETHEME structure Return: Always returns zero. Remarks: Fields of AETHEME should be set to the following values: .text_color = window text .text_background = window background .sel_text = selected text .sel_background = background of the selected text .margin_background = background of the margin .margin_border = border of the margin .margin_width = width of margin .margin_gap = width of gap between margin border and text .bookmark = bookmark color .syntax_proc = pointer to syntax highlight procedure or 0 .syntax_colors = colors used in the syntax procedure (can be zero or more dword values) ----------------------------------------------------------------------------- AEM_SETBOOKMARKICON Parameters: wparam = handle of icon lparam = ignored ----------------------------------------------------------------------------- AEM_TOGGLEBOOKMARK Parameters: wparam = ignored, should be zero lparam = ignored, should be zero Return: Returns the id of the newly created bookmark. ----------------------------------------------------------------------------- AEM_GOTOBOOKMARK Parameters: wparam = zero (or id of bookmark if lparam = AEBM_NUM) lparam = bookmark constant: AEBM_NEXT, AEBM_PREV or AEBM_NUM Return: Returns the line number of the target bookmark. ----------------------------------------------------------------------------- AEM_CLEARBOOKMARKS Parameters: wparam = ignored, should be zero lparam = ignored, should be zero Return: Always returns zero. ----------------------------------------------------------------------------- AEM_COMMENT Parameters: wparam = ignored, should be zero lparam = comment (= true) or uncomment (= false) Return: Always returns zero. ----------------------------------------------------------------------------- AEM_INDENT Parameters: wparam = ignored, should be zero lparam = indent (= true) or outdent (= false) Return: Always returns zero.