From 805e109be2f52c0ea446511fc33efb3746a3bc18 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 14 May 2009 12:10:06 +0000 Subject: First upload of Cocoa platform from Mike Lischke at Sun. --- cocoa/ScintillaListBox.h | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 cocoa/ScintillaListBox.h (limited to 'cocoa/ScintillaListBox.h') diff --git a/cocoa/ScintillaListBox.h b/cocoa/ScintillaListBox.h new file mode 100644 index 000000000..c42576e6d --- /dev/null +++ b/cocoa/ScintillaListBox.h @@ -0,0 +1,64 @@ + +/* + * ScintillaMacOSX.h + * tutorial + * + * Created by Evan Jones on Sun Sep 01 2002. + * + */ + +#ifndef SCINTILLA_LISTBOX_H +#define SCINTILLA_LISTBOX_H + +#include "TView.h" + +#include +#include +#include +#include +#include + +#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 -- cgit v1.2.3