X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bec80f4f4a44ce7d1ce24627f87deb0166249c54..c5d7b7d20ba810df4ad66f6826c529a106e81577:/include/wx/richtext/richtextbuffer.h diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index cd131df4e9..afb4139089 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -372,11 +372,8 @@ public: class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensionConverter { public: - wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize) - { m_ppi = dc.GetPPI().x; m_scale = scale; m_parentSize = parentSize; } - - wxTextAttrDimensionConverter(int ppi, double scale = 1.0, const wxSize& parentSize = wxDefaultSize) - { m_ppi = ppi; m_scale = scale; m_parentSize = parentSize; } + wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize); + wxTextAttrDimensionConverter(int ppi, double scale = 1.0, const wxSize& parentSize = wxDefaultSize); int GetPixels(const wxTextAttrDimension& dim, int direction = wxHORIZONTAL) const; int GetTenthsMM(const wxTextAttrDimension& dim) const; @@ -1513,14 +1510,14 @@ protected: * TODO: a floating text box */ -class WXDLLIMPEXP_RICHTEXT wxRichTextBox: public wxRichTextParagraphLayoutBox +class WXDLLIMPEXP_RICHTEXT wxRichTextBox: public wxRichTextCompositeObject { DECLARE_DYNAMIC_CLASS(wxRichTextBox) public: // Constructors wxRichTextBox(wxRichTextObject* parent = NULL); - wxRichTextBox(const wxRichTextBox& obj): wxRichTextParagraphLayoutBox() { Copy(obj); } + wxRichTextBox(const wxRichTextBox& obj): wxRichTextCompositeObject() { Copy(obj); } // Overrideables @@ -1530,6 +1527,10 @@ public: /// Lay the item out virtual bool Layout(wxDC& dc, const wxRect& rect, int style); + /// Get/set the object size for the given range. Returns false if the range + /// is invalid for this object. + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, int flags, wxPoint position = wxPoint(0,0), wxArrayInt* partialExtents = NULL) const; + // Accessors // Operations