aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-06-04 21:37:19 +1000
committernyamatongwe <unknown>2011-06-04 21:37:19 +1000
commit1e8e06f21d6b2b74e0db767890058a48d9cc81b1 (patch)
tree05cd8f6110ec0575a34ea7dabfc360210e634ee6
parent58dd663ac4ff37742b6028e495e84b122f3b4188 (diff)
downloadscintilla-mirror-1e8e06f21d6b2b74e0db767890058a48d9cc81b1.tar.gz
Removed files for list box that are no longer used.
-rw-r--r--cocoa/ScintillaListBox.h64
-rw-r--r--cocoa/ScintillaListBox.mm110
2 files changed, 0 insertions, 174 deletions
diff --git a/cocoa/ScintillaListBox.h b/cocoa/ScintillaListBox.h
deleted file mode 100644
index c42576e6d..000000000
--- a/cocoa/ScintillaListBox.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/*
- * ScintillaMacOSX.h
- * tutorial
- *
- * Created by Evan Jones on Sun Sep 01 2002.
- *
- */
-
-#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
diff --git a/cocoa/ScintillaListBox.mm b/cocoa/ScintillaListBox.mm
deleted file mode 100644
index b0c8a2ec3..000000000
--- a/cocoa/ScintillaListBox.mm
+++ /dev/null
@@ -1,110 +0,0 @@
-
-#include "ScintillaCocoa.h"
-#include "ScintillaListBox.h"
-
-using namespace Scintilla;
-
-const CFStringRef ScintillaListBox::kScintillaListBoxClassID = CFSTR( "org.scintilla.listbox" );
-const ControlKind ScintillaListBox::kScintillaListBoxKind = { 'ejon', 'Sclb' };
-
-ScintillaListBox::ScintillaListBox( void* windowid ) :
- TView( reinterpret_cast<HIViewRef>( windowid ) )
-{
- ActivateInterface( kMouse );
- // debugPrint = true;
-}
-
-void ScintillaListBox::Draw(
- RgnHandle /*inLimitRgn*/,
- CGContextRef inContext )
-{
- Rect contentBounds;
- GetControlBounds(GetViewRef(), &contentBounds);
-
- HIRect controlFrame;
- HIViewGetFrame( GetViewRef(), &controlFrame );
-
- // what is the global pos?
- Surface *surfaceWindow = Surface::Allocate();
- if (surfaceWindow)
- {
- surfaceWindow->Init(inContext, GetViewRef());
-
- // TODO: Implement or find workaround
- // ctip->PaintCT(surfaceWindow);
- surfaceWindow->Release();
- delete surfaceWindow;
- }
-
-}
-
-ControlPartCode ScintillaListBox::HitTest( const HIPoint& where )
-{
- if ( CGRectContainsPoint( Bounds(), where ) )
- return 1;
- else
- return kControlNoPart;
-}
-
-OSStatus ScintillaListBox::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
-{
- if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
- ListBox* ctip = NULL;
- ScintillaCocoa *sciThis = NULL;
- OSStatus err = GetControlProperty( GetViewRef(), scintillaListBoxType, 0, sizeof( ctip ), NULL, &ctip );
- err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
-
- // TODO: Implement of find work around.
- // ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
-
- // TODO: still needed?
- // sciThis->ListBoxClick();
- return noErr;
-}
-
-OSStatus ScintillaListBox::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
-{
- if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
- return noErr;
-}
-
-HIViewRef ScintillaListBox::Create()
-{
- // Register the HIView, if needed
- static bool registered = false;
-
- if ( not registered )
- {
- TView::RegisterSubclass( kScintillaListBoxClassID, Construct );
- registered = true;
- }
-
- OSStatus err = noErr;
- EventRef event = CreateInitializationEvent();
- assert( event != NULL );
-
- HIViewRef control = NULL;
- err = HIObjectCreate( kScintillaListBoxClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
- ReleaseEvent( event );
- if ( err == noErr ) {
- Platform::DebugPrintf("ScintillaListBox::Create control %08X\n",control);
- return control;
- }
- return NULL;
-}
-
-OSStatus ScintillaListBox::Construct( HIViewRef inControl, TView** outView )
-{
- *outView = new ScintillaListBox( inControl );
- Platform::DebugPrintf("ScintillaListBox::Construct scintilla %08X\n",*outView);
- if ( *outView != NULL )
- return noErr;
- else
- return memFullErr;
-}
-
-extern "C" {
-HIViewRef scintilla_listbox_new() {
- return ScintillaListBox::Create();
-}
-}