used from wx DLL without it being a DLL also. Some work will still
need to be done for making xmlres be a DLL...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10432
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
34 files changed:
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler
{
public:
wxBitmapXmlHandler();
{
public:
wxBitmapXmlHandler();
virtual bool CanHandle(wxXmlNode *node);
};
virtual bool CanHandle(wxXmlNode *node);
};
-class WXDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler
{
public:
wxIconXmlHandler();
{
public:
wxIconXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler
{
public:
wxBitmapButtonXmlHandler();
{
public:
wxBitmapButtonXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler
{
public:
wxButtonXmlHandler();
{
public:
wxButtonXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxCalendarCtrlXmlHandler();
{
public:
wxCalendarCtrlXmlHandler();
-class WXDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxCheckBoxXmlHandler();
{
public:
wxCheckBoxXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler
{
public:
wxCheckListXmlHandler();
{
public:
wxCheckListXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler
{
public:
wxChoiceXmlHandler();
{
public:
wxChoiceXmlHandler();
-class WXDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxComboBoxXmlHandler();
{
public:
wxComboBoxXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler
{
public:
wxDialogXmlHandler();
{
public:
wxDialogXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler
{
public:
wxFrameXmlHandler();
{
public:
wxFrameXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxGaugeXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxGaugeXmlHandler : public wxXmlResourceHandler
{
wxGAUGE_DEFAULT_RANGE = 100
};
{
wxGAUGE_DEFAULT_RANGE = 100
};
-class WXDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler
{
public:
wxHtmlWindowXmlHandler();
{
public:
wxHtmlWindowXmlHandler();
-class WXDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxListBoxXmlHandler();
{
public:
wxListBoxXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxListCtrlXmlHandler();
{
public:
wxListCtrlXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler
{
public:
wxMenuXmlHandler();
{
public:
wxMenuXmlHandler();
-class WXDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler
{
public:
wxMenuBarXmlHandler();
{
public:
wxMenuBarXmlHandler();
class WXDLLEXPORT wxNotebook;
class WXDLLEXPORT wxNotebook;
-class WXDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler
{
public:
wxNotebookXmlHandler();
{
public:
wxNotebookXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler
{
public:
wxPanelXmlHandler();
{
public:
wxPanelXmlHandler();
-class WXDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler
{
public:
wxRadioButtonXmlHandler();
{
public:
wxRadioButtonXmlHandler();
-class WXDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxRadioBoxXmlHandler();
{
public:
wxRadioBoxXmlHandler();
-class WXDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler
{
wxSL_DEFAULT_VALUE = 0,
wxSL_DEFAULT_MIN = 0,
{
wxSL_DEFAULT_VALUE = 0,
wxSL_DEFAULT_MIN = 0,
class WXDLLEXPORT wxSizer;
class WXDLLEXPORT wxSizer;
-class WXDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler
{
public:
wxSizerXmlHandler();
{
public:
wxSizerXmlHandler();
private:
bool m_isInside;
wxSizer *m_parentSizer;
private:
bool m_isInside;
wxSizer *m_parentSizer;
bool IsSizerNode(wxXmlNode *node);
};
bool IsSizerNode(wxXmlNode *node);
};
-class WXDLLEXPORT wxSliderXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxSliderXmlHandler : public wxXmlResourceHandler
{
wxSL_DEFAULT_VALUE = 0,
wxSL_DEFAULT_MIN = 0,
{
wxSL_DEFAULT_VALUE = 0,
wxSL_DEFAULT_MIN = 0,
#include "wx/defs.h"
#if wxUSE_SPINBTN
#include "wx/defs.h"
#if wxUSE_SPINBTN
-class WXDLLEXPORT wxSpinButtonXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxSpinButtonXmlHandler : public wxXmlResourceHandler
{
wxSP_DEFAULT_VALUE = 0,
wxSP_DEFAULT_MIN = 0,
{
wxSP_DEFAULT_VALUE = 0,
wxSP_DEFAULT_MIN = 0,
#endif
#if wxUSE_SPINCTRL
#endif
#if wxUSE_SPINCTRL
-class WXDLLEXPORT wxSpinCtrlXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxSpinCtrlXmlHandler : public wxXmlResourceHandler
{
wxSP_DEFAULT_VALUE = 0,
wxSP_DEFAULT_MIN = 0,
{
wxSP_DEFAULT_VALUE = 0,
wxSP_DEFAULT_MIN = 0,
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler
{
public:
wxStaticBitmapXmlHandler();
{
public:
wxStaticBitmapXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler
{
public:
wxStaticBoxXmlHandler();
{
public:
wxStaticBoxXmlHandler();
-class WXDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
{
public:
wxStaticLineXmlHandler();
{
public:
wxStaticLineXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler
{
public:
wxStaticTextXmlHandler();
{
public:
wxStaticTextXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxTextCtrlXmlHandler();
{
public:
wxTextCtrlXmlHandler();
class WXDLLEXPORT wxToolBar;
class WXDLLEXPORT wxToolBar;
-class WXDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler
{
public:
wxToolBarXmlHandler();
virtual wxObject *DoCreateResource();
virtual bool CanHandle(wxXmlNode *node);
{
public:
wxToolBarXmlHandler();
virtual wxObject *DoCreateResource();
virtual bool CanHandle(wxXmlNode *node);
private:
bool m_isInside;
wxToolBar *m_toolbar;
private:
bool m_isInside;
wxToolBar *m_toolbar;
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler
{
public:
wxTreeCtrlXmlHandler();
{
public:
wxTreeCtrlXmlHandler();
#include "wx/xml/xmlres.h"
#include "wx/xml/xmlres.h"
-class WXDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler
+class WXXMLDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler
{
public:
wxUnknownWidgetXmlHandler();
{
public:
wxUnknownWidgetXmlHandler();
#include "wx/object.h"
#include "wx/list.h"
#include "wx/object.h"
#include "wx/list.h"
+#ifdef WXXMLISDLL
+#define WXXMLDLLEXPORT WXDLLEXPORT
+#else
+#define WXXMLDLLEXPORT
+#endif
-class WXDLLEXPORT wxXmlNode;
-class WXDLLEXPORT wxXmlProperty;
-class WXDLLEXPORT wxXmlDocument;
-class WXDLLEXPORT wxXmlIOHandler;
+class WXXMLDLLEXPORT wxXmlNode;
+class WXXMLDLLEXPORT wxXmlProperty;
+class WXXMLDLLEXPORT wxXmlDocument;
+class WXXMLDLLEXPORT wxXmlIOHandler;
class WXDLLEXPORT wxInputStream;
class WXDLLEXPORT wxOutputStream;
class WXDLLEXPORT wxInputStream;
class WXDLLEXPORT wxOutputStream;
// Example: in <img src="hello.gif" id="3"/> "src" is property with value
// "hello.gif" and "id" is prop. with value "3".
// Example: in <img src="hello.gif" id="3"/> "src" is property with value
// "hello.gif" and "id" is prop. with value "3".
-class WXDLLEXPORT wxXmlProperty
+class WXXMLDLLEXPORT wxXmlProperty
{
public:
wxXmlProperty() : m_next(NULL) {}
{
public:
wxXmlProperty() : m_next(NULL) {}
- wxXmlProperty(const wxString& name, const wxString& value,
+ wxXmlProperty(const wxString& name, const wxString& value,
wxXmlProperty *next)
: m_name(name), m_value(value), m_next(next) {}
~wxXmlProperty() { delete m_next; }
wxXmlProperty *next)
: m_name(name), m_value(value), m_next(next) {}
~wxXmlProperty() { delete m_next; }
// with content="hi").
//
// If wxUSE_UNICODE is 0, all strings are encoded in UTF-8 encoding (same as
// with content="hi").
//
// If wxUSE_UNICODE is 0, all strings are encoded in UTF-8 encoding (same as
-// ASCII for characters 0-127). You can use wxMBConvUTF8 to convert then to
+// ASCII for characters 0-127). You can use wxMBConvUTF8 to convert then to
// desired encoding:
//
// wxCSConv myConv("iso8859-2");
// wxString s(cMB2WC(node->GetContent().c_str()), myConv);
// desired encoding:
//
// wxCSConv myConv("iso8859-2");
// wxString s(cMB2WC(node->GetContent().c_str()), myConv);
-class WXDLLEXPORT wxXmlNode
+class WXXMLDLLEXPORT wxXmlNode
- wxXmlNode() : m_properties(NULL), m_parent(NULL),
+ wxXmlNode() : m_properties(NULL), m_parent(NULL),
m_children(NULL), m_next(NULL) {}
m_children(NULL), m_next(NULL) {}
- wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
+ wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
const wxString& name, const wxString& content,
wxXmlProperty *props, wxXmlNode *next);
~wxXmlNode() { delete m_properties; delete m_next; delete m_children; }
const wxString& name, const wxString& content,
wxXmlProperty *props, wxXmlNode *next);
~wxXmlNode() { delete m_properties; delete m_next; delete m_children; }
wxXmlNode& operator=(const wxXmlNode& node);
// user-friendly creation:
wxXmlNode& operator=(const wxXmlNode& node);
// user-friendly creation:
- wxXmlNode(wxXmlNodeType type, const wxString& name,
+ wxXmlNode(wxXmlNodeType type, const wxString& name,
const wxString& content = wxEmptyString);
void AddChild(wxXmlNode *child);
void InsertChild(wxXmlNode *child, wxXmlNode *before_node);
const wxString& content = wxEmptyString);
void AddChild(wxXmlNode *child);
void InsertChild(wxXmlNode *child, wxXmlNode *before_node);
wxXmlProperty *GetProperties() const { return m_properties; }
bool GetPropVal(const wxString& propName, wxString *value) const;
wxXmlProperty *GetProperties() const { return m_properties; }
bool GetPropVal(const wxString& propName, wxString *value) const;
- wxString GetPropVal(const wxString& propName,
+ wxString GetPropVal(const wxString& propName,
const wxString& defaultVal) const;
bool HasProp(const wxString& propName) const;
const wxString& defaultVal) const;
bool HasProp(const wxString& propName) const;
-// This class holds XML data/document as parsed by libxml. Note that
-// internal representation is independant on libxml and you can use
+// This class holds XML data/document as parsed by libxml. Note that
+// internal representation is independant on libxml and you can use
// it without libxml (see Load/SaveBinary).
// it without libxml (see Load/SaveBinary).
-class WXDLLEXPORT wxXmlDocument : public wxObject
+class WXXMLDLLEXPORT wxXmlDocument : public wxObject
{
public:
wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {}
{
public:
wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {}
- wxXmlDocument(const wxString& filename,
+ wxXmlDocument(const wxString& filename,
wxXmlIOType io_type = wxXML_IO_AUTO);
wxXmlIOType io_type = wxXML_IO_AUTO);
- wxXmlDocument(wxInputStream& stream,
+ wxXmlDocument(wxInputStream& stream,
wxXmlIOType io_type = wxXML_IO_AUTO);
~wxXmlDocument() { delete m_root; }
wxXmlIOType io_type = wxXML_IO_AUTO);
~wxXmlDocument() { delete m_root; }
wxXmlDocument& operator=(const wxXmlDocument& doc);
// Parses .xml file and loads data. Returns TRUE on success, FALSE
wxXmlDocument& operator=(const wxXmlDocument& doc);
// Parses .xml file and loads data. Returns TRUE on success, FALSE
// NOTE: Any call to this method will result into linking against libxml
// and app's binary size will grow by ca. 250kB
bool Load(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO);
bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
// Saves document as .xml file.
// NOTE: Any call to this method will result into linking against libxml
// and app's binary size will grow by ca. 250kB
bool Load(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO);
bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
// Saves document as .xml file.
- bool Save(const wxString& filename,
+ bool Save(const wxString& filename,
wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const;
wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const;
- bool Save(wxOutputStream& stream,
+ bool Save(wxOutputStream& stream,
wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const;
bool IsOk() const { return m_root != NULL; }
wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const;
bool IsOk() const { return m_root != NULL; }
// Returns encoding of document (may be empty).
// Note: this is the encoding original fail was saved in, *not* the
// encoding of in-memory representation! Data in wxXmlNode are always
// Returns encoding of document (may be empty).
// Note: this is the encoding original fail was saved in, *not* the
// encoding of in-memory representation! Data in wxXmlNode are always
- // stored in wchar_t (in Unicode build) or UTF-8 encoded
+ // stored in wchar_t (in Unicode build) or UTF-8 encoded
// (if wxUSE_UNICODE is 0).
wxString GetEncoding() const { return m_encoding; }
// (if wxUSE_UNICODE is 0).
wxString GetEncoding() const { return m_encoding; }
// wxXmlIOHandler takes care of loading and/or saving XML data.
// see xmlio.h for available handlers
// wxXmlIOHandler takes care of loading and/or saving XML data.
// see xmlio.h for available handlers
-class WXDLLEXPORT wxXmlIOHandler : public wxObject
+class WXXMLDLLEXPORT wxXmlIOHandler : public wxObject
{
public:
wxXmlIOHandler() {}
{
public:
wxXmlIOHandler() {}
virtual wxXmlIOType GetType() = 0;
virtual bool CanLoad(wxInputStream& stream) = 0;
virtual bool CanSave() = 0;
virtual wxXmlIOType GetType() = 0;
virtual bool CanLoad(wxInputStream& stream) = 0;
virtual bool CanSave() = 0;
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) = 0;
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) = 0;
};
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) = 0;
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) = 0;
};
+void wxXmlInitXmlModule();
-class WXDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler
+class WXXMLDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler
{
public:
virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; }
{
public:
virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; }
-class WXDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler
+class WXXMLDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler
{
public:
virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; }
{
public:
virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; }
-class WXDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
+class WXXMLDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
{
public:
wxXmlIOHandlerBin() {}
{
public:
wxXmlIOHandlerBin() {}
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
wxString ReadHeader(wxInputStream& stream);
void WriteHeader(wxOutputStream& stream, const wxString& header);
};
wxString ReadHeader(wxInputStream& stream);
void WriteHeader(wxOutputStream& stream, const wxString& header);
};
-class WXDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
+class WXXMLDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
{
public:
wxXmlIOHandlerBinZ() {}
{
public:
wxXmlIOHandlerBinZ() {}
#include "wx/bitmap.h"
#include "wx/icon.h"
#include "wx/bitmap.h"
#include "wx/icon.h"
+#include "wx/xml/xml.h"
+
class WXDLLEXPORT wxMenu;
class WXDLLEXPORT wxMenuBar;
class WXDLLEXPORT wxDialog;
class WXDLLEXPORT wxMenu;
class WXDLLEXPORT wxMenuBar;
class WXDLLEXPORT wxDialog;
class WXDLLEXPORT wxFrame;
class WXDLLEXPORT wxToolBar;
class WXDLLEXPORT wxFrame;
class WXDLLEXPORT wxToolBar;
-class WXDLLEXPORT wxXmlResourceHandler;
+class WXXMLDLLEXPORT wxXmlResourceHandler;
// These macros indicate current version of XML resources (this information is
// encoded in root node of XRC file as "version" property).
// These macros indicate current version of XML resources (this information is
// encoded in root node of XRC file as "version" property).
WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \
WX_XMLRES_CURRENT_VERSION_REVISION)
WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \
WX_XMLRES_CURRENT_VERSION_REVISION)
-class WXDLLEXPORT wxXmlResourceDataRecord
+class WXXMLDLLEXPORT wxXmlResourceDataRecord
{
public:
wxXmlResourceDataRecord() : Doc(NULL), Time(wxDateTime::Now()) {}
{
public:
wxXmlResourceDataRecord() : Doc(NULL), Time(wxDateTime::Now()) {}
WX_DECLARE_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords);
WX_DECLARE_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords);
+#else
+WX_DECLARE_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords);
+#endif
-// This class holds XML resources from one or more .xml files
+
+// This class holds XML resources from one or more .xml files
// (or derived forms, either binary or zipped -- see manual for
// (or derived forms, either binary or zipped -- see manual for
-class WXDLLEXPORT wxXmlResource : public wxObject
+class WXXMLDLLEXPORT wxXmlResource : public wxObject
{
public:
// Ctor. If use_locale is TRUE, translatable strings are
{
public:
// Ctor. If use_locale is TRUE, translatable strings are
// Initialize only specific handler (or custom handler). Convention says
// that handler name is equal to control's name plus 'XmlHandler', e.g.
// wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. XML resource compiler
// Initialize only specific handler (or custom handler). Convention says
// that handler name is equal to control's name plus 'XmlHandler', e.g.
// wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. XML resource compiler
- // (xmlres) can create include file that contains initialization code for
+ // (xmlres) can create include file that contains initialization code for
// all controls used within the resource.
void AddHandler(wxXmlResourceHandler *handler);
// all controls used within the resource.
void AddHandler(wxXmlResourceHandler *handler);
// Loads bitmap or icon resource from file:
wxBitmap LoadBitmap(const wxString& name);
wxIcon LoadIcon(const wxString& name);
// Loads bitmap or icon resource from file:
wxBitmap LoadBitmap(const wxString& name);
wxIcon LoadIcon(const wxString& name);
// Attaches unknown control into given panel/window/dialog:
// (unknown controls are used in conjunction with <object class="unknown">)
bool AttachUnknownControl(const wxString& name, wxWindow *control,
// Attaches unknown control into given panel/window/dialog:
// (unknown controls are used in conjunction with <object class="unknown">)
bool AttachUnknownControl(const wxString& name, wxWindow *control,
// resource. To be used in event tables
// Macro XMLID is provided for convenience
static int GetXMLID(const char *str_id);
// resource. To be used in event tables
// Macro XMLID is provided for convenience
static int GetXMLID(const char *str_id);
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
long GetVersion() const { return m_version; }
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
long GetVersion() const { return m_version; }
// Compares resources version to argument. Returns -1 if resources version
// is less than the argument, +1 if greater and 0 if they equal.
int CompareVersion(int major, int minor, int release, int revision) const
// Compares resources version to argument. Returns -1 if resources version
// is less than the argument, +1 if greater and 0 if they equal.
int CompareVersion(int major, int minor, int release, int revision) const
- { return GetVersion() -
+ { return GetVersion() -
(major*256*256*256 + minor*256*256 + release*256 + revision); }
protected:
(major*256*256*256 + minor*256*256 + release*256 + revision); }
protected:
bool m_useLocale;
wxList m_handlers;
wxXmlResourceDataRecords m_data;
bool m_useLocale;
wxList m_handlers;
wxXmlResourceDataRecords m_data;
// EVT_MENU(XMLID("about"), MyFrame::OnAbout)
// EVT_MENU(XMLID("new"), MyFrame::OnNew)
// EVT_MENU(XMLID("open"), MyFrame::OnOpen)
// EVT_MENU(XMLID("about"), MyFrame::OnAbout)
// EVT_MENU(XMLID("new"), MyFrame::OnNew)
// EVT_MENU(XMLID("open"), MyFrame::OnOpen)
#define XMLID(str_id) \
wxXmlResource::GetXMLID(wxT(str_id))
#define XMLID(str_id) \
wxXmlResource::GetXMLID(wxT(str_id))
-class WXDLLEXPORT wxXmlResourceHandler : public wxObject
+class WXXMLDLLEXPORT wxXmlResourceHandler : public wxObject
{
public:
wxXmlResourceHandler();
{
public:
wxXmlResourceHandler();
// that is often neccessary to create resource
// if instance != NULL it should not create new instance via 'new' but
// rather use this one and call its Create method
// that is often neccessary to create resource
// if instance != NULL it should not create new instance via 'new' but
// rather use this one and call its Create method
- wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
+ wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
wxObject *instance);
// This one is called from CreateResource after variables
wxObject *instance);
// This one is called from CreateResource after variables
// Gets node content from wxXML_ENTITY_NODE
// (the problem is, <tag>content<tag> is represented as
// wxXML_ENTITY_NODE name="tag", content=""
// Gets node content from wxXML_ENTITY_NODE
// (the problem is, <tag>content<tag> is represented as
// wxXML_ENTITY_NODE name="tag", content=""
- // |-- wxXML_TEXT_NODE or
+ // |-- wxXML_TEXT_NODE or
// wxXML_CDATA_SECTION_NODE name="" content="content"
wxString GetNodeContent(wxXmlNode *node);
// Check to see if a param exists
// wxXML_CDATA_SECTION_NODE name="" content="content"
wxString GetNodeContent(wxXmlNode *node);
// Check to see if a param exists
- bool HasParam(const wxString& param);
+ bool HasParam(const wxString& param);
// Finds the node or returns NULL
wxXmlNode *GetParamNode(const wxString& param);
// Finds the node or returns NULL
wxXmlNode *GetParamNode(const wxString& param);
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
- wxObject *CreateResFromNode(wxXmlNode *node,
+ wxObject *CreateResFromNode(wxXmlNode *node,
wxObject *parent, wxObject *instance = NULL)
{ return m_resource->CreateResFromNode(node, parent, instance); }
wxObject *parent, wxObject *instance = NULL)
{ return m_resource->CreateResFromNode(node, parent, instance); }
#define ADD_STYLE(style) AddStyle(wxT(#style), style)
#define ADD_STYLE(style) AddStyle(wxT(#style), style)
+void wxXmlInitResourceModule();