1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/textentry.h
3 // Purpose: wxMotif-specific wxTextEntry implementation
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MOTIF_TEXTENTRY_H_
12 #define _WX_MOTIF_TEXTENTRY_H_
14 // ----------------------------------------------------------------------------
15 // wxTextEntry wraps XmTextXXX() methods suitable for single-line controls
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxTextEntry
: public wxTextEntryBase
23 // implement wxTextEntryBase pure virtual methods
24 virtual void WriteText(const wxString
& text
);
25 virtual void Replace(long from
, long to
, const wxString
& value
);
26 virtual void Remove(long from
, long to
);
34 virtual bool CanUndo() const;
35 virtual bool CanRedo() const;
37 virtual void SetInsertionPoint(long pos
);
38 virtual long GetInsertionPoint() const;
39 virtual long GetLastPosition() const;
41 virtual void SetSelection(long from
, long to
);
42 virtual void GetSelection(long *from
, long *to
) const;
44 virtual bool IsEditable() const;
45 virtual void SetEditable(bool editable
);
48 virtual wxString
DoGetValue() const;
50 // translate wx text position (which may be -1 meaning "last one") to a
51 // valid Motif text position
52 long GetMotifPos(long pos
) const;
55 // implement this to return the associated xmTextWidgetClass widget
56 virtual WXWidget
GetTextWidget() const = 0;
59 #endif // _WX_MOTIF_TEXTENTRY_H_