-};
-
-
-
-//----------------------------------------------------------------------------
-%newgroup;
-
-// wxHVScrolledWindow
-
-// First, the C++ version
-%{
-class wxPyHVScrolledWindow : public wxHVScrolledWindow
-{
- DECLARE_ABSTRACT_CLASS(wxPyHVScrolledWindow)
-public:
- wxPyHVScrolledWindow() : wxHVScrolledWindow() {}
- wxPyHVScrolledWindow(wxWindow *parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPyPanelNameStr)
- : wxHVScrolledWindow(parent, id, pos, size, style, name) {}
-
- // Overridable virtuals
-
- // these functions must be overridden in the derived class and they should
- // return the width or height of the given line in pixels
- DEC_PYCALLBACK_COORD_SIZET_constpure(OnGetRowHeight);
- DEC_PYCALLBACK_COORD_SIZET_constpure(OnGetColumnWidth);
-
- // the following functions don't need to be overridden but it may be useful
- // to do if calculating the lines widths or heights is a relatively
- // expensive operation as it gives the user code a possibility to calculate
- // several of them at once
- //
- // OnGetRowsHeightHint() and OnGetColumnsWidthHint() are normally called
- // just before OnGetRowHeight() and OnGetColumnWidth(), respectively, but
- // you shouldn't rely on the latter methods being called for all lines in
- // the interval specified here. It is also possible that OnGetRowHeight()
- // or OnGetColumnWidth() will be called for the lines outside of this
- // interval, so this is really just a hint, not a promise.
- //
- // finally note that min is inclusive, while max is exclusive, as usual
- DEC_PYCALLBACK_VOID_SIZETSIZET_const(OnGetRowsHeightHint);
- DEC_PYCALLBACK_VOID_SIZETSIZET_const(OnGetColumnsWidthHint);
-
- // when the number of lines changes, we try to estimate the total width or
- // height of all lines which is a rather expensive operation in terms of
- // lines access, so if the user code may estimate the average height
- // better/faster than we do, it should override this function to implement
- // its own logic
- //
- // this function should return the best guess for the total height it may
- // make
- DEC_PYCALLBACK_COORD_const(EstimateTotalHeight);
- DEC_PYCALLBACK_COORD_const(EstimateTotalWidth);
-
-
- // Also expose some other interesting protected methods
-
- // find the index of the horizontal line we need to show at the top of the
- // window such that the last (fully or partially) visible line is the given
- // one
- size_t FindFirstFromRight(size_t columnLast, bool fullyVisible = false)
- { return wxHVScrolledWindow::FindFirstFromRight(columnLast, fullyVisible); }
-
- // find the index of the vertical line we need to show at the top of the
- // window such that the last (fully or partially) visible line is the given
- // one
- size_t FindFirstFromBottom(size_t lineLast, bool fullyVisible = false)
- { return wxHVScrolledWindow::FindFirstFromBottom(lineLast, fullyVisible); }
-
-
- // get the total width or height of the lines between lineMin (inclusive)
- // and lineMax (exclusive)
- wxCoord GetRowsHeight(size_t lineMin, size_t lineMax) const
- { return wxHVScrolledWindow::GetRowsHeight(lineMin, lineMax); }
- wxCoord GetColumnsWidth(size_t columnMin, size_t columnMax) const
- { return wxHVScrolledWindow::GetColumnsWidth(columnMin, columnMax); }
-
- PYPRIVATE;
-};
-
-
-IMPLEMENT_ABSTRACT_CLASS(wxPyHVScrolledWindow, wxHVScrolledWindow);
-
-IMP_PYCALLBACK_COORD_SIZET_constpure(wxPyHVScrolledWindow, wxHVScrolledWindow, OnGetRowHeight);
-IMP_PYCALLBACK_COORD_SIZET_constpure(wxPyHVScrolledWindow, wxHVScrolledWindow, OnGetColumnWidth);
-IMP_PYCALLBACK_VOID_SIZETSIZET_const(wxPyHVScrolledWindow, wxHVScrolledWindow, OnGetRowsHeightHint);
-IMP_PYCALLBACK_VOID_SIZETSIZET_const(wxPyHVScrolledWindow, wxHVScrolledWindow, OnGetColumnsWidthHint);
-IMP_PYCALLBACK_COORD_const (wxPyHVScrolledWindow, wxHVScrolledWindow, EstimateTotalHeight);
-IMP_PYCALLBACK_COORD_const (wxPyHVScrolledWindow, wxHVScrolledWindow, EstimateTotalWidth);
-%}
-
-
-
-
-// Now define this class for SWIG
-
-/*
- This class is strongly influenced by wxVScrolledWindow. In fact, much of
- code is line for line the same except it EXPLICITLY states which axis is
- being worked on. Like wxVScrolledWindow, this class is here to provide
- an easy way to implement variable line sizes. The difference is that
- wxVScrolledWindow only works with vertical scrolling. This class extends
- the behavior of wxVScrolledWindow to the horizontal axis in addition to the
- vertical axis.
-
- The scrolling is also "virtual" in the sense that line widths and heights
- only need to be known for lines that are currently visible.
-
- Like wxVScrolledWindow, this is a generalization of the wxScrolledWindow
- class which can be only used when all horizontal lines have the same width
- and all of the vertical lines have the same height. Like wxVScrolledWinow
- it lacks some of wxScrolledWindow features such as scrolling another window
- or only scrolling a rectangle of the window and not its entire client area.
-
- If only vertical scrolling is needed, wxVScrolledWindow is recommended
- because it is simpler to use (and you get to type less).
-
- There is no wxHScrolledWindow but horizontal only scrolling is implemented
- easily enough with this class. If someone feels the need for such a class,
- implementing it is trivial.
- */
-MustHaveApp(wxPyHVScrolledWindow);
-
-%rename(HVScrolledWindow) wxPyHVScrolledWindow;
-class wxPyHVScrolledWindow : public wxPanel
-{
-public:
- %pythonAppend wxPyHVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)"
- %pythonAppend wxPyHVScrolledWindow() ""
-
- // normal ctor, no need to call Create() after this one
- //
- // note that wxVSCROLL and wxHSCROLL are always automatically added to our
- // style, there is no need to specify them explicitly
- wxPyHVScrolledWindow(wxWindow *parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPyPanelNameStr);
-
- %RenameCtor(PreHVScrolledWindow, wxPyHVScrolledWindow());
- void _setCallbackInfo(PyObject* self, PyObject* _class);
-
-
- bool Create(wxWindow *parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxPyPanelNameStr);