simplify native textcontrol creations, adding search control for cocoa
[wxWidgets.git] / include / wx / osx / carbon / private / mactext.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: mactext.h
3 // Purpose: private wxMacTextControl base class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 03/02/99
7 // RCS-ID: $Id:
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MAC_PRIVATE_MACTEXT_H_
13 #define _WX_MAC_PRIVATE_MACTEXT_H_
14
15 #include "wx/osx/private.h"
16
17 // implementation exposed, so that search control can pull it
18
19 class wxMacUnicodeTextControl : public wxMacControl, public wxTextWidgetImpl
20 {
21 public :
22 wxMacUnicodeTextControl( wxTextCtrl *wxPeer ) ;
23 wxMacUnicodeTextControl( wxTextCtrl *wxPeer,
24 const wxString& str,
25 const wxPoint& pos,
26 const wxSize& size, long style ) ;
27 virtual ~wxMacUnicodeTextControl();
28
29 virtual void VisibilityChanged(bool shown);
30 virtual wxString GetStringValue() const ;
31 virtual void SetStringValue( const wxString &str) ;
32 virtual void Copy();
33 virtual void Cut();
34 virtual void Paste();
35 virtual bool CanPaste() const;
36 virtual void SetEditable(bool editable) ;
37 virtual void GetSelection( long* from, long* to) const ;
38 virtual void SetSelection( long from , long to ) ;
39 virtual void WriteText(const wxString& str) ;
40
41 protected :
42 void InstallEventHandlers();
43
44 // contains the tag for the content (is different for password and non-password controls)
45 OSType m_valueTag ;
46 public :
47 ControlEditTextSelectionRec m_selection ;
48 };
49
50 #endif // _WX_MAC_PRIVATE_MACTEXT_H_