#include "wx/window.h"
+class WXDLLEXPORT wxScrollHelperEvtHandler;
class WXDLLEXPORT wxTimer;
// ----------------------------------------------------------------------------
// occasions you might want it to scroll [part of] another window (e.g. a
// child of it in order to scroll only a portion the area between the
// scrollbars (spreadsheet: only cell area will move).
- virtual void SetTargetWindow(wxWindow *target);
+ virtual void SetTargetWindow(wxWindow *target, bool pushEventHandler = FALSE);
virtual wxWindow *GetTargetWindow() const;
void SetTargetRect(const wxRect& rect) { m_rectToScroll = rect; }
void HandleOnMouseWheel(wxMouseEvent& event);
#endif // wxUSE_MOUSEWHEEL
+ // FIXME: this is needed for now for wxPlot compilation, should be removed
+ // once it is fixed!
+ void OnScroll(wxScrollWinEvent& event) { HandleOnScroll(event); }
+
protected:
// get pointer to our scroll rect if we use it or NULL
const wxRect *GetRect() const
*h = size.y;
}
+ // change just the target window (unlike SetWindow which changes m_win as
+ // well)
+ void DoSetTargetWindow(wxWindow *target, bool pushEventHandler = FALSE);
+
+ // delete the event handler we installed
+ void DeleteEvtHandler();
+
wxWindow *m_win,
*m_targetWindow;
#if wxUSE_MOUSEWHEEL
int m_wheelRotation;
#endif // wxUSE_MOUSEWHEEL
+
+ wxScrollHelperEvtHandler *m_handler;
};
// ----------------------------------------------------------------------------
// wxScrolledWindow: a wxWindow which knows how to scroll
// ----------------------------------------------------------------------------
-#ifdef __WXGTK__
+#if defined(__WXGTK__) && !defined(__WXUNIVERSAL__)
#include "wx/gtk/scrolwin.h"
#else // !wxGTK
#include "wx/generic/scrolwin.h"