]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_window.i
check encoding in EnumerateFacenames(); implemented EnumerateEncodings() for wxUSE_PA...
[wxWidgets.git] / wxPython / src / _window.i
index 8bb7459a196f800daa40503a2d0168cdc3e85c49..10844879f65825849bc6bac6ca3b5c265d33516d 100644 (file)
@@ -373,6 +373,25 @@ autogenerated) id", "");
 autogenerated) id", "");
     
 
+    DocDeclStr(
+        virtual wxLayoutDirection , GetLayoutDirection() const,
+        "Get the layout direction (LTR or RTL) for this window.  Returns
+``wx.Layout_Default`` if layout direction is not supported.", "");
+    
+    DocDeclStr(
+        virtual void , SetLayoutDirection(wxLayoutDirection dir),
+        "Set the layout direction (LTR or RTL) for this window.", "");
+    
+
+    DocDeclStr(
+        virtual wxCoord , AdjustForLayoutDirection(wxCoord x,
+                                             wxCoord width,
+                                                   wxCoord widthTotal) const,
+        "Mirror coordinates for RTL layout if this window uses it and if the
+mirroring is not done automatically like Win32.", "");
+    
+
+    
 
 
     // moving/resizing
@@ -460,14 +479,32 @@ around panel items, for example.", "");
 
 
     DocStr(GetPosition,   // sets the docstring for both
-           "Get the window's position.", "");
-    wxPoint GetPosition();
+           "Get the window's position.  Notice that the position is in client
+coordinates for child windows and screen coordinates for the top level
+ones, use `GetScreenPosition` if you need screen coordinates for all
+kinds of windows.", "");
+    wxPoint GetPosition() const;
 
     DocDeclAName(
-        void, GetPosition(int *OUTPUT, int *OUTPUT),
+        void, GetPosition(int *OUTPUT, int *OUTPUT) const,
         "GetPositionTuple() -> (x,y)",
         GetPositionTuple);
 
+    
+    DocStr(GetScreenPosition,   // sets the docstring for both
+           "Get the position of the window in screen coordinantes.", "");
+    wxPoint GetScreenPosition() const;
+    DocDeclAName(
+        void, GetScreenPosition(int *OUTPUT, int *OUTPUT) const,
+        "GetScreenPositionTuple() -> (x,y)",
+        GetScreenPositionTuple);
+
+    DocDeclStr(
+        wxRect , GetScreenRect() const,
+        "Returns the size and position of the window in screen coordinantes as
+a `wx.Rect` object.", "
+:see: `GetRect`, `GetScreenPosition`");
+    
    
     DocStr(GetSize, "Get the window size.", "");
     wxSize GetSize() const;
@@ -480,7 +517,7 @@ around panel items, for example.", "");
 
     DocDeclStr(
         wxRect , GetRect() const,
-        "Returns the size and position of the window as a wx.Rect object.", "");
+        "Returns the size and position of the window as a `wx.Rect` object.", "");
     
 
     DocStr(GetClientSize,
@@ -844,20 +881,6 @@ it.", "");
     
 
 
-    
-    DocDeclStr(
-        virtual wxWindow *, GetDefaultItem() const,
-        "Get the default child of this parent, i.e. the one which is activated
-by pressing <Enter> such as the OK button on a wx.Dialog.", "");
-    
-    DocDeclStr(
-        virtual wxWindow *, SetDefaultItem(wxWindow * child),
-        "Set this child as default, return the old default.", "");
-    
-    DocDeclStr(
-        virtual void , SetTmpDefaultItem(wxWindow * win),
-        "Set this child as temporary default", "");
-    
 
     DocDeclAStr(
         virtual bool , Navigate(int flags = wxNavigationKeyEvent::IsForward),
@@ -962,9 +985,18 @@ functions so should not be required by the application programmer.", "");
         "Removes a child window. This is called automatically by window
 deletion functions so should not be required by the application
 programmer.", "");
-    
 
 
+    DocStr(SetDoubleBuffered,
+           "Currently wxGTK2 only.", "");
+#ifdef __WXGTK__
+    void SetDoubleBuffered(bool on);
+#else
+    %extend {
+        void SetDoubleBuffered(bool on) {}
+    }
+#endif
+
 
     // looking for windows
     // -------------------
@@ -1180,7 +1212,13 @@ Note that wxWindows maintains the stack of windows having captured the
 mouse and when the mouse is released the capture returns to the window
 which had had captured it previously and it is only really released if
 there were no previous window. In particular, this means that you must
-release the mouse as many times as you capture it.", "");
+release the mouse as many times as you capture it, unless the window
+receives the `wx.MouseCaptureLostEvent` event.
+Any application which captures the mouse in the beginning of some
+operation *must* handle `wx.MouseCaptureLostEvent` and cancel this
+operation when it receives the event. The event handler must not
+recapture mouse.", "");
     
     DocDeclStr(
         void , ReleaseMouse(),
@@ -1594,7 +1632,10 @@ mouse cursor will be used.", "");
     bool PopupMenu(wxMenu *menu, const wxPoint& pos=wxDefaultPosition);
 
 
-
+    DocDeclStr(
+        virtual bool , HasMultiplePages() const,
+        "", "");
+    
     
     %extend {
         DocStr(GetHandle,
@@ -1739,7 +1780,7 @@ already on top/bottom and nothing was done.", "");
         void , SetHelpText(const wxString& text),
         "Sets the help text to be used as context-sensitive help for this
 window.  Note that the text is actually stored by the current
-wxHelpProvider implementation, and not in the window object itself.", "");
+`wx.HelpProvider` implementation, and not in the window object itself.", "");
     
 
     DocDeclStr(
@@ -1749,10 +1790,20 @@ one.", "");
     
 
     DocDeclStr(
+        virtual wxString , GetHelpTextAtPoint(const wxPoint& pt,
+                                              wxHelpEvent::Origin origin) const,
+        "Get the help string associated with the given position in this window.
+
+Notice that pt may be invalid if event origin is keyboard or unknown
+and this method should return the global window help text then
+", "");
+    
+    
+   DocDeclStr(
         wxString , GetHelpText() const,
         "Gets the help text to be used as context-sensitive help for this
 window.  Note that the text is actually stored by the current
-wxHelpProvider implementation, and not in the window object itself.", "");
+`wx.HelpProvider` implementation, and not in the window object itself.", "");
     
 
 
@@ -1810,7 +1861,7 @@ Only functional on Windows.", "");
     // constraints and sizers
     // ----------------------
 
-    // set the constraints for this window or retrieve them (may be NULL)
+    %disownarg(wxLayoutConstraints*);
     DocDeclStr(
         void , SetConstraints( wxLayoutConstraints *constraints ),
         "Sets the window to have the given layout constraints. If an existing
@@ -1828,6 +1879,7 @@ effect.", "");
         wxLayoutConstraints *, GetConstraints() const,
         "Returns a pointer to the window's layout constraints, or None if there
 are none.", "");
+    %cleardisown(wxLayoutConstraints*);
     
 
     DocDeclStr(
@@ -1948,6 +2000,26 @@ from the parent window.
 The base class version returns false, but this method is overridden in
 wxControl where it returns true.", "");
     
+
+
+    DocDeclStr(
+        virtual bool , CanSetTransparent(),
+        "Returns ``True`` if the platform supports setting the transparency for
+this window.  Note that this method will err on the side of caution,
+so it is possible that this will return ``False`` when it is in fact
+possible to set the transparency.
+
+NOTE: On X-windows systems the X server must have the composite
+extension loaded, and there must be a composite manager program (such
+as xcompmgr) running.", "");
+
+    DocDeclStr(
+        virtual bool , SetTransparent(byte alpha),
+        "Attempt to set the transparency of this window to the ``alpha`` value,
+returns True on success.  The ``alpha`` value is an integer in the
+range of 0 to 255, where 0 is fully transparent and 255 is fully
+opaque.", "");
+    
     
 
     %pythoncode {
@@ -1967,11 +2039,69 @@ wxControl where it returns true.", "");
 
     %pythoncode {
     def SendSizeEvent(self):
-        self.GetEventhandler().ProcessEvent(wx.SizeEvent((-1,-1)))
+        self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1)))
     }
-};
-
 
+    
+    %property(AcceleratorTable, GetAcceleratorTable, SetAcceleratorTable, doc="See `GetAcceleratorTable` and `SetAcceleratorTable`");
+    %property(AdjustedBestSize, GetAdjustedBestSize, doc="See `GetAdjustedBestSize`");
+    %property(AutoLayout, GetAutoLayout, SetAutoLayout, doc="See `GetAutoLayout` and `SetAutoLayout`");
+    %property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`");
+    %property(BackgroundStyle, GetBackgroundStyle, SetBackgroundStyle, doc="See `GetBackgroundStyle` and `SetBackgroundStyle`");
+    %property(BestFittingSize, GetBestFittingSize, SetBestFittingSize, doc="See `GetBestFittingSize` and `SetBestFittingSize`");
+    %property(BestSize, GetBestSize, doc="See `GetBestSize`");
+    %property(BestVirtualSize, GetBestVirtualSize, doc="See `GetBestVirtualSize`");
+    %property(Border, GetBorder, doc="See `GetBorder`");
+    %property(Caret, GetCaret, SetCaret, doc="See `GetCaret` and `SetCaret`");
+    %property(CharHeight, GetCharHeight, doc="See `GetCharHeight`");
+    %property(CharWidth, GetCharWidth, doc="See `GetCharWidth`");
+    %property(Children, GetChildren, doc="See `GetChildren`");
+    %property(ClientAreaOrigin, GetClientAreaOrigin, doc="See `GetClientAreaOrigin`");
+    %property(ClientRect, GetClientRect, SetClientRect, doc="See `GetClientRect` and `SetClientRect`");
+    %property(ClientSize, GetClientSize, SetClientSize, doc="See `GetClientSize` and `SetClientSize`");
+    %property(Constraints, GetConstraints, SetConstraints, doc="See `GetConstraints` and `SetConstraints`");
+    %property(ContainingSizer, GetContainingSizer, SetContainingSizer, doc="See `GetContainingSizer` and `SetContainingSizer`");
+    %property(Cursor, GetCursor, SetCursor, doc="See `GetCursor` and `SetCursor`");
+    %property(DefaultAttributes, GetDefaultAttributes, doc="See `GetDefaultAttributes`");
+    %property(DropTarget, GetDropTarget, SetDropTarget, doc="See `GetDropTarget` and `SetDropTarget`");
+    %property(EventHandler, GetEventHandler, SetEventHandler, doc="See `GetEventHandler` and `SetEventHandler`");
+    %property(ExtraStyle, GetExtraStyle, SetExtraStyle, doc="See `GetExtraStyle` and `SetExtraStyle`");
+    %property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`");
+    %property(ForegroundColour, GetForegroundColour, SetForegroundColour, doc="See `GetForegroundColour` and `SetForegroundColour`");
+    %property(GrandParent, GetGrandParent, doc="See `GetGrandParent`");
+    %property(Handle, GetHandle, doc="See `GetHandle`");
+    %property(HelpText, GetHelpText, SetHelpText, doc="See `GetHelpText` and `SetHelpText`");
+    %property(Id, GetId, SetId, doc="See `GetId` and `SetId`");
+    %property(Label, GetLabel, SetLabel, doc="See `GetLabel` and `SetLabel`");
+    %property(MaxHeight, GetMaxHeight, doc="See `GetMaxHeight`");
+    %property(MaxSize, GetMaxSize, SetMaxSize, doc="See `GetMaxSize` and `SetMaxSize`");
+    %property(MaxWidth, GetMaxWidth, doc="See `GetMaxWidth`");
+    %property(MinHeight, GetMinHeight, doc="See `GetMinHeight`");
+    %property(MinSize, GetMinSize, SetMinSize, doc="See `GetMinSize` and `SetMinSize`");
+    %property(MinWidth, GetMinWidth, doc="See `GetMinWidth`");
+    %property(Name, GetName, SetName, doc="See `GetName` and `SetName`");
+    %property(Parent, GetParent, doc="See `GetParent`");
+    %property(Position, GetPosition, SetPosition, doc="See `GetPosition` and `SetPosition`");
+    %property(Rect, GetRect, SetRect, doc="See `GetRect` and `SetRect`");
+    %property(ScreenPosition, GetScreenPosition, doc="See `GetScreenPosition`");
+    %property(ScreenRect, GetScreenRect, doc="See `GetScreenRect`");
+    %property(Size, GetSize, SetSize, doc="See `GetSize` and `SetSize`");
+    %property(Sizer, GetSizer, SetSizer, doc="See `GetSizer` and `SetSizer`");
+    %property(ThemeEnabled, GetThemeEnabled, SetThemeEnabled, doc="See `GetThemeEnabled` and `SetThemeEnabled`");
+    %property(ToolTip, GetToolTip, SetToolTip, doc="See `GetToolTip` and `SetToolTip`");
+    %property(UpdateClientRect, GetUpdateClientRect, doc="See `GetUpdateClientRect`");
+    %property(UpdateRegion, GetUpdateRegion, doc="See `GetUpdateRegion`");
+    %property(Validator, GetValidator, SetValidator, doc="See `GetValidator` and `SetValidator`");
+    %property(VirtualSize, GetVirtualSize, SetVirtualSize, doc="See `GetVirtualSize` and `SetVirtualSize`");
+    %property(WindowStyle, GetWindowStyle, SetWindowStyle, doc="See `GetWindowStyle` and `SetWindowStyle`");
+    %property(WindowStyleFlag, GetWindowStyleFlag, SetWindowStyleFlag, doc="See `GetWindowStyleFlag` and `SetWindowStyleFlag`");
+    %property(WindowVariant, GetWindowVariant, SetWindowVariant, doc="See `GetWindowVariant` and `SetWindowVariant`");
+
+    %property(Shown, IsShown, Show, doc="See `IsShown` and `Show`");
+    %property(Enabled, IsEnabled, Enable, doc="See `IsEnabled` and `Enable`");
+    %property(TopLevel, IsTopLevel, doc="See `IsTopLevel`");
+    
+};