]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/textentry.h
fixing infinite recursion for rotated text, introduced in cleanup r57915
[wxWidgets.git] / include / wx / motif / textentry.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/textentry.h
3 // Purpose: wxMotif-specific wxTextEntry implementation
4 // Author: Vadim Zeitlin
5 // Created: 2007-11-05
6 // RCS-ID: $Id$
7 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MOTIF_TEXTENTRY_H_
12 #define _WX_MOTIF_TEXTENTRY_H_
13
14 // ----------------------------------------------------------------------------
15 // wxTextEntry wraps XmTextXXX() methods suitable for single-line controls
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
19 {
20 public:
21 wxTextEntry() { }
22
23 // implement wxTextEntryBase pure virtual methods
24 virtual void WriteText(const wxString& text);
25 virtual wxString GetValue() const;
26 virtual void Replace(long from, long to, const wxString& value);
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
45 virtual bool IsEditable() const;
46 virtual void SetEditable(bool editable);
47
48 protected:
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
53 private:
54 // implement this to return the associated xmTextWidgetClass widget
55 virtual WXWidget GetTextWidget() const = 0;
56 };
57
58 #endif // _WX_MOTIF_TEXTENTRY_H_
59