]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/iphone/private/textimpl.h
c56576e622348f5cce1c1b603eb0622e66c522e5
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: textcontrol implementation classes that have to be exposed
4 // Author: Stefan Csomor
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( wxTextCtrl
*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 wxSize
GetBestSize() const;
40 virtual bool SetHint(const wxString
& hint
);
42 virtual void controlAction(WXWidget slf
, void* _cmd
, void *sender
);
44 UITextField
* m_textField
;
45 NSObject
<UITextFieldDelegate
>* m_delegate
;
50 class wxUITextViewControl
: public wxWidgetIPhoneImpl
, public wxTextWidgetImpl
53 wxUITextViewControl( wxTextCtrl
*wxPeer
, UITextView
* w
);
54 virtual ~wxUITextViewControl();
56 virtual wxString
GetStringValue() const ;
57 virtual void SetStringValue( const wxString
&str
) ;
60 virtual void Paste() ;
61 virtual bool CanPaste() const ;
62 virtual void SetEditable(bool editable
) ;
63 virtual void GetSelection( long* from
, long* to
) const ;
64 virtual void SetSelection( long from
, long to
);
65 virtual void WriteText(const wxString
& str
) ;
66 virtual void SetFont( const wxFont
& font
, const wxColour
& foreground
, long windowStyle
, bool ignoreBlack
= true );
68 virtual bool GetStyle(long position
, wxTextAttr
& style
);
69 virtual void SetStyle(long start
, long end
, const wxTextAttr
& style
);
71 virtual bool CanFocus() const;
73 virtual bool HasOwnContextMenu() const { return true; }
75 virtual void CheckSpelling(bool check
);
76 virtual wxSize
GetBestSize() const;
79 NSObject
<UITextViewDelegate
>* m_delegate
;
80 UITextView
* m_textView
;
84 class wxNSComboBoxControl
: public wxUITextFieldControl
, public wxComboWidgetImpl
87 wxNSComboBoxControl( wxWindow
*wxPeer
, WXWidget w
);
88 virtual ~wxNSComboBoxControl();
90 virtual int GetSelectedItem() const;
91 virtual void SetSelectedItem(int item
);
93 virtual int GetNumberOfItems() const;
95 virtual void InsertItem(int pos
, const wxString
& item
);
96 virtual void RemoveItem(int pos
);
100 virtual wxString
GetStringAtIndex(int pos
) const;
102 virtual int FindString(const wxString
& text
) const;
104 NSComboBox
* m_comboBox
;
108 #endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_