]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/textctrl.mm
compilation fix for !USE_PCH
[wxWidgets.git] / src / cocoa / textctrl.mm
CommitLineData
fb896a32
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/textctrl.mm
3// Purpose: wxTextCtrl
4// Author: David Elliott
5// Modified by:
6// Created: 2003/03/16
7// RCS-ID: $Id:
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/app.h"
13#include "wx/textctrl.h"
14
15#import <Foundation/NSString.h>
16#import <AppKit/NSTextField.h>
17
18IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
19BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
20END_EVENT_TABLE()
21WX_IMPLEMENT_COCOA_OWNER(wxTextCtrl,NSTextField,NSControl,NSView)
22
23bool wxTextCtrl::Create(wxWindow *parent, wxWindowID winid,
24 const wxString& value,
25 const wxPoint& pos,
26 const wxSize& size,
27 long style,
28 const wxValidator& validator,
29 const wxString& name)
30{
31 if(!CreateControl(parent,winid,pos,size,style,validator,name))
32 return false;
33 m_cocoaNSView = NULL;
34 SetNSTextField([[NSTextField alloc] initWithFrame:NSMakeRect(0,0,30,30)]);
35 [m_cocoaNSView release];
36 [GetNSTextField() setStringValue:[NSString stringWithCString:value.c_str()]];
37 [GetNSControl() sizeToFit];
38 if(m_parent)
39 m_parent->CocoaAddChild(this);
40 return true;
41}
42
43wxTextCtrl::~wxTextCtrl()
44{
45 CocoaRemoveFromParent();
46 SetNSTextField(NULL);
47}
48
49void wxTextCtrl::Cocoa_didChangeText(void)
50{
51}
52
53void wxTextCtrl::AppendText(wxString const&)
54{
55}
56
57void wxTextCtrl::SetEditable(bool)
58{
59}
60
61void wxTextCtrl::DiscardEdits()
62{
63}
64
65void wxTextCtrl::SetSelection(long, long)
66{
67}
68
69void wxTextCtrl::ShowPosition(long)
70{
71}
72
73void wxTextCtrl::SetInsertionPoint(long)
74{
75}
76
77void wxTextCtrl::SetInsertionPointEnd()
78{
79}
80
81void wxTextCtrl::Cut()
82{
83}
84
85void wxTextCtrl::Copy()
86{
87}
88
89void wxTextCtrl::Redo()
90{
91}
92
93void wxTextCtrl::Undo()
94{
95}
96
97void wxTextCtrl::Clear()
98{
99}
100
101void wxTextCtrl::Paste()
102{
103}
104
105void wxTextCtrl::Remove(long, long)
106{
107}
108
109void wxTextCtrl::Replace(long, long, wxString const&)
110{
111}
112
113void wxTextCtrl::SetValue(wxString const&)
114{
115}
116
117void wxTextCtrl::WriteText(wxString const&)
118{
119}
120
121bool wxTextCtrl::IsEditable() const
122{
123 return true;
124}
125
126bool wxTextCtrl::IsModified() const
127{
128 return false;
129}
130
131wxString wxTextCtrl::GetLineText(long) const
132{
133 return wxEmptyString;
134}
135
136void wxTextCtrl::GetSelection(long*, long*) const
137{
138}
139
140bool wxTextCtrl::PositionToXY(long, long*, long*) const
141{
142 return false;
143}
144
145long wxTextCtrl::XYToPosition(long, long) const
146{
147 return 0;
148}
149
150int wxTextCtrl::GetLineLength(long) const
151{
152 return 0;
153}
154
155long wxTextCtrl::GetLastPosition() const
156{
157 return 0;
158}
159
160int wxTextCtrl::GetNumberOfLines() const
161{
162 return 0;
163}
164
165long wxTextCtrl::GetInsertionPoint() const
166{
167 return 0;
168}
169
170bool wxTextCtrl::CanRedo() const
171{
172 return false;
173}
174
175bool wxTextCtrl::CanUndo() const
176{
177 return false;
178}
179
180wxString wxTextCtrl::GetValue() const
181{
182 return wxEmptyString;
183}
184