# 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
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;
/// 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);
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(); }
};
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *