]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | typedef struct _GtkEditable GtkEditable; | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // wxTextEntry: roughly corresponds to GtkEditable | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase | |
21 | { | |
22 | public: | |
23 | wxTextEntry() { } | |
24 | ||
25 | // implement wxTextEntryBase pure virtual methods | |
26 | virtual void WriteText(const wxString& text); | |
0ec1179b VZ |
27 | virtual void Remove(long from, long to); |
28 | ||
29 | virtual void Copy(); | |
30 | virtual void Cut(); | |
31 | virtual void Paste(); | |
32 | ||
33 | virtual void Undo(); | |
34 | virtual void Redo(); | |
35 | virtual bool CanUndo() const; | |
36 | virtual bool CanRedo() const; | |
37 | ||
38 | virtual void SetInsertionPoint(long pos); | |
39 | virtual long GetInsertionPoint() const; | |
40 | virtual long GetLastPosition() const; | |
41 | ||
42 | virtual void SetSelection(long from, long to); | |
43 | virtual void GetSelection(long *from, long *to) const; | |
44 | ||
0c3d1aa7 | 45 | virtual bool AutoComplete(const wxArrayString& choices); |
ecaed0bc | 46 | |
0ec1179b VZ |
47 | virtual bool IsEditable() const; |
48 | virtual void SetEditable(bool editable); | |
49 | ||
0ec1179b VZ |
50 | virtual void SetMaxLength(unsigned long len); |
51 | ||
0ec1179b VZ |
52 | // implementation only from now on |
53 | void SendMaxLenEvent(); | |
54 | ||
135b23b2 VZ |
55 | protected: |
56 | virtual wxString DoGetValue() const; | |
57 | ||
0ec1179b | 58 | private: |
0ec1179b VZ |
59 | // implement this to return the associated GtkEntry or another widget |
60 | // implementing GtkEditable | |
61 | virtual GtkEditable *GetEditable() const = 0; | |
62 | }; | |
63 | ||
64 | #endif // _WX_GTK_TEXTENTRY_H_ | |
65 |