X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/caret.h diff --git a/interface/wx/caret.h b/interface/wx/caret.h index 4182c41f60..a9d4211b14 100644 --- a/interface/wx/caret.h +++ b/interface/wx/caret.h @@ -3,12 +3,11 @@ // Purpose: interface of wxCaret // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @class wxCaret - @wxheader{caret.h} A caret is a blinking cursor showing the position where the typed text will appear. Text controls usually have their own caret but wxCaret provides a @@ -39,7 +38,7 @@ public: the @a window. */ wxCaret(wxWindow* window, int width, int height); - wxCaret(wxWindowBase* window, const wxSize& size); + wxCaret(wxWindow* window, const wxSize& size); //@} //@{ @@ -47,8 +46,8 @@ public: Creates a caret with the given size (in pixels) and associates it with the @a window (same as the equivalent constructors). */ - bool Create(wxWindowBase* window, int width, int height); - bool Create(wxWindowBase* window, const wxSize& size); + bool Create(wxWindow* window, int width, int height); + bool Create(wxWindow* window, const wxSize& size); //@} /** @@ -61,17 +60,31 @@ public: //@{ /** Get the caret position (in pixels). + + @beginWxPerlOnly + In wxPerl there are two methods instead of a single overloaded + method: + - GetPosition(): returns a Wx::Point object. + - GetPositionXY(): returns a 2-element list (x, y). + @endWxPerlOnly */ void GetPosition(int* x, int* y) const; - const wxPoint GetPosition() const; + wxPoint GetPosition() const; //@} //@{ /** Get the caret size. + + @beginWxPerlOnly + In wxPerl there are two methods instead of a single overloaded + method: + - GetSize(): returns a Wx::Size object. + - GetSizeWH(): returns a 2-element list (width, height). + @endWxPerlOnly */ void GetSize(int* width, int* height) const; - const wxSize GetSize() const; + wxSize GetSize() const; //@} /** @@ -82,7 +95,7 @@ public: /** Hides the caret, same as Show(@false). */ - void Hide(); + virtual void Hide(); /** Returns @true if the caret was created successfully. @@ -91,7 +104,7 @@ public: /** Returns @true if the caret is visible and @false if it is permanently - hidden (if it is is blinking and not shown currently but will be after + hidden (if it is blinking and not shown currently but will be after the next blink, this method still returns @true). */ bool IsVisible() const; @@ -127,6 +140,6 @@ public: Shows or hides the caret. Notice that if the caret was hidden N times, it must be shown N times as well to reappear on the screen. */ - void Show(bool show = true); + virtual void Show(bool show = true); };