]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_misc.py
Removed unnecessary files, removed or replaced images that we're not
[wxWidgets.git] / wxPython / src / gtk / _misc.py
index 15e2860836c15e1f9eb991e14f32802c5384c50e..06eb5a5d7c37f6ac5f6076cf30964b0d3bc4286a 100644 (file)
@@ -155,7 +155,7 @@ class SystemSettings(object):
 
     GetFont = staticmethod(GetFont)
     def GetMetric(*args, **kwargs):
 
     GetFont = staticmethod(GetFont)
     def GetMetric(*args, **kwargs):
-        """GetMetric(int index) -> int"""
+        """GetMetric(int index, Window win=None) -> int"""
         return _misc_.SystemSettings_GetMetric(*args, **kwargs)
 
     GetMetric = staticmethod(GetMetric)
         return _misc_.SystemSettings_GetMetric(*args, **kwargs)
 
     GetMetric = staticmethod(GetMetric)
@@ -191,7 +191,7 @@ def SystemSettings_GetFont(*args, **kwargs):
     return _misc_.SystemSettings_GetFont(*args, **kwargs)
 
 def SystemSettings_GetMetric(*args, **kwargs):
     return _misc_.SystemSettings_GetFont(*args, **kwargs)
 
 def SystemSettings_GetMetric(*args, **kwargs):
-    """SystemSettings_GetMetric(int index) -> int"""
+    """SystemSettings_GetMetric(int index, Window win=None) -> int"""
     return _misc_.SystemSettings_GetMetric(*args, **kwargs)
 
 def SystemSettings_HasFeature(*args, **kwargs):
     return _misc_.SystemSettings_GetMetric(*args, **kwargs)
 
 def SystemSettings_HasFeature(*args, **kwargs):
@@ -241,6 +241,11 @@ class SystemOptions(_core.Object):
         return _misc_.SystemOptions_HasOption(*args, **kwargs)
 
     HasOption = staticmethod(HasOption)
         return _misc_.SystemOptions_HasOption(*args, **kwargs)
 
     HasOption = staticmethod(HasOption)
+    def IsFalse(*args, **kwargs):
+        """IsFalse(String name) -> bool"""
+        return _misc_.SystemOptions_IsFalse(*args, **kwargs)
+
+    IsFalse = staticmethod(IsFalse)
 
 class SystemOptionsPtr(SystemOptions):
     def __init__(self, this):
 
 class SystemOptionsPtr(SystemOptions):
     def __init__(self, this):
@@ -271,6 +276,10 @@ def SystemOptions_HasOption(*args, **kwargs):
     """SystemOptions_HasOption(String name) -> bool"""
     return _misc_.SystemOptions_HasOption(*args, **kwargs)
 
     """SystemOptions_HasOption(String name) -> bool"""
     return _misc_.SystemOptions_HasOption(*args, **kwargs)
 
+def SystemOptions_IsFalse(*args, **kwargs):
+    """SystemOptions_IsFalse(String name) -> bool"""
+    return _misc_.SystemOptions_IsFalse(*args, **kwargs)
+
 #---------------------------------------------------------------------------
 
 
 #---------------------------------------------------------------------------
 
 
@@ -525,6 +534,15 @@ def SetCursor(*args, **kwargs):
     """SetCursor(Cursor cursor)"""
     return _misc_.SetCursor(*args, **kwargs)
 
     """SetCursor(Cursor cursor)"""
     return _misc_.SetCursor(*args, **kwargs)
 
+def GetXDisplay(*args, **kwargs):
+    """
+    GetXDisplay() -> void
+
+    Returns a swigified pointer to the X11 display.  Returns None on
+    other platforms.
+    """
+    return _misc_.GetXDisplay(*args, **kwargs)
+
 def BeginBusyCursor(*args, **kwargs):
     """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)"""
     return _misc_.BeginBusyCursor(*args, **kwargs)
 def BeginBusyCursor(*args, **kwargs):
     """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)"""
     return _misc_.BeginBusyCursor(*args, **kwargs)
@@ -545,6 +563,16 @@ def GetTopLevelParent(*args, **kwargs):
     """GetTopLevelParent(Window win) -> Window"""
     return _misc_.GetTopLevelParent(*args, **kwargs)
 
     """GetTopLevelParent(Window win) -> Window"""
     return _misc_.GetTopLevelParent(*args, **kwargs)
 
+def LaunchDefaultBrowser(*args, **kwargs):
+    """
+    LaunchDefaultBrowser(String url) -> bool
+
+    Launches the user's default browser and tells it to open the location
+    at ``url``.  Returns ``True`` if the application was successfully
+    launched.
+    """
+    return _misc_.LaunchDefaultBrowser(*args, **kwargs)
+
 def GetKeyState(*args, **kwargs):
     """
     GetKeyState(int key) -> bool
 def GetKeyState(*args, **kwargs):
     """
     GetKeyState(int key) -> bool
@@ -958,6 +986,10 @@ def PreSingleInstanceChecker(*args, **kwargs):
     val.thisown = 1
     return val
 
     val.thisown = 1
     return val
 
+
+def DrawWindowOnDC(*args, **kwargs):
+    """DrawWindowOnDC(Window window, DC dc) -> bool"""
+    return _misc_.DrawWindowOnDC(*args, **kwargs)
 #---------------------------------------------------------------------------
 
 class TipProvider(object):
 #---------------------------------------------------------------------------
 
 class TipProvider(object):
@@ -1082,7 +1114,7 @@ class Timer(_core.EvtHandler):
         """GetId(self) -> int"""
         return _misc_.Timer_GetId(*args, **kwargs)
 
         """GetId(self) -> int"""
         return _misc_.Timer_GetId(*args, **kwargs)
 
-    def Destroy():
+    def Destroy(self):
         """NO-OP: Timers must be destroyed by normal refrence counting"""
         pass
 
         """NO-OP: Timers must be destroyed by normal refrence counting"""
         pass
 
@@ -2544,6 +2576,16 @@ class ArtProvider(object):
         return _misc_.ArtProvider_GetIcon(*args, **kwargs)
 
     GetIcon = staticmethod(GetIcon)
         return _misc_.ArtProvider_GetIcon(*args, **kwargs)
 
     GetIcon = staticmethod(GetIcon)
+    def GetSizeHint(*args, **kwargs):
+        """
+        GetSizeHint(String client, bool platform_dependent=False) -> Size
+
+        Get the size hint of an icon from a specific Art Client, queries the
+        topmost provider if platform_dependent = false
+        """
+        return _misc_.ArtProvider_GetSizeHint(*args, **kwargs)
+
+    GetSizeHint = staticmethod(GetSizeHint)
     def Destroy(*args, **kwargs):
         """Destroy(self)"""
         return _misc_.ArtProvider_Destroy(*args, **kwargs)
     def Destroy(*args, **kwargs):
         """Destroy(self)"""
         return _misc_.ArtProvider_Destroy(*args, **kwargs)
@@ -2577,6 +2619,8 @@ ART_GO_DOWN = cvar.ART_GO_DOWN
 ART_GO_TO_PARENT = cvar.ART_GO_TO_PARENT
 ART_GO_HOME = cvar.ART_GO_HOME
 ART_FILE_OPEN = cvar.ART_FILE_OPEN
 ART_GO_TO_PARENT = cvar.ART_GO_TO_PARENT
 ART_GO_HOME = cvar.ART_GO_HOME
 ART_FILE_OPEN = cvar.ART_FILE_OPEN
+ART_FILE_SAVE = cvar.ART_FILE_SAVE
+ART_FILE_SAVE_AS = cvar.ART_FILE_SAVE_AS
 ART_PRINT = cvar.ART_PRINT
 ART_HELP = cvar.ART_HELP
 ART_TIP = cvar.ART_TIP
 ART_PRINT = cvar.ART_PRINT
 ART_HELP = cvar.ART_HELP
 ART_TIP = cvar.ART_TIP
@@ -2599,6 +2643,15 @@ ART_QUESTION = cvar.ART_QUESTION
 ART_WARNING = cvar.ART_WARNING
 ART_INFORMATION = cvar.ART_INFORMATION
 ART_MISSING_IMAGE = cvar.ART_MISSING_IMAGE
 ART_WARNING = cvar.ART_WARNING
 ART_INFORMATION = cvar.ART_INFORMATION
 ART_MISSING_IMAGE = cvar.ART_MISSING_IMAGE
+ART_COPY = cvar.ART_COPY
+ART_CUT = cvar.ART_CUT
+ART_PASTE = cvar.ART_PASTE
+ART_DELETE = cvar.ART_DELETE
+ART_UNDO = cvar.ART_UNDO
+ART_REDO = cvar.ART_REDO
+ART_QUIT = cvar.ART_QUIT
+ART_FIND = cvar.ART_FIND
+ART_FIND_AND_REPLACE = cvar.ART_FIND_AND_REPLACE
 
 def ArtProvider_PushProvider(*args, **kwargs):
     """
 
 def ArtProvider_PushProvider(*args, **kwargs):
     """
@@ -2643,6 +2696,15 @@ def ArtProvider_GetIcon(*args, **kwargs):
     """
     return _misc_.ArtProvider_GetIcon(*args, **kwargs)
 
     """
     return _misc_.ArtProvider_GetIcon(*args, **kwargs)
 
+def ArtProvider_GetSizeHint(*args, **kwargs):
+    """
+    ArtProvider_GetSizeHint(String client, bool platform_dependent=False) -> Size
+
+    Get the size hint of an icon from a specific Art Client, queries the
+    topmost provider if platform_dependent = false
+    """
+    return _misc_.ArtProvider_GetSizeHint(*args, **kwargs)
+
 #---------------------------------------------------------------------------
 
 CONFIG_USE_LOCAL_FILE = _misc_.CONFIG_USE_LOCAL_FILE
 #---------------------------------------------------------------------------
 
 CONFIG_USE_LOCAL_FILE = _misc_.CONFIG_USE_LOCAL_FILE
@@ -3809,12 +3871,13 @@ class DateTime(object):
 
     def __repr__(self):
         if self.IsValid():
 
     def __repr__(self):
         if self.IsValid():
-            return '<wx.DateTime: \"%s\" at %s>' % ( self.Format(), self.this)
+            f = self.Format().encode(wx.GetDefaultPyEncoding())
+            return '<wx.DateTime: \"%s\" at %s>' % ( f, self.this)
         else:
             return '<wx.DateTime: \"INVALID\" at %s>' % self.this
     def __str__(self):
         if self.IsValid():
         else:
             return '<wx.DateTime: \"INVALID\" at %s>' % self.this
     def __str__(self):
         if self.IsValid():
-            return self.Format()
+            return self.Format().encode(wx.GetDefaultPyEncoding())
         else:
             return "INVALID DateTime"
 
         else:
             return "INVALID DateTime"
 
@@ -4134,9 +4197,10 @@ class TimeSpan(object):
         return _misc_.TimeSpan_Format(*args, **kwargs)
 
     def __repr__(self):
         return _misc_.TimeSpan_Format(*args, **kwargs)
 
     def __repr__(self):
-        return '<wx.TimeSpan: \"%s\" at %s>' % ( self.Format(), self.this)
+        f = self.Format().encode(wx.GetDefaultPyEncoding())
+        return '<wx.TimeSpan: \"%s\" at %s>' % ( f, self.this)
     def __str__(self):
     def __str__(self):
-        return self.Format()
+        return self.Format().encode(wx.GetDefaultPyEncoding())
 
 
 class TimeSpanPtr(TimeSpan):
 
 
 class TimeSpanPtr(TimeSpan):
@@ -5198,6 +5262,18 @@ class DropSourcePtr(DropSource):
         self.__class__ = DropSource
 _misc_.DropSource_swigregister(DropSourcePtr)
 
         self.__class__ = DropSource
 _misc_.DropSource_swigregister(DropSourcePtr)
 
+def DROP_ICON(filename):
+    """
+    Returns either a `wx.Cursor` or `wx.Icon` created from the image file
+    ``filename``.  This function is useful with the `wx.DropSource` class
+    which, depending on platform accepts either a icon or a cursor.
+    """
+    img = wx.Image(filename)
+    if wx.Platform == '__WXGTK__':
+        return wx.IconFromBitmap(wx.BitmapFromImage(img))
+    else:
+        return wx.CursorFromImage(img)
+
 class DropTarget(object):
     """Proxy of C++ DropTarget class"""
     def __repr__(self):
 class DropTarget(object):
     """Proxy of C++ DropTarget class"""
     def __repr__(self):
@@ -5248,6 +5324,14 @@ class DropTarget(object):
         """GetData(self) -> bool"""
         return _misc_.DropTarget_GetData(*args, **kwargs)
 
         """GetData(self) -> bool"""
         return _misc_.DropTarget_GetData(*args, **kwargs)
 
+    def SetDefaultAction(*args, **kwargs):
+        """SetDefaultAction(self, int action)"""
+        return _misc_.DropTarget_SetDefaultAction(*args, **kwargs)
+
+    def GetDefaultAction(*args, **kwargs):
+        """GetDefaultAction(self) -> int"""
+        return _misc_.DropTarget_GetDefaultAction(*args, **kwargs)
+
 
 class DropTargetPtr(DropTarget):
     def __init__(self, this):
 
 class DropTargetPtr(DropTarget):
     def __init__(self, this):