这篇教程C++ CreateChildren函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CreateChildren函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateChildren函数的具体用法?C++ CreateChildren怎么用?C++ CreateChildren使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CreateChildren函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: m_hypoChartTrellisNode::ChartTrellisNode(const ChartTrellisNode &root, const ChartTrellisNode &substitutedNode, const ChartHypothesis &replacementHypo, ChartTrellisNode *&deviationPoint) : m_hypo((&root == &substitutedNode) ? replacementHypo : root.GetHypothesis()){ if (&root == &substitutedNode) { deviationPoint = this; CreateChildren(); } else { CreateChildren(root, substitutedNode, replacementHypo, deviationPoint); }}
开发者ID:Applied-Language-Solutions,项目名称:mosesdecoder,代码行数:15,
示例2: ASSERTBOOL COXNetBrowseTree::ExpandNode(HTREEITEM hTreeItem) // --- In : hTreeItem : Node to expand (NULL is top level)// --- Out : // --- Returns :// --- Effect : Expands the specified node{ // If hTreeItem == NULL we have to have an empty tree ASSERT((hTreeItem != NULL) || (GetRootItem() == NULL)); // Get the net resource of the parent item NETRESOURCE* pNetResources = NULL; if (hTreeItem != NULL) { pNetResources = GetAssocNetResourceEx(hTreeItem); ASSERT(pNetResources != NULL); } else pNetResources = NULL; if ((pNetResources != NULL) && ((pNetResources->dwUsage & RESOURCEUSAGE_CONTAINER) != RESOURCEUSAGE_CONTAINER)) // Net resource exists, but is not a container and thus cannot be enumerated return FALSE; // Expand the node (may take a while) CWaitCursor wc; return CreateChildren(hTreeItem, pNetResources);}
开发者ID:drupalhunter-team,项目名称:TrackMonitor,代码行数:27,
示例3: XRC_MAKE_INSTANCEwxObject* wxRibbonXmlHandler::Handle_bar(){ XRC_MAKE_INSTANCE (ribbonBar, wxRibbonBar); Handle_RibbonArtProvider (ribbonBar); if ( !ribbonBar->Create(wxDynamicCast(m_parent, wxWindow), GetID(), GetPosition(), GetSize(), GetStyle("style", wxRIBBON_BAR_DEFAULT_STYLE)) ) { ReportError ("could not create ribbonbar"); } else { // Currently the art provider style must be explicitly set to the // ribbon style too. ribbonBar->GetArtProvider() ->SetFlags(GetStyle("style", wxRIBBON_BAR_DEFAULT_STYLE)); const wxClassInfo* const wasInside = m_isInside; wxON_BLOCK_EXIT_SET(m_isInside, wasInside); m_isInside = &wxRibbonBar::ms_classInfo; CreateChildren (ribbonBar, true); ribbonBar->Realize(); } return ribbonBar;}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:32,
示例4: CreateFramewxObject * MaxMdiXmlHandler::DoCreateResource(){ wxWindow *frame = CreateFrame(); if (HasParam(wxT("size"))) frame->SetClientSize(GetSize()); if (HasParam(wxT("pos"))) frame->Move(GetPosition()); if (HasParam(wxT("icon"))) { wxFrame* f = wxDynamicCast(frame, wxFrame); if (f) f->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON)); } SetupWindow(frame); CreateChildren(frame); if (GetBool(wxT("centered"), false)) frame->Centre(); return frame;}
开发者ID:BlitzMaxModules,项目名称:wx.mod,代码行数:25,
示例5: XRC_MAKE_INSTANCEwxObject *wxMDIParentFrameXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(frame, wxMDIParentFrame); frame->Create(m_parentAsWindow, GetID(), GetText(wxT("title")), wxDefaultPosition, wxDefaultSize, GetStyle(wxT("style"), wxDEFAULT_FRAME_STYLE), GetName()); if (HasParam(wxT("size"))) frame->SetClientSize(GetSize()); if (HasParam(wxT("pos"))) frame->Move(GetPosition()); SetupWindow(frame); CreateChildren(frame); if (GetBool(wxT("centered"), FALSE)) frame->Centre(); return frame;}
开发者ID:HJvT,项目名称:wxHaskell,代码行数:25,
示例6: XRC_MAKE_INSTANCEwxObject * MaxDialogXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(dlg, MaxDialog); dlg->Create(m_parentAsWindow, GetID(), GetText(wxT("title")), wxDefaultPosition, wxDefaultSize, GetStyle(wxT("style"), wxDEFAULT_DIALOG_STYLE), GetName()); dlg->MaxBind(_wx_wxdialog_wxDialog__xrcNew(dlg)); if (HasParam(wxT("size"))) dlg->SetClientSize(GetSize(wxT("size"), dlg)); if (HasParam(wxT("pos"))) dlg->Move(GetPosition()); if (HasParam(wxT("icon"))) dlg->SetIcon(GetIcon(wxT("icon"), wxART_FRAME_ICON)); SetupWindow(dlg); CreateChildren(dlg); if (GetBool(wxT("centered"), false)) dlg->Centre(); return dlg;}
开发者ID:BlitzMaxModules,项目名称:wx.mod,代码行数:29,
示例7: GetParamNodewxObject *wxSimplebookXmlHandler::DoCreateResource(){ if (m_class == wxS("simplebookpage")) { wxXmlNode *n = GetParamNode(wxS("object")); if ( !n ) n = GetParamNode(wxS("object_ref")); if (n) { bool old_ins = m_isInside; m_isInside = false; wxObject *item = CreateResFromNode(n, m_simplebook, NULL); m_isInside = old_ins; wxWindow *wnd = wxDynamicCast(item, wxWindow); if (wnd) { m_simplebook->AddPage(wnd, GetText(wxS("label")), GetBool(wxS("selected"))); } else { ReportError(n, "simplebookpage child must be a window"); } return wnd; } else { ReportError("simplebookpage must have a window child"); return NULL; } } else { XRC_MAKE_INSTANCE(sb, wxSimplebook) sb->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxS("style")), GetName()); SetupWindow(sb); wxSimplebook *old_par = m_simplebook; m_simplebook = sb; bool old_ins = m_isInside; m_isInside = true; CreateChildren(m_simplebook, true/*only this handler*/); m_isInside = old_ins; m_simplebook = old_par; return sb; }}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:58,
示例8: GetParamNodewxObject *wxCollapsiblePaneXmlHandler::DoCreateResource(){ if (m_class == wxT("panewindow")) // read the XRC for the pane window { wxXmlNode *n = GetParamNode(wxT("object")); if ( !n ) n = GetParamNode(wxT("object_ref")); if (n) { bool old_ins = m_isInside; m_isInside = false; wxObject *item = CreateResFromNode(n, m_collpane->GetPane(), NULL); m_isInside = old_ins; return item; } else { ReportError("no control within panewindow"); return NULL; } } else { XRC_MAKE_INSTANCE(ctrl, wxCollapsiblePane) wxString label = GetText(wxT("label")); if (label.empty()) { ReportParamError("label", "label cannot be empty"); return NULL; } ctrl->Create(m_parentAsWindow, GetID(), label, GetPosition(), GetSize(), GetStyle(wxT("style"), wxCP_DEFAULT_STYLE), wxDefaultValidator, GetName()); ctrl->Collapse(GetBool(wxT("collapsed"))); SetupWindow(ctrl); wxCollapsiblePane *old_par = m_collpane; m_collpane = ctrl; bool old_ins = m_isInside; m_isInside = true; CreateChildren(m_collpane, true/*only this handler*/); m_isInside = old_ins; m_collpane = old_par; return ctrl; }}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:57,
示例9: CreateChildrenvoid CDialog::InitChildren(){ if (!m_bChildrenInited) { m_bChildrenInited = true; CreateChildren(); }}
开发者ID:Elemental239,项目名称:OpenGL_Study,代码行数:9,
示例10: CreateChildrenBOOL RichEditObj::InitFromXml(pugi::xml_node xmlNode){ if (xmlNode) { SObject::InitFromXml(xmlNode); CreateChildren(xmlNode); } return TRUE;}
开发者ID:435420057,项目名称:soui,代码行数:10,
示例11: CreateChildrenHWND CStatusControl::Create(HWND hParent) { CWindowImpl<CStatusControl>::Create(hParent, 0, 0, WS_VISIBLE | WS_CHILD ); CreateChildren(); PopulateCombo(); PopulateSpeed(); LayoutChildrenInitial(); return m_hWnd;}
开发者ID:dbarnett,项目名称:dasher,代码行数:12,
示例12: wxMenuBarwxObject *wxMenuBarXmlHandler::DoCreateResource(){ wxMenuBar *menubar = new wxMenuBar(GetStyle()); CreateChildren(menubar); if (m_parentAsWindow) { wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); if (parentFrame) parentFrame->SetMenuBar(menubar); } return menubar;}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:14,
示例13: XRC_MAKE_INSTANCEwxObject *wxPanelXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(panel, wxPanel) panel->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxT("style"), wxTAB_TRAVERSAL), GetName()); SetupWindow(panel); CreateChildren(panel); return panel;}
开发者ID:chromylei,项目名称:third_party,代码行数:15,
示例14: XRC_MAKE_INSTANCEwxObject *wxScrolledWindowXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(control, wxScrolledWindow) control->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxT("style"), wxHSCROLL | wxVSCROLL), GetName()); SetupWindow(control); CreateChildren(control); return control;}
开发者ID:hgwells,项目名称:tive,代码行数:15,
示例15: wxASSERTwxObject *wxStdDialogButtonSizerXmlHandler::DoCreateResource(){ if (m_class == wxT("wxStdDialogButtonSizer")) { wxASSERT( !m_parentSizer ); wxSizer *s = m_parentSizer = new wxStdDialogButtonSizer; m_isInside = true; CreateChildren(m_parent, true/*only this handler*/); m_parentSizer->Realize(); m_isInside = false; m_parentSizer = NULL; return s; } else // m_class == "button" { wxASSERT( m_parentSizer ); // find the item to be managed by this sizeritem wxXmlNode *n = GetParamNode(wxT("object")); if ( !n ) n = GetParamNode(wxT("object_ref")); // did we find one? if (n) { wxObject *item = CreateResFromNode(n, m_parent, NULL); wxButton *button = wxDynamicCast(item, wxButton); if (button) m_parentSizer->AddButton(button); else ReportError(n, "expected wxButton"); return item; } else /*n == NULL*/ { ReportError("no button within wxStdDialogButtonSizer"); return NULL; } }}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:47,
示例16: GetParamNodewxObject* MyWxSimplebookXmlHandler::DoCreateResource(){ if(m_class == wxT("simplebookpage")) { wxXmlNode* n = GetParamNode(wxT("object")); if(!n) n = GetParamNode(wxT("object_ref")); if(n) { bool old_ins = m_isInside; m_isInside = false; wxObject* item = CreateResFromNode(n, m_notebook, NULL); m_isInside = old_ins; wxWindow* wnd = wxDynamicCast(item, wxWindow); if(wnd) { m_notebook->AddPage(wnd, GetText(wxT("label")), GetBool(wxT("selected")), wxNOT_FOUND); } else wxLogError(wxT("Error in resource.")); return wnd; } else { wxLogError(wxT("Error in resource: no control within notebook's <page> tag.")); return NULL; } } else { wxSimplebook* nb = new wxSimplebook(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxT("style"))); wxString showEffect = GetText("effect", false); nb->SetEffect(wxCrafter::ShowEffectFromString(showEffect)); nb->SetName(GetName()); SetupWindow(nb); wxSimplebook* old_par = m_notebook; m_notebook = nb; bool old_ins = m_isInside; m_isInside = true; CreateChildren(m_notebook, true /*only this handler*/); m_isInside = old_ins; m_notebook = old_par; return nb; }}
开发者ID:eranif,项目名称:codelite,代码行数:45,
示例17: MaxMenuBarwxObject * MaxMenuBarXmlHandler::DoCreateResource(){ MaxMenuBar *menubar = new MaxMenuBar(GetStyle()); menubar->MaxBind(CB_PREF(wx_wxmenubar_wxMenuBar__xrcNew)(menubar)); CreateChildren(menubar); if (m_parentAsWindow) { wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); if (parentFrame) parentFrame->SetMenuBar(menubar); } return menubar;}
开发者ID:maxmods,项目名称:wx.mod,代码行数:19,
示例18: datasetCoverTree<MetricType, StatisticType, MatType, RootPointPolicy>::CoverTree( const MatType& dataset, const ElemType base, const size_t pointIndex, const int scale, CoverTree* parent, const ElemType parentDistance, arma::Col<size_t>& indices, arma::vec& distances, size_t nearSetSize, size_t& farSetSize, size_t& usedSetSize, MetricType& metric) : dataset(&dataset), point(pointIndex), scale(scale), base(base), numDescendants(0), parent(parent), parentDistance(parentDistance), furthestDescendantDistance(0), localMetric(false), localDataset(false), metric(&metric), distanceComps(0){ // If the size of the near set is 0, this is a leaf. if (nearSetSize == 0) { this->scale = INT_MIN; numDescendants = 1; stat = StatisticType(*this); return; } // Otherwise, create the children. CreateChildren(indices, distances, nearSetSize, farSetSize, usedSetSize); // Initialize statistic. stat = StatisticType(*this);}
开发者ID:dasayan05,项目名称:mlpack,代码行数:41,
示例19: XRC_MAKE_INSTANCEwxObject *wxScrollBarXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(control, wxScrollBar) control->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(), wxDefaultValidator, GetName()); control->SetScrollbar(GetLong( wxT("value"), 0), GetLong( wxT("thumbsize"),1), GetLong( wxT("range"), 10), GetLong( wxT("pagesize"),1)); SetupWindow(control); CreateChildren(control); return control;}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:21,
示例20: XRC_MAKE_INSTANCEwxObject *wxScrolledWindowXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(control, wxScrolledWindow) control->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxT("style"), wxHSCROLL | wxVSCROLL), GetName()); SetupWindow(control); CreateChildren(control); if ( HasParam(wxT("scrollrate")) ) { wxSize rate = GetSize(wxT("scrollrate")); control->SetScrollRate(rate.x, rate.y); } return control;}
开发者ID:chromylei,项目名称:third_party,代码行数:21,
示例21: XRC_MAKE_INSTANCEwxObject *wxWizardXmlHandler::DoCreateResource(){ if (m_class == wxT("wxWizard")) { XRC_MAKE_INSTANCE(wiz, wxWizard) long style = GetStyle(wxT("exstyle"), 0); if (style != 0) wiz->SetExtraStyle(style); wiz->Create(m_parentAsWindow, GetID(), GetText(wxT("title")), GetBitmap(), GetPosition()); wxWizard *old = m_wizard; m_wizard = wiz; m_lastSimplePage = NULL; CreateChildren(wiz, true /*this handler only*/); m_wizard = old; return wiz; }
开发者ID:hgwells,项目名称:tive,代码行数:22,
示例22: XRC_MAKE_INSTANCEwxObject* MYwxTreebookXmlHandler::DoCreateResource(){ if(m_class == wxT("wxTreebook")) { XRC_MAKE_INSTANCE(tbk, wxTreebook) tbk->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxT("style")), GetName()); wxTreebook* old_par = m_tbk; m_tbk = tbk; bool old_ins = m_isInside; m_isInside = true; wxArrayTbkPageIndexes old_treeContext = m_treeContext; m_treeContext.Clear(); CreateChildren(m_tbk, true /*only this handler*/); wxXmlNode* node = GetParamNode(wxT("object")); int pageIndex = 0; for(unsigned int i = 0; i < m_tbk->GetPageCount(); i++) { if(m_tbk->GetPage(i)) { wxXmlNode* child = node->GetChildren(); while(child) { if(child->GetName() == wxT("expanded") && child->GetNodeContent() == wxT("1")) m_tbk->ExpandNode(pageIndex, true); child = child->GetNext(); } pageIndex++; } } m_treeContext = old_treeContext; m_isInside = old_ins; m_tbk = old_par; return tbk; } // else ( m_class == wxT("treebookpage") ) wxXmlNode* n = GetParamNode(wxT("object")); wxWindow* wnd = NULL; if(!n) n = GetParamNode(wxT("object_ref")); if(n) { bool old_ins = m_isInside; m_isInside = false; wxObject* item = CreateResFromNode(n, m_tbk, NULL); m_isInside = old_ins; wnd = wxDynamicCast(item, wxWindow); } size_t depth = GetLong(wxT("depth")); if(depth <= m_treeContext.GetCount()) { // first prepare the icon int imgIndex = wxNOT_FOUND; if(HasParam(wxT("bitmap"))) { wxBitmap bmp = GetBitmap(wxT("bitmap"), wxART_OTHER); wxImageList* imgList = m_tbk->GetImageList(); if(imgList == NULL) { imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight()); m_tbk->AssignImageList(imgList); } imgIndex = imgList->Add(bmp); } else if(HasParam(wxT("image"))) { if(m_tbk->GetImageList()) { imgIndex = GetLong(wxT("image")); } else // image without image list? { } } // then add the page to the corresponding parent if(depth < m_treeContext.GetCount()) m_treeContext.RemoveAt(depth, m_treeContext.GetCount() - depth); if(depth == 0) { m_tbk->AddPage(wnd, GetText(wxT("label")), GetBool(wxT("selected")), imgIndex); } else { m_tbk->InsertSubPage(m_treeContext.Item(depth - 1), wnd, GetText(wxT("label")), GetBool(wxT("selected")), imgIndex); } m_treeContext.Add(m_tbk->GetPageCount() - 1); } else { // ReportParamError("depth", "invalid depth"); } return wnd;}
开发者ID:eranif,项目名称:codelite,代码行数:92,
注:本文中的CreateChildren函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CreateCompatibleBitmap函数代码示例 C++ CreateButtonSizer函数代码示例 |