]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/ScintillaBase.h
6344b17a3441e7fbbc4b15c772b10df7dd403b30
[wxWidgets.git] / src / stc / scintilla / src / ScintillaBase.h
1 // Scintilla source code edit control
2 // ScintillaBase.h - defines an enhanced subclass of Editor with calltips, autocomplete and context menu
3 // Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4 // The License.txt file describes the conditions under which this software may be distributed.
5
6 #ifndef SCINTILLABASE_H
7 #define SCINTILLABASE_H
8
9 class ScintillaBase : public Editor {
10 // Private so ScintillaBase objects can not be copied
11 ScintillaBase(const ScintillaBase &) : Editor() {}
12 ScintillaBase &operator=(const ScintillaBase &) { return *this; }
13 protected:
14 // Enumeration of commands and child windows
15 enum {
16 idCallTip=1,
17 idAutoComplete=2,
18
19 idcmdUndo=10,
20 idcmdRedo=11,
21 idcmdCut=12,
22 idcmdCopy=13,
23 idcmdPaste=14,
24 idcmdDelete=15,
25 idcmdSelectAll=16
26 };
27
28 Menu popup;
29 AutoComplete ac;
30
31 CallTip ct;
32
33 #ifdef SCI_LEXER
34 int lexLanguage;
35 PropSet props;
36 enum {numWordLists=5};
37 WordList *keyWordLists[numWordLists];
38 void Colourise(int start, int end);
39 #endif
40
41 ScintillaBase();
42 virtual ~ScintillaBase();
43 virtual void Initialise() = 0;
44 virtual void Finalise() = 0;
45
46 virtual void RefreshColourPalette(Palette &pal, bool want);
47
48 virtual void AddCharUTF(char *s, unsigned int len);
49 void Command(int cmdId);
50 virtual int KeyCommand(UINT iMessage);
51
52 void AutoCompleteStart(int lenEntered, const char *list);
53 void AutoCompleteCancel();
54 void AutoCompleteMove(int delta);
55 void AutoCompleteChanged(char ch=0);
56 void AutoCompleteCompleted();
57
58 virtual void CreateCallTipWindow(PRectangle rc) = 0;
59
60 virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
61 void ContextMenu(Point pt);
62
63 virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
64
65 virtual void NotifyStyleToNeeded(int endStyleNeeded);
66 public:
67 // Public so scintilla_send_message can use it
68 virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
69 };
70
71 #endif