X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c61c5b04b0b023eb9592bde5633c2111f1940fb..14946ce13c15b729fb9e1f679e117a702db55861:/interface/wx/window.h diff --git a/interface/wx/window.h b/interface/wx/window.h index 73b300c789..ed15f4adb0 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -12,6 +12,13 @@ */ enum wxShowEffect { + /** + No effect, equivalent to normal wxWindow::Show() or Hide() call. + + @since 2.9.1 + */ + wxSHOW_EFFECT_NONE, + /// Roll window to the left wxSHOW_EFFECT_ROLL_TO_LEFT, @@ -513,7 +520,23 @@ public: virtual int GetScrollThumb(int orientation) const; /** - Returns @true if this window has a scroll bar for this orientation. + Returns @true if this window can have a scroll bar in this orientation. + + @param orient + Orientation to check, either wxHORIZONTAL or wxVERTICAL. + + @since 2.9.1 + */ + bool CanScroll(int orient) const; + + /** + Returns @true if this window currently has a scroll bar for this + orientation. + + This method may return @false even when CanScroll() for the same + orientation returns @true, but if CanScroll() returns @false, i.e. + scrolling in this direction is not enabled at all, HasScrollbar() + always returns @false as well. @param orient Orientation to check, either wxHORIZONTAL or wxVERTICAL. @@ -759,6 +782,11 @@ public: Note that if this window is a top-level one and it is currently minimized, the return size is empty (both width and height are 0). + @beginWxPerlOnly + In wxPerl this method takes no parameters and returns + a 2-element list (width, height). + @endWxPerlOnly + @see GetSize(), GetVirtualSize() */ void GetClientSize(int* width, int* height) const; @@ -835,6 +863,11 @@ public: @param height Receives the window height. + @beginWxPerlOnly + In wxPerl this method is implemented as GetSizeWH() returning + a 2-element list (width, height). + @endWxPerlOnly + @see GetClientSize(), GetVirtualSize(), @ref overview_windowsizing */ void GetSize(int* width, int* height) const; @@ -1174,6 +1207,11 @@ public: @param y Receives the y position of the window if non-@NULL. + @beginWxPerlOnly + In wxPerl this method is implemented as GetPositionXY() returning + a 2-element list (x, y). + @endWxPerlOnly + @see GetScreenPosition() */ void GetPosition(int* x, int* y) const; @@ -1282,6 +1320,11 @@ public: - ClientToScreen(point): Accepts and returns a wxPoint - ClientToScreenXY(x, y): Returns a 2-tuple, (x, y) @endWxPythonOnly + + @beginWxPerlOnly + In wxPerl this method returns a 2-element list instead of + modifying its parameters. + @endWxPerlOnly */ void ClientToScreen(int* x, int* y) const; @@ -1488,6 +1531,12 @@ public: Return value for external leading (optional). @param font Font to use instead of the current window font (optional). + + @beginWxPerlOnly + In wxPerl this method takes only the @a string and optionally + @a font parameters, and returns a 4-element list + (x, y, descent, externalLeading). + @endWxPerlOnly */ void GetTextExtent(const wxString& string, int* w, int* h, @@ -1576,6 +1625,9 @@ public: usually the themes represent the appearance chosen by the user to be used for all applications on the system. + @return @true if the colour was really changed, @false if it was already set + to this colour and nothing was done. + @see GetBackgroundColour(), SetForegroundColour(), GetForegroundColour(), ClearBackground(), Refresh(), wxEraseEvent @@ -1627,8 +1679,8 @@ public: Font to associate with this window, pass wxNullFont to reset to the default font. - @return @true if the want was really changed, @false if it was already set - to this font and so nothing was done. + @return @true if the font was really changed, @false if it was already set + to this font and nothing was done. @see GetFont(), InheritAttributes() */ @@ -1647,6 +1699,9 @@ public: interpretation according to the window class; it may be the text colour or other colour, or it may not be used at all. + @return @true if the colour was really changed, @false if it was already set + to this colour and nothing was done. + @see GetForegroundColour(), SetBackgroundColour(), GetBackgroundColour(), ShouldInheritColours() */ @@ -2162,8 +2217,10 @@ public: milliseconds. If the default value of 0 is used, the default animation time for the current platform is used. - @note Currently this function is only implemented in wxMSW and does the - same thing as Show() in the other ports. + @note Currently this function is only implemented in wxMSW and wxOSX + (for wxTopLevelWindows only in Carbon version and for any kind of + windows in Cocoa) and does the same thing as Show() in the other + ports. @since 2.9.0 @@ -2216,6 +2273,11 @@ public: */ wxToolTip* GetToolTip() const; + /** + Get the text of the associated tooltip or empty string if none. + */ + wxString GetToolTipText() const; + /** Attach a tooltip to the window. @@ -2781,8 +2843,10 @@ public: /** Moves the pointer to the given position on the window. - @note This function is not supported under Mac because Apple Human - Interface Guidelines forbid moving the mouse cursor programmatically. + @note Apple Human Interface Guidelines forbid moving the mouse cursor + programmatically so you should avoid using this function in Mac + applications (and probably avoid using it under the other + platforms without good reason as well). @param x The new x position for the cursor. @@ -2829,6 +2893,10 @@ public: Returns the platform-specific handle of the physical window. Cast it to an appropriate handle, such as @b HWND for Windows, @b Widget for Motif, @b GtkWidget for GTK or @b WinHandle for PalmOS. + + @beginWxPerlOnly + This method will return an integer in wxPerl. + @endWxPerlOnly */ virtual WXWidget GetHandle() const;