]> git.saurik.com Git - wxWidgets.git/blob - user/wxLayout/wxlparser.h
another API change fix
[wxWidgets.git] / user / wxLayout / wxlparser.h
1 /*-*- c++ -*-********************************************************
2 * wxlparser.h : parsers, import/export for wxLayoutList *
3 * *
4 * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) *
5 * *
6 * $Id$
7 *******************************************************************/
8 #ifndef WXLPARSER_H
9 # define WXLPARSER_H
10
11 #ifdef __GNUG__
12 # pragma interface "wxlparser.h"
13 #endif
14
15 #ifndef NULL
16 # define NULL 0
17 #endif
18
19 enum wxLayoutExportType
20 {
21 WXLO_EXPORT_TEXT,
22 WXLO_EXPORT_HTML,
23 WXLO_EXPORT_OBJECT
24 };
25
26 enum wxLayoutExportMode
27 {
28 WXLO_EXPORT_AS_TEXT,
29 WXLO_EXPORT_AS_TEXT_AND_COMMANDS,
30 WXLO_EXPORT_AS_HTML,
31 WXLO_EXPORT_AS_OBJECTS
32 };
33
34 struct wxLayoutExportObject
35 {
36 wxLayoutExportType type;
37 union
38 {
39 String *text;
40 wxLayoutObjectBase *object;
41 }content;
42 ~wxLayoutExportObject()
43 {
44 if(type == WXLO_EXPORT_TEXT || type == WXLO_EXPORT_HTML)
45 delete content.text;
46 }
47 };
48
49 /// import text into a wxLayoutList (including linefeeds):
50 void wxLayoutImportText(wxLayoutList &list, String const &str);
51
52
53 wxLayoutExportObject *wxLayoutExport(wxLayoutList &list,
54 wxLayoutList::iterator &from,
55 wxLayoutExportMode WXLO_EXPORT_AS_TEXT);
56
57 #endif //WXLPARSER_H