]>
git.saurik.com Git - wxWidgets.git/blob - 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.
6 #ifndef SCINTILLABASE_H
7 #define SCINTILLABASE_H
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; }
14 // Enumeration of commands and child windows
36 enum {numWordLists
=5};
37 WordList
*keyWordLists
[numWordLists
];
38 void Colourise(int start
, int end
);
42 virtual ~ScintillaBase();
43 virtual void Initialise() = 0;
44 virtual void Finalise() = 0;
46 virtual void RefreshColourPalette(Palette
&pal
, bool want
);
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
);
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();
60 virtual void CreateCallTipWindow(PRectangle rc
) = 0;
62 virtual void AddToPopUp(const char *label
, int cmd
=0, bool enabled
=true) = 0;
63 void ContextMenu(Point pt
);
65 virtual void ButtonDown(Point pt
, unsigned int curTime
, bool shift
, bool ctrl
, bool alt
);
67 virtual void NotifyStyleToNeeded(int endStyleNeeded
);
69 // Public so scintilla_send_message can use it
70 virtual long WndProc(unsigned int iMessage
, unsigned long wParam
, long lParam
);