#ifndef _WX_UNIV_TEXTCTRL_H_
#define _WX_UNIV_TEXTCTRL_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma interface "univtextctrl.h"
-#endif
-
class WXDLLEXPORT wxCaret;
class WXDLLEXPORT wxTextCtrlCommandProcessor;
// wxTextCtrl
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase, public wxScrollHelper
+class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase,
+ public wxScrollHelper
{
public:
// creation
// --------
- wxTextCtrl() { Init(); }
+ wxTextCtrl() : wxScrollHelper(this) { Init(); }
wxTextCtrl(wxWindow *parent,
wxWindowID id,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTextCtrlNameStr)
+ : wxScrollHelper(this)
{
Init();
virtual void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const;
virtual void CalcScrolledPosition(int x, int y, int *xx, int *yy) const;
- // ensure we have correct default border
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; }
-
// perform an action
virtual bool PerformAction(const wxControlAction& action,
long numArg = -1,
// only for wxStdTextCtrlInputHandler
void RefreshSelection();
+ // override wxScrollHelper method to prevent (auto)scrolling beyond the end
+ // of line
+ virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
+
+ // idle processing
+ virtual void OnInternalIdle();
+
protected:
+ // ensure we have correct default border
+ virtual wxBorder GetDefaultBorder() const { return wxBORDER_SUNKEN; }
+
// override base class methods
virtual void DoDrawBorder(wxDC& dc, const wxRect& rect);
virtual void DoDraw(wxControlRenderer *renderer);
void OnChar(wxKeyEvent& event);
void OnSize(wxSizeEvent& event);
- // overrdie wxScrollHelper method to prevent (auto)scrolling beyond the end
- // of line
- virtual bool SendAutoScrollEvents(wxScrollWinEvent& event) const;
-
// return the struct containing control-type dependent data
struct wxTextSingleLineData& SData() { return *m_data.sdata; }
struct wxTextMultiLineData& MData() { return *m_data.mdata; }
bool DoCut();
bool DoPaste();
- // idle processing
- virtual void OnInternalIdle();
private:
// all these methods are for multiline text controls only
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
+
+ friend class wxWrappedLineData;
};
// ----------------------------------------------------------------------------