]> git.saurik.com Git - wxWidgets.git/commitdiff
wxCheckList -> wxCheckListBox
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 28 Aug 2003 09:36:54 +0000 (09:36 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 28 Aug 2003 09:36:54 +0000 (09:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/include/wx/xrc/xh_chckl.h
contrib/samples/xrc/rc/controls.xrc
contrib/src/xrc/xh_chckl.cpp
contrib/src/xrc/xmlrsall.cpp
include/wx/xrc/xh_chckl.h
samples/xrc/rc/controls.xrc
src/xrc/xh_chckl.cpp
src/xrc/xmlrsall.cpp

index f662f31c69c8f12314fc9e4212c046791d524303..4db9c50128cec7635293fca31677bfd1382c96ca 100644 (file)
 
 #include "wx/xrc/xmlres.h"
 
-class WXDLLIMPEXP_XRC wxCheckListXmlHandler : public wxXmlResourceHandler
+class WXDLLIMPEXP_XRC wxCheckListBoxXmlHandler : public wxXmlResourceHandler
 {
-DECLARE_DYNAMIC_CLASS(wxCheckListXmlHandler)
+DECLARE_DYNAMIC_CLASS(wxCheckListBoxXmlHandler)
 public:
-    wxCheckListXmlHandler();
+    wxCheckListBoxXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 private:
index 6972bd4cb7fa1f84152e80390be08e809a5ef6be..e441962fb9230be301970da2fc614ea54680c171 100644 (file)
                     </object>
                 </object>
                 <object class="notebookpage">
-                    <label>wxCheckList</label>
+                    <label>wxCheckListBox</label>
                     <object class="wxPanel" name="checklist">
                         <object class="wxFlexGridSizer">
                             <cols>1</cols>
                             <object class="sizeritem">
                                 <flag>wxALIGN_CENTRE|wxALL</flag>
                                 <border>5</border>
-                                <object class="wxCheckList" name="conrols_checklist">
+                                <object class="wxCheckListBox" name="conrols_checklist">
                                 <size>180,180</size>
                                     <content>
                                         <item checked="1">Download library</item>
index fb8c71ad34599ef012850b166537c258ec8df2d8..522612a2644ac9871155c53a935c279e2ae31084 100644 (file)
 #include "wx/xrc/xh_chckl.h"
 #include "wx/checklst.h"
 #include "wx/intl.h"
+#include "wx/log.h"
 
-IMPLEMENT_DYNAMIC_CLASS(wxCheckListXmlHandler, wxXmlResourceHandler)
+IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
 
-wxCheckListXmlHandler::wxCheckListXmlHandler() 
+wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler() 
 : wxXmlResourceHandler(), m_insideBox(FALSE)
 {
     // no styles
     AddWindowStyles();
 }
 
-wxObject *wxCheckListXmlHandler::DoCreateResource()
+wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
 { 
-    if (m_class == wxT("wxCheckList"))
+    if (m_class == wxT("wxCheckListBox")
+#if WXWIN_COMPATIBILITY_2_4
+        || m_class == wxT("wxCheckList")
+#endif
+       )
     {
+#if WXWIN_COMPATIBILITY_2_4
+        if (m_class == wxT("wxCheckList"))
+            wxLogDebug(wxT("'wxCheckList' name is deprecated, use 'wxCheckListBox' instead."));
+#endif
         // need to build the list of strings from children
         m_insideBox = TRUE;
         CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
@@ -103,9 +112,12 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
     }
 }
 
-bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node)
+bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return (IsOfClass(node, wxT("wxCheckList")) ||
+    return (IsOfClass(node, wxT("wxCheckListBox")) ||
+#if WXWIN_COMPATIBILITY_2_4
+            IsOfClass(node, wxT("wxCheckList")) ||
+#endif
            (m_insideBox && node->GetName() == wxT("item")));
 }
 
index 7de3f4f9cbaa21f1a6ea844455023a54a254a057..2749b9eb004cc1c6c4f61c0a8a8700ea2cd86a69 100644 (file)
@@ -43,7 +43,7 @@ void wxXmlResource::InitAllHandlers()
 #endif
     AddHandler(new wxListCtrlXmlHandler);
 #if wxUSE_CHECKLISTBOX
-    AddHandler(new wxCheckListXmlHandler);
+    AddHandler(new wxCheckListBoxXmlHandler);
 #endif
 #if wxUSE_CHOICE
     AddHandler(new wxChoiceXmlHandler);
index f662f31c69c8f12314fc9e4212c046791d524303..4db9c50128cec7635293fca31677bfd1382c96ca 100644 (file)
 
 #include "wx/xrc/xmlres.h"
 
-class WXDLLIMPEXP_XRC wxCheckListXmlHandler : public wxXmlResourceHandler
+class WXDLLIMPEXP_XRC wxCheckListBoxXmlHandler : public wxXmlResourceHandler
 {
-DECLARE_DYNAMIC_CLASS(wxCheckListXmlHandler)
+DECLARE_DYNAMIC_CLASS(wxCheckListBoxXmlHandler)
 public:
-    wxCheckListXmlHandler();
+    wxCheckListBoxXmlHandler();
     virtual wxObject *DoCreateResource();
     virtual bool CanHandle(wxXmlNode *node);
 private:
index 6972bd4cb7fa1f84152e80390be08e809a5ef6be..e441962fb9230be301970da2fc614ea54680c171 100644 (file)
                     </object>
                 </object>
                 <object class="notebookpage">
-                    <label>wxCheckList</label>
+                    <label>wxCheckListBox</label>
                     <object class="wxPanel" name="checklist">
                         <object class="wxFlexGridSizer">
                             <cols>1</cols>
                             <object class="sizeritem">
                                 <flag>wxALIGN_CENTRE|wxALL</flag>
                                 <border>5</border>
-                                <object class="wxCheckList" name="conrols_checklist">
+                                <object class="wxCheckListBox" name="conrols_checklist">
                                 <size>180,180</size>
                                     <content>
                                         <item checked="1">Download library</item>
index fb8c71ad34599ef012850b166537c258ec8df2d8..522612a2644ac9871155c53a935c279e2ae31084 100644 (file)
 #include "wx/xrc/xh_chckl.h"
 #include "wx/checklst.h"
 #include "wx/intl.h"
+#include "wx/log.h"
 
-IMPLEMENT_DYNAMIC_CLASS(wxCheckListXmlHandler, wxXmlResourceHandler)
+IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler)
 
-wxCheckListXmlHandler::wxCheckListXmlHandler() 
+wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler() 
 : wxXmlResourceHandler(), m_insideBox(FALSE)
 {
     // no styles
     AddWindowStyles();
 }
 
-wxObject *wxCheckListXmlHandler::DoCreateResource()
+wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
 { 
-    if (m_class == wxT("wxCheckList"))
+    if (m_class == wxT("wxCheckListBox")
+#if WXWIN_COMPATIBILITY_2_4
+        || m_class == wxT("wxCheckList")
+#endif
+       )
     {
+#if WXWIN_COMPATIBILITY_2_4
+        if (m_class == wxT("wxCheckList"))
+            wxLogDebug(wxT("'wxCheckList' name is deprecated, use 'wxCheckListBox' instead."));
+#endif
         // need to build the list of strings from children
         m_insideBox = TRUE;
         CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
@@ -103,9 +112,12 @@ wxObject *wxCheckListXmlHandler::DoCreateResource()
     }
 }
 
-bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node)
+bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return (IsOfClass(node, wxT("wxCheckList")) ||
+    return (IsOfClass(node, wxT("wxCheckListBox")) ||
+#if WXWIN_COMPATIBILITY_2_4
+            IsOfClass(node, wxT("wxCheckList")) ||
+#endif
            (m_insideBox && node->GetName() == wxT("item")));
 }
 
index 7de3f4f9cbaa21f1a6ea844455023a54a254a057..2749b9eb004cc1c6c4f61c0a8a8700ea2cd86a69 100644 (file)
@@ -43,7 +43,7 @@ void wxXmlResource::InitAllHandlers()
 #endif
     AddHandler(new wxListCtrlXmlHandler);
 #if wxUSE_CHECKLISTBOX
-    AddHandler(new wxCheckListXmlHandler);
+    AddHandler(new wxCheckListBoxXmlHandler);
 #endif
 #if wxUSE_CHOICE
     AddHandler(new wxChoiceXmlHandler);