1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/textentry.h
3 // Purpose: wxOS2-specific wxTextEntry implementation
6 // Copyright: (c) 2007 Stefan Neis
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_OS2_TEXTENTRY_H_
11 #define _WX_OS2_TEXTENTRY_H_
13 // ----------------------------------------------------------------------------
14 // wxTextEntry: common part of wxComboBox and (single line) wxTextCtrl
15 // ----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxTextEntry
: public wxTextEntryBase
22 // implement wxTextEntryBase pure virtual methods
23 virtual void WriteText(const wxString
& text
);
24 virtual void Remove(long from
, long to
);
32 virtual bool CanUndo() const;
33 virtual bool CanRedo() const;
35 virtual void SetInsertionPoint(long pos
);
36 virtual long GetInsertionPoint() const;
37 virtual long GetLastPosition() const;
39 virtual void SetSelection(long from
, long to
)
40 { DoSetSelection(from
, to
); }
41 virtual void GetSelection(long *from
, long *to
) const;
43 virtual bool IsEditable() const;
44 virtual void SetEditable(bool editable
);
46 virtual void SetMaxLength(unsigned long len
);
49 virtual wxString
DoGetValue() const;
51 // this is really a hook for multiline text controls as the single line
52 // ones don't need to ever scroll to show the selection but having it here
53 // allows us to put Remove() in the base class
56 SetSel_NoScroll
= 0, // don't do anything special
57 SetSel_Scroll
= 1 // default: scroll to make the selection visible
59 virtual void DoSetSelection(long from
, long to
, int flags
= SetSel_Scroll
);
62 // implement this to return the HWND of the EDIT control
63 virtual WXHWND
GetEditHWND() const = 0;
66 #endif // _WX_OS2_TEXTENTRY_H_