]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/textentry.h
Add wxActivateEvent::GetActivationReason().
[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 // 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
17 class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
18 {
19 public:
20 wxTextEntry() { }
21
22 // implement wxTextEntryBase pure virtual methods
23 virtual void WriteText(const wxString& text);
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
46 protected:
47 virtual wxString DoGetValue() const;
48
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