]> git.saurik.com Git - wxWidgets.git/commitdiff
added new controls: wxBitmapButton, wxCalendarCtrl, wxListCtrl, wxScrollBar, wxStatic...
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 14 Sep 2000 21:32:23 +0000 (21:32 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 14 Sep 2000 21:32:23 +0000 (21:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
contrib/include/wx/xml/xh_all.h
contrib/include/wx/xml/xh_bmpbt.h [new file with mode: 0644]
contrib/include/wx/xml/xh_cald.h [new file with mode: 0644]
contrib/include/wx/xml/xh_listc.h [new file with mode: 0644]
contrib/include/wx/xml/xh_scrol.h [new file with mode: 0644]
contrib/include/wx/xml/xh_stbox.h [new file with mode: 0644]
contrib/include/wx/xml/xh_tree.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_bmpbt.cpp [new file with mode: 0644]
contrib/src/xml/xh_cald.cpp [new file with mode: 0644]
contrib/src/xml/xh_listc.cpp [new file with mode: 0644]
contrib/src/xml/xh_scrol.cpp [new file with mode: 0644]
contrib/src/xml/xh_stbox.cpp [new file with mode: 0644]
contrib/src/xml/xh_tree.cpp [new file with mode: 0644]
contrib/src/xml/xmlrsall.cpp

index a46213b43478c76b8f8deee21d0c6d1ddf5a1201..5f5d75442a39e12cc358a22820537b1a809e7451 100644 (file)
 #include "wx/xml/xh_text.h"
 #include "wx/xml/xh_listb.h"
 #include "wx/xml/xh_toolb.h"
-
+#include "wx/xml/xh_bmpbt.h"
+#include "wx/xml/xh_stbox.h"
+#include "wx/xml/xh_scrol.h"
+#include "wx/xml/xh_tree.h"
+#include "wx/xml/xh_cald.h"
+#include "wx/xml/xh_listc.h"
 #endif // _WX_XMLRES_H_
diff --git a/contrib/include/wx/xml/xh_bmpbt.h b/contrib/include/wx/xml/xh_bmpbt.h
new file mode 100644 (file)
index 0000000..7b12cc9
--- /dev/null
@@ -0,0 +1,30 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_bmpbt.h
+// Purpose:     XML resource handler for bitmap buttons
+// Author:      Brian Gavin
+// Created:     2000/03/05
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_BMPBT_H_
+#define _WX_XH_BMPBT_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_bmpbt.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+
+
+class WXDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler
+{
+    public:
+        wxBitmapButtonXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+
+#endif // _WX_XH_BMPBT_H_
diff --git a/contrib/include/wx/xml/xh_cald.h b/contrib/include/wx/xml/xh_cald.h
new file mode 100644 (file)
index 0000000..adf0ecc
--- /dev/null
@@ -0,0 +1,29 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_cald.h
+// Purpose:     XML resource handler for wxCalendarCtrl
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_CALD_H_
+#define _WX_XH_CALD_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_cald.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+
+class WXDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
+{
+    public:
+        wxCalendarCtrlXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+
+#endif // _WX_XH_CALD_H_
diff --git a/contrib/include/wx/xml/xh_listc.h b/contrib/include/wx/xml/xh_listc.h
new file mode 100644 (file)
index 0000000..27de314
--- /dev/null
@@ -0,0 +1,29 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_listc.h
+// Purpose:     XML resource handler for wxCalendarCtrl
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_LISTC_H_
+#define _WX_XH_LISTC_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_listc.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+
+class WXDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler
+{
+    public:
+        wxListCtrlXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+
+#endif // _WX_XH_LISTC_H_
diff --git a/contrib/include/wx/xml/xh_scrol.h b/contrib/include/wx/xml/xh_scrol.h
new file mode 100644 (file)
index 0000000..f5d2aec
--- /dev/null
@@ -0,0 +1,39 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_scrol.h
+// Purpose:     XML resource handler for wxScrollBar
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_SCROL_H_
+#define _WX_XH_SCROL_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_scrol.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+#include "wx/defs.h"
+
+
+
+class WXDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler
+{
+    enum 
+    {
+        wxSL_DEFAULT_VALUE = 0,
+        wxSL_DEFAULT_MIN = 0,
+        wxSL_DEFAULT_MAX = 100
+    };
+
+    public:
+        wxScrollBarXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+
+#endif // _WX_XH_SCROL_H_
diff --git a/contrib/include/wx/xml/xh_stbox.h b/contrib/include/wx/xml/xh_stbox.h
new file mode 100644 (file)
index 0000000..aae851c
--- /dev/null
@@ -0,0 +1,30 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_stbox.h
+// Purpose:     XML resource handler for wxStaticBox
+// Author:      Brian Gavin
+// Created:     2000/09/00
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_STBOX_H_
+#define _WX_XH_STBOX_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_stbox.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+
+
+class WXDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler
+{
+    public:
+        wxStaticBoxXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+
+#endif // _WX_XH_STBOX_H_
diff --git a/contrib/include/wx/xml/xh_tree.h b/contrib/include/wx/xml/xh_tree.h
new file mode 100644 (file)
index 0000000..e743380
--- /dev/null
@@ -0,0 +1,29 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_tree.h
+// Purpose:     XML resource handler for wxTreeCtrl
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_XH_TREE_H_
+#define _WX_XH_TREE_H_
+
+#ifdef __GNUG__
+#pragma interface "xh_tree.h"
+#endif
+
+#include "wx/xml/xmlres.h"
+
+class WXDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler
+{
+    public:
+        wxTreeCtrlXmlHandler();
+        virtual wxObject *DoCreateResource();
+        virtual bool CanHandle(wxXmlNode *node);
+};
+
+
+#endif // _WX_XH_TREE_H_
index 5ce54915cf7e7e944660d22b708ba677c6caf389..8c2286b7ebfdd999844fc9a604a7097ad01a02b6 100644 (file)
@@ -16,7 +16,8 @@ HEADER_SUBDIR=xml
 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_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
 
 
 OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
@@ -24,6 +25,7 @@ OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.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_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o
 
 APPEXTRADEFS=-I$(top_srcdir)/contrib/include
 
index 2da7a2742870dcd29a6b73a449e6149c1b69e6df..70ed81e9635ae81847f86e040b727726195c5aec 100644 (file)
@@ -17,7 +17,8 @@ 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_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
 
 !include $(WXDIR)\src\makelib.b32
 
index 4b1e1a64d717e1c38acdbfbb4c29eb9ed74e62f5..75d4bca0bf173bbae9b0348e88f851432c7b00e1 100644 (file)
@@ -16,7 +16,8 @@ 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_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o
 
 include $(WXDIR)/src/makelib.g95
 
index bc8b3e3eb5be0e8c11de76c88890f80fa38f5ace..58baf13425726cf8c5eba9cbfb4e2988624da5d2 100644 (file)
@@ -37,7 +37,9 @@ OBJECTS=$(D)\xml.obj $(D)\xmlbin.obj $(D)\xmlbinz.obj $(D)\xmlpars.obj $(D)\xmlr
         $(D)\xh_bttn.obj $(D)\xh_chckb.obj $(D)\xh_chckl.obj $(D)\xh_choic.obj $(D)\xh_combo.obj $(D)\xh_dlg.obj \
         $(D)\xh_gauge.obj $(D)\xh_html.obj $(D)\xh_menu.obj $(D)\xh_notbk.obj $(D)\xh_panel.obj $(D)\xh_radbt.obj \
         $(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_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
 
 !include $(WXDIR)\src\makelib.vc
 
index 883e948eec13fdd8e8d32ace5f0404ff5470fd9a..545aa04728d900a94f115b68b343f93e39e2b056 100644 (file)
@@ -16,7 +16,8 @@ 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_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
 
 
 all: $(WXXMLLIB)
index ac16ed5c16d9e83cfb93bb1feaf7f9bfdb721a77..64008fe50aecc36a3463f1b363a35f53c2aebb99 100644 (file)
@@ -188,6 +188,30 @@ SOURCE=.\xmlres.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\xh_bmpbt.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_cald.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_listc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_scrol.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_stbox.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\xh_tree.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\xmlrsall.cpp
 # End Source File
 # End Target
diff --git a/contrib/src/xml/xh_bmpbt.cpp b/contrib/src/xml/xh_bmpbt.cpp
new file mode 100644 (file)
index 0000000..cfc3fe5
--- /dev/null
@@ -0,0 +1,60 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_bmpbt.cpp
+// Purpose:     XML resource for bitmap buttons
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_bmpbt.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_bmpbt.h"
+#include <wx/bmpbuttn.h>
+
+wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    ADD_STYLE(wxBU_AUTODRAW);
+    ADD_STYLE(wxBU_LEFT);
+    ADD_STYLE(wxBU_RIGHT);
+    ADD_STYLE(wxBU_TOP);
+    ADD_STYLE(wxBU_BOTTOM);
+    AddWindowStyles();
+}
+
+
+wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
+{ 
+    wxBitmapButton *button = new wxBitmapButton(m_ParentAsWindow,
+                                    GetID(),
+                                    GetBitmap(_T("bitmap"), GetSize()),
+                                    //GetBitmap(_T("bitmap")),
+                                    GetPosition(), GetSize(),
+                                    GetStyle(_T("style"), wxBU_AUTODRAW),
+                                    wxDefaultValidator,
+                                    GetName());
+    if (GetBool(_T("default"), 0) == 1) button->SetDefault();
+    SetupWindow(button);
+    
+    return button;
+}
+
+
+
+bool wxBitmapButtonXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("bitmapbutton");
+}
+
+
diff --git a/contrib/src/xml/xh_cald.cpp b/contrib/src/xml/xh_cald.cpp
new file mode 100644 (file)
index 0000000..a174531
--- /dev/null
@@ -0,0 +1,60 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_cald.cpp
+// Purpose:     XML resource for wxCalendarCtrl
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_cald.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_cald.h"
+#include "wx/calctrl.h"
+
+
+wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    ADD_STYLE(wxCAL_SUNDAY_FIRST);
+    ADD_STYLE(wxCAL_MONDAY_FIRST);
+    ADD_STYLE(wxCAL_SHOW_HOLIDAYS);
+    ADD_STYLE(wxCAL_NO_YEAR_CHANGE);
+    ADD_STYLE(wxCAL_NO_MONTH_CHANGE);
+    AddWindowStyles();
+}
+
+
+wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
+{ 
+    wxCalendarCtrl *calendar = new wxCalendarCtrl(m_ParentAsWindow,
+                                    GetID(),
+                                    wxDefaultDateTime,
+                                    /*TODO: take it from resource*/
+                                    GetPosition(), GetSize(),
+                                    GetStyle(),
+                                    GetName());
+    
+    SetupWindow(calendar);
+    
+    return calendar;
+}
+
+
+
+bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("calendarctrl");
+}
+
+
diff --git a/contrib/src/xml/xh_listc.cpp b/contrib/src/xml/xh_listc.cpp
new file mode 100644 (file)
index 0000000..332d965
--- /dev/null
@@ -0,0 +1,67 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_listc.cpp
+// Purpose:     XML resource for wxListCtrl
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_listc.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_listc.h"
+#include "wx/listctrl.h"
+
+
+wxListCtrlXmlHandler::wxListCtrlXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    ADD_STYLE(wxLC_LIST);
+    ADD_STYLE(wxLC_REPORT);
+    ADD_STYLE(wxLC_REPORT);
+    ADD_STYLE(wxLC_ICON);
+    ADD_STYLE(wxLC_SMALL_ICON);
+    ADD_STYLE(wxLC_ALIGN_TOP);
+    ADD_STYLE(wxLC_ALIGN_LEFT);
+    ADD_STYLE(wxLC_AUTOARRANGE);
+    ADD_STYLE(wxLC_USER_TEXT);
+    ADD_STYLE(wxLC_EDIT_LABELS);
+    ADD_STYLE(wxLC_NO_HEADER);
+    ADD_STYLE(wxLC_SINGLE_SEL);
+    ADD_STYLE(wxLC_SORT_ASCENDING);
+    ADD_STYLE(wxLC_SORT_DESCENDING);
+    AddWindowStyles();
+}
+
+
+wxObject *wxListCtrlXmlHandler::DoCreateResource()
+{ 
+    wxListCtrl *list = new wxListCtrl(m_ParentAsWindow,
+                                    GetID(),
+                                    GetPosition(), GetSize(),
+                                    GetStyle(),
+                                    wxDefaultValidator,
+                                    GetName());
+    /* TODO: columns definition */
+    
+    SetupWindow(list);
+    
+    return list;
+}
+
+
+
+bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("listctrl");
+}
diff --git a/contrib/src/xml/xh_scrol.cpp b/contrib/src/xml/xh_scrol.cpp
new file mode 100644 (file)
index 0000000..6e7e2b1
--- /dev/null
@@ -0,0 +1,63 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_scrol.cpp
+// Purpose:     XML resource for wxScrollBar
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_scrol.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_scrol.h"
+#include "wx/scrolbar.h"
+
+
+wxScrollBarXmlHandler::wxScrollBarXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    ADD_STYLE( wxSB_HORIZONTAL );
+    ADD_STYLE( wxSB_VERTICAL );
+    AddWindowStyles();
+}
+
+wxObject *wxScrollBarXmlHandler::DoCreateResource()
+{ 
+    wxScrollBar *control = new wxScrollBar(m_ParentAsWindow,
+                                    GetID(),
+                                    GetPosition(), GetSize(),
+                                    GetStyle(),
+                                    wxDefaultValidator,
+                                    GetName()
+                                    );
+    control->SetScrollbar(GetLong( _T("value"), 0), 
+                          GetLong( _T("thumbsize"),1),
+                          GetLong( _T("range"), 10),
+                          GetLong( _T("pagesize"),1)
+                          );
+                          
+    
+    SetupWindow(control);
+    
+    return control;
+}
+
+
+
+bool wxScrollBarXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("scrollbar");
+}
+
+
+
diff --git a/contrib/src/xml/xh_stbox.cpp b/contrib/src/xml/xh_stbox.cpp
new file mode 100644 (file)
index 0000000..3613fbc
--- /dev/null
@@ -0,0 +1,52 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_stbox.cpp
+// Purpose:     XML resource for wxStaticBox
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_stbox.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_stbox.h"
+#include "wx/statbox.h"
+
+wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    AddWindowStyles();
+}
+
+wxObject *wxStaticBoxXmlHandler::DoCreateResource()
+{ 
+    wxStaticBox *box = new wxStaticBox(m_ParentAsWindow,
+                                    GetID(),
+                                    GetText(_T("label")),
+                                    GetPosition(), GetSize(),
+                                    GetStyle(),
+                                    GetName()
+                                    );
+    SetupWindow(box);
+    
+    return box;
+}
+
+
+
+bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("staticbox");
+}
+
+
diff --git a/contrib/src/xml/xh_tree.cpp b/contrib/src/xml/xh_tree.cpp
new file mode 100644 (file)
index 0000000..b10dc6c
--- /dev/null
@@ -0,0 +1,57 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        xh_tree.cpp
+// Purpose:     XML resource for wxTreeCtrl
+// Author:      Brian Gavin
+// Created:     2000/09/09
+// RCS-ID:      $Id$
+// Copyright:   (c) 2000 Brian Gavin
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#ifdef __GNUG__
+#pragma implementation "xh_tree.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/xml/xh_tree.h"
+#include "wx/treectrl.h"
+
+
+wxTreeCtrlXmlHandler::wxTreeCtrlXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    ADD_STYLE(wxTR_HAS_BUTTONS);
+    ADD_STYLE(wxTR_EDIT_LABELS);
+    ADD_STYLE(wxTR_MULTIPLE);
+    AddWindowStyles();
+}
+
+
+wxObject *wxTreeCtrlXmlHandler::DoCreateResource()
+{ 
+    wxTreeCtrl *tree = new wxTreeCtrl(m_ParentAsWindow,
+                                    GetID(),
+                                    GetPosition(), GetSize(),
+                                    GetStyle(),
+                                    wxDefaultValidator,
+                                    GetName());
+    
+    SetupWindow(tree);
+    
+    return tree;
+}
+
+
+
+bool wxTreeCtrlXmlHandler::CanHandle(wxXmlNode *node)
+{
+    return node->GetName() == _T("treectrl");
+}
+
+
index 19312097e9119a4c9bd2107eb149acc2f0c75872..584dc04ed4ffa1401939c56980f3999553131850 100644 (file)
@@ -30,7 +30,26 @@ void wxXmlResource::InitAllHandlers()
 
     AddHandler(new wxDialogXmlHandler);
     AddHandler(new wxPanelXmlHandler);
+
+    AddHandler(new wxSizerXmlHandler);
+//Controls
     AddHandler(new wxButtonXmlHandler);
+    AddHandler(new wxBitmapButtonXmlHandler);
+    AddHandler(new wxStaticTextXmlHandler);
+    AddHandler(new wxStaticBoxXmlHandler);
+    AddHandler(new wxStaticBitmapXmlHandler);
+    AddHandler(new wxTreeCtrlXmlHandler);
+    AddHandler(new wxCalendarCtrlXmlHandler);
+    AddHandler(new wxListCtrlXmlHandler);
+#if CHECKLISTBOX
+    AddHandler(new wxCheckListXmlHandler);
+#endif
+#if wxUSE_CHOICE
+    AddHandler(new wxChoiceXmlHandler);
+#endif
+#if wxUSE_SLIDER
+    AddHandler(new wxSliderXmlHandler);
+#endif
 #if wxUSE_GAUGE
     AddHandler(new wxGaugeXmlHandler);
 #endif
@@ -46,9 +65,10 @@ void wxXmlResource::InitAllHandlers()
 #if wxUSE_SPINCTRL
     AddHandler(new wxSpinCtrlXmlHandler);
 #endif    
-    AddHandler(new wxStaticTextXmlHandler);
-    AddHandler(new wxStaticBitmapXmlHandler);
-    AddHandler(new wxSliderXmlHandler);
+#if wxUSE_SCROLLBAR
+    AddHandler(new wxScrollBarXmlHandler);
+#endif
+    
 #if wxUSE_RADIOBOX
     AddHandler(new wxRadioBoxXmlHandler);
     AddHandler(new wxRadioButtonXmlHandler);
@@ -56,9 +76,6 @@ void wxXmlResource::InitAllHandlers()
 #if wxUSE_COMBOBOX
     AddHandler(new wxComboBoxXmlHandler);
 #endif
-    AddHandler(new wxChoiceXmlHandler);
-    AddHandler(new wxCheckListXmlHandler);
-    AddHandler(new wxSizerXmlHandler);
 #if wxUSE_NOTEBOOK
     AddHandler(new wxNotebookXmlHandler);
 #endif
@@ -69,4 +86,7 @@ void wxXmlResource::InitAllHandlers()
 #if wxUSE_TOOLBAR
     AddHandler(new wxToolBarXmlHandler);
 #endif
+
+
+
 }