本文整理汇总了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"));
}
示例2: IsOfClass
bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxScrolledWindow"));
}
示例3: return
bool MaxBitmapComboBoxXmlHandler::CanHandle(wxXmlNode *node)
{
return ((!m_isInside && IsOfClass(node, wxT("wxBitmapComboBox"))) ||
(m_isInside && IsOfClass(node, wxT("ownerdrawnitem"))));
}
示例4: IsOfClass
bool wxDateCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxDatePickerCtrl"));
}
示例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;
}
}
示例6: IsOfClass
bool wxActivityIndicatorXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxS("wxActivityIndicator"));
}
示例7: IsOfClass
bool wxScrollingDialogXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxScrollingDialog"));
}
示例8: IsOfClass
bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxGenericDirCtrl"));
}
示例9: IsOfClass
bool wxStaticTextXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxStaticText"));
}
示例10: IsOfClass
bool wxPanelXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxPanel"));
}
示例11: IsOfClass
bool ctlCheckTreeViewXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("ctlCheckTreeView"));
}
示例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;
}
}
示例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"))));
}
示例14: IsOfClass
bool wxSliderXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxSlider"));
}
示例15: IsOfClass
bool CGToggleButton::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxToggleButton"));
}