diff options
author | scaraveo <unknown> | 2007-06-01 00:57:26 +0000 |
---|---|---|
committer | scaraveo <unknown> | 2007-06-01 00:57:26 +0000 |
commit | 710f716e96f6e9ee9eb410b343b78b3c4d95bc46 (patch) | |
tree | 55e5547869daa67b6a639c89825058baf75545c7 /macosx/ScintillaCallTip.h | |
parent | cac98b923422b91839f7c285a9b78ea282cd6f0a (diff) | |
download | scintilla-mirror-710f716e96f6e9ee9eb410b343b78b3c4d95bc46.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/ScintillaCallTip.h')
-rw-r--r-- | macosx/ScintillaCallTip.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/macosx/ScintillaCallTip.h b/macosx/ScintillaCallTip.h new file mode 100644 index 000000000..525804942 --- /dev/null +++ b/macosx/ScintillaCallTip.h @@ -0,0 +1,64 @@ +/* + * ScintillaMacOSX.h + * tutorial + * + * Created by Evan Jones on Sun Sep 01 2002. + * Copyright (c) 2002 __MyCompanyName__. All rights reserved. + * + */ +#ifndef SCINTILLA_CALLTIP_H +#define SCINTILLA_CALLTIP_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 scintillaCallTipType = 'Scct'; + +namespace Scintilla { + +class ScintillaCallTip : public TView +{ +public: + // Private so ScintillaCallTip objects can not be copied + ScintillaCallTip(const ScintillaCallTip &) : TView( NULL ) {} + ScintillaCallTip &operator=(const ScintillaCallTip &) { return * this; } + ~ScintillaCallTip() {}; + +public: + /** This is the class ID that we've assigned to Scintilla. */ + static const CFStringRef kScintillaCallTipClassID; + static const ControlKind kScintillaCallTipKind; + + ScintillaCallTip( void* windowid ); + + /** Returns the HIView object kind, needed to subclass TView. */ + virtual ControlKind GetKind() { return kScintillaCallTipKind; } + +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 ); + virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); + +public: + static HIViewRef Create(); +private: + static OSStatus Construct( HIViewRef inControl, TView** outView ); + +}; + + +} + + +#endif |