]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/ScintillaBase.h
d5b1e8ba0ccae8b98666326d2711112cef0917d5
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-2001 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. */
38 int listType
; ///< 0 is an autocomplete list
39 SString userListSelected
; ///< Receives listbox selected string
43 LexerModule
*lexCurrent
;
45 enum {numWordLists
=5};
46 WordList
*keyWordLists
[numWordLists
+1];
47 void SetLexer(uptr_t wParam
);
48 void SetLexerLanguage(const char *languageName
);
49 void Colourise(int start
, int end
);
53 virtual ~ScintillaBase();
54 virtual void Initialise() = 0;
55 virtual void Finalise() = 0;
57 virtual void RefreshColourPalette(Palette
&pal
, bool want
);
59 virtual void AddCharUTF(char *s
, unsigned int len
);
60 void Command(int cmdId
);
61 virtual void CancelModes();
62 virtual int KeyCommand(unsigned int iMessage
);
64 void AutoCompleteStart(int lenEntered
, const char *list
);
65 void AutoCompleteCancel();
66 void AutoCompleteMove(int delta
);
67 void AutoCompleteChanged(char ch
=0);
68 void AutoCompleteCompleted(char fillUp
='\0');
69 void AutoCompleteMoveToCurrentWord();
71 virtual void CreateCallTipWindow(PRectangle rc
) = 0;
73 virtual void AddToPopUp(const char *label
, int cmd
=0, bool enabled
=true) = 0;
74 void ContextMenu(Point pt
);
76 virtual void ButtonDown(Point pt
, unsigned int curTime
, bool shift
, bool ctrl
, bool alt
);
78 virtual void NotifyStyleToNeeded(int endStyleNeeded
);
80 // Public so scintilla_send_message can use it
81 virtual sptr_t
WndProc(unsigned int iMessage
, uptr_t wParam
, sptr_t lParam
);