]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_stlin.cpp
added wxStaticLine handler
[wxWidgets.git] / contrib / src / xml / xh_stlin.cpp
diff --git a/contrib/src/xml/xh_stlin.cpp b/contrib/src/xml/xh_stlin.cpp
new file mode 100644 (file)
index 0000000..0ec560d
--- /dev/null
@@ -0,0 +1,55 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_stbox.cpp
+// Purpose:     XML resource for wxStaticLine
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_stlin.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_stlin.h"
+#include "wx/statline.h"
+
+#if wxUSE_STATLINE
+
+wxStaticLineXmlHandler::wxStaticLineXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    ADD_STYLE(wxLI_HORIZONTAL);
+    ADD_STYLE(wxLI_VERTICAL);
+    AddWindowStyles();
+}
+
+wxObject *wxStaticLineXmlHandler::DoCreateResource()
+{ 
+    wxStaticLine *line = new wxStaticLine(m_ParentAsWindow,
+                                    GetID(),
+                                    GetPosition(), GetSize(),
+                                    GetStyle(_T("style"), wxLI_HORIZONTAL),
+                                    GetName()
+                                    );
+    SetupWindow(line);
+    
+    return line;
+}
+
+
+
+bool wxStaticLineXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("staticline");
+}
+
+#endif