當前位置: 首頁>>代碼示例>>C++>>正文


C++ CreateChildren函數代碼示例

本文整理匯總了C++中CreateChildren函數的典型用法代碼示例。如果您正苦於以下問題:C++ CreateChildren函數的具體用法?C++ CreateChildren怎麽用?C++ CreateChildren使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CreateChildren函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: m_hypo

ChartTrellisNode::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,代碼來源:ChartTrellisNode.cpp

示例2: ASSERT

BOOL 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,代碼來源:OXNetBrowseTree.cpp

示例3: XRC_MAKE_INSTANCE

wxObject* 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,代碼來源:xh_ribbon.cpp

示例4: CreateFrame

wxObject * 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,代碼來源:glue.cpp

示例5: XRC_MAKE_INSTANCE

wxObject *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,代碼來源:eljrc.cpp

示例6: XRC_MAKE_INSTANCE

wxObject * 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,代碼來源:glue.cpp

示例7: GetParamNode

wxObject *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,代碼來源:xh_simplebook.cpp

示例8: GetParamNode

wxObject *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,代碼來源:xh_collpane.cpp

示例9: CreateChildren

void CDialog::InitChildren()
{
	if (!m_bChildrenInited)
	{
		m_bChildrenInited = true;

		CreateChildren();
	}
}
開發者ID:Elemental239,項目名稱:OpenGL_Study,代碼行數:9,代碼來源:Dialog.cpp

示例10: CreateChildren

BOOL RichEditObj::InitFromXml(pugi::xml_node xmlNode)
{
    if (xmlNode)
    {
        SObject::InitFromXml(xmlNode);
        CreateChildren(xmlNode);
    }

    return TRUE;
}
開發者ID:435420057,項目名稱:soui,代碼行數:10,代碼來源:RichEditObj.cpp

示例11: CreateChildren

HWND 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,代碼來源:StatusControl.cpp

示例12: wxMenuBar

wxObject *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,代碼來源:xh_menu.cpp

示例13: XRC_MAKE_INSTANCE

wxObject *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,代碼來源:xh_panel.cpp

示例14: XRC_MAKE_INSTANCE

wxObject *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,代碼來源:xh_scwin.cpp

示例15: wxASSERT

wxObject *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,代碼來源:xh_sizer.cpp


注:本文中的CreateChildren函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。