aboutsummaryrefslogtreecommitdiffhomepage
path: root/macosx/ScintillaListBox.h
diff options
context:
space:
mode:
authorscaraveo <devnull@localhost>2007-06-01 00:57:26 +0000
committerscaraveo <devnull@localhost>2007-06-01 00:57:26 +0000
commitbff5c376377f4c19a62e6a44eccda7dbe9deebaf (patch)
tree55e5547869daa67b6a639c89825058baf75545c7 /macosx/ScintillaListBox.h
parent664fee964e1f91132ebf07a4b122e59c1e932ea6 (diff)
downloadscintilla-mirror-bff5c376377f4c19a62e6a44eccda7dbe9deebaf.tar.gz
integrate OS X support for scintilla. a big patch with a little commit message :)
- now uses namespaces (optionally for non-os x) to avoid conflicts with OS X libraries - several fixes in the OS X layer since the branch was commited in 2005 - used in Komodo since 2005, so pretty stable
Diffstat (limited to 'macosx/ScintillaListBox.h')
-rw-r--r--macosx/ScintillaListBox.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/macosx/ScintillaListBox.h b/macosx/ScintillaListBox.h
new file mode 100644
index 000000000..e26d354eb
--- /dev/null
+++ b/macosx/ScintillaListBox.h
@@ -0,0 +1,63 @@
+/*
+ * ScintillaMacOSX.h
+ * tutorial
+ *
+ * Created by Evan Jones on Sun Sep 01 2002.
+ * Copyright (c) 2002 __MyCompanyName__. All rights reserved.
+ *
+ */
+#ifndef SCINTILLA_LISTBOX_H
+#define SCINTILLA_LISTBOX_H
+
+#include "TView.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "Platform.h"
+#include "Scintilla.h"
+
+static const OSType scintillaListBoxType = 'sclb';
+
+namespace Scintilla {
+
+class ScintillaListBox : public TView
+{
+public:
+ // Private so ScintillaListBox objects can not be copied
+ ScintillaListBox(const ScintillaListBox &) : TView( NULL ) {}
+ ScintillaListBox &operator=(const ScintillaListBox &) { return * this; }
+ ~ScintillaListBox() {};
+
+public:
+ /** This is the class ID that we've assigned to Scintilla. */
+ static const CFStringRef kScintillaListBoxClassID;
+ static const ControlKind kScintillaListBoxKind;
+
+ ScintillaListBox( void* windowid );
+
+ /** Returns the HIView object kind, needed to subclass TView. */
+ virtual ControlKind GetKind() { return kScintillaListBoxKind; }
+
+private:
+
+ virtual ControlPartCode HitTest( const HIPoint& where );
+ virtual void Draw( RgnHandle rgn, CGContextRef gc );
+ virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+ virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+
+public:
+ static HIViewRef Create();
+private:
+ static OSStatus Construct( HIViewRef inControl, TView** outView );
+
+};
+
+
+}
+
+
+#endif