// Scintilla source code edit control // Scintilla.h - interface to the edit control // Copyright 1998-2000 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCINTILLA_H #define SCINTILLA_H // Compile-time configuration options #define MACRO_SUPPORT 1 // Comment out to remove macro hooks #if PLAT_GTK #include #include #ifdef __cplusplus extern "C" { #endif #define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) #define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAS T (klass, scintilla_get_type (), ScintillaClass) #define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) typedef struct _ScintillaObject ScintillaObject; typedef struct _ScintillaClass ScintillaClass; struct _ScintillaObject { GtkFixed vbox; void *pscin; }; struct _ScintillaClass { GtkFixedClass parent_class; void (* command) (ScintillaObject *ttt); void (* notify) (ScintillaObject *ttt); }; guint scintilla_get_type (void); GtkWidget* scintilla_new (void); void scintilla_set_id (ScintillaObject *sci,int id); long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); #include "WinDefs.h" #ifdef __cplusplus } #endif #endif #if PLAT_WX #include "WinDefs.h" #endif // Both GTK and Windows #define INVALID_POSITION -1 // Define start of Scintilla messages to be greater than all edit (EM_*) messages // as many EM_ messages can be used. #define SCI_START 2000 #define SCI_OPTIONAL_START 3000 #define SCI_LEXER_START 4000 #define SCI_ADDTEXT SCI_START + 1 #define SCI_ADDSTYLEDTEXT SCI_START + 2 #define SCI_INSERTTEXT SCI_START + 3 #define SCI_CLEARALL SCI_START + 4 #define SCI_GETLENGTH SCI_START + 6 #define SCI_GETCHARAT SCI_START + 7 #define SCI_GETCURRENTPOS SCI_START + 8 #define SCI_GETANCHOR SCI_START + 9 #define SCI_GETSTYLEAT SCI_START + 10 #define SCI_REDO SCI_START + 11 #define SCI_SETUNDOCOLLECTION SCI_START + 12 #define SCI_SELECTALL SCI_START + 13 #define SCI_SETSAVEPOINT SCI_START + 14 #define SCI_GETSTYLEDTEXT SCI_START + 15 #define SCI_CANREDO SCI_START + 16 #define SCI_MARKERLINEFROMHANDLE SCI_START + 17 #define SCI_MARKERDELETEHANDLE SCI_START + 18 #define SC_UNDOCOLLECT_NONE 0 #define SC_UNDOCOLLECT_AUTOSTART 1 #define SCI_GETVIEWWS SCI_START + 20 #define SCI_SETVIEWWS SCI_START + 21 #define SCI_CHANGEPOSITION SCI_START + 22 #define SCI_GOTOLINE SCI_START + 24 #define SCI_GOTOPOS SCI_START + 25 #define SCI_SETANCHOR SCI_START + 26 #define SCI_GETCURLINE SCI_START + 27 #define SCI_GETENDSTYLED SCI_START + 28 #define SCI_CONVERTEOLS SCI_START + 29 #define SCI_GETEOLMODE SCI_START + 30 #define SCI_SETEOLMODE SCI_START + 31 #define SC_EOL_CRLF 0 #define SC_EOL_CR 1 #define SC_EOL_LF 2 #define SCI_STARTSTYLING SCI_START + 32 #define SCI_SETSTYLING SCI_START + 33 // This is the same value as CP_UTF8 in Windows #define SC_CP_UTF8 65001 #define SCI_SETBUFFEREDDRAW SCI_START + 35 #define SCI_SETTABWIDTH SCI_START + 36 #define SCI_SETCODEPAGE SCI_START + 37 #define SCI_SETUSEPALETTE SCI_START + 39 #define MARKER_MAX 31 #define SC_MARK_CIRCLE 0 #define SC_MARK_ROUNDRECT 1 #define SC_MARK_ARROW 2 #define SC_MARK_SMALLRECT 3 #define SC_MARK_SHORTARROW 4 #define SC_MARK_EMPTY 5 #define SC_MARK_ARROWDOWN 6 #define SC_MARK_MINUS 7 #define SC_MARK_PLUS 8 #define SCI_MARKERDEFINE SCI_START + 40 #define SCI_MARKERSETFORE SCI_START + 41 #define SCI_MARKERSETBACK SCI_START + 42 #define SCI_MARKERADD SCI_START + 43 #define SCI_MARKERDELETE SCI_START + 44 #define SCI_MARKERDELETEALL SCI_START + 45 #define SCI_MARKERGET SCI_START + 46 #define SCI_MARKERNEXT SCI_START + 47 #define SCI_MARKERPREVIOUS SCI_START + 48 #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 #define SC_MASK_FOLDERS ((1<