1 /*-*- c++ -*-********************************************************
2 * wxlparser.h : parsers, import/export for wxLayoutList *
4 * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) *
7 *******************************************************************/
12 # pragma interface "wxlparser.h"
19 enum wxLayoutExportType
24 // this can be caused by empty lines:
28 enum wxLayoutExportMode
30 WXLO_EXPORT_AS_TEXT
= 0x00,
31 WXLO_EXPORT_AS_TEXT_AND_COMMANDS
= 0x01,
32 WXLO_EXPORT_AS_HTML
= 0x02,
33 WXLO_EXPORT_AS_OBJECTS
= 0x03,
36 WXLO_EXPORT_WITH_CRLF
= 0x10,
37 WXLO_EXPORT_WITH_LF_ONLY
= 0x20
40 struct wxLayoutExportObject
42 wxLayoutExportType type
;
46 wxLayoutObject
*object
;
48 ~wxLayoutExportObject()
50 if(type
== WXLO_EXPORT_TEXT
|| type
== WXLO_EXPORT_HTML
)
56 extern const wxPoint wxLayoutExportNoPosition
;
58 struct wxLayoutExportStatus
60 wxLayoutExportStatus(wxLayoutList
*list
,
61 wxPoint fromPos
= wxLayoutExportNoPosition
,
62 wxPoint toPos
= wxLayoutExportNoPosition
);
63 wxLayoutLine
* m_line
;
64 wxLOiterator m_iterator
;
65 wxLayoutStyleInfo m_si
;
71 /// import text into a wxLayoutList (including linefeeds):
72 void wxLayoutImportText(wxLayoutList
*list
, wxString
const &str
,
73 int withflag
= WXLO_EXPORT_WITH_CRLF
);
75 wxLayoutExportObject
*wxLayoutExport(wxLayoutExportStatus
*status
,
76 int mode
= WXLO_EXPORT_AS_TEXT
,
78 WXLO_EXPORT_WITH_CRLF
);
80 /// import text into a wxLayoutList (including linefeeds):
81 void wxLayoutImportText(wxLayoutList
*list
, wxString
const &str
,
82 int withflag
= WXLO_EXPORT_WITH_LF_ONLY
);
84 /// export text in a given format
85 wxLayoutExportObject
*wxLayoutExport(wxLayoutExportStatus
*status
,
86 int mode
= WXLO_EXPORT_AS_TEXT
,
88 WXLO_EXPORT_WITH_LF_ONLY
);