]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/ScintillaBase.h
updates to correct build errors (new locations, etc.)
[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 protected:
11 // Enumeration of commands and child windows
12 enum {
13 idCallTip=1,
14 idAutoComplete=2,
15
16 idcmdUndo=10,
17 idcmdRedo=11,
18 idcmdCut=12,
19 idcmdCopy=13,
20 idcmdPaste=14,
21 idcmdDelete=15,
22 idcmdSelectAll=16
23 };
24
25 Menu popup;
26 AutoComplete ac;
27
28 CallTip ct;
29
30 #ifdef SCI_LEXER
31 int lexLanguage;
32 PropSet props;
33 enum {numWordLists=5};
34 WordList *keyWordLists[numWordLists];
35 void Colourise(int start, int end);
36 #endif
37
38 ScintillaBase();
39 virtual ~ScintillaBase();
40 virtual void Initialise() = 0;
41 virtual void Finalise() = 0;
42
43 virtual void RefreshColourPalette(Palette &pal, bool want);
44
45 virtual void AddChar(char ch);
46 void Command(int cmdId);
47 virtual int KeyCommand(UINT iMessage);
48
49 void AutoCompleteStart(int lenEntered, const char *list);
50 void AutoCompleteCancel();
51 void AutoCompleteMove(int delta);
52 void AutoCompleteChanged(char ch=0);
53 void AutoCompleteCompleted();
54
55 virtual void CreateCallTipWindow(PRectangle rc) = 0;
56
57 virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
58 void ContextMenu(Point pt);
59
60 virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
61
62 virtual void NotifyStyleNeeded(int endStyleNeeded);
63 public:
64 // Public so scintilla_send_message can use it
65 virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
66 };
67
68 #endif