1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/textentry.h
3 // Purpose: wxOS2-specific wxTextEntry implementation
7 // Copyright: (c) 2007 Stefan Neis
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_OS2_TEXTENTRY_H_
12 #define _WX_OS2_TEXTENTRY_H_
14 // ----------------------------------------------------------------------------
15 // wxTextEntry: common part of wxComboBox and (single line) wxTextCtrl
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxTextEntry
: public wxTextEntryBase
23 // implement wxTextEntryBase pure virtual methods
24 virtual void WriteText(const wxString
& text
);
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 { DoSetSelection(from
, to
); }
42 virtual void GetSelection(long *from
, long *to
) const;
44 virtual bool IsEditable() const;
45 virtual void SetEditable(bool editable
);
47 virtual void SetMaxLength(unsigned long len
);
50 virtual wxString
DoGetValue() const;
52 // this is really a hook for multiline text controls as the single line
53 // ones don't need to ever scroll to show the selection but having it here
54 // allows us to put Remove() in the base class
57 SetSel_NoScroll
= 0, // don't do anything special
58 SetSel_Scroll
= 1 // default: scroll to make the selection visible
60 virtual void DoSetSelection(long from
, long to
, int flags
= SetSel_Scroll
);
63 // implement this to return the HWND of the EDIT control
64 virtual WXHWND
GetEditHWND() const = 0;
67 #endif // _WX_OS2_TEXTENTRY_H_