X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8614c467553e7dd8a5b9984683d73c89730b8ead..219a5f10c0e5efc3aad7ff3d050a92e7fed88806:/include/wx/generic/scrolwin.h diff --git a/include/wx/generic/scrolwin.h b/include/wx/generic/scrolwin.h index 7a6302a8bf..0af1fc66c4 100644 --- a/include/wx/generic/scrolwin.h +++ b/include/wx/generic/scrolwin.h @@ -26,17 +26,19 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr; // default scrolled window style -#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL | wxTAB_TRAVERSAL) +#ifndef wxScrolledWindowStyle +#define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL) +#endif // ---------------------------------------------------------------------------- -// wxScrolledWindow +// wxGenericScrolledWindow // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxScrolledWindow : public wxPanel +class WXDLLEXPORT wxGenericScrolledWindow : public wxPanel { public: - wxScrolledWindow(); - wxScrolledWindow(wxWindow *parent, + wxGenericScrolledWindow(); + wxGenericScrolledWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -46,7 +48,7 @@ public: Create(parent, id, pos, size, style, name); } - ~wxScrolledWindow(); + ~wxGenericScrolledWindow(); bool Create(wxWindow *parent, wxWindowID id, @@ -55,7 +57,7 @@ public: long style = wxScrolledWindowStyle, const wxString& name = wxPanelNameStr); - // Normally the wxScrolledWindow will scroll itself, but in + // Normally the wxGenericScrolledWindow will scroll itself, but in // some rare occasions you might want it to scroll another // window (e.g. a child of it in order to scroll only a portion // the area between the scrollbars (spreadsheet: only cell area @@ -115,7 +117,7 @@ public: // Override this function to draw the graphic (or just process EVT_PAINT) virtual void OnDraw(wxDC& WXUNUSED(dc)) {}; - // Override this function if you don't want to have wxScrolledWindow + // Override this function if you don't want to have wxGenericScrolledWindow // automatically change the origin according to the scroll position. virtual void PrepareDC(wxDC& dc); @@ -123,6 +125,8 @@ public: void OnScroll(wxScrollWinEvent& event); void OnSize(wxSizeEvent& event); void OnPaint(wxPaintEvent& event); + void OnChar(wxKeyEvent& event); + void OnMouseWheel(wxMouseEvent& event); // Calculate scroll increment virtual int CalcScrollInc(wxScrollWinEvent& event); @@ -141,10 +145,11 @@ protected: int m_yScrollLinesPerPage; double m_scaleX; double m_scaleY; + int m_wheelRotation; private: DECLARE_EVENT_TABLE() - DECLARE_ABSTRACT_CLASS(wxScrolledWindow) + DECLARE_ABSTRACT_CLASS(wxGenericScrolledWindow) }; #endif