X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d551ad5e5d4f9643d69e70638788fb9a78f209a..e4277538a535d6d6c049f0b0ead9ed2b07cd93f2:/include/wx/richtext/richtextctrl.h?ds=sidebyside diff --git a/include/wx/richtext/richtextctrl.h b/include/wx/richtext/richtextctrl.h index 407fc1cb95..e9425ea376 100644 --- a/include/wx/richtext/richtextctrl.h +++ b/include/wx/richtext/richtextctrl.h @@ -12,21 +12,23 @@ #ifndef _WX_RICHTEXTCTRL_H_ #define _WX_RICHTEXTCTRL_H_ -#include "wx/textctrl.h" +#include "wx/richtext/richtextbuffer.h" #if wxUSE_RICHTEXT #include "wx/scrolwin.h" #include "wx/caret.h" -#include "wx/richtext/richtextbuffer.h" - #if wxCHECK_VERSION(2,7,0) #define wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE 0 #else #define wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE 0 #endif +#if wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE +#include "wx/textctrl.h" +#endif + /*! * Styles and flags */ @@ -231,7 +233,7 @@ public: virtual void Freeze(); /// Call Thaw to refresh - virtual void Thaw(bool refresh = true); + virtual void Thaw(); /// Call Thaw to refresh virtual bool IsFrozen() const { return m_freezeCount > 0; } @@ -383,7 +385,7 @@ public: /// Layout the buffer: which we must do before certain operations, such as /// setting the caret position. - virtual bool Layout(bool onlyVisibleRect = false); + virtual bool LayoutContent(bool onlyVisibleRect = false); /// Move the caret to the given character position virtual bool MoveCaret(long pos, bool showAtLineStart = false); @@ -568,8 +570,15 @@ public: /// Idle-time processing void OnIdle(wxIdleEvent& event); + /// Scrolling + void OnScroll(wxScrollWinEvent& event); + // Implementation +#if wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE + WX_FORWARD_TO_SCROLL_HELPER() +#endif + /// Set font, and also default attributes virtual bool SetFont(const wxFont& font); @@ -577,7 +586,7 @@ public: virtual void SetupScrollbars(bool atTop = false); /// Keyboard navigation - virtual bool Navigate(int keyCode, int flags); + virtual bool KeyboardNavigate(int keyCode, int flags); /// Paint the background virtual void PaintBackground(wxDC& dc); @@ -662,6 +671,7 @@ public: long GetFirstVisiblePosition() const; // Overrides +protected: virtual wxSize DoGetBestSize() const ; @@ -753,13 +763,13 @@ private: */ BEGIN_DECLARE_EVENT_TYPES() - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 2600) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED, 2601) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 2602) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 2603) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 2604) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, 2605) - DECLARE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_RETURN, 2606) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 2600) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED, 2601) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 2602) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 2603) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 2604) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, 2605) + DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_RICHTEXT_RETURN, 2606) END_DECLARE_EVENT_TYPES() typedef void (wxEvtHandler::*wxRichTextEventFunction)(wxRichTextEvent&);