2008-09-05 10:41:11 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: textimpl.h
|
|
|
|
// Purpose: textcontrol implementation classes that have to be exposed
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 03/02/99
|
2009-01-11 06:58:34 -05:00
|
|
|
// RCS-ID: $Id$
|
2008-09-05 10:41:11 -04:00
|
|
|
// Copyright: (c) Stefan Csomor
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
|
|
|
#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
|
|
|
|
|
|
|
#include "wx/osx/private.h"
|
|
|
|
|
2009-01-11 06:58:34 -05:00
|
|
|
// implementation exposed, so that search control can pull it
|
2008-09-05 10:41:11 -04:00
|
|
|
|
|
|
|
class wxNSTextFieldControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
|
|
|
{
|
|
|
|
public :
|
|
|
|
wxNSTextFieldControl( wxTextCtrl *wxPeer, WXWidget w );
|
|
|
|
virtual ~wxNSTextFieldControl();
|
2009-01-11 06:58:34 -05:00
|
|
|
|
2008-09-05 10:41:11 -04:00
|
|
|
virtual wxString GetStringValue() const ;
|
|
|
|
virtual void SetStringValue( const wxString &str) ;
|
|
|
|
virtual void Copy() ;
|
|
|
|
virtual void Cut() ;
|
|
|
|
virtual void Paste() ;
|
|
|
|
virtual bool CanPaste() const ;
|
|
|
|
virtual void SetEditable(bool editable) ;
|
|
|
|
virtual void GetSelection( long* from, long* to) const ;
|
|
|
|
virtual void SetSelection( long from , long to );
|
|
|
|
virtual void WriteText(const wxString& str) ;
|
2009-08-21 06:41:26 -04:00
|
|
|
|
2009-02-12 02:17:46 -05:00
|
|
|
virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
|
|
|
|
protected :
|
|
|
|
NSTextField* m_textField;
|
2009-04-15 15:44:51 -04:00
|
|
|
long m_selStart;
|
|
|
|
long m_selEnd;
|
2008-09-05 10:41:11 -04:00
|
|
|
};
|
|
|
|
|
2009-02-14 03:06:34 -05:00
|
|
|
class wxNSTextViewControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w );
|
|
|
|
virtual ~wxNSTextViewControl();
|
|
|
|
|
|
|
|
virtual wxString GetStringValue() const ;
|
|
|
|
virtual void SetStringValue( const wxString &str) ;
|
|
|
|
virtual void Copy() ;
|
|
|
|
virtual void Cut() ;
|
|
|
|
virtual void Paste() ;
|
|
|
|
virtual bool CanPaste() const ;
|
|
|
|
virtual void SetEditable(bool editable) ;
|
|
|
|
virtual void GetSelection( long* from, long* to) const ;
|
|
|
|
virtual void SetSelection( long from , long to );
|
|
|
|
virtual void WriteText(const wxString& str) ;
|
2009-05-27 05:52:23 -04:00
|
|
|
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
|
2009-10-31 20:58:04 -04:00
|
|
|
|
|
|
|
virtual bool GetStyle(long position, wxTextAttr& style);
|
|
|
|
virtual void SetStyle(long start, long end, const wxTextAttr& style);
|
2009-02-14 03:06:34 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
NSScrollView* m_scrollView;
|
|
|
|
NSTextView* m_textView;
|
|
|
|
};
|
|
|
|
|
2008-09-05 10:41:11 -04:00
|
|
|
#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|