of the window and not its entire client area.
*/
+MustHaveApp(wxPyVScrolledWindow);
+
%name(VScrolledWindow) class wxPyVScrolledWindow : public wxPanel
{
public:
- %addtofunc wxPyVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)"
- %addtofunc wxPyVScrolledWindow() ""
+ %pythonAppend wxPyVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)"
+ %pythonAppend wxPyVScrolledWindow() ""
wxPyVScrolledWindow(wxWindow *parent,
// return the item at the specified (in physical coordinates) position or
// wxNOT_FOUND if none, i.e. if it is below the last item
- %name(HitTestXT) int HitTest(wxCoord x, wxCoord y) const;
+ %name(HitTestXY) int HitTest(wxCoord x, wxCoord y) const;
int HitTest(const wxPoint& pt) const;
// recalculate all our parameters and redisplay all lines
It emits the same events as wxListBox and the same event macros may be used
with it.
*/
+MustHaveApp(wxPyVListBox);
+
%name(VListBox) class wxPyVListBox : public wxPyVScrolledWindow
{
public:
- %addtofunc wxPyVListBox "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)"
- %addtofunc wxPyVListBox() ""
+ %pythonAppend wxPyVListBox "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)"
+ %pythonAppend wxPyVListBox() ""
wxPyVListBox(wxWindow *parent,
// this method is valid for both single and multi selection listboxes
size_t GetSelectedCount() const;
- // get the first selected item, returns wxNOT_FOUND if none
- //
- // cookie is an opaque parameter which should be passed to
- // GetNextSelected() later
- //
- // this method is only valid for the multi selection listboxes
- int GetFirstSelected(unsigned long& cookie) const;
-
- // get next selection item, return wxNOT_FOUND if no more
- //
- // cookie must be the same parameter that was passed to GetFirstSelected()
- // before
- //
- // this method is only valid for the multi selection listboxes
- int GetNextSelected(unsigned long& cookie) const;
+ %extend {
+ // get the first selected item, returns wxNOT_FOUND if none
+ //
+ // cookie is an opaque parameter which should be passed to
+ // GetNextSelected() later
+ //
+ // this method is only valid for the multi selection listboxes
+ //int GetFirstSelected(unsigned long& cookie) const;
+ PyObject* GetFirstSelected() {
+ unsigned long cookie = 0;
+ int selected = self->GetFirstSelected(cookie);
+ bool blocked = wxPyBeginBlockThreads();
+ PyObject* tup = PyTuple_New(2);
+ PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(selected));
+ PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
+ wxPyEndBlockThreads(blocked);
+ return tup;
+ }
+
+ // get next selection item, return wxNOT_FOUND if no more
+ //
+ // cookie must be the same parameter that was passed to GetFirstSelected()
+ // before
+ //
+ // this method is only valid for the multi selection listboxes
+ // int GetNextSelected(unsigned long& cookie) const;
+ PyObject* GetNextSelected(unsigned long cookie) {
+ int selected = self->GetNextSelected(cookie);
+ bool blocked = wxPyBeginBlockThreads();
+ PyObject* tup = PyTuple_New(2);
+ PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(selected));
+ PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie));
+ wxPyEndBlockThreads(blocked);
+ return tup;
+ }
+ }
+
// get the margins around each item
wxPoint GetMargins() const;
// wxHtmlListBox is a listbox whose items are wxHtmlCells
+MustHaveApp(wxPyHtmlListBox);
%name(HtmlListBox) class wxPyHtmlListBox : public wxPyVListBox
{
public:
- %addtofunc wxPyHtmlListBox "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)"
- %addtofunc wxPyHtmlListBox() ""
+ %pythonAppend wxPyHtmlListBox "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)"
+ %pythonAppend wxPyHtmlListBox() ""
// normal constructor which calls Create() internally
void RefreshAll();
void SetItemCount(size_t count);
+ // retrieve the file system used by the wxHtmlWinParser: if you use
+ // relative paths in your HTML, you should use its ChangePathTo() method
+ wxFileSystem& GetFileSystem();
};