1998-06-29 12:44:36 +00:00
|
|
|
|
/*-*- c++ -*-********************************************************
|
|
|
|
|
* wxlparser.h : parsers, import/export for wxLayoutList *
|
|
|
|
|
* *
|
|
|
|
|
* (C) 1998 by Karsten Ball<EFBFBD>der (Ballueder@usa.net) *
|
|
|
|
|
* *
|
|
|
|
|
* $Id$
|
|
|
|
|
*******************************************************************/
|
|
|
|
|
#ifndef WXLPARSER_H
|
|
|
|
|
# define WXLPARSER_H
|
|
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
|
# pragma interface "wxlparser.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
|
# define NULL 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
enum wxLayoutExportType
|
|
|
|
|
{
|
|
|
|
|
WXLO_EXPORT_TEXT,
|
|
|
|
|
WXLO_EXPORT_HTML,
|
|
|
|
|
WXLO_EXPORT_OBJECT
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum wxLayoutExportMode
|
|
|
|
|
{
|
|
|
|
|
WXLO_EXPORT_AS_TEXT,
|
|
|
|
|
WXLO_EXPORT_AS_TEXT_AND_COMMANDS,
|
|
|
|
|
WXLO_EXPORT_AS_HTML,
|
|
|
|
|
WXLO_EXPORT_AS_OBJECTS
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct wxLayoutExportObject
|
|
|
|
|
{
|
|
|
|
|
wxLayoutExportType type;
|
|
|
|
|
union
|
|
|
|
|
{
|
1998-07-12 15:02:44 +00:00
|
|
|
|
String *text;
|
1998-06-29 12:44:36 +00:00
|
|
|
|
wxLayoutObjectBase *object;
|
|
|
|
|
}content;
|
|
|
|
|
~wxLayoutExportObject()
|
|
|
|
|
{
|
|
|
|
|
if(type == WXLO_EXPORT_TEXT || type == WXLO_EXPORT_HTML)
|
|
|
|
|
delete content.text;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/// import text into a wxLayoutList (including linefeeds):
|
1998-07-12 15:02:44 +00:00
|
|
|
|
void wxLayoutImportText(wxLayoutList &list, String const &str);
|
1998-06-29 12:44:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wxLayoutExportObject *wxLayoutExport(wxLayoutList &list,
|
|
|
|
|
wxLayoutList::iterator &from,
|
|
|
|
|
wxLayoutExportMode WXLO_EXPORT_AS_TEXT);
|
|
|
|
|
|
|
|
|
|
#endif //WXLPARSER_H
|