]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/textentry.h
No real changes, just cleanup week days handling in wxGenericCalendarCtrl.
[wxWidgets.git] / include / wx / gtk / textentry.h
CommitLineData
0ec1179b
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/textentry.h
3// Purpose: wxGTK-specific wxTextEntry implementation
4// Author: Vadim Zeitlin
5// Created: 2007-09-24
6// RCS-ID: $Id$
7// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GTK_TEXTENTRY_H_
12#define _WX_GTK_TEXTENTRY_H_
13
14typedef struct _GtkEditable GtkEditable;
0847e36e 15typedef struct _GtkEntry GtkEntry;
0ec1179b
VZ
16
17// ----------------------------------------------------------------------------
18// wxTextEntry: roughly corresponds to GtkEditable
19// ----------------------------------------------------------------------------
20
21class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
22{
23public:
24 wxTextEntry() { }
25
26 // implement wxTextEntryBase pure virtual methods
27 virtual void WriteText(const wxString& text);
0ec1179b
VZ
28 virtual void Remove(long from, long to);
29
30 virtual void Copy();
31 virtual void Cut();
32 virtual void Paste();
33
34 virtual void Undo();
35 virtual void Redo();
36 virtual bool CanUndo() const;
37 virtual bool CanRedo() const;
38
39 virtual void SetInsertionPoint(long pos);
40 virtual long GetInsertionPoint() const;
41 virtual long GetLastPosition() const;
42
43 virtual void SetSelection(long from, long to);
44 virtual void GetSelection(long *from, long *to) const;
45
0c3d1aa7 46 virtual bool AutoComplete(const wxArrayString& choices);
ecaed0bc 47
0ec1179b
VZ
48 virtual bool IsEditable() const;
49 virtual void SetEditable(bool editable);
50
0ec1179b
VZ
51 virtual void SetMaxLength(unsigned long len);
52
0ec1179b
VZ
53 // implementation only from now on
54 void SendMaxLenEvent();
55
135b23b2
VZ
56protected:
57 virtual wxString DoGetValue() const;
58
0847e36e
JS
59 // margins functions
60 virtual bool DoSetMargins(const wxPoint& pt);
61 virtual wxPoint DoGetMargins() const;
62
0ec1179b 63private:
0ec1179b
VZ
64 // implement this to return the associated GtkEntry or another widget
65 // implementing GtkEditable
66 virtual GtkEditable *GetEditable() const = 0;
0847e36e
JS
67
68 // implement this to return the associated GtkEntry
69 virtual GtkEntry *GetEntry() const = 0;
0ec1179b
VZ
70};
71
72#endif // _WX_GTK_TEXTENTRY_H_
73