]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/ScintillaBase.h
changed version number
[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 void CancelModes();
51 virtual int KeyCommand(unsigned int iMessage);
52
53 void AutoCompleteStart(int lenEntered, const char *list);
54 void AutoCompleteCancel();
55 void AutoCompleteMove(int delta);
56 void AutoCompleteChanged(char ch=0);
57 void AutoCompleteCompleted(char fillUp='\0');
58 void AutoCompleteMoveToCurrentWord();
59
60 virtual void CreateCallTipWindow(PRectangle rc) = 0;
61
62 virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
63 void ContextMenu(Point pt);
64
65 virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
66
67 virtual void NotifyStyleToNeeded(int endStyleNeeded);
68 public:
69 // Public so scintilla_send_message can use it
70 virtual long WndProc(unsigned int iMessage, unsigned long wParam, long lParam);
71 };
72
73 #endif