]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/osx/iphone/private/textimpl.h
updated headers
[wxWidgets.git] / include / wx / osx / iphone / private / textimpl.h
... / ...
CommitLineData
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
7// RCS-ID: $Id: textimpl.h 63564 2010-02-27 02:51:45Z KO $
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 :
23 wxUITextFieldControl( wxWindow *wxPeer, UITextField* w );
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
38 virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
39protected :
40 UITextField* m_textField;
41 long m_selStart;
42 long m_selEnd;
43};
44
45class wxUITextViewControl : public wxWidgetIPhoneImpl, public wxTextWidgetImpl
46{
47public:
48 wxUITextViewControl( wxTextCtrl *wxPeer, UITextView* w );
49 virtual ~wxUITextViewControl();
50
51 virtual wxString GetStringValue() const ;
52 virtual void SetStringValue( const wxString &str) ;
53 virtual void Copy() ;
54 virtual void Cut() ;
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 );
62
63 virtual bool GetStyle(long position, wxTextAttr& style);
64 virtual void SetStyle(long start, long end, const wxTextAttr& style);
65
66 virtual bool CanFocus() const;
67
68 virtual bool HasOwnContextMenu() const { return true; }
69
70 virtual void CheckSpelling(bool check);
71 virtual wxSize GetBestSize() const;
72
73protected:
74 UITextView* m_textView;
75};
76
77#if 0
78class wxNSComboBoxControl : public wxUITextFieldControl, public wxComboWidgetImpl
79{
80public :
81 wxNSComboBoxControl( wxWindow *wxPeer, WXWidget w );
82 virtual ~wxNSComboBoxControl();
83
84 virtual int GetSelectedItem() const;
85 virtual void SetSelectedItem(int item);
86
87 virtual int GetNumberOfItems() const;
88
89 virtual void InsertItem(int pos, const wxString& item);
90 virtual void RemoveItem(int pos);
91
92 virtual void Clear();
93
94 virtual wxString GetStringAtIndex(int pos) const;
95
96 virtual int FindString(const wxString& text) const;
97private:
98 NSComboBox* m_comboBox;
99};
100#endif
101
102#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_