X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89be8239db1ae24f501ac68c5bcff3e5ca2efa84..0dfef5a8124ac0f1bb2aed6ef5ddfa833e8e2c6e:/samples/richedit/wxllist.h?ds=sidebyside diff --git a/samples/richedit/wxllist.h b/samples/richedit/wxllist.h index 940e3aca6b..71e7d381ae 100644 --- a/samples/richedit/wxllist.h +++ b/samples/richedit/wxllist.h @@ -28,7 +28,7 @@ # define WXMENU_LAYOUT_LCLICK 1111 # define WXMENU_LAYOUT_RCLICK 1112 # define WXMENU_LAYOUT_DBLCLICK 1113 -#else // for Mahogany only: +#else // for Mahogany only # include "MObject.h" #endif @@ -421,6 +421,7 @@ public: int underline = -1, wxColour *fg = NULL, wxColour *bg = NULL); + wxLayoutObjectCmd(const wxLayoutStyleInfo &si); ~wxLayoutObjectCmd(); /** Stores the current style in the styleinfo structure */ wxLayoutStyleInfo * GetStyle(void) const; @@ -1140,6 +1141,12 @@ public: /// get the line by number wxLayoutLine *GetLine(CoordType index) const; + + /** Reads objects from a string and inserts them. + @param istr stream to read from, will bee changed + */ + void Read(wxString &istr); + private: /// Clear the list. void InternalClear(void); @@ -1215,14 +1222,18 @@ private: own format. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -class wxLayoutDataObject : public wxPrivateDataObject +class wxLayoutDataObject : public wxCustomDataObject { public: - wxLayoutDataObject(void) + wxLayoutDataObject() { - SetId("application/wxlayoutlist"); - //m_format.SetAtom((GdkAtom) 222222); + SetFormat("application/wxlayoutlist"); } + + // type safe wrappers + void SetLayoutData(const wxString& text) + { SetData(text.length() + 1, text.c_str()); } + const char *GetLayoutData() const { return (const char *)GetData(); } }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *