X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/903972f99993e6f31a31b66d1866f6fc982a1c43..eee3624b111881520d7d58fe174ef563c62d8375:/include/wx/html/htmlwin.h diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h index f26cb3c723..719fbc4fc5 100644 --- a/include/wx/html/htmlwin.h +++ b/include/wx/html/htmlwin.h @@ -37,6 +37,10 @@ class wxHtmlProcessorList; // wxHtmlWindow flags: #define wxHW_SCROLLBAR_NEVER 0x0002 #define wxHW_SCROLLBAR_AUTO 0x0004 +#define wxHW_NO_SELECTION 0x0008 + +#define wxHW_DEFAULT_STYLE wxHW_SCROLLBAR_AUTO + // enums for wxHtmlWindow::OnOpeningURL enum wxHtmlOpeningStatus @@ -46,16 +50,16 @@ enum wxHtmlOpeningStatus wxHTML_REDIRECT }; -//-------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- // wxHtmlWindow // (This is probably the only class you will directly use.) // Purpose of this class is to display HTML page (either local -// file or downloaded via HTTP protocol) in a window. Width -// of window is constant - given in constructor - virtual height -// is changed dynamicly depending on page size. -// Once the window is created you can set it's content by calling +// file or downloaded via HTTP protocol) in a window. Width of +// window is constant - given in constructor - virtual height +// is changed dynamicly depending on page size. Once the +// window is created you can set it's content by calling // SetPage(text) or LoadPage(filename). -//-------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow { @@ -67,7 +71,7 @@ public: wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxHW_SCROLLBAR_AUTO, + long style = wxHW_DEFAULT_STYLE, const wxString& name = wxT("htmlWindow")) { Init(); @@ -121,7 +125,8 @@ public: void SetRelatedStatusBar(int bar); // Sets fonts to be used when displaying HTML page. - void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes); + void SetFonts(wxString normal_face, wxString fixed_face, + const int *sizes = NULL); // Sets space between text and window borders. void SetBorders(int b) {m_Borders = b;} @@ -204,7 +209,8 @@ protected: void OnDraw(wxDC& dc); void OnSize(wxSizeEvent& event); - void OnMouseEvent(wxMouseEvent& event); + void OnMouseMove(wxMouseEvent& event); + void OnMouseButton(wxMouseEvent& event); void OnIdle(wxIdleEvent& event); // Returns new filter (will be stored into m_DefaultFilter variable) @@ -213,6 +219,10 @@ protected: // cleans static variables static void CleanUpStatics(); + // Returns true if text selection is enabled (wxClipboard must be available + // and wxHW_NO_SELECTION not used) + bool IsSelectionEnabled() const; + protected: // This is pointer to the first cell in parsed data. // (Note: the first cell is usually top one = all other cells are sub-cells of this one)