X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0facd0e524cf285ef0a567648fa1369e32fdb96c..1f443284e1584947ef9007f4c8a055121effa366:/wxPython/src/_window.i diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 92c48f1a83..7e2a4c8d93 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -588,8 +588,8 @@ sizer, interior children, or other means)"); virtual bool , Show( bool show = True ), "Shows or hides the window. You may need to call Raise for a top level window if you want to bring it to top, although this is not needed if -Show() is called immediately after the frame creation. Returns true -if the window has been shown or hidden or false if nothing was done +Show is called immediately after the frame creation. Returns True if +the window has been shown or hidden or False if nothing was done because it already was in the requested state."); DocDeclStr( @@ -629,7 +629,8 @@ after changing the others for the change to take place immediately."); DocDeclStr( virtual long , GetWindowStyleFlag() const, - "Gets the window style that was passed to the constructor or Create method."); + "Gets the window style that was passed to the constructor or Create +method."); %pythoncode { SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag } @@ -723,8 +724,7 @@ or None."); virtual bool , AcceptsFocusFromKeyboard() const, "Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click -it. -"); +it."); @@ -732,8 +732,7 @@ it. DocDeclStr( virtual wxWindow *, GetDefaultItem() const, "Get the default child of this parent, i.e. the one which is activated -by pressing such as the OK button on a wx.Dialog. -"); +by pressing such as the OK button on a wx.Dialog."); DocDeclStr( virtual wxWindow *, SetDefaultItem(wxWindow * child), @@ -946,8 +945,8 @@ hotkey was registered successfully."); // --------------------------- DocStr(ConvertDialogToPixels, - "Converts a point or size from dialog units to pixels. Dialog units are -used for maintaining a dialog's proportions even if the font + "Converts a point or size from dialog units to pixels. Dialog units +are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and @@ -1047,9 +1046,10 @@ colour. Does not cause an erase background event to be generated."); DocDeclStr( virtual void , Freeze(), - "Freezes the window or, in other words, prevents any updates from -taking place on screen, the window is not redrawn at all. Thaw must be -called to reenable window redrawing. + "Freezes the window or, in other words, prevents any updates from taking place +on screen, the window is not redrawn at all. Thaw must be called to reenable +window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw +being delayed until all the nesting has been undone. This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into @@ -1060,7 +1060,9 @@ mandatory directive."); DocDeclStr( virtual void , Thaw(), - "Reenables window updating after a previous call to Freeze."); + "Reenables window updating after a previous call to Freeze. Calls to +Freeze/Thaw may be nested, so Thaw must be called the same number of times +that Freeze was before the window will be updated."); DocDeclStr( @@ -1088,7 +1090,7 @@ optimize redrawing by only redrawing those areas, which have been exposed."); bool IsExposed( int x, int y, int w=1, int h=1 ) const; %name(IsExposedPoint) bool IsExposed( const wxPoint& pt ) const; - %name(isExposedRect) bool IsExposed( const wxRect& rect ) const; + %name(IsExposedRect) bool IsExposed( const wxRect& rect ) const; @@ -1157,7 +1159,7 @@ be reset back to default."); DocDeclStr( wxFont& , GetFont(), - "Returns a reference to the font for this window."); + "Returns the default font used for this window."); @@ -1689,11 +1691,18 @@ wxWindow* wxFindWindowByLabel( const wxString& label, %inline %{ - wxWindow* wxWindow_FromHWND(unsigned long hWnd) { + wxWindow* wxWindow_FromHWND(wxWindow* parent, unsigned long _hWnd) { #ifdef __WXMSW__ + WXHWND hWnd = (WXHWND)_hWnd; + long id = wxGetWindowId(hWnd); wxWindow* win = new wxWindow; + parent->AddChild(win); + win->SetEventHandler(win); win->SetHWND(hWnd); + win->SetId(id); win->SubclassWin(hWnd); + win->AdoptAttributesFromHWND(); + win->SetupColours(); return win; #else wxPyRaiseNotImplemented();