]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/src/ScintillaBase.h
e68aeb60841415ac4fb29da25d89b17a29eb0d92
1 // Scintilla source code edit control
2 /** @file ScintillaBase.h
3 ** Defines an enhanced subclass of Editor with calltips, autocomplete and context menu.
5 // Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef SCINTILLABASE_H
9 #define SCINTILLABASE_H
13 class ScintillaBase
: public Editor
{
14 // Private so ScintillaBase objects can not be copied
15 ScintillaBase(const ScintillaBase
&) : Editor() {}
16 ScintillaBase
&operator=(const ScintillaBase
&) { return *this; }
19 /** Enumeration of commands and child windows. */
33 bool displayPopupMenu
;
39 int listType
; ///< 0 is an autocomplete list
40 SString userListSelected
; ///< Receives listbox selected string
44 const LexerModule
*lexCurrent
;
46 enum {numWordLists
=6};
47 WordList
*keyWordLists
[numWordLists
+1];
48 void SetLexer(uptr_t wParam
);
49 void SetLexerLanguage(const char *languageName
);
50 void Colourise(int start
, int end
);
54 virtual ~ScintillaBase();
55 virtual void Initialise() = 0;
56 virtual void Finalise() = 0;
58 virtual void RefreshColourPalette(Palette
&pal
, bool want
);
60 virtual void AddCharUTF(char *s
, unsigned int len
, bool treatAsDBCS
=false);
61 void Command(int cmdId
);
62 virtual void CancelModes();
63 virtual int KeyCommand(unsigned int iMessage
);
65 void AutoCompleteStart(int lenEntered
, const char *list
);
66 void AutoCompleteCancel();
67 void AutoCompleteMove(int delta
);
68 void AutoCompleteCharacterAdded(char ch
);
69 void AutoCompleteCharacterDeleted();
70 void AutoCompleteCompleted();
71 void AutoCompleteMoveToCurrentWord();
72 static void AutoCompleteDoubleClick(void* p
);
74 virtual void CreateCallTipWindow(PRectangle rc
) = 0;
76 virtual void AddToPopUp(const char *label
, int cmd
=0, bool enabled
=true) = 0;
77 void ContextMenu(Point pt
);
79 virtual void ButtonDown(Point pt
, unsigned int curTime
, bool shift
, bool ctrl
, bool alt
);
81 virtual void NotifyStyleToNeeded(int endStyleNeeded
);
83 // Public so scintilla_send_message can use it
84 virtual sptr_t
WndProc(unsigned int iMessage
, uptr_t wParam
, sptr_t lParam
);