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 wxString
GetValue() const;
26 virtual void Replace(long from
, long to
, const wxString
& value
);
27 virtual void Remove(long from
, long to
);
35 virtual bool CanUndo() const;
36 virtual bool CanRedo() const;
38 virtual void SetInsertionPoint(long pos
);
39 virtual long GetInsertionPoint() const;
40 virtual long GetLastPosition() const;
42 virtual void SetSelection(long from
, long to
);
43 virtual void GetSelection(long *from
, long *to
) const;
45 virtual bool IsEditable() const;
46 virtual void SetEditable(bool editable
);
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;
54 // implement this to return the associated xmTextWidgetClass widget
55 virtual WXWidget
GetTextWidget() const = 0;
58 #endif // _WX_MOTIF_TEXTENTRY_H_