]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/iphone/private/textimpl.h
Fix wrong tab order in wxAuiNotebook after dragging.
[wxWidgets.git] / include / wx / osx / iphone / private / textimpl.h
CommitLineData
170ea46e 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/osx/iphone/private/textimpl.h
170ea46e
SC
3// Purpose: textcontrol implementation classes that have to be exposed
4// Author: Stefan Csomor
5// Modified by:
6// Created: 03/02/99
a9a4f229 7// RCS-ID: $Id$
170ea46e
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/combobox.h"
16#include "wx/osx/private.h"
17
18// implementation exposed, so that search control can pull it
19
20class wxUITextFieldControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl
21{
22public :
99eb484a 23 wxUITextFieldControl( wxTextCtrl *wxPeer, UITextField* w );
170ea46e
SC
24 virtual ~wxUITextFieldControl();
25
26 virtual wxString GetStringValue() const ;
27 virtual void SetStringValue( const wxString &str) ;
28 virtual void Copy() ;
29 virtual void Cut() ;
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; }
37
99eb484a
SC
38 virtual wxSize GetBestSize() const;
39
40 virtual bool SetHint(const wxString& hint);
41
170ea46e
SC
42 virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
43protected :
44 UITextField* m_textField;
99eb484a 45 NSObject<UITextFieldDelegate>* m_delegate;
170ea46e
SC
46 long m_selStart;
47 long m_selEnd;
48};
49
50class wxUITextViewControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl
51{
52public:
53 wxUITextViewControl( wxTextCtrl *wxPeer, UITextView* w );
54 virtual ~wxUITextViewControl();
55
56 virtual wxString GetStringValue() const ;
57 virtual void SetStringValue( const wxString &str) ;
58 virtual void Copy() ;
59 virtual void Cut() ;
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 );
ce00f59b 67
170ea46e
SC
68 virtual bool GetStyle(long position, wxTextAttr& style);
69 virtual void SetStyle(long start, long end, const wxTextAttr& style);
ce00f59b 70
170ea46e 71 virtual bool CanFocus() const;
ce00f59b 72
170ea46e 73 virtual bool HasOwnContextMenu() const { return true; }
ce00f59b 74
170ea46e
SC
75 virtual void CheckSpelling(bool check);
76 virtual wxSize GetBestSize() const;
77
78protected:
99eb484a 79 NSObject<UITextViewDelegate>* m_delegate;
170ea46e
SC
80 UITextView* m_textView;
81};
82
83#if 0
84class wxNSComboBoxControl : public wxUITextFieldControl, public wxComboWidgetImpl
85{
86public :
87 wxNSComboBoxControl( wxWindow *wxPeer, WXWidget w );
88 virtual ~wxNSComboBoxControl();
ce00f59b 89
170ea46e
SC
90 virtual int GetSelectedItem() const;
91 virtual void SetSelectedItem(int item);
ce00f59b 92
170ea46e 93 virtual int GetNumberOfItems() const;
ce00f59b 94
170ea46e
SC
95 virtual void InsertItem(int pos, const wxString& item);
96 virtual void RemoveItem(int pos);
ce00f59b 97
170ea46e 98 virtual void Clear();
ce00f59b 99
170ea46e 100 virtual wxString GetStringAtIndex(int pos) const;
ce00f59b 101
170ea46e
SC
102 virtual int FindString(const wxString& text) const;
103private:
104 NSComboBox* m_comboBox;
105};
106#endif
107
108#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_