1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/textentry.h
3 // Purpose: wxMotif-specific wxTextEntry implementation
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MOTIF_TEXTENTRY_H_
11 #define _WX_MOTIF_TEXTENTRY_H_
13 // ----------------------------------------------------------------------------
14 // wxTextEntry wraps XmTextXXX() methods suitable for single-line controls
15 // ----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxTextEntry
: public wxTextEntryBase
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
);
33 virtual bool CanUndo() const;
34 virtual bool CanRedo() const;
36 virtual void SetInsertionPoint(long pos
);
37 virtual long GetInsertionPoint() const;
38 virtual long GetLastPosition() const;
40 virtual void SetSelection(long from
, long to
);
41 virtual void GetSelection(long *from
, long *to
) const;
43 virtual bool IsEditable() const;
44 virtual void SetEditable(bool editable
);
47 virtual wxString
DoGetValue() const;
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_