]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxStaticLine handler
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 17 Sep 2000 19:18:02 +0000 (19:18 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 17 Sep 2000 19:18:02 +0000 (19:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/include/wx/xml/xh_all.h
contrib/include/wx/xml/xh_stlin.h [new file with mode: 0644]
contrib/src/xml/Makefile.in
contrib/src/xml/makefile.b32
contrib/src/xml/makefile.g95
contrib/src/xml/makefile.vc
contrib/src/xml/makefile.wat
contrib/src/xml/wxXMLVC.dsp
contrib/src/xml/xh_stlin.cpp [new file with mode: 0644]
contrib/src/xml/xmlrsall.cpp

index 5f5d75442a39e12cc358a22820537b1a809e7451..39e0f7732415e4bddec56159fc39fefb899b179d 100644 (file)
@@ -41,4 +41,7 @@
 #include "wx/xml/xh_tree.h"
 #include "wx/xml/xh_cald.h"
 #include "wx/xml/xh_listc.h"
+#include "wx/xml/xh_stlin.h"
+#include "wx/xml/xh_bmp.h"
+#include "wx/xml/xh_unkwn.h"
 #endif // _WX_XMLRES_H_
diff --git a/contrib/include/wx/xml/xh_stlin.h b/contrib/include/wx/xml/xh_stlin.h
new file mode 100644 (file)
index 0000000..5a23c9d
--- /dev/null
@@ -0,0 +1,32 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_stlin.h
+// Purpose:     XML resource handler for wxStaticLine
+// Author:      Vaclav Slavik
+// Created:     2000/09/00
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Vaclav Slavik
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_STLIN_H_
+#define _WX_XH_STLIN_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_stlin.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+
+#if wxUSE_STATLINE
+
+class WXDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
+{
+    public:
+        wxStaticLineXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+#endif
+
+#endif // _WX_XH_STLIN_H_
index 8c2286b7ebfdd999844fc9a604a7097ad01a02b6..47e4e74135d4adfac5597f78c32b37c94b9dca63 100644 (file)
@@ -17,14 +17,15 @@ HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \
         xh_dlg.h xh_gauge.h xh_html.h xh_menu.h xh_notbk.h xh_panel.h \
         xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \
         xh_sttxt.h xh_text.h xh_listb.h xml.h xmlio.h xmlres.h xh_toolb.h \
-        xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h
+        xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \
+        xh_stlin.h xh_bmp.h xh_unkwn.h
 
 
 OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
         xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
         xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \
         xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
-        xh_text.o xh_listb.o xh_toolb.o \
+        xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
         xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o
 
 APPEXTRADEFS=-I$(top_srcdir)/contrib/include
index 70ed81e9635ae81847f86e040b727726195c5aec..49ce1e8aeff81ebccc0078bd1c9d0b817031271f 100644 (file)
@@ -17,8 +17,9 @@ OBJECTS=xml.obj xmlbin.obj xmlbinz.obj xmlpars.obj xmlres.obj xmlrsall.obj \
         xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj \
         xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj \
         xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \
-        xh_text.obj xh_listb.obj xh_toolb.obj \
-        xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj xh_tree.obj
+        xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj \
+        xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj \
+        xh_tree.obj xh_unkwn.obj
 
 !include $(WXDIR)\src\makelib.b32
 
index 75d4bca0bf173bbae9b0348e88f851432c7b00e1..0f1a306feb58bd97a2ee1e8ca07f35c6e1bc13b4 100644 (file)
@@ -16,7 +16,7 @@ OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
         xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
         xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \
         xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
-        xh_text.o xh_listb.o xh_toolb.o \
+        xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
         xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o
 
 include $(WXDIR)/src/makelib.g95
index 58baf13425726cf8c5eba9cbfb4e2988624da5d2..f29130e2ce00356f949ca9bb1665d6bea1d0d3dd 100644 (file)
@@ -39,7 +39,8 @@ OBJECTS=$(D)\xml.obj $(D)\xmlbin.obj $(D)\xmlbinz.obj $(D)\xmlpars.obj $(D)\xmlr
         $(D)\xh_radbx.obj $(D)\xh_sizer.obj $(D)\xh_slidr.obj $(D)\xh_spin.obj $(D)\xh_stbmp.obj $(D)\xh_sttxt.obj \
         $(D)\xh_text.obj $(D)\xh_listb.obj $(D)\xh_toolb.obj \
         $(D)\xh_bmpbt.obj $(D)\xh_cald.obj $(D)\xh_listc.obj $(D)\xh_scrol.obj \
-        $(D)\xh_stbox.obj $(D)\xh_tree.obj
+        $(D)\xh_stbox.obj $(D)\xh_tree.obj $(D)\xh_stlin.obj $(D)\xh_bmp.obj \
+        $(D)\xh_unkwn.obj
 
 !include $(WXDIR)\src\makelib.vc
 
index 545aa04728d900a94f115b68b343f93e39e2b056..37593ad2affc25668964e57677470b2b503c1fa2 100644 (file)
@@ -16,8 +16,9 @@ OBJECTS=xml.obj xmlbin.obj xmlbinz.obj xmlpars.obj xmlres.obj xmlrsall.obj &
         xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj &
         xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj &
         xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj &
-        xh_text.obj xh_listb.obj xh_toolb.obj &
-        xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj xh_tree.obj
+        xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj &
+        xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj &
+        xh_tree.obj xh_unkwn.obj
 
 
 all: $(WXXMLLIB)
index 64008fe50aecc36a3463f1b363a35f53c2aebb99..d65bada031c7aee9187d556f2f5bcbf94cf85a1b 100644 (file)
@@ -212,6 +212,18 @@ SOURCE=.\xh_tree.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\xh_stlin.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_bmp.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_unkwn.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\xmlrsall.cpp
 # End Source File
 # End Target
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
index 584dc04ed4ffa1401939c56980f3999553131850..7c5dd8136d9c5ea86befb3aaaabedefe629b3ff1 100644 (file)
@@ -25,6 +25,8 @@
 
 void wxXmlResource::InitAllHandlers()
 {
+    AddHandler(new wxBitmapXmlHandler);
+    AddHandler(new wxIconXmlHandler);
     AddHandler(new wxMenuXmlHandler);
     AddHandler(new wxMenuBarXmlHandler);
 
@@ -86,7 +88,8 @@ void wxXmlResource::InitAllHandlers()
 #if wxUSE_TOOLBAR
     AddHandler(new wxToolBarXmlHandler);
 #endif
-
-
-
+#if wxUSE_STATLINE
+    AddHandler(new wxStaticLineXmlHandler);
+#endif
+    AddHandler(new wxUnknownWidgetXmlHandler);
 }