X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08da19d737fcb12a19a2746b438b3a3610214e6d..f29c177351d7b4f44b9bfab25866495ba8d7fe39:/wxPython/src/gtk/wx.py diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index c69e3f7efd..b213f84dfd 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -167,7 +167,6 @@ wxRAISED_BORDER = wxc.wxRAISED_BORDER wxBORDER = wxc.wxBORDER wxSIMPLE_BORDER = wxc.wxSIMPLE_BORDER wxSTATIC_BORDER = wxc.wxSTATIC_BORDER -wxBORDER_MASK = wxc.wxBORDER_MASK wxTRANSPARENT_WINDOW = wxc.wxTRANSPARENT_WINDOW wxNO_BORDER = wxc.wxNO_BORDER wxUSER_COLOURS = wxc.wxUSER_COLOURS @@ -240,16 +239,20 @@ wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW wxLB_HSCROLL = wxc.wxLB_HSCROLL wxPROCESS_ENTER = wxc.wxPROCESS_ENTER wxPASSWORD = wxc.wxPASSWORD -wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER -wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB -wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_READONLY = wxc.wxTE_READONLY -wxTE_RICH = wxc.wxTE_RICH wxTE_MULTILINE = wxc.wxTE_MULTILINE -wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL +wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB +wxTE_RICH = wxc.wxTE_RICH +wxTE_RICH2 = wxc.wxTE_RICH2 wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL +wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL +wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER +wxTE_PASSWORD = wxc.wxTE_PASSWORD wxTE_AUTO_URL = wxc.wxTE_AUTO_URL wxTE_NOHIDESEL = wxc.wxTE_NOHIDESEL +wxTE_DONTWRAP = wxc.wxTE_DONTWRAP +wxTE_LINEWRAP = wxc.wxTE_LINEWRAP +wxTE_WORDWRAP = wxc.wxTE_WORDWRAP wxCB_SIMPLE = wxc.wxCB_SIMPLE wxCB_DROPDOWN = wxc.wxCB_DROPDOWN wxCB_SORT = wxc.wxCB_SORT @@ -352,6 +355,7 @@ wxID_HELP_CONTENTS = wxc.wxID_HELP_CONTENTS wxID_HELP_COMMANDS = wxc.wxID_HELP_COMMANDS wxID_HELP_PROCEDURES = wxc.wxID_HELP_PROCEDURES wxID_HELP_CONTEXT = wxc.wxID_HELP_CONTEXT +wxID_CLOSE_ALL = wxc.wxID_CLOSE_ALL wxID_CUT = wxc.wxID_CUT wxID_COPY = wxc.wxID_COPY wxID_PASTE = wxc.wxID_PASTE @@ -421,8 +425,6 @@ wxNB_BOTTOM = wxc.wxNB_BOTTOM wxNB_MULTILINE = wxc.wxNB_MULTILINE wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL wxLI_VERTICAL = wxc.wxLI_VERTICAL -wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER -wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO wxJOYSTICK1 = wxc.wxJOYSTICK1 wxJOYSTICK2 = wxc.wxJOYSTICK2 wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1 @@ -432,6 +434,7 @@ wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4 wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS +wxWS_EX_TRANSIENT = wxc.wxWS_EX_TRANSIENT wxMM_TEXT = wxc.wxMM_TEXT wxMM_LOMETRIC = wxc.wxMM_LOMETRIC wxMM_HIMETRIC = wxc.wxMM_HIMETRIC @@ -442,6 +445,14 @@ wxMM_ISOTROPIC = wxc.wxMM_ISOTROPIC wxMM_ANISOTROPIC = wxc.wxMM_ANISOTROPIC wxMM_POINTS = wxc.wxMM_POINTS wxMM_METRIC = wxc.wxMM_METRIC +wxBORDER_DEFAULT = wxc.wxBORDER_DEFAULT +wxBORDER_NONE = wxc.wxBORDER_NONE +wxBORDER_STATIC = wxc.wxBORDER_STATIC +wxBORDER_SIMPLE = wxc.wxBORDER_SIMPLE +wxBORDER_RAISED = wxc.wxBORDER_RAISED +wxBORDER_SUNKEN = wxc.wxBORDER_SUNKEN +wxBORDER_DOUBLE = wxc.wxBORDER_DOUBLE +wxBORDER_MASK = wxc.wxBORDER_MASK wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE wxROMAN = wxc.wxROMAN @@ -623,6 +634,8 @@ wxBITMAP_TYPE_PICT = wxc.wxBITMAP_TYPE_PICT wxBITMAP_TYPE_PICT_RESOURCE = wxc.wxBITMAP_TYPE_PICT_RESOURCE wxBITMAP_TYPE_ICON = wxc.wxBITMAP_TYPE_ICON wxBITMAP_TYPE_ICON_RESOURCE = wxc.wxBITMAP_TYPE_ICON_RESOURCE +wxBITMAP_TYPE_ANI = wxc.wxBITMAP_TYPE_ANI +wxBITMAP_TYPE_IFF = wxc.wxBITMAP_TYPE_IFF wxBITMAP_TYPE_MACCURSOR = wxc.wxBITMAP_TYPE_MACCURSOR wxBITMAP_TYPE_MACCURSOR_RESOURCE = wxc.wxBITMAP_TYPE_MACCURSOR_RESOURCE wxBITMAP_TYPE_ANY = wxc.wxBITMAP_TYPE_ANY @@ -725,6 +738,22 @@ wxPAPER_A3_EXTRA_TRANSVERSE = wxc.wxPAPER_A3_EXTRA_TRANSVERSE wxDUPLEX_SIMPLEX = wxc.wxDUPLEX_SIMPLEX wxDUPLEX_HORIZONTAL = wxc.wxDUPLEX_HORIZONTAL wxDUPLEX_VERTICAL = wxc.wxDUPLEX_VERTICAL +wxHT_NOWHERE = wxc.wxHT_NOWHERE +wxHT_SCROLLBAR_FIRST = wxc.wxHT_SCROLLBAR_FIRST +wxHT_SCROLLBAR_ARROW_LINE_1 = wxc.wxHT_SCROLLBAR_ARROW_LINE_1 +wxHT_SCROLLBAR_ARROW_LINE_2 = wxc.wxHT_SCROLLBAR_ARROW_LINE_2 +wxHT_SCROLLBAR_ARROW_PAGE_1 = wxc.wxHT_SCROLLBAR_ARROW_PAGE_1 +wxHT_SCROLLBAR_ARROW_PAGE_2 = wxc.wxHT_SCROLLBAR_ARROW_PAGE_2 +wxHT_SCROLLBAR_THUMB = wxc.wxHT_SCROLLBAR_THUMB +wxHT_SCROLLBAR_BAR_1 = wxc.wxHT_SCROLLBAR_BAR_1 +wxHT_SCROLLBAR_BAR_2 = wxc.wxHT_SCROLLBAR_BAR_2 +wxHT_SCROLLBAR_LAST = wxc.wxHT_SCROLLBAR_LAST +wxHT_WINDOW_OUTSIDE = wxc.wxHT_WINDOW_OUTSIDE +wxHT_WINDOW_INSIDE = wxc.wxHT_WINDOW_INSIDE +wxHT_WINDOW_VERT_SCROLLBAR = wxc.wxHT_WINDOW_VERT_SCROLLBAR +wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR +wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER +wxHT_MAX = wxc.wxHT_MAX FALSE = wxc.FALSE false = wxc.false TRUE = wxc.TRUE @@ -755,6 +784,7 @@ wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS +wxEVT_CHILD_FOCUS = wxc.wxEVT_CHILD_FOCUS wxEVT_MOUSEWHEEL = wxc.wxEVT_MOUSEWHEEL wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP @@ -818,11 +848,12 @@ wxEVT_PAINT = wxc.wxEVT_PAINT wxEVT_ERASE_BACKGROUND = wxc.wxEVT_ERASE_BACKGROUND wxEVT_NC_PAINT = wxc.wxEVT_NC_PAINT wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON -wxEVT_MENU_CHAR = wxc.wxEVT_MENU_CHAR -wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT +wxEVT_MENU_OPEN = wxc.wxEVT_MENU_OPEN +wxEVT_MENU_CLOSE = wxc.wxEVT_MENU_CLOSE wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT -wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT +wxEVT_CONTEXT_MENU = wxc.wxEVT_CONTEXT_MENU wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED +wxEVT_DISPLAY_CHANGED = wxc.wxEVT_DISPLAY_CHANGED wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED wxEVT_QUERY_NEW_PALETTE = wxc.wxEVT_QUERY_NEW_PALETTE wxEVT_PALETTE_CHANGED = wxc.wxEVT_PALETTE_CHANGED @@ -862,7 +893,6 @@ wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) # Author: Robin Dunn # # Created: 6/30/97 -# RCS-ID: $Id$ # Copyright: (c) 1998 by Total Control Software # Licence: wxWindows license #---------------------------------------------------------------------------- @@ -919,6 +949,12 @@ def EVT_KEY_DOWN(win, func): def EVT_KEY_UP(win, func): win.Connect(-1, -1, wxEVT_KEY_UP, func) +def EVT_MENU_OPEN(win, func): + win.Connect(-1, -1, wxEVT_MENU_OPEN, func) + +def EVT_MENU_CLOSE(win, func): + win.Connect(-1, -1, wxEVT_MENU_CLOSE, func) + def EVT_MENU_HIGHLIGHT(win, id, func): win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func) @@ -931,6 +967,9 @@ def EVT_SET_FOCUS(win, func): def EVT_KILL_FOCUS(win, func): win.Connect(-1, -1, wxEVT_KILL_FOCUS, func) +def EVT_CHILD_FOCUS(win, func): + win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func) + def EVT_ACTIVATE(win, func): win.Connect(-1, -1, wxEVT_ACTIVATE, func) @@ -952,6 +991,9 @@ def EVT_INIT_DIALOG(win, func): def EVT_SYS_COLOUR_CHANGED(win, func): win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func) +def EVT_DISPLAY_CHANGED(win, func): + win.Connect(-1, -1, wxEVT_DISPLAY_CHANGED, func) + def EVT_SHOW(win, func): win.Connect(-1, -1, wxEVT_SHOW, func) @@ -1396,19 +1438,6 @@ def EVT_TOGGLEBUTTON(win, id, func): -# Help events -def EVT_HELP(win, id, func): - win.Connect(id, -1, wxEVT_HELP, func) - -def EVT_HELP_RANGE(win, id, id2, func): - win.Connect(id, id2, wxEVT_HELP, func) - -def EVT_DETAILED_HELP(win, id, func): - win.Connect(id, -1, wxEVT_DETAILED_HELP, func) - -def EVT_DETAILED_HELP_RANGE(win, id, id2, func): - win.Connect(id, id2, wxEVT_DETAILED_HELP, func) - def EVT_CONTEXT_MENU(win, func): win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func) @@ -1424,33 +1453,33 @@ class wxTimer(wxPyTimer): wxPyTimer.__init__(self, None) self.SetOwner(evtHandler, id) -#---------------------------------------------------------------------- - -NULL = None # For backwards compatibility only. You should really be - # using None now. - - #---------------------------------------------------------------------- # aliases wxColor = wxColour wxNamedColor = wxNamedColour wxPen = wxPyPen +wxScrollbar = wxScrollBar + # backwards compatibility wxNoRefBitmap = wxBitmap wxPyDefaultPosition = wxDefaultPosition wxPyDefaultSize = wxDefaultSize - +NULL = None +wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour +wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont +wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric #---------------------------------------------------------------------- # 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 +if wxPlatform == "__WXGTK__": + try: + import locale + locale.setlocale(locale.LC_ALL, "") + except: + pass @@ -1632,7 +1661,15 @@ class __wxPyCleanup: def __del__(self): self.cleanup() -__cleanMeUp = __wxPyCleanup() +sys.__wxPythonCleanup = __wxPyCleanup() + +## # another possible solution, but it gets called too early... +## if sys.version[0] == '2': +## import atexit +## atexit.register(wxc.wxApp_CleanUp) +## else: +## sys.exitfunc = wxc.wxApp_CleanUp + #---------------------------------------------------------------------------- #----------------------------------------------------------------------------