def EVT_TEXT_URL(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TEXT_URL, func)
+def EVT_TEXT_MAXLEN(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TEXT_MAXLEN, func)
+
def EVT_MENU(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func)
win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func)
-# wxTreeCtrl events
-def EVT_TREE_BEGIN_DRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
-
-def EVT_TREE_BEGIN_RDRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
-
-def EVT_TREE_END_DRAG(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func)
-
-def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
-
-def EVT_TREE_END_LABEL_EDIT(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
-
-def EVT_TREE_GET_INFO(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func)
-
-def EVT_TREE_SET_INFO(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func)
-
-def EVT_TREE_ITEM_EXPANDED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
-
-def EVT_TREE_ITEM_EXPANDING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
-
-def EVT_TREE_ITEM_COLLAPSED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
-
-def EVT_TREE_ITEM_COLLAPSING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
-
-def EVT_TREE_SEL_CHANGED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func)
-
-def EVT_TREE_SEL_CHANGING(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func)
-
-def EVT_TREE_KEY_DOWN(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func)
-
-def EVT_TREE_DELETE_ITEM(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
-
-def EVT_TREE_ITEM_ACTIVATED(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, func)
-
-def EVT_TREE_ITEM_RIGHT_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, func)
-
-def EVT_TREE_ITEM_MIDDLE_CLICK(win, id, func):
- win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, func)
-
-
# wxSpinButton
def EVT_SPIN_UP(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
-
-
# wxTaskBarIcon
def EVT_TASKBAR_MOVE(win, func):
win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func)
wxPyDefaultPosition = wxDefaultPosition
wxPyDefaultSize = wxDefaultSize
+
+# wxGTK sets the locale when initialized. Doing this at the Python
+# level should set it up to match what GTK is doing at the C level.
+try:
+ import locale
+ locale.setlocale(locale.LC_ALL, "")
+except:
+ pass
+
+
#----------------------------------------------------------------------
# This helper function will take a wxPython object and convert it to
# another wxPython object type. This will not be able to create objects