Beispiel #1
0
    XRCWndClassData(const wxString& className,
                    const wxString& parentClassName,
                    const wxXmlNode* node) :
        m_className(className) , m_parentClassName(parentClassName)
    {
        if ( className == _T("wxMenu") )
        {
            m_ancestorClassNames.insert(_T("wxMenu"));
            m_ancestorClassNames.insert(_T("wxMenuBar"));
        }
        else if ( className == _T("wxMDIChildFrame") )
        {
            m_ancestorClassNames.insert(_T("wxMDIParentFrame"));
        }
        else if( className == _T("wxMenuBar") ||
                    className == _T("wxStatusBar") ||
                        className == _T("wxToolBar") )
        {
            m_ancestorClassNames.insert(_T("wxFrame"));
        }
        else
        {
            m_ancestorClassNames.insert(_T("wxWindow"));
        }

        BrowseXmlNode(node->GetChildren());
    }
Beispiel #2
0
 void BrowseXmlNode(wxXmlNode* node)
 {
     wxString classValue;
     wxString nameValue;
     wxXmlNode* children;
     while (node)
     {
         if (node->GetName() == _T("object")
             && node->GetPropVal(_T("class"),&classValue)
             && node->GetPropVal(_T("name"),&nameValue))
         {
             m_wdata.Add(XRCWidgetData(nameValue,classValue));
         }
         children = node->GetChildren();
         if (children)
                 BrowseXmlNode(children);
         node = node->GetNext();
     }
 }
Beispiel #3
0
 XRCWndClassData(const wxString& className,const wxString& parentClassName, const wxXmlNode* node) :
     m_className(className) , m_parentClassName(parentClassName)
 {
     BrowseXmlNode(node->GetChildren());
 }