当前位置: 首页>>代码示例>>C++>>正文


C++ IsOfClass函数代码示例

本文整理汇总了C++中IsOfClass函数的典型用法代码示例。如果您正苦于以下问题:C++ IsOfClass函数的具体用法?C++ IsOfClass怎么用?C++ IsOfClass使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IsOfClass函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IsOfClass

bool kwxLinearRegulatorHandler::CanHandle(wxXmlNode *node)
{
    // this function tells XRC system that this handler can parse
    // the <object class="MyControl"> tags
    return IsOfClass(node, wxT("kwxLinearRegulator"));
}
开发者ID:DowerChest,项目名称:codeblocks,代码行数:6,代码来源:xh_kwxlinearregulatorhandler.cpp

示例2: IsOfClass

bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxScrolledWindow"));
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:4,代码来源:xh_scwin.cpp

示例3: return

bool MaxBitmapComboBoxXmlHandler::CanHandle(wxXmlNode *node)
{
    return ((!m_isInside && IsOfClass(node, wxT("wxBitmapComboBox"))) ||
            (m_isInside && IsOfClass(node, wxT("ownerdrawnitem"))));
}
开发者ID:BlitzMaxModules,项目名称:wx.mod,代码行数:5,代码来源:glue.cpp

示例4: IsOfClass

bool wxDateCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxDatePickerCtrl"));
}
开发者ID:EdgarTx,项目名称:wx,代码行数:4,代码来源:xh_datectrl.cpp

示例5: ReportError


//.........这里部分代码省略.........
            if (hasProportion && hasWidth)
            {
                ReportError("A space can't both stretch and have width");
                return NULL;
            }

            if (hasWidth)
            {
                m_toolbar->AddSpacer
                (
                    GetLong(wxS("width"))
                );
            }
            else
            {
                m_toolbar->AddStretchSpacer
                (
                    GetLong(wxS("proportion"), 1l)
                );
            }
        }

        else if (m_class == wxS("label"))
        {
            m_toolbar->AddLabel
            (
                GetID(),
                GetText(wxS("label")),
                GetLong(wxS("width"), -1l)
            );
        }

        return m_toolbar; // must return non-NULL
    }

    else /*<object class="wxAuiToolBar">*/
    {
        int style = GetStyle(wxS("style"), wxNO_BORDER | wxTB_HORIZONTAL);
#ifdef __WXMSW__
        if (!(style & wxNO_BORDER)) style |= wxNO_BORDER;
#endif

        XRC_MAKE_INSTANCE(toolbar, wxAuiToolBar)

        toolbar->Create(m_parentAsWindow,
                         GetID(),
                         GetPosition(),
                         GetSize(),
                         style);
        toolbar->SetName(GetName());
        SetupWindow(toolbar);

        m_toolSize = GetSize(wxS("bitmapsize"));
        if (!(m_toolSize == wxDefaultSize))
            toolbar->SetToolBitmapSize(m_toolSize);
        wxSize margins = GetSize(wxS("margins"));
        if (!(margins == wxDefaultSize))
            toolbar->SetMargins(margins.x, margins.y);
        long packing = GetLong(wxS("packing"), -1);
        if (packing != -1)
            toolbar->SetToolPacking(packing);
        long separation = GetLong(wxS("separation"), -1);
        if (separation != -1)
            toolbar->SetToolSeparation(separation);

        wxXmlNode *children_node = GetParamNode(wxS("object"));
        if (!children_node)
           children_node = GetParamNode(wxS("object_ref"));

        if (children_node == NULL) return toolbar;

        m_isInside = true;
        m_toolbar = toolbar;

        wxXmlNode *n = children_node;

        while (n)
        {
            if (IsObjectNode(n))
            {
                wxObject *created = CreateResFromNode(n, toolbar, NULL);
                wxControl *control = wxDynamicCast(created, wxControl);
                if (!IsOfClass(n, wxS("tool")) &&
                    !IsOfClass(n, wxS("separator")) &&
                    !IsOfClass(n, wxS("label")) &&
                    !IsOfClass(n, wxS("space")) &&
                    control != NULL)
                    toolbar->AddControl(control);
            }
            n = GetNodeNext(n);
        }

        m_isInside = false;
        m_toolbar = NULL;

        toolbar->Realize();

        return toolbar;
    }
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:101,代码来源:xh_auitoolb.cpp

示例6: IsOfClass

bool wxActivityIndicatorXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxS("wxActivityIndicator"));
}
开发者ID:HanruZhou,项目名称:wxWidgets,代码行数:4,代码来源:xh_activityindicator.cpp

示例7: IsOfClass

bool wxScrollingDialogXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxScrollingDialog"));
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:4,代码来源:xtra_res.cpp

示例8: IsOfClass

bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxGenericDirCtrl"));
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:4,代码来源:xh_gdctl.cpp

示例9: IsOfClass

bool wxStaticTextXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxStaticText"));
}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:4,代码来源:xh_sttxt.cpp

示例10: IsOfClass

bool wxPanelXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxPanel"));
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:4,代码来源:xh_panel.cpp

示例11: IsOfClass

bool ctlCheckTreeViewXmlHandler::CanHandle(wxXmlNode *node)
{
	return IsOfClass(node, wxT("ctlCheckTreeView"));
}
开发者ID:SokilV,项目名称:pgadmin3,代码行数:4,代码来源:xh_ctlchecktreeview.cpp

示例12: wxCHECK_MSG


//.........这里部分代码省略.........
                              _T("can't have both toggleable and radion button at once") );
                kind = wxITEM_CHECK;
            }
            m_toolbar->AddTool(GetID(),
                               GetText(wxT("label")),
                               GetBitmap(wxT("bitmap"), wxART_TOOLBAR, m_iconSize),
                               GetBitmap(wxT("bitmap2"), wxART_TOOLBAR, m_iconSize),
                               kind,
                               GetText(wxT("tooltip")),
                               GetText(wxT("longhelp")));

            if ( GetBool(wxT("disabled")) )
                m_toolbar->EnableTool(GetID(), false);
        }
        return m_toolbar; // must return non-NULL
    }

    else if (m_class == wxT("separator"))
    {
        wxCHECK_MSG(m_toolbar, NULL, wxT("Incorrect syntax of XRC resource: separator not within a toolbar!"));
        m_toolbar->AddSeparator();
        return m_toolbar; // must return non-NULL
    }

    else /*<object class="wxToolBar">*/
    {
        int style = GetStyle(wxT("style"), wxNO_BORDER | wxTB_HORIZONTAL);
#ifdef __WXMSW__
        if (!(style & wxNO_BORDER)) style |= wxNO_BORDER;
#endif

        XRC_MAKE_INSTANCE(toolbar, wxToolBar)

        toolbar->Create(m_parentAsWindow,
                         GetID(),
                         GetPosition(),
                         GetSize(),
                         style,
                         GetName());

        wxSize bmpsize;
		if (m_iconSize.IsFullySpecified())
			bmpsize = m_iconSize;
		else
			bmpsize = GetSize(wxT("bitmapsize"));
        if (!(bmpsize == wxDefaultSize))
            toolbar->SetToolBitmapSize(bmpsize);
        wxSize margins = GetSize(wxT("margins"));
        if (!(margins == wxDefaultSize))
            toolbar->SetMargins(margins.x, margins.y);
        long packing = GetLong(wxT("packing"), -1);
        if (packing != -1)
            toolbar->SetToolPacking(packing);
        long separation = GetLong(wxT("separation"), -1);
        if (separation != -1)
            toolbar->SetToolSeparation(separation);
        if (HasParam(wxT("bg")))
            toolbar->SetBackgroundColour(GetColour(wxT("bg")));

        wxXmlNode *children_node = GetParamNode(wxT("object"));
        if (!children_node)
           children_node = GetParamNode(wxT("object_ref"));

        if (children_node == NULL) return toolbar;

        m_isInside = true;
        m_toolbar = toolbar;

        wxXmlNode *n = children_node;

        while (n)
        {
            if ((n->GetType() == wxXML_ELEMENT_NODE) &&
                (n->GetName() == wxT("object") || n->GetName() == wxT("object_ref")))
            {
                wxObject *created = CreateResFromNode(n, toolbar, NULL);
                wxControl *control = wxDynamicCast(created, wxControl);
                if (!IsOfClass(n, wxT("tool")) &&
                    !IsOfClass(n, wxT("separator")) &&
                    control != NULL)
                    toolbar->AddControl(control);
            }
            n = n->GetNext();
        }

        m_isInside = false;
        m_toolbar = NULL;

        toolbar->Realize();

        if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
        {
            wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
            if (parentFrame)
                parentFrame->SetToolBar(toolbar);
        }

        return toolbar;
    }
}
开发者ID:AbelTian,项目名称:filezilla,代码行数:101,代码来源:xh_toolb_ex.cpp

示例13: return

bool wxToolBarXmlHandlerEx::CanHandle(wxXmlNode *node)
{
    return ((!m_isInside && IsOfClass(node, wxT("wxToolBar"))) ||
            (m_isInside && IsOfClass(node, wxT("tool"))) ||
            (m_isInside && IsOfClass(node, wxT("separator"))));
}
开发者ID:AbelTian,项目名称:filezilla,代码行数:6,代码来源:xh_toolb_ex.cpp

示例14: IsOfClass

bool wxSliderXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxSlider"));
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:4,代码来源:xh_slidr.cpp

示例15: IsOfClass

bool CGToggleButton::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxToggleButton"));
}
开发者ID:k3a,项目名称:Panther3D-2,代码行数:4,代码来源:CGToggleButton.cpp


注:本文中的IsOfClass函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。