X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b39c3fa09a936e6a3f386a67c0fc7cfd84df0168..1d0ac8f5767f3b3fc2529455ee5bc14189fa4a27:/wxPython/src/_panel.i?ds=sidebyside diff --git a/wxPython/src/_panel.i b/wxPython/src/_panel.i index de57b04fcd..881ceefcec 100644 --- a/wxPython/src/_panel.i +++ b/wxPython/src/_panel.i @@ -37,7 +37,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPyPanelNameStr); - %name(PrePanel)wxPanel(); + %RenameCtor(PrePanel, wxPanel()); // Turn it back on again %typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); } @@ -51,6 +51,24 @@ public: void InitDialog(); + + DocDeclStr( + virtual void , SetFocus(), + "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.", " +:see: `wx.FocusEvent`, `wx.Window.SetFocus`, `SetFocusIgnoringChildren`"); + + + DocDeclStr( + virtual void , SetFocusIgnoringChildren(), + "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.", ""); + + static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -78,7 +96,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxHSCROLL | wxVSCROLL, const wxString& name = wxPyPanelNameStr); - %name(PreScrolledWindow)wxScrolledWindow(); + %RenameCtor(PreScrolledWindow, wxScrolledWindow()); // Turn it back on again %typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); } @@ -95,7 +113,7 @@ public: virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos = 0, int yPos = 0, - bool noRefresh = False ); + bool noRefresh = false ); // scroll to the given (in logical coords) position virtual void Scroll(int x, int y); @@ -171,6 +189,12 @@ public: wxRect GetTargetRect() const; #endif + // TODO: directorize this? + DocDeclStr( + virtual void , DoPrepareDC( wxDC & dc ), + "Normally what is called by `PrepareDC`.", ""); + + static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); };