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,
Create(parent, id, pos, size, style, name);
}
- ~wxScrolledWindow();
+ ~wxGenericScrolledWindow();
bool Create(wxWindow *parent,
wxWindowID id,
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
// 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);
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);
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