#include "wx/artprov.h"
#include "wx/colour.h"
#include "wx/animate.h"
+#include "wx/vector.h"
#include "wx/xml/xml.h"
-class WXDLLEXPORT wxMenu;
-class WXDLLEXPORT wxMenuBar;
-class WXDLLEXPORT wxDialog;
-class WXDLLEXPORT wxPanel;
-class WXDLLEXPORT wxWindow;
-class WXDLLEXPORT wxFrame;
-class WXDLLEXPORT wxToolBar;
-
-class WXDLLIMPEXP_XRC wxXmlResourceHandler;
-class WXDLLIMPEXP_XRC wxXmlSubclassFactory;
-class WXDLLIMPEXP_XRC wxXmlSubclassFactoriesList;
+class WXDLLIMPEXP_FWD_CORE wxMenu;
+class WXDLLIMPEXP_FWD_CORE wxMenuBar;
+class WXDLLIMPEXP_FWD_CORE wxDialog;
+class WXDLLIMPEXP_FWD_CORE wxPanel;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxFrame;
+class WXDLLIMPEXP_FWD_CORE wxToolBar;
+
+class WXDLLIMPEXP_FWD_XRC wxXmlResourceHandler;
+class WXDLLIMPEXP_FWD_XRC wxXmlSubclassFactory;
+class wxXmlSubclassFactories;
class wxXmlResourceModule;
-
+class wxXmlResourceDataRecords;
// 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)
-class WXDLLIMPEXP_XRC wxXmlResourceDataRecord
-{
-public:
- wxXmlResourceDataRecord() : Doc(NULL) {
-#if wxUSE_DATETIME
- Time = wxDateTime::Now();
-#endif
- }
- ~wxXmlResourceDataRecord() {delete Doc;}
-
- wxString File;
- wxXmlDocument *Doc;
-#if wxUSE_DATETIME
- wxDateTime Time;
-#endif
-};
-
-
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxXmlResourceDataRecord,
- wxXmlResourceDataRecords,
- WXDLLIMPEXP_XRC);
-
enum wxXmlResourceFlags
{
wxXRC_USE_LOCALE = 1,
static bool IsArchive(const wxString& filename);
#endif // wxUSE_FILESYSTEM
+private:
+ wxXmlResourceDataRecords& Data() { return *m_data; }
+ const wxXmlResourceDataRecords& Data() const { return *m_data; }
+
private:
long m_version;
int m_flags;
- wxList m_handlers;
- wxXmlResourceDataRecords m_data;
+ wxVector<wxXmlResourceHandler*> m_handlers;
+ wxXmlResourceDataRecords *m_data;
#if wxUSE_FILESYSTEM
wxFileSystem m_curFileSystem;
wxFileSystem& GetCurFileSystem() { return m_curFileSystem; }
friend class wxXmlResourceHandler;
friend class wxXmlResourceModule;
- static wxXmlSubclassFactoriesList *ms_subclassFactories;
+ static wxXmlSubclassFactories *ms_subclassFactories;
// singleton instance:
static wxXmlResource *ms_instance;
#define XRCCTRL(window, id, type) \
(wxStaticCast((window).FindWindow(XRCID(id)), type))
+// This macro returns pointer to sizer item
+// Example:
+//
+// <object class="spacer" name="area">
+// <size>400, 300</size>
+// </object>
+//
+// wxSizerItem* item = XRCSIZERITEM(*this, "area")
+
+#define XRCSIZERITEM(window, id) \
+ ((window).GetSizer() ? (window).GetSizer()->GetItemById(XRCID(id)) : NULL)
+
// wxXmlResourceHandler is an abstract base class for resource handlers
// capable of creating a control from an XML node.
// Gets a font.
wxFont GetFont(const wxString& param = wxT("font"));
+ // Gets the value of a boolean attribute (only "0" and "1" are valid values)
+ bool GetBoolAttr(const wxString& attr, bool defaultv);
+
+
// Sets common window options.
void SetupWindow(wxWindow *wnd);