- @class wxVarHVScrollHelper
- @wxheader{vscroll.h}
-
- This class provides functions wrapping the
- wxVarHScrollHelper and
- wxVarVScrollHelper classes, targeted for
- scrolling a window in both axis using
- wxHVScrolledWindow. Since this class is also
- the join class of the horizontal and vertical scrolling functionality, it
- also addresses some wrappers that help avoid the need to specify class scope
- in your wxHVScrolledWindow-derived class when using wxVarScrollHelperBase
- functionality.
-
- Like all three of it's scroll helper base classes, this class is mostly only
- useful to those classes built into wxWidgets deriving from here, and this
- documentation is mostly only provided for referencing those functions
- provided. You will likely want to derive your window from wxHVScrolledWindow
- rather than from here directly.
-
- @library{wxcore}
- @category{FIXME}
-
- @see wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow
-*/
-class wxVarHVScrollHelper : public wxVarVScrollHelper
-{
-public:
- /**
- Constructor taking the target window to be scrolled by this helper class.
- This will attach scroll event handlers to the target window to catch and
- handle scroll events appropriately.
- */
- wxVarHVScrollHelper(wxWindow* winToScroll);
-
- /**
- With physical scrolling on (when this is @true), the device origin is
- changed properly when a wxPaintDC is prepared,
- children are actually moved and laid out properly, and the contents of the
- window (pixels) are actually moved. When this is @false, you are
- responsible for repainting any invalidated areas of the window yourself to
- account for the new scroll position.
-
- @param vscrolling
- Specifies if physical scrolling should be turned on when scrolling
- vertically.
- @param hscrolling
- Specifies if physical scrolling should be turned on when scrolling
- horizontally.
- */
- void EnablePhysicalScrolling(bool vscrolling = true,
- bool hscrolling = true);
-
- /**
- Returns the number of columns and rows the target window contains.
-
- @see SetRowColumnCount()
- */
- wxSize GetRowColumnCount() const;
-
- /**
- Returns the index of the first visible column and row based on the current
- scroll position.
- */
- wxPosition GetVisibleBegin() const;
-
- /**
- Returns the index of the last visible column and row based on the scroll
- position. This includes any partially visible columns or rows.
- */
- wxPosition GetVisibleEnd() const;
-
- //@{
- /**
- Returns @true if both the given row and column are currently visible
- (even if only partially visible) or @false otherwise.
- */
- bool IsVisible(size_t row, size_t column) const;
- const bool IsVisible(const wxPosition& pos) const;
- //@}
-
- //@{
- /**
- Triggers a refresh for just the area shared between the given row and column
- of the window if it is visible.
- */
- virtual void RefreshRowColumn(size_t row, size_t column);
- virtual void RefreshRowColumn(const wxPosition& pos);
- //@}
-
- //@{
- /**
- Triggers a refresh for the visible area shared between all given rows and
- columns (inclusive) of the window. If the target window for both orientations
- is the same, the rectangle of cells is refreshed; if the target windows
- differ, the entire client size opposite the orientation direction is
- refreshed between the specified limits.
- */
- virtual void RefreshRowsColumns(size_t fromRow, size_t toRow,
- size_t fromColumn,
- size_t toColumn);
- virtual void RefreshRowsColumns(const wxPosition& from,
- const wxPosition& to);
- //@}
-
- //@{
- /**
- Scroll to the specified row and column. It will become the first visible row
- and column in the window. Returns @true if we scrolled the window,
- @false if nothing was done.
- */
- bool ScrollToRowColumn(size_t row, size_t column);
- bool ScrollToRowColumn(const wxPosition& pos);
- //@}
-
- /**
- Set the number of rows and columns the target window will contain. The
- derived class must provide the sizes for all rows and columns with indices up
- to the ones given here in it's wxVarVScrollHelper::OnGetRowHeight
- and wxVarHScrollHelper::OnGetColumnWidth implementations,
- respectively.
- */
- void SetRowColumnCount(size_t rowCount, size_t columnCount);
-
- //@{
- /**
- Returns the virtual scroll unit under the device unit given accounting for
- scroll position or @c wxNOT_FOUND (for the row, column, or possibly both
- values) if none.
- */
- wxPosition VirtualHitTest(wxCoord x, wxCoord y) const;
- const wxPosition VirtualHitTest(const wxPoint& pos) const;
- //@}
-};
-
-
-
-/**
- @class wxHScrolledWindow