1 /*-*- c++ -*-********************************************************
2 * wxlparser.h : parsers, import/export for wxLayoutList *
4 * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) *
7 *******************************************************************/
15 enum wxLayoutExportType
20 // this can be caused by empty lines:
24 enum wxLayoutExportMode
26 WXLO_EXPORT_AS_TEXT
= 0x00,
27 WXLO_EXPORT_AS_TEXT_AND_COMMANDS
= 0x01,
28 WXLO_EXPORT_AS_HTML
= 0x02,
29 WXLO_EXPORT_AS_OBJECTS
= 0x03,
32 WXLO_EXPORT_WITH_CRLF
= 0x10,
33 WXLO_EXPORT_WITH_LF_ONLY
= 0x20
36 struct wxLayoutExportObject
38 wxLayoutExportType type
;
42 wxLayoutObject
*object
;
44 ~wxLayoutExportObject()
46 if(type
== WXLO_EXPORT_TEXT
|| type
== WXLO_EXPORT_HTML
)
52 struct wxLayoutExportStatus
54 wxLayoutExportStatus(wxLayoutList
*list
);
55 wxLayoutLine
* m_line
;
56 wxLOiterator m_iterator
;
57 wxLayoutStyleInfo m_si
;
62 # define WXLO_DEFAULT_EXPORT_MODE WXLO_EXPORT_WITH_CRLF
64 # define WXLO_DEFAULT_EXPORT_MODE WXLO_EXPORT_WITH_LF_ONLY
67 /// import text into a wxLayoutList (including linefeeds):
68 void wxLayoutImportText(wxLayoutList
*list
, wxString
const &str
);
70 /// export text in a given format
71 wxLayoutExportObject
*wxLayoutExport(wxLayoutExportStatus
*status
,
72 int mode
= WXLO_EXPORT_AS_TEXT
,
73 int flags
= WXLO_DEFAULT_EXPORT_MODE
);