Deprecated PyShell and PyShellWindow, added a snapshot of PyCrust.

Added the new virtual list capabilities to wxListCtrl.

Other odds and ends.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-08-14 19:19:48 +00:00
parent 6443de0263
commit c7e7022c2c
35 changed files with 3771 additions and 1641 deletions

View File

@@ -270,6 +270,7 @@ enum {
wxTE_MULTILINE,
wxTE_AUTO_SCROLL,
wxTE_NO_VSCROLL,
wxTE_AUTO_URL,
wxCB_SIMPLE,
wxCB_DROPDOWN,
wxCB_SORT,
@@ -813,6 +814,7 @@ enum wxEventType {
wxEVT_COMMAND_SPINCTRL_UPDATED,
wxEVT_COMMAND_TEXT_UPDATED,
wxEVT_COMMAND_TEXT_ENTER,
wxEVT_COMMAND_TEXT_URL,
wxEVT_COMMAND_MENU_SELECTED,
wxEVT_COMMAND_SLIDER_UPDATED,
wxEVT_COMMAND_RADIOBOX_SELECTED,

View File

@@ -362,6 +362,9 @@ def EVT_TEXT(win, id, func):
def EVT_TEXT_ENTER(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func)
def EVT_TEXT_URL(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TEXT_URL, func)
def EVT_MENU(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func)
@@ -544,58 +547,6 @@ def EVT_CALCULATE_LAYOUT(win, func):
win.Connect(-1, -1, wxEVT_EVT_CALCULATE_LAYOUT, func)
# wxListCtrl
def EVT_LIST_BEGIN_DRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
def EVT_LIST_BEGIN_RDRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
def EVT_LIST_END_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
def EVT_LIST_DELETE_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
def EVT_LIST_GET_INFO(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
def EVT_LIST_SET_INFO(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
def EVT_LIST_ITEM_SELECTED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
def EVT_LIST_ITEM_DESELECTED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
def EVT_LIST_KEY_DOWN(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
def EVT_LIST_INSERT_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
def EVT_LIST_COL_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func)
def EVT_LIST_ITEM_ACTIVATED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
#wxSplitterWindow
def EVT_SPLITTER_SASH_POS_CHANGING(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, func)

View File

@@ -37,60 +37,9 @@
%pragma(python) code = "import wx"
//----------------------------------------------------------------------
//----------------------------------------------------------------------
enum {
wxLIST_MASK_TEXT,
wxLIST_MASK_IMAGE,
wxLIST_MASK_DATA,
wxLIST_MASK_WIDTH,
wxLIST_MASK_FORMAT,
wxLIST_MASK_STATE,
wxLIST_STATE_DONTCARE,
wxLIST_STATE_DROPHILITED,
wxLIST_STATE_FOCUSED,
wxLIST_STATE_SELECTED,
wxLIST_STATE_CUT,
wxLIST_HITTEST_ABOVE,
wxLIST_HITTEST_BELOW,
wxLIST_HITTEST_NOWHERE,
wxLIST_HITTEST_ONITEMICON,
wxLIST_HITTEST_ONITEMLABEL,
wxLIST_HITTEST_ONITEMRIGHT,
wxLIST_HITTEST_ONITEMSTATEICON,
wxLIST_HITTEST_TOLEFT,
wxLIST_HITTEST_TORIGHT,
wxLIST_HITTEST_ONITEM,
wxLIST_NEXT_ABOVE,
wxLIST_NEXT_ALL,
wxLIST_NEXT_BELOW,
wxLIST_NEXT_LEFT,
wxLIST_NEXT_RIGHT,
wxLIST_ALIGN_DEFAULT,
wxLIST_ALIGN_LEFT,
wxLIST_ALIGN_TOP,
wxLIST_ALIGN_SNAP_TO_GRID,
wxLIST_AUTOSIZE,
wxLIST_AUTOSIZE_USEHEADER,
wxLIST_RECT_BOUNDS,
wxLIST_RECT_ICON,
wxLIST_RECT_LABEL,
wxLIST_FIND_UP,
wxLIST_FIND_DOWN,
wxLIST_FIND_LEFT,
wxLIST_FIND_RIGHT,
};
enum wxListColumnFormat
{
wxLIST_FORMAT_LEFT,
wxLIST_FORMAT_RIGHT,
wxLIST_FORMAT_CENTRE,
wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
};
enum {
/* List control event types */
@@ -107,46 +56,177 @@ enum {
wxEVT_COMMAND_LIST_KEY_DOWN,
wxEVT_COMMAND_LIST_INSERT_ITEM,
wxEVT_COMMAND_LIST_COL_CLICK,
wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK,
wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
wxEVT_COMMAND_LIST_CACHE_HINT,
};
%pragma(python) code = "
def EVT_LIST_BEGIN_DRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
def EVT_LIST_BEGIN_RDRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
def EVT_LIST_END_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
def EVT_LIST_DELETE_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
def EVT_LIST_GET_INFO(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
def EVT_LIST_SET_INFO(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
def EVT_LIST_ITEM_SELECTED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
def EVT_LIST_ITEM_DESELECTED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
def EVT_LIST_KEY_DOWN(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
def EVT_LIST_INSERT_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
def EVT_LIST_COL_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func)
def EVT_LIST_ITEM_ACTIVATED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
def EVT_LIST_CACHE_HINT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_CACHE_HINT, func)
"
enum {
/* Style flags */
wxLC_VRULES,
wxLC_HRULES,
wxLC_ICON,
wxLC_SMALL_ICON,
wxLC_LIST,
wxLC_REPORT,
wxLC_ALIGN_TOP,
wxLC_ALIGN_LEFT,
wxLC_AUTOARRANGE,
wxLC_USER_TEXT,
wxLC_VIRTUAL,
wxLC_EDIT_LABELS,
wxLC_NO_HEADER,
wxLC_NO_SORT_HEADER,
wxLC_SINGLE_SEL,
wxLC_SORT_ASCENDING,
wxLC_SORT_DESCENDING,
wxLC_MASK_TYPE,
wxLC_MASK_ALIGN,
wxLC_MASK_SORT,
wxLC_HRULES,
wxLC_VRULES,
wxLC_VIRTUAL,
};
enum {
// Mask flags
wxLIST_MASK_STATE,
wxLIST_MASK_TEXT,
wxLIST_MASK_IMAGE,
wxLIST_MASK_DATA,
wxLIST_SET_ITEM,
wxLIST_MASK_WIDTH,
wxLIST_MASK_FORMAT,
// State flags
wxLIST_STATE_DONTCARE,
wxLIST_STATE_DROPHILITED,
wxLIST_STATE_FOCUSED,
wxLIST_STATE_SELECTED,
wxLIST_STATE_CUT,
// Hit test flags
wxLIST_HITTEST_ABOVE,
wxLIST_HITTEST_BELOW,
wxLIST_HITTEST_NOWHERE,
wxLIST_HITTEST_ONITEMICON,
wxLIST_HITTEST_ONITEMLABEL,
wxLIST_HITTEST_ONITEMRIGHT,
wxLIST_HITTEST_ONITEMSTATEICON,
wxLIST_HITTEST_TOLEFT,
wxLIST_HITTEST_TORIGHT,
wxLIST_HITTEST_ONITEM,
// Flags for GetNextItem
wxLIST_NEXT_ABOVE,
wxLIST_NEXT_ALL,
wxLIST_NEXT_BELOW,
wxLIST_NEXT_LEFT,
wxLIST_NEXT_RIGHT,
// Alignment flags
wxLIST_ALIGN_DEFAULT,
wxLIST_ALIGN_LEFT,
wxLIST_ALIGN_TOP,
wxLIST_ALIGN_SNAP_TO_GRID,
// Autosize values for SetColumnWidth
wxLIST_AUTOSIZE = -1,
wxLIST_AUTOSIZE_USEHEADER = -2,
// Flag values for GetItemRect
wxLIST_RECT_BOUNDS,
wxLIST_RECT_ICON,
wxLIST_RECT_LABEL,
// Flag values for FindItem (MSW only)
wxLIST_FIND_UP,
wxLIST_FIND_DOWN,
wxLIST_FIND_LEFT,
wxLIST_FIND_RIGHT,
};
enum wxListColumnFormat
{
wxLIST_FORMAT_LEFT,
wxLIST_FORMAT_RIGHT,
wxLIST_FORMAT_CENTRE,
wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
};
class wxListItemAttr
{
public:
// ctors
wxListItemAttr();
//wxListItemAttr(const wxColour& colText,
// const wxColour& colBack,
// const wxFont& font)
// : m_colText(colText), m_colBack(colBack), m_font(font) { }
//wxListItemAttr();
wxListItemAttr(const wxColour& colText = wxNullColour,
const wxColour& colBack = wxNullColour,
const wxFont& font = wxNullFont);
// setters
void SetTextColour(const wxColour& colText);
@@ -252,45 +332,76 @@ public:
};
class wxListCtrl : public wxControl {
%{
class wxPyListCtrl : public wxListCtrl {
DECLARE_ABSTRACT_CLASS(wxPyListCtrl);
public:
wxListCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
char* name = "listCtrl");
wxPyListCtrl(wxWindow* parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxValidator& validator,
char* name) :
wxListCtrl(parent, id, pos, size, style, validator, name) {}
DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText);
DEC_PYCALLBACK_INT_LONG(OnGetItemImage);
DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr);
PYPRIVATE;
};
IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl);
IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText);
IMP_PYCALLBACK_INT_LONG(wxPyListCtrl, wxListCtrl, OnGetItemImage);
IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr);
%}
%name(wxListCtrl)class wxPyListCtrl : public wxControl {
public:
wxPyListCtrl(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
char* name = "listCtrl");
void _setSelf(PyObject* self, PyObject* _class);
%pragma(python) addtomethod = "__init__:#wx._StdWindowCallbacks(self)"
%pragma(python) addtomethod = "__init__:self._setSelf(self, wxListCtrl)"
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
void AssignImageList(wxImageList* imageList, int which);
%pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0"
bool DeleteItem(long item);
bool DeleteAllItems();
bool DeleteColumn(int col);
bool DeleteAllColumns(void);
void ClearAll(void);
#ifdef __WXMSW__
wxTextCtrl* EditLabel(long item);
bool EndEditLabel(bool cancel);
wxTextCtrl* GetEditControl();
#else
void EditLabel(long item);
#endif
bool EnsureVisible(long item);
long FindItem(long start, const wxString& str, bool partial = FALSE);
%name(FindItemData)long FindItem(long start, long data);
%name(FindItemAtPos)long FindItem(long start, const wxPoint& pt,
int direction);
bool GetColumn(int col, wxListItem& item);
int GetColumnWidth(int col);
int GetCountPerPage();
wxImageList* GetImageList(int which);
long GetItemData(long item);
// Set the control colours
bool SetForegroundColour(const wxColour& col);
bool SetBackgroundColour(const wxColour& col);
// Gets information about this column
bool GetColumn(int col, wxListItem& item) const;
// Sets information about this column
bool SetColumn(int col, wxListItem& item) ;
// Gets the column width
int GetColumnWidth(int col) const;
// Sets the column width
bool SetColumnWidth(int col, int width) ;
// Gets the number of items that can fit vertically in the
// visible area of the list control (list or report view)
// or the total number of items in the list control (icon
// or small icon view)
int GetCountPerPage() const;
// Gets the edit control for editing labels.
wxTextCtrl* GetEditControl() const;
//bool GetItem(wxListItem& info) const ;
%addmethods {
// Gets information about the item
%new wxListItem* GetItem(long itemId, int col=0) {
wxListItem* info = new wxListItem;
info->m_itemId = itemId;
@@ -307,12 +418,45 @@ public:
return val
"
// Sets information about the item
bool SetItem(wxListItem& info) ;
// Sets a string field at a particular column
%name(SetStringItem)long SetItem(long index, int col, const wxString& label, int imageId = -1);
// Gets the item state
int GetItemState(long item, long stateMask) const ;
// Sets the item state
bool SetItemState(long item, long state, long stateMask) ;
// Sets the item image
bool SetItemImage(long item, int image, int selImage) ;
// Gets the item text
wxString GetItemText(long item) const ;
// Sets the item text
void SetItemText(long item, const wxString& str) ;
// Gets the item data
long GetItemData(long item) const ;
// Sets the item data
bool SetItemData(long item, long data) ;
//bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
//bool GetItemPosition(long item, wxPoint& pos) const ;
%addmethods {
// Gets the item position
%new wxPoint* GetItemPosition(long item) {
wxPoint* pos = new wxPoint;
self->GetItemPosition(item, *pos);
return pos;
}
// Gets the item rectangle
%new wxRect* GetItemRect(long item, int code = wxLIST_RECT_BOUNDS) {
wxRect* rect= new wxRect;
self->GetItemRect(item, *rect, code);
@@ -320,60 +464,158 @@ public:
}
}
int GetItemState(long item, long stateMask);
int GetItemCount();
int GetItemSpacing(bool isSmall);
wxString GetItemText(long item);
long GetNextItem(long item,
int geometry = wxLIST_NEXT_ALL,
int state = wxLIST_STATE_DONTCARE);
int GetSelectedItemCount();
#ifdef __WXMSW__
wxColour GetTextColour();
// Sets the item position
bool SetItemPosition(long item, const wxPoint& pos) ;
// Gets the number of items in the list control
int GetItemCount() const;
// Gets the number of columns in the list control
int GetColumnCount() const { return m_colCount; }
// Retrieves the spacing between icons in pixels.
// If small is TRUE, gets the spacing for the small icon
// view, otherwise the large icon view.
int GetItemSpacing(bool isSmall) const;
// Gets the number of selected items in the list control
int GetSelectedItemCount() const;
// Gets the text colour of the listview
wxColour GetTextColour() const;
// Sets the text colour of the listview
void SetTextColour(const wxColour& col);
#endif
long GetTopItem();
// Gets the index of the topmost visible item when in
// list or report view
long GetTopItem() const ;
// Add or remove a single window style
void SetSingleStyle(long style, bool add = TRUE) ;
// Set the whole window style
void SetWindowStyleFlag(long style) ;
// Searches for an item, starting from 'item'.
// item can be -1 to find the first item that matches the
// specified flags.
// Returns the item or -1 if unsuccessful.
long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ;
// Gets one of the three image lists
wxImageList *GetImageList(int which) const ;
// Sets the image list
void SetImageList(wxImageList *imageList, int which) ;
void AssignImageList(wxImageList *imageList, int which) ;
%pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0"
// returns true if it is a virtual list control
bool IsVirtual() const;
// refresh items selectively (only useful for virtual list controls)
void RefreshItem(long item);
void RefreshItems(long itemFrom, long itemTo);
// Arranges the items
bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
// Deletes an item
bool DeleteItem(long item);
// Deletes all items
bool DeleteAllItems() ;
// Deletes a column
bool DeleteColumn(int col);
// Deletes all columns
bool DeleteAllColumns();
// Clears items, and columns if there are any.
void ClearAll();
// Edit the label
wxTextCtrl* EditLabel(long item /*, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)*/);
// End label editing, optionally cancelling the edit
bool EndEditLabel(bool cancel);
// Ensures this item is visible
bool EnsureVisible(long item) ;
// Find an item whose label matches this string, starting from the item after 'start'
// or the beginning if 'start' is -1.
long FindItem(long start, const wxString& str, bool partial = FALSE);
// Find an item whose data matches this data, starting from the item after 'start'
// or the beginning if 'start' is -1.
%name(FindItemData)long FindItem(long start, long data);
// Find an item nearest this position in the specified direction, starting from
// the item after 'start' or the beginning if 'start' is -1.
%name(FindItemAtPos)long FindItem(long start, const wxPoint& pt, int direction);
// Determines which item (if any) is at the specified point,
// giving details in the second return value (see wxLIST_HITTEST_... flags above)
long HitTest(const wxPoint& point, int& OUTPUT);
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
long InsertItem(wxListItem& info);
// Insert a string item
%name(InsertStringItem)long InsertItem(long index, const wxString& label);
// Insert an image item
%name(InsertImageItem)long InsertItem(long index, int imageIndex);
// Insert an image/string item
%name(InsertImageStringItem)long InsertItem(long index, const wxString& label, int imageIndex);
// For list view mode (only), inserts a column.
%name(InsertColumnInfo)long InsertColumn(long col, wxListItem& info);
long InsertColumn(long col, const wxString& heading,
long InsertColumn(long col,
const wxString& heading,
int format = wxLIST_FORMAT_LEFT,
int width = -1);
long InsertItem(wxListItem& info);
%name(InsertStringItem) long InsertItem(long index, const wxString& label);
%name(InsertImageItem) long InsertItem(long index, int imageIndex);
%name(InsertImageStringItem)long InsertItem(long index, const wxString& label,
int imageIndex);
// set the number of items in a virtual list control
void SetItemCount(long count);
// Scrolls the list control. If in icon, small icon or report view mode,
// x specifies the number of pixels to scroll. If in list view mode, x
// specifies the number of columns to scroll.
// If in icon, small icon or list view mode, y specifies the number of pixels
// to scroll. If in report view mode, y specifies the number of lines to scroll.
bool ScrollList(int dx, int dy);
void SetBackgroundColour(const wxColour& col);
bool SetColumn(int col, wxListItem& item);
bool SetColumnWidth(int col, int width);
void SetImageList(wxImageList* imageList, int which);
bool SetItem(wxListItem& info);
%name(SetStringItem)long SetItem(long index, int col, const wxString& label,
int imageId = -1);
bool SetItemData(long item, long data);
bool SetItemImage(long item, int image, int selImage);
bool SetItemPosition(long item, const wxPoint& pos);
bool SetItemState(long item, long state, long stateMask);
void SetItemText(long item, const wxString& text);
void SetSingleStyle(long style, bool add = TRUE);
void SetWindowStyleFlag(long style);
// bool SortItems(wxListCtrlCompare fn, long data);
%addmethods {
// Sort items.
// func is a function which takes 2 long arguments: item1, item2.
// item1 is the long data associated with a first item (NOT the index).
// item2 is the long data associated with a second item (NOT the index).
// The return value is a negative number if the first item should precede the second
// item, a positive number of the second item should precede the first,
// or zero if the two items are equivalent.
bool SortItems(PyObject* func) {
if (!PyCallable_Check(func))
return FALSE;
return self->SortItems(wxPyListCtrl_SortItems, (long)func);
}
}
};
%{
int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) {
int retval = 0;

View File

@@ -446,6 +446,17 @@ public:
int GetInterval();
};
//---------------------------------------------------------------------------
class wxTextUrlEvent : public wxCommandEvent
{
public:
wxTextUrlEvent(int id, const wxMouseEvent& evtMouse,
long start, long end);
const wxMouseEvent& GetMouseEvent();
long GetURLStart();
long GetURLEnd();
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------

View File

@@ -623,6 +623,10 @@ public:
void CalcBoundingBox(int x, int y);
void ResetBoundingBox();
#ifdef __WXMSW__
long GetHDC();
#endif
};

View File

@@ -1176,19 +1176,19 @@ public:
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_DATAFMT_SIZET(CBNAME) \
wxDataFormat CBNAME(); \
wxDataFormat base_##CBNAME();
#define DEC_PYCALLBACK_DATAFMT_SIZET(CBNAME) \
wxDataFormat CBNAME(size_t a); \
wxDataFormat base_##CBNAME(size_t a);
#define IMP_PYCALLBACK_DATAFMT_SIZET(CLASS, PCLASS, CBNAME) \
wxDataFormat CLASS::CBNAME(size_t a) { \
wxDataFormat rval; \
bool doSave = wxPyRestoreThread(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* ro; \
wxDataFormat* ptr; \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)", a)); \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)", a)); \
if (ro) { \
if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxDataFormat_p")) \
rval = *ptr; \
@@ -1278,6 +1278,94 @@ public:
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_STRING_LONGLONG(CBNAME) \
wxString CBNAME(long a, long b) const; \
wxString base_##CBNAME(long a, long b)const ;
#define IMP_PYCALLBACK_STRING_LONGLONG(CLASS, PCLASS, CBNAME) \
wxString CLASS::CBNAME(long a, long b) const { \
wxString rval; \
bool doSave = wxPyRestoreThread(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* ro; \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ll)",a,b)); \
if (ro) { \
PyObject* str = PyObject_Str(ro); \
rval = PyString_AsString(str); \
Py_DECREF(ro); Py_DECREF(str); \
} \
} \
else \
rval = PCLASS::CBNAME(a,b); \
wxPySaveThread(doSave); \
return rval; \
} \
wxString CLASS::base_##CBNAME(long a, long b) const { \
return PCLASS::CBNAME(a,b); \
}
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_INT_LONG(CBNAME) \
int CBNAME(long a) const; \
int base_##CBNAME(long a)const ;
#define IMP_PYCALLBACK_INT_LONG(CLASS, PCLASS, CBNAME) \
int CLASS::CBNAME(long a) const { \
int rval=-1; \
bool doSave = wxPyRestoreThread(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* ro; \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(l)",a)); \
if (ro) { \
rval = PyInt_AsLong(ro); \
Py_DECREF(ro); \
} \
} \
else \
rval = PCLASS::CBNAME(a); \
wxPySaveThread(doSave); \
return rval; \
} \
int CLASS::base_##CBNAME(long a) const { \
return PCLASS::CBNAME(a); \
}
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_LISTATTR_LONG(CBNAME) \
wxListItemAttr* CBNAME(long a); \
wxListItemAttr* base_##CBNAME(long a);
#define IMP_PYCALLBACK_LISTATTR_LONG(CLASS, PCLASS, CBNAME) \
wxListItemAttr *CLASS::CBNAME(long a) { \
wxListItemAttr *rval = NULL; \
bool doSave = wxPyRestoreThread(); \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* ro; \
wxListItemAttr* ptr; \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(i)", a)); \
if (ro) { \
if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxListItemAttr_p")) \
rval = ptr; \
Py_DECREF(ro); \
} \
} \
else \
rval = PCLASS::CBNAME(a); \
wxPySaveThread(doSave); \
return rval; \
} \
wxListItemAttr *CLASS::base_##CBNAME(long a) { \
return PCLASS::CBNAME(a); \
}
//---------------------------------------------------------------------------
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,58 @@ from events import *
from controls import *
import wx
def EVT_LIST_BEGIN_DRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
def EVT_LIST_BEGIN_RDRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
def EVT_LIST_END_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
def EVT_LIST_DELETE_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
def EVT_LIST_GET_INFO(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
def EVT_LIST_SET_INFO(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
def EVT_LIST_ITEM_SELECTED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
def EVT_LIST_ITEM_DESELECTED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
def EVT_LIST_KEY_DOWN(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
def EVT_LIST_INSERT_ITEM(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
def EVT_LIST_COL_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
def EVT_LIST_ITEM_RIGHT_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, func)
def EVT_LIST_ITEM_MIDDLE_CLICK(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, func)
def EVT_LIST_ITEM_ACTIVATED(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
def EVT_LIST_CACHE_HINT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_LIST_CACHE_HINT, func)
class wxListItemAttrPtr :
def __init__(self,this):
self.this = this
@@ -315,13 +367,127 @@ class wxListCtrlPtr(wxControlPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def Arrange(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_Arrange,(self,) + _args, _kwargs)
def _setSelf(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl__setSelf,(self,) + _args, _kwargs)
return val
def SetForegroundColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetForegroundColour,(self,) + _args, _kwargs)
return val
def SetBackgroundColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetBackgroundColour,(self,) + _args, _kwargs)
return val
def GetColumn(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
return val
def SetColumn(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetColumn,(self,) + _args, _kwargs)
return val
def GetColumnWidth(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumnWidth,(self,) + _args, _kwargs)
return val
def SetColumnWidth(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetColumnWidth,(self,) + _args, _kwargs)
return val
def GetCountPerPage(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetCountPerPage,(self,) + _args, _kwargs)
return val
def GetEditControl(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetEditControl,(self,) + _args, _kwargs)
return val
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
return val
def SetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItem,(self,) + _args, _kwargs)
return val
def SetStringItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetStringItem,(self,) + _args, _kwargs)
return val
def GetItemState(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemState,(self,) + _args, _kwargs)
return val
def SetItemState(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemState,(self,) + _args, _kwargs)
return val
def SetItemImage(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemImage,(self,) + _args, _kwargs)
return val
def GetItemText(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemText,(self,) + _args, _kwargs)
return val
def SetItemText(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemText,(self,) + _args, _kwargs)
return val
def GetItemData(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemData,(self,) + _args, _kwargs)
return val
def SetItemData(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemData,(self,) + _args, _kwargs)
return val
def GetItemPosition(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemPosition,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def GetItemRect(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemRect,(self,) + _args, _kwargs)
if val: val = wxRectPtr(val) ; val.thisown = 1
return val
def SetItemPosition(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemPosition,(self,) + _args, _kwargs)
return val
def GetItemCount(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemCount,(self,) + _args, _kwargs)
return val
def GetColumnCount(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumnCount,(self,) + _args, _kwargs)
return val
def GetItemSpacing(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemSpacing,(self,) + _args, _kwargs)
return val
def GetSelectedItemCount(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs)
return val
def GetTextColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetTextColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val) ; val.thisown = 1
return val
def SetTextColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetTextColour,(self,) + _args, _kwargs)
return val
def GetTopItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetTopItem,(self,) + _args, _kwargs)
return val
def SetSingleStyle(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetSingleStyle,(self,) + _args, _kwargs)
return val
def SetWindowStyleFlag(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetWindowStyleFlag,(self,) + _args, _kwargs)
return val
def GetNextItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetNextItem,(self,) + _args, _kwargs)
return val
def GetImageList(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetImageList,(self,) + _args, _kwargs)
return val
def SetImageList(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetImageList,(self,) + _args, _kwargs)
return val
def AssignImageList(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_AssignImageList,(self,) + _args, _kwargs)
_args[0].thisown = 0
return val
def IsVirtual(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_IsVirtual,(self,) + _args, _kwargs)
return val
def RefreshItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_RefreshItem,(self,) + _args, _kwargs)
return val
def RefreshItems(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_RefreshItems,(self,) + _args, _kwargs)
return val
def Arrange(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_Arrange,(self,) + _args, _kwargs)
return val
def DeleteItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_DeleteItem,(self,) + _args, _kwargs)
return val
@@ -343,9 +509,6 @@ class wxListCtrlPtr(wxControlPtr):
def EndEditLabel(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_EndEditLabel,(self,) + _args, _kwargs)
return val
def GetEditControl(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetEditControl,(self,) + _args, _kwargs)
return val
def EnsureVisible(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs)
return val
@@ -358,69 +521,9 @@ class wxListCtrlPtr(wxControlPtr):
def FindItemAtPos(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_FindItemAtPos,(self,) + _args, _kwargs)
return val
def GetColumn(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
return val
def GetColumnWidth(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumnWidth,(self,) + _args, _kwargs)
return val
def GetCountPerPage(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetCountPerPage,(self,) + _args, _kwargs)
return val
def GetImageList(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetImageList,(self,) + _args, _kwargs)
return val
def GetItemData(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemData,(self,) + _args, _kwargs)
return val
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs)
return val
def GetItemPosition(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemPosition,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def GetItemRect(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemRect,(self,) + _args, _kwargs)
if val: val = wxRectPtr(val) ; val.thisown = 1
return val
def GetItemState(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemState,(self,) + _args, _kwargs)
return val
def GetItemCount(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemCount,(self,) + _args, _kwargs)
return val
def GetItemSpacing(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemSpacing,(self,) + _args, _kwargs)
return val
def GetItemText(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetItemText,(self,) + _args, _kwargs)
return val
def GetNextItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetNextItem,(self,) + _args, _kwargs)
return val
def GetSelectedItemCount(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs)
return val
def GetTextColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetTextColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val) ; val.thisown = 1
return val
def SetTextColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetTextColour,(self,) + _args, _kwargs)
return val
def GetTopItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetTopItem,(self,) + _args, _kwargs)
return val
def HitTest(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_HitTest,(self,) + _args, _kwargs)
return val
def InsertColumnInfo(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs)
return val
def InsertColumn(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs)
return val
def InsertItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_InsertItem,(self,) + _args, _kwargs)
return val
@@ -433,48 +536,18 @@ class wxListCtrlPtr(wxControlPtr):
def InsertImageStringItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_InsertImageStringItem,(self,) + _args, _kwargs)
return val
def InsertColumnInfo(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_InsertColumnInfo,(self,) + _args, _kwargs)
return val
def InsertColumn(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_InsertColumn,(self,) + _args, _kwargs)
return val
def SetItemCount(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemCount,(self,) + _args, _kwargs)
return val
def ScrollList(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_ScrollList,(self,) + _args, _kwargs)
return val
def SetBackgroundColour(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetBackgroundColour,(self,) + _args, _kwargs)
return val
def SetColumn(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetColumn,(self,) + _args, _kwargs)
return val
def SetColumnWidth(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetColumnWidth,(self,) + _args, _kwargs)
return val
def SetImageList(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetImageList,(self,) + _args, _kwargs)
return val
def SetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItem,(self,) + _args, _kwargs)
return val
def SetStringItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetStringItem,(self,) + _args, _kwargs)
return val
def SetItemData(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemData,(self,) + _args, _kwargs)
return val
def SetItemImage(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemImage,(self,) + _args, _kwargs)
return val
def SetItemPosition(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemPosition,(self,) + _args, _kwargs)
return val
def SetItemState(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemState,(self,) + _args, _kwargs)
return val
def SetItemText(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetItemText,(self,) + _args, _kwargs)
return val
def SetSingleStyle(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetSingleStyle,(self,) + _args, _kwargs)
return val
def SetWindowStyleFlag(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SetWindowStyleFlag,(self,) + _args, _kwargs)
return val
def SortItems(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs)
return val
@@ -491,6 +564,7 @@ class wxListCtrl(wxListCtrlPtr):
self.this = apply(controls2c.new_wxListCtrl,_args,_kwargs)
self.thisown = 1
#wx._StdWindowCallbacks(self)
self._setSelf(self, wxListCtrl)
@@ -838,12 +912,49 @@ class wxTreeCtrl(wxTreeCtrlPtr):
#-------------- VARIABLE WRAPPERS ------------------
wxEVT_COMMAND_LIST_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_DRAG
wxEVT_COMMAND_LIST_BEGIN_RDRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_RDRAG
wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
wxEVT_COMMAND_LIST_END_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_END_LABEL_EDIT
wxEVT_COMMAND_LIST_DELETE_ITEM = controls2c.wxEVT_COMMAND_LIST_DELETE_ITEM
wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = controls2c.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
wxEVT_COMMAND_LIST_GET_INFO = controls2c.wxEVT_COMMAND_LIST_GET_INFO
wxEVT_COMMAND_LIST_SET_INFO = controls2c.wxEVT_COMMAND_LIST_SET_INFO
wxEVT_COMMAND_LIST_ITEM_SELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_SELECTED
wxEVT_COMMAND_LIST_ITEM_DESELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_DESELECTED
wxEVT_COMMAND_LIST_KEY_DOWN = controls2c.wxEVT_COMMAND_LIST_KEY_DOWN
wxEVT_COMMAND_LIST_INSERT_ITEM = controls2c.wxEVT_COMMAND_LIST_INSERT_ITEM
wxEVT_COMMAND_LIST_COL_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_CLICK
wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
wxEVT_COMMAND_LIST_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
wxEVT_COMMAND_LIST_CACHE_HINT = controls2c.wxEVT_COMMAND_LIST_CACHE_HINT
wxLC_VRULES = controls2c.wxLC_VRULES
wxLC_HRULES = controls2c.wxLC_HRULES
wxLC_ICON = controls2c.wxLC_ICON
wxLC_SMALL_ICON = controls2c.wxLC_SMALL_ICON
wxLC_LIST = controls2c.wxLC_LIST
wxLC_REPORT = controls2c.wxLC_REPORT
wxLC_ALIGN_TOP = controls2c.wxLC_ALIGN_TOP
wxLC_ALIGN_LEFT = controls2c.wxLC_ALIGN_LEFT
wxLC_AUTOARRANGE = controls2c.wxLC_AUTOARRANGE
wxLC_VIRTUAL = controls2c.wxLC_VIRTUAL
wxLC_EDIT_LABELS = controls2c.wxLC_EDIT_LABELS
wxLC_NO_HEADER = controls2c.wxLC_NO_HEADER
wxLC_NO_SORT_HEADER = controls2c.wxLC_NO_SORT_HEADER
wxLC_SINGLE_SEL = controls2c.wxLC_SINGLE_SEL
wxLC_SORT_ASCENDING = controls2c.wxLC_SORT_ASCENDING
wxLC_SORT_DESCENDING = controls2c.wxLC_SORT_DESCENDING
wxLC_MASK_TYPE = controls2c.wxLC_MASK_TYPE
wxLC_MASK_ALIGN = controls2c.wxLC_MASK_ALIGN
wxLC_MASK_SORT = controls2c.wxLC_MASK_SORT
wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
wxLIST_MASK_TEXT = controls2c.wxLIST_MASK_TEXT
wxLIST_MASK_IMAGE = controls2c.wxLIST_MASK_IMAGE
wxLIST_MASK_DATA = controls2c.wxLIST_MASK_DATA
wxLIST_SET_ITEM = controls2c.wxLIST_SET_ITEM
wxLIST_MASK_WIDTH = controls2c.wxLIST_MASK_WIDTH
wxLIST_MASK_FORMAT = controls2c.wxLIST_MASK_FORMAT
wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
wxLIST_STATE_DONTCARE = controls2c.wxLIST_STATE_DONTCARE
wxLIST_STATE_DROPHILITED = controls2c.wxLIST_STATE_DROPHILITED
wxLIST_STATE_FOCUSED = controls2c.wxLIST_STATE_FOCUSED
@@ -881,42 +992,6 @@ wxLIST_FORMAT_LEFT = controls2c.wxLIST_FORMAT_LEFT
wxLIST_FORMAT_RIGHT = controls2c.wxLIST_FORMAT_RIGHT
wxLIST_FORMAT_CENTRE = controls2c.wxLIST_FORMAT_CENTRE
wxLIST_FORMAT_CENTER = controls2c.wxLIST_FORMAT_CENTER
wxEVT_COMMAND_LIST_BEGIN_DRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_DRAG
wxEVT_COMMAND_LIST_BEGIN_RDRAG = controls2c.wxEVT_COMMAND_LIST_BEGIN_RDRAG
wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
wxEVT_COMMAND_LIST_END_LABEL_EDIT = controls2c.wxEVT_COMMAND_LIST_END_LABEL_EDIT
wxEVT_COMMAND_LIST_DELETE_ITEM = controls2c.wxEVT_COMMAND_LIST_DELETE_ITEM
wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = controls2c.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
wxEVT_COMMAND_LIST_GET_INFO = controls2c.wxEVT_COMMAND_LIST_GET_INFO
wxEVT_COMMAND_LIST_SET_INFO = controls2c.wxEVT_COMMAND_LIST_SET_INFO
wxEVT_COMMAND_LIST_ITEM_SELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_SELECTED
wxEVT_COMMAND_LIST_ITEM_DESELECTED = controls2c.wxEVT_COMMAND_LIST_ITEM_DESELECTED
wxEVT_COMMAND_LIST_KEY_DOWN = controls2c.wxEVT_COMMAND_LIST_KEY_DOWN
wxEVT_COMMAND_LIST_INSERT_ITEM = controls2c.wxEVT_COMMAND_LIST_INSERT_ITEM
wxEVT_COMMAND_LIST_COL_CLICK = controls2c.wxEVT_COMMAND_LIST_COL_CLICK
wxEVT_COMMAND_LIST_ITEM_ACTIVATED = controls2c.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = controls2c.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
wxLC_ICON = controls2c.wxLC_ICON
wxLC_SMALL_ICON = controls2c.wxLC_SMALL_ICON
wxLC_LIST = controls2c.wxLC_LIST
wxLC_REPORT = controls2c.wxLC_REPORT
wxLC_ALIGN_TOP = controls2c.wxLC_ALIGN_TOP
wxLC_ALIGN_LEFT = controls2c.wxLC_ALIGN_LEFT
wxLC_AUTOARRANGE = controls2c.wxLC_AUTOARRANGE
wxLC_USER_TEXT = controls2c.wxLC_USER_TEXT
wxLC_EDIT_LABELS = controls2c.wxLC_EDIT_LABELS
wxLC_NO_HEADER = controls2c.wxLC_NO_HEADER
wxLC_NO_SORT_HEADER = controls2c.wxLC_NO_SORT_HEADER
wxLC_SINGLE_SEL = controls2c.wxLC_SINGLE_SEL
wxLC_SORT_ASCENDING = controls2c.wxLC_SORT_ASCENDING
wxLC_SORT_DESCENDING = controls2c.wxLC_SORT_DESCENDING
wxLC_MASK_TYPE = controls2c.wxLC_MASK_TYPE
wxLC_MASK_ALIGN = controls2c.wxLC_MASK_ALIGN
wxLC_MASK_SORT = controls2c.wxLC_MASK_SORT
wxLC_HRULES = controls2c.wxLC_HRULES
wxLC_VRULES = controls2c.wxLC_VRULES
wxLC_VIRTUAL = controls2c.wxLC_VIRTUAL
wxTreeItemIcon_Normal = controls2c.wxTreeItemIcon_Normal
wxTreeItemIcon_Selected = controls2c.wxTreeItemIcon_Selected
wxTreeItemIcon_Expanded = controls2c.wxTreeItemIcon_Expanded

View File

@@ -6514,6 +6514,153 @@ static PyObject *_wrap_wxTimerEvent_GetInterval(PyObject *self, PyObject *args,
return _resultobj;
}
static void *SwigwxTextUrlEventTowxCommandEvent(void *ptr) {
wxTextUrlEvent *src;
wxCommandEvent *dest;
src = (wxTextUrlEvent *) ptr;
dest = (wxCommandEvent *) src;
return (void *) dest;
}
static void *SwigwxTextUrlEventTowxEvent(void *ptr) {
wxTextUrlEvent *src;
wxEvent *dest;
src = (wxTextUrlEvent *) ptr;
dest = (wxEvent *) src;
return (void *) dest;
}
static void *SwigwxTextUrlEventTowxObject(void *ptr) {
wxTextUrlEvent *src;
wxObject *dest;
src = (wxTextUrlEvent *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxTextUrlEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxTextUrlEvent(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
static PyObject *_wrap_new_wxTextUrlEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxTextUrlEvent * _result;
int _arg0;
wxMouseEvent * _arg1;
long _arg2;
long _arg3;
PyObject * _argo1 = 0;
char *_kwnames[] = { "id","evtMouse","start","end", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iOll:new_wxTextUrlEvent",_kwnames,&_arg0,&_argo1,&_arg2,&_arg3))
return NULL;
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxTextUrlEvent. Expected _wxMouseEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxTextUrlEvent *)new_wxTextUrlEvent(_arg0,*_arg1,_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextUrlEvent_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxTextUrlEvent_GetMouseEvent(_swigobj) (_swigobj->GetMouseEvent())
static PyObject *_wrap_wxTextUrlEvent_GetMouseEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxMouseEvent * _result;
wxTextUrlEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextUrlEvent_GetMouseEvent",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextUrlEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextUrlEvent_GetMouseEvent. Expected _wxTextUrlEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
const wxMouseEvent & _result_ref = wxTextUrlEvent_GetMouseEvent(_arg0);
_result = (wxMouseEvent *) &_result_ref;
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
}{ _resultobj = wxPyMake_wxObject(_result); }
return _resultobj;
}
#define wxTextUrlEvent_GetURLStart(_swigobj) (_swigobj->GetURLStart())
static PyObject *_wrap_wxTextUrlEvent_GetURLStart(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
wxTextUrlEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextUrlEvent_GetURLStart",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextUrlEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextUrlEvent_GetURLStart. Expected _wxTextUrlEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (long )wxTextUrlEvent_GetURLStart(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
#define wxTextUrlEvent_GetURLEnd(_swigobj) (_swigobj->GetURLEnd())
static PyObject *_wrap_wxTextUrlEvent_GetURLEnd(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
wxTextUrlEvent * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextUrlEvent_GetURLEnd",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextUrlEvent_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextUrlEvent_GetURLEnd. Expected _wxTextUrlEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (long )wxTextUrlEvent_GetURLEnd(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
static void *SwigwxPyEventTowxEvent(void *ptr) {
wxPyEvent *src;
wxEvent *dest;
@@ -6800,6 +6947,10 @@ static PyMethodDef eventscMethods[] = {
{ "wxPyEvent_SetSelf", (PyCFunction) _wrap_wxPyEvent_SetSelf, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxPyEvent", (PyCFunction) _wrap_delete_wxPyEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyEvent", (PyCFunction) _wrap_new_wxPyEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxTextUrlEvent_GetURLEnd", (PyCFunction) _wrap_wxTextUrlEvent_GetURLEnd, METH_VARARGS | METH_KEYWORDS },
{ "wxTextUrlEvent_GetURLStart", (PyCFunction) _wrap_wxTextUrlEvent_GetURLStart, METH_VARARGS | METH_KEYWORDS },
{ "wxTextUrlEvent_GetMouseEvent", (PyCFunction) _wrap_wxTextUrlEvent_GetMouseEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTextUrlEvent", (PyCFunction) _wrap_new_wxTextUrlEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxTimerEvent_GetInterval", (PyCFunction) _wrap_wxTimerEvent_GetInterval, METH_VARARGS | METH_KEYWORDS },
{ "new_wxTimerEvent", (PyCFunction) _wrap_new_wxTimerEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindowDestroyEvent_GetWindow", (PyCFunction) _wrap_wxWindowDestroyEvent_GetWindow, METH_VARARGS | METH_KEYWORDS },
@@ -7012,6 +7163,7 @@ static PyMethodDef eventscMethods[] = {
static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxEvent},
{ "_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent},
{ "_wxEvent","_wxTextUrlEvent",SwigwxTextUrlEventTowxEvent},
{ "_wxEvent","_wxTimerEvent",SwigwxTimerEventTowxEvent},
{ "_wxEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxEvent},
{ "_wxEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxEvent},
@@ -7071,6 +7223,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_wxWindowID",0},
{ "_wxChar","_char",0},
{ "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_wxCommandEvent","_wxTextUrlEvent",SwigwxTextUrlEventTowxCommandEvent},
{ "_wxCommandEvent","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxCommandEvent},
{ "_wxCommandEvent","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxCommandEvent},
{ "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
@@ -7096,6 +7249,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_unsigned_short","_short",0},
{ "_wxObject","_wxPyCommandEvent",SwigwxPyCommandEventTowxObject},
{ "_wxObject","_wxPyEvent",SwigwxPyEventTowxObject},
{ "_wxObject","_wxTextUrlEvent",SwigwxTextUrlEventTowxObject},
{ "_wxObject","_wxTimerEvent",SwigwxTimerEventTowxObject},
{ "_wxObject","_wxWindowDestroyEvent",SwigwxWindowDestroyEventTowxObject},
{ "_wxObject","_wxWindowCreateEvent",SwigwxWindowCreateEventTowxObject},

View File

@@ -942,6 +942,29 @@ class wxTimerEvent(wxTimerEventPtr):
class wxTextUrlEventPtr(wxCommandEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetMouseEvent(self, *_args, **_kwargs):
val = apply(eventsc.wxTextUrlEvent_GetMouseEvent,(self,) + _args, _kwargs)
return val
def GetURLStart(self, *_args, **_kwargs):
val = apply(eventsc.wxTextUrlEvent_GetURLStart,(self,) + _args, _kwargs)
return val
def GetURLEnd(self, *_args, **_kwargs):
val = apply(eventsc.wxTextUrlEvent_GetURLEnd,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxTextUrlEvent instance at %s>" % (self.this,)
class wxTextUrlEvent(wxTextUrlEventPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(eventsc.new_wxTextUrlEvent,_args,_kwargs)
self.thisown = 1
class wxPyEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this

View File

@@ -8515,6 +8515,34 @@ static PyObject *_wrap_wxDC_ResetBoundingBox(PyObject *self, PyObject *args, PyO
return _resultobj;
}
#define wxDC_GetHDC(_swigobj) (_swigobj->GetHDC())
static PyObject *_wrap_wxDC_GetHDC(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
long _result;
wxDC * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_GetHDC",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetHDC. Expected _wxDC_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (long )wxDC_GetHDC(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("l",_result);
return _resultobj;
}
static void *SwigwxMemoryDCTowxDC(void *ptr) {
wxMemoryDC *src;
wxDC *dest;
@@ -10770,6 +10798,7 @@ static PyMethodDef gdicMethods[] = {
{ "new_wxScreenDC", (PyCFunction) _wrap_new_wxScreenDC, METH_VARARGS | METH_KEYWORDS },
{ "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS },
{ "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_GetHDC", (PyCFunction) _wrap_wxDC_GetHDC, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_ResetBoundingBox", (PyCFunction) _wrap_wxDC_ResetBoundingBox, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_CalcBoundingBox", (PyCFunction) _wrap_wxDC_CalcBoundingBox, METH_VARARGS | METH_KEYWORDS },
{ "wxDC_SetAxisOrientation", (PyCFunction) _wrap_wxDC_SetAxisOrientation, METH_VARARGS | METH_KEYWORDS },

View File

@@ -821,6 +821,9 @@ class wxDCPtr(wxObjectPtr):
def ResetBoundingBox(self, *_args, **_kwargs):
val = apply(gdic.wxDC_ResetBoundingBox,(self,) + _args, _kwargs)
return val
def GetHDC(self, *_args, **_kwargs):
val = apply(gdic.wxDC_GetHDC,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxDC instance at %s>" % (self.this,)
class wxDC(wxDCPtr):

View File

@@ -5411,6 +5411,176 @@ static PyObject *_wrap_wxWindow_SetHelpText(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define wxWindow_ScrollLines(_swigobj,_swigarg0) (_swigobj->ScrollLines(_swigarg0))
static PyObject *_wrap_wxWindow_ScrollLines(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
int _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","lines", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_ScrollLines",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ScrollLines. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_ScrollLines(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_ScrollPages(_swigobj,_swigarg0) (_swigobj->ScrollPages(_swigarg0))
static PyObject *_wrap_wxWindow_ScrollPages(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
int _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","pages", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxWindow_ScrollPages",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_ScrollPages. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_ScrollPages(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_LineUp(_swigobj) (_swigobj->LineUp())
static PyObject *_wrap_wxWindow_LineUp(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_LineUp",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_LineUp. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_LineUp(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_LineDown(_swigobj) (_swigobj->LineDown())
static PyObject *_wrap_wxWindow_LineDown(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_LineDown",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_LineDown. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_LineDown(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_PageUp(_swigobj) (_swigobj->PageUp())
static PyObject *_wrap_wxWindow_PageUp(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_PageUp",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PageUp. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_PageUp(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWindow_PageDown(_swigobj) (_swigobj->PageDown())
static PyObject *_wrap_wxWindow_PageDown(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWindow * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_PageDown",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_PageDown. Expected _wxWindow_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxWindow_PageDown(_arg0);
wxPy_END_ALLOW_THREADS;
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static void *SwigwxPanelTowxWindow(void *ptr) {
wxPanel *src;
wxWindow *dest;
@@ -10611,6 +10781,12 @@ static PyMethodDef windowscMethods[] = {
{ "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS },
{ "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPanel", (PyCFunction) _wrap_new_wxPanel, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PageDown", (PyCFunction) _wrap_wxWindow_PageDown, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_PageUp", (PyCFunction) _wrap_wxWindow_PageUp, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_LineDown", (PyCFunction) _wrap_wxWindow_LineDown, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_LineUp", (PyCFunction) _wrap_wxWindow_LineUp, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_ScrollPages", (PyCFunction) _wrap_wxWindow_ScrollPages, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_ScrollLines", (PyCFunction) _wrap_wxWindow_ScrollLines, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_SetHelpText", (PyCFunction) _wrap_wxWindow_SetHelpText, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_GetHelpText", (PyCFunction) _wrap_wxWindow_GetHelpText, METH_VARARGS | METH_KEYWORDS },
{ "wxWindow_Thaw", (PyCFunction) _wrap_wxWindow_Thaw, METH_VARARGS | METH_KEYWORDS },

View File

@@ -520,6 +520,24 @@ class wxWindowPtr(wxEvtHandlerPtr):
def SetHelpText(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_SetHelpText,(self,) + _args, _kwargs)
return val
def ScrollLines(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_ScrollLines,(self,) + _args, _kwargs)
return val
def ScrollPages(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_ScrollPages,(self,) + _args, _kwargs)
return val
def LineUp(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_LineUp,(self,) + _args, _kwargs)
return val
def LineDown(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_LineDown,(self,) + _args, _kwargs)
return val
def PageUp(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_PageUp,(self,) + _args, _kwargs)
return val
def PageDown(self, *_args, **_kwargs):
val = apply(windowsc.wxWindow_PageDown,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxWindow instance at %s>" % (self.this,)
# replaces broken shadow method

View File

@@ -389,6 +389,14 @@ public:
wxString GetHelpText();
void SetHelpText(const wxString& helpText);
bool ScrollLines(int lines);
bool ScrollPages(int pages);
bool LineUp();
bool LineDown();
bool PageUp();
bool PageDown();
// // Properties list
// %pragma(python) addtoclass = "