]>
Commit | Line | Data |
---|---|---|
1e181c7a SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: textimpl.h | |
3 | // Purpose: textcontrol implementation classes that have to be exposed | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 03/02/99 | |
2903e699 | 7 | // RCS-ID: $Id$ |
1e181c7a SC |
8 | // Copyright: (c) Stefan Csomor |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ | |
13 | #define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ | |
14 | ||
15 | #include "wx/osx/private.h" | |
16 | ||
2903e699 | 17 | // implementation exposed, so that search control can pull it |
1e181c7a SC |
18 | |
19 | class wxNSTextFieldControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl | |
20 | { | |
21 | public : | |
22 | wxNSTextFieldControl( wxTextCtrl *wxPeer, WXWidget w ); | |
23 | virtual ~wxNSTextFieldControl(); | |
2903e699 | 24 | |
1e181c7a SC |
25 | virtual wxString GetStringValue() const ; |
26 | virtual void SetStringValue( const wxString &str) ; | |
27 | virtual void Copy() ; | |
28 | virtual void Cut() ; | |
29 | virtual void Paste() ; | |
30 | virtual bool CanPaste() const ; | |
31 | virtual void SetEditable(bool editable) ; | |
32 | virtual void GetSelection( long* from, long* to) const ; | |
33 | virtual void SetSelection( long from , long to ); | |
34 | virtual void WriteText(const wxString& str) ; | |
03647350 | 35 | |
e32090ba SC |
36 | virtual void controlAction(WXWidget slf, void* _cmd, void *sender); |
37 | protected : | |
38 | NSTextField* m_textField; | |
50b5e38d SC |
39 | long m_selStart; |
40 | long m_selEnd; | |
1e181c7a SC |
41 | }; |
42 | ||
c824c165 KO |
43 | class wxNSTextViewControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl |
44 | { | |
45 | public: | |
46 | wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w ); | |
47 | virtual ~wxNSTextViewControl(); | |
48 | ||
49 | virtual wxString GetStringValue() const ; | |
50 | virtual void SetStringValue( const wxString &str) ; | |
51 | virtual void Copy() ; | |
52 | virtual void Cut() ; | |
53 | virtual void Paste() ; | |
54 | virtual bool CanPaste() const ; | |
55 | virtual void SetEditable(bool editable) ; | |
56 | virtual void GetSelection( long* from, long* to) const ; | |
57 | virtual void SetSelection( long from , long to ); | |
58 | virtual void WriteText(const wxString& str) ; | |
f95dd972 | 59 | virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); |
c824c165 KO |
60 | |
61 | protected: | |
62 | NSScrollView* m_scrollView; | |
63 | NSTextView* m_textView; | |
64 | }; | |
65 | ||
1e181c7a | 66 | #endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_ |