aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-03-08 01:43:56 +0000
committernyamatongwe <unknown>2000-03-08 01:43:56 +0000
commitc196d2fc7c3ece7ccb7d89c425499a75ead7e59b (patch)
tree3ea3c536f04e88499b86ed82e8a9a457f96b4978 /src/ScintillaBase.h
parent7fbd8e2a34d2f5084ce26ad95d7c70ae4de6a233 (diff)
downloadscintilla-mirror-c196d2fc7c3ece7ccb7d89c425499a75ead7e59b.tar.gz
Initial revision
Diffstat (limited to 'src/ScintillaBase.h')
-rw-r--r--src/ScintillaBase.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h
new file mode 100644
index 000000000..e9f8f28d0
--- /dev/null
+++ b/src/ScintillaBase.h
@@ -0,0 +1,68 @@
+// Scintilla source code edit control
+// ScintillaBase.h - defines an enhanced subclass of Editor with calltips, autocomplete and context menu
+// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
+// The License.txt file describes the conditions under which this software may be distributed.
+
+#ifndef SCINTILLABASE_H
+#define SCINTILLABASE_H
+
+class ScintillaBase : public Editor {
+protected:
+ // Enumeration of commands and child windows
+ enum {
+ idCallTip=1,
+ idAutoComplete=2,
+
+ idcmdUndo=10,
+ idcmdRedo=11,
+ idcmdCut=12,
+ idcmdCopy=13,
+ idcmdPaste=14,
+ idcmdDelete=15,
+ idcmdSelectAll=16
+ };
+
+ Menu popup;
+ AutoComplete ac;
+
+ CallTip ct;
+
+#ifdef SCI_LEXER
+ int lexLanguage;
+ PropSet props;
+ enum {numWordLists=5};
+ WordList *keyWordLists[numWordLists];
+ void Colourise(int start, int end);
+#endif
+
+ ScintillaBase();
+ virtual ~ScintillaBase();
+ virtual void Initialise() = 0;
+ virtual void Finalise() = 0;
+
+ virtual void RefreshColourPalette(Palette &pal, bool want);
+
+ virtual void AddChar(char ch);
+ void Command(int cmdId);
+ virtual int KeyCommand(UINT iMessage);
+
+ void AutoCompleteStart(int lenEntered, const char *list);
+ void AutoCompleteCancel();
+ void AutoCompleteMove(int delta);
+ void AutoCompleteChanged(char ch=0);
+ void AutoCompleteCompleted();
+
+ virtual void CreateCallTipWindow(PRectangle rc) = 0;
+
+ virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0;
+ void ContextMenu(Point pt);
+
+ virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
+
+ virtual void NotifyStyleNeeded(int endStyleNeeded);
+public:
+ // Public so scintilla_send_message can use it
+ virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);
+};
+
+#endif