]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/textentry.h
Better name for wxXmlResource::GetDirection() argument.
[wxWidgets.git] / include / wx / motif / textentry.h
CommitLineData
978c6e41
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/motif/textentry.h
3// Purpose: wxMotif-specific wxTextEntry implementation
4// Author: Vadim Zeitlin
5// Created: 2007-11-05
978c6e41
VZ
6// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_MOTIF_TEXTENTRY_H_
11#define _WX_MOTIF_TEXTENTRY_H_
12
13// ----------------------------------------------------------------------------
14// wxTextEntry wraps XmTextXXX() methods suitable for single-line controls
15// ----------------------------------------------------------------------------
16
17class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
18{
19public:
20 wxTextEntry() { }
21
22 // implement wxTextEntryBase pure virtual methods
23 virtual void WriteText(const wxString& text);
978c6e41
VZ
24 virtual void Replace(long from, long to, const wxString& value);
25 virtual void Remove(long from, long to);
26
27 virtual void Copy();
28 virtual void Cut();
29 virtual void Paste();
30
31 virtual void Undo();
32 virtual void Redo();
33 virtual bool CanUndo() const;
34 virtual bool CanRedo() const;
35
36 virtual void SetInsertionPoint(long pos);
37 virtual long GetInsertionPoint() const;
38 virtual long GetLastPosition() const;
39
40 virtual void SetSelection(long from, long to);
41 virtual void GetSelection(long *from, long *to) const;
42
43 virtual bool IsEditable() const;
44 virtual void SetEditable(bool editable);
45
46protected:
135b23b2
VZ
47 virtual wxString DoGetValue() const;
48
978c6e41
VZ
49 // translate wx text position (which may be -1 meaning "last one") to a
50 // valid Motif text position
51 long GetMotifPos(long pos) const;
52
53private:
54 // implement this to return the associated xmTextWidgetClass widget
55 virtual WXWidget GetTextWidget() const = 0;
56};
57
58#endif // _WX_MOTIF_TEXTENTRY_H_
59