]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/iphone/private/textimpl.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: textcontrol implementation classes that have to be exposed
4 // Author: Stefan Csomor
7 // RCS-ID: $Id: textimpl.h 63564 2010-02-27 02:51:45Z KO $
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
13 #define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
15 #include "wx/combobox.h"
16 #include "wx/osx/private.h"
18 // implementation exposed, so that search control can pull it
20 class wxUITextFieldControl
: public wxWidgetIPhoneImpl
, public wxTextWidgetImpl
23 wxUITextFieldControl( wxWindow
*wxPeer
, UITextField
* w
);
24 virtual ~wxUITextFieldControl();
26 virtual wxString
GetStringValue() const ;
27 virtual void SetStringValue( const wxString
&str
) ;
30 virtual void Paste() ;
31 virtual bool CanPaste() const ;
32 virtual void SetEditable(bool editable
) ;
33 virtual void GetSelection( long* from
, long* to
) const ;
34 virtual void SetSelection( long from
, long to
);
35 virtual void WriteText(const wxString
& str
) ;
36 virtual bool HasOwnContextMenu() const { return true; }
38 virtual void controlAction(WXWidget slf
, void* _cmd
, void *sender
);
40 UITextField
* m_textField
;
45 class wxUITextViewControl
: public wxWidgetIPhoneImpl
, public wxTextWidgetImpl
48 wxUITextViewControl( wxTextCtrl
*wxPeer
, UITextView
* w
);
49 virtual ~wxUITextViewControl();
51 virtual wxString
GetStringValue() const ;
52 virtual void SetStringValue( const wxString
&str
) ;
55 virtual void Paste() ;
56 virtual bool CanPaste() const ;
57 virtual void SetEditable(bool editable
) ;
58 virtual void GetSelection( long* from
, long* to
) const ;
59 virtual void SetSelection( long from
, long to
);
60 virtual void WriteText(const wxString
& str
) ;
61 virtual void SetFont( const wxFont
& font
, const wxColour
& foreground
, long windowStyle
, bool ignoreBlack
= true );
63 virtual bool GetStyle(long position
, wxTextAttr
& style
);
64 virtual void SetStyle(long start
, long end
, const wxTextAttr
& style
);
66 virtual bool CanFocus() const;
68 virtual bool HasOwnContextMenu() const { return true; }
70 virtual void CheckSpelling(bool check
);
71 virtual wxSize
GetBestSize() const;
74 UITextView
* m_textView
;
78 class wxNSComboBoxControl
: public wxUITextFieldControl
, public wxComboWidgetImpl
81 wxNSComboBoxControl( wxWindow
*wxPeer
, WXWidget w
);
82 virtual ~wxNSComboBoxControl();
84 virtual int GetSelectedItem() const;
85 virtual void SetSelectedItem(int item
);
87 virtual int GetNumberOfItems() const;
89 virtual void InsertItem(int pos
, const wxString
& item
);
90 virtual void RemoveItem(int pos
);
94 virtual wxString
GetStringAtIndex(int pos
) const;
96 virtual int FindString(const wxString
& text
) const;
98 NSComboBox
* m_comboBox
;
102 #endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_