]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_windows.py
Allow the OOR reference to be saved without doing an INCREF. This
[wxWidgets.git] / wxPython / src / gtk / _windows.py
index 0a98983696becda9e318d20ab95a03f1ea6976fe..0fa05fae4376a7c6c42a07b44c730e0d4b2ac517 100644 (file)
@@ -41,6 +41,28 @@ class Panel(_core.Window):
         """
         return _windows_.Panel_InitDialog(*args, **kwargs)
 
+    def SetFocus(*args, **kwargs):
+        """
+        SetFocus(self)
+
+        Overrides `wx.Window.SetFocus`.  This method uses the (undocumented)
+        mix-in class wxControlContainer which manages the focus and TAB logic
+        for controls which usually have child controls.  In practice, if you
+        call this method and the panel has at least one child window, then the
+        focus will be given to the child window.
+        """
+        return _windows_.Panel_SetFocus(*args, **kwargs)
+
+    def SetFocusIgnoringChildren(*args, **kwargs):
+        """
+        SetFocusIgnoringChildren(self)
+
+        In contrast to `SetFocus` (see above) this will set the focus to the
+        panel even of there are child windows in the panel. This is only
+        rarely needed.
+        """
+        return _windows_.Panel_SetFocusIgnoringChildren(*args, **kwargs)
+
     def GetClassDefaultAttributes(*args, **kwargs):
         """
         GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
@@ -1057,7 +1079,7 @@ class SplitterWindow(_core.Window):
         """
         SetSashSize(self, int width)
 
-        Sets the sash size
+        Sets the sash size.  Currently a NOP.
         """
         return _windows_.SplitterWindow_SetSashSize(*args, **kwargs)
 
@@ -1065,7 +1087,7 @@ class SplitterWindow(_core.Window):
         """
         SetBorderSize(self, int width)
 
-        Sets the border size
+        Sets the border size. Currently a NOP.
         """
         return _windows_.SplitterWindow_SetBorderSize(*args, **kwargs)
 
@@ -1102,6 +1124,28 @@ class SplitterWindow(_core.Window):
         """
         return _windows_.SplitterWindow_GetSashPosition(*args, **kwargs)
 
+    def SetSashGravity(*args, **kwargs):
+        """
+        SetSashGravity(self, double gravity)
+
+        Set the sash gravity.  Gravity is a floating-point factor between 0.0
+        and 1.0 which controls position of sash while resizing the
+        `wx.SplitterWindow`.  The gravity specifies how much the left/top
+        window will grow while resizing.
+        """
+        return _windows_.SplitterWindow_SetSashGravity(*args, **kwargs)
+
+    def GetSashGravity(*args, **kwargs):
+        """
+        GetSashGravity(self) -> double
+
+        Gets the sash gravity.
+
+        :see: `SetSashGravity`
+
+        """
+        return _windows_.SplitterWindow_GetSashGravity(*args, **kwargs)
+
     def SetMinimumPaneSize(*args, **kwargs):
         """
         SetMinimumPaneSize(self, int min)
@@ -2604,6 +2648,7 @@ class SingleChoiceDialogPtr(SingleChoiceDialog):
         self.__class__ = SingleChoiceDialog
 _windows_.SingleChoiceDialog_swigregister(SingleChoiceDialogPtr)
 
+TextEntryDialogStyle = _windows_.TextEntryDialogStyle
 class TextEntryDialog(Dialog):
     """A dialog with text control, [ok] and [cancel] buttons"""
     def __repr__(self):
@@ -2612,7 +2657,7 @@ class TextEntryDialog(Dialog):
         """
         __init__(self, Window parent, String message, String caption=GetTextFromUserPromptStr, 
             String defaultValue=EmptyString, 
-            long style=wxTextEntryDialogStyle, Point pos=DefaultPosition) -> TextEntryDialog
+            long style=TextEntryDialogStyle, Point pos=DefaultPosition) -> TextEntryDialog
 
         Constructor.  Use ShowModal method to show the dialog.
         """
@@ -2654,7 +2699,7 @@ class PasswordEntryDialog(TextEntryDialog):
         """
         __init__(self, Window parent, String message, String caption=GetPasswordFromUserPromptStr, 
             String value=EmptyString, 
-            long style=wxTextEntryDialogStyle, Point pos=DefaultPosition) -> PasswordEntryDialog
+            long style=TextEntryDialogStyle, Point pos=DefaultPosition) -> PasswordEntryDialog
         """
         newobj = _windows_.new_PasswordEntryDialog(*args, **kwargs)
         self.this = newobj.this
@@ -3300,7 +3345,7 @@ class MDIChildFrame(Frame):
         return _windows_.MDIChildFrame_Activate(*args, **kwargs)
 
     def Maximize(*args, **kwargs):
-        """Maximize(self, bool maximize)"""
+        """Maximize(self, bool maximize=True)"""
         return _windows_.MDIChildFrame_Maximize(*args, **kwargs)
 
     def Restore(*args, **kwargs):
@@ -4078,7 +4123,7 @@ class PageSetupDialogDataPtr(PageSetupDialogData):
         self.__class__ = PageSetupDialogData
 _windows_.PageSetupDialogData_swigregister(PageSetupDialogDataPtr)
 
-class PageSetupDialog(Dialog):
+class PageSetupDialog(_core.Object):
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxPageSetupDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
@@ -4087,12 +4132,14 @@ class PageSetupDialog(Dialog):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._setOORInfo(self)
-
     def GetPageSetupData(*args, **kwargs):
         """GetPageSetupData(self) -> PageSetupDialogData"""
         return _windows_.PageSetupDialog_GetPageSetupData(*args, **kwargs)
 
+    def GetPageSetupDialogData(*args, **kwargs):
+        """GetPageSetupDialogData(self) -> PageSetupDialogData"""
+        return _windows_.PageSetupDialog_GetPageSetupDialogData(*args, **kwargs)
+
     def ShowModal(*args, **kwargs):
         """ShowModal(self) -> int"""
         return _windows_.PageSetupDialog_ShowModal(*args, **kwargs)
@@ -4256,7 +4303,7 @@ class PrintDialogDataPtr(PrintDialogData):
         self.__class__ = PrintDialogData
 _windows_.PrintDialogData_swigregister(PrintDialogDataPtr)
 
-class PrintDialog(Dialog):
+class PrintDialog(_core.Object):
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxPrintDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self, *args, **kwargs):
@@ -4265,8 +4312,6 @@ class PrintDialog(Dialog):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._setOORInfo(self)
-
     def ShowModal(*args, **kwargs):
         """ShowModal(self) -> int"""
         return _windows_.PrintDialog_ShowModal(*args, **kwargs)
@@ -4310,11 +4355,11 @@ class Printer(_core.Object):
         except: pass
 
     def CreateAbortWindow(*args, **kwargs):
-        """CreateAbortWindow(self, Window parent, wxPrintout printout) -> Window"""
+        """CreateAbortWindow(self, Window parent, Printout printout) -> Window"""
         return _windows_.Printer_CreateAbortWindow(*args, **kwargs)
 
     def ReportError(*args, **kwargs):
-        """ReportError(self, Window parent, wxPrintout printout, String message)"""
+        """ReportError(self, Window parent, Printout printout, String message)"""
         return _windows_.Printer_ReportError(*args, **kwargs)
 
     def Setup(*args, **kwargs):
@@ -4322,7 +4367,7 @@ class Printer(_core.Object):
         return _windows_.Printer_Setup(*args, **kwargs)
 
     def Print(*args, **kwargs):
-        """Print(self, Window parent, wxPrintout printout, bool prompt=True) -> bool"""
+        """Print(self, Window parent, Printout printout, bool prompt=True) -> bool"""
         return _windows_.Printer_Print(*args, **kwargs)
 
     def PrintDialog(*args, **kwargs):
@@ -4839,115 +4884,4 @@ class PyPreviewControlBarPtr(PyPreviewControlBar):
         self.__class__ = PyPreviewControlBar
 _windows_.PyPreviewControlBar_swigregister(PyPreviewControlBarPtr)
 
-class PrintFactory(object):
-    def __init__(self): raise RuntimeError, "No constructor defined"
-    def __repr__(self):
-        return "<%s.%s; proxy of C++ wxPrintFactory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
-    def CreatePrinter(*args, **kwargs):
-        """CreatePrinter(self, PrintDialogData data) -> wxPrinterBase"""
-        return _windows_.PrintFactory_CreatePrinter(*args, **kwargs)
-
-    def CreatePrintPreview(*args):
-        """
-        CreatePrintPreview(self, wxPrintout preview, wxPrintout printout=None, PrintDialogData data=None) -> wxPrintPreviewBase
-        CreatePrintPreview(self, wxPrintout preview, wxPrintout printout, PrintData data) -> wxPrintPreviewBase
-        """
-        return _windows_.PrintFactory_CreatePrintPreview(*args)
-
-    def CreatePrintDialog(*args):
-        """
-        CreatePrintDialog(self, Window parent, PrintDialogData data=None) -> wxPrintDialogBase
-        CreatePrintDialog(self, Window parent, PrintData data) -> wxPrintDialogBase
-        """
-        return _windows_.PrintFactory_CreatePrintDialog(*args)
-
-    def HasPrintSetupDialog(*args, **kwargs):
-        """HasPrintSetupDialog(self) -> bool"""
-        return _windows_.PrintFactory_HasPrintSetupDialog(*args, **kwargs)
-
-    def CreatePrintSetupDialog(*args, **kwargs):
-        """CreatePrintSetupDialog(self, Window parent, PrintData data) -> Dialog"""
-        return _windows_.PrintFactory_CreatePrintSetupDialog(*args, **kwargs)
-
-    def HasOwnPrintToFile(*args, **kwargs):
-        """HasOwnPrintToFile(self) -> bool"""
-        return _windows_.PrintFactory_HasOwnPrintToFile(*args, **kwargs)
-
-    def HasPrinterLine(*args, **kwargs):
-        """HasPrinterLine(self) -> bool"""
-        return _windows_.PrintFactory_HasPrinterLine(*args, **kwargs)
-
-    def CreatePrinterLine(*args, **kwargs):
-        """CreatePrinterLine(self) -> String"""
-        return _windows_.PrintFactory_CreatePrinterLine(*args, **kwargs)
-
-    def HasStatusLine(*args, **kwargs):
-        """HasStatusLine(self) -> bool"""
-        return _windows_.PrintFactory_HasStatusLine(*args, **kwargs)
-
-    def CreateStatusLine(*args, **kwargs):
-        """CreateStatusLine(self) -> String"""
-        return _windows_.PrintFactory_CreateStatusLine(*args, **kwargs)
-
-    def CreatePrintNativeData(*args, **kwargs):
-        """CreatePrintNativeData(self) -> PrintNativeDataBase"""
-        return _windows_.PrintFactory_CreatePrintNativeData(*args, **kwargs)
-
-    def SetPrintFactory(*args, **kwargs):
-        """SetPrintFactory(PrintFactory factory)"""
-        return _windows_.PrintFactory_SetPrintFactory(*args, **kwargs)
-
-    SetPrintFactory = staticmethod(SetPrintFactory)
-    def GetFactory(*args, **kwargs):
-        """GetFactory() -> PrintFactory"""
-        return _windows_.PrintFactory_GetFactory(*args, **kwargs)
-
-    GetFactory = staticmethod(GetFactory)
-
-class PrintFactoryPtr(PrintFactory):
-    def __init__(self, this):
-        self.this = this
-        if not hasattr(self,"thisown"): self.thisown = 0
-        self.__class__ = PrintFactory
-_windows_.PrintFactory_swigregister(PrintFactoryPtr)
-
-def PrintFactory_SetPrintFactory(*args, **kwargs):
-    """PrintFactory_SetPrintFactory(PrintFactory factory)"""
-    return _windows_.PrintFactory_SetPrintFactory(*args, **kwargs)
-
-def PrintFactory_GetFactory(*args, **kwargs):
-    """PrintFactory_GetFactory() -> PrintFactory"""
-    return _windows_.PrintFactory_GetFactory(*args, **kwargs)
-
-class PrintNativeDataBase(_core.Object):
-    def __init__(self): raise RuntimeError, "No constructor defined"
-    def __repr__(self):
-        return "<%s.%s; proxy of C++ wxPrintNativeDataBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
-    def __del__(self, destroy=_windows_.delete_PrintNativeDataBase):
-        """__del__(self)"""
-        try:
-            if self.thisown: destroy(self)
-        except: pass
-
-    def TransferTo(*args, **kwargs):
-        """TransferTo(self, PrintData data) -> bool"""
-        return _windows_.PrintNativeDataBase_TransferTo(*args, **kwargs)
-
-    def TransferFrom(*args, **kwargs):
-        """TransferFrom(self, PrintData data) -> bool"""
-        return _windows_.PrintNativeDataBase_TransferFrom(*args, **kwargs)
-
-    def Ok(*args, **kwargs):
-        """Ok(self) -> bool"""
-        return _windows_.PrintNativeDataBase_Ok(*args, **kwargs)
-
-    m_ref = property(_windows_.PrintNativeDataBase_m_ref_get, _windows_.PrintNativeDataBase_m_ref_set)
-
-class PrintNativeDataBasePtr(PrintNativeDataBase):
-    def __init__(self, this):
-        self.this = this
-        if not hasattr(self,"thisown"): self.thisown = 0
-        self.__class__ = PrintNativeDataBase
-_windows_.PrintNativeDataBase_swigregister(PrintNativeDataBasePtr)
-