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


C++ ElementDocument::Hide方法代码示例

本文整理汇总了C++中rocket::core::ElementDocument::Hide方法的典型用法代码示例。如果您正苦于以下问题:C++ ElementDocument::Hide方法的具体用法?C++ ElementDocument::Hide怎么用?C++ ElementDocument::Hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rocket::core::ElementDocument的用法示例。


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

示例1: LoadDocument

IGUIDocument* GUISystem::LoadDocument(const char* file, const char* id)
{
	assert(m_pContext);

	// Check for an existing document with this ID
	Rocket::Core::ElementDocument* pExisting = m_pContext->GetDocument(id);
	
	Rocket::Core::ElementDocument* pED = m_pContext->LoadDocument(file);
	if (pED)
	{
		if (pExisting)
		{
			// Delete existing document now that new one has been successfully loaded
			pExisting->Hide();
			m_pContext->UnloadDocument(pExisting);
		}

		pED->SetId(id);
		return InstanceDocument(pED, true);
	}

	return NULL;
}
开发者ID:ABuus,项目名称:RuntimeCompiledCPlusPlus,代码行数:23,代码来源:GUISystem.cpp

示例2: Undefined

 Handle<Value> EDHide(const Arguments& args)
 {  
    Rocket::Core::ElementDocument* v = UnwrapElementDocument(args.This());
    v->Hide();   
    return Undefined();      
 }
开发者ID:flyskyosg,项目名称:dtentity,代码行数:6,代码来源:elementdocumentwrapper.cpp

示例3: Rocket_DocumentAction

void Rocket_DocumentAction(const char* name, const char* action) {
    if (!Q_stricmp(action, "show") || !Q_stricmp(action, "open")) {
        Rocket::Core::ElementDocument* document = menuContext->GetDocument(name);
        if (document) {
            document->Show();
        }
    } else if (!Q_stricmp("close", action)) {
        if (!*name) // If name is empty, hide active
        {
            if (menuContext->GetFocusElement() &&
                menuContext->GetFocusElement()->GetOwnerDocument()) {
                menuContext->GetFocusElement()->GetOwnerDocument()->Close();
            }

            return;
        }

        Rocket::Core::ElementDocument* document = menuContext->GetDocument(name);
        if (document) {
            document->Close();
        }
    } else if (!Q_stricmp("goto", action)) {
        Rocket::Core::ElementDocument* document = menuContext->GetDocument(name);
        if (document) {
            Rocket::Core::ElementDocument* owner =
                    menuContext->GetFocusElement()->GetOwnerDocument();
            if (owner) {
                owner->Close();
            }
            document->Show();
        }
    } else if (!Q_stricmp("load", action)) {
        Rocket_LoadDocument(name);
    } else if (!Q_stricmp("blur", action) || !Q_stricmp("hide", action)) {
        Rocket::Core::ElementDocument* document = nullptr;

        if (!*name) // If name is empty, hide active
        {
            if (menuContext->GetFocusElement() &&
                menuContext->GetFocusElement()->GetOwnerDocument()) {
                document = menuContext->GetFocusElement()->GetOwnerDocument();
            }
        } else {
            document = menuContext->GetDocument(name);
        }

        if (document) {
            document->Hide();
        }
    } else if (!Q_stricmp("blurall", action)) {
        for (int i = 0; i < menuContext->GetNumDocuments(); ++i) {
            menuContext->GetDocument(i)->Hide();
        }
    } else if (!Q_stricmp("reload", action)) {
        Rocket::Core::ElementDocument* document = nullptr;

        if (!*name) // If name is empty, hide active
        {
            if (menuContext->GetFocusElement() &&
                menuContext->GetFocusElement()->GetOwnerDocument()) {
                document = menuContext->GetFocusElement()->GetOwnerDocument();
            }
        } else {
            document = menuContext->GetDocument(name);
        }

        if (document) {
            Rocket::Core::String url = document->GetSourceURL();
            document->Close();
            document = menuContext->LoadDocument(url);
            document->Show();
        }
    }
}
开发者ID:Kangz,项目名称:Unvanquished,代码行数:74,代码来源:rocket_documents.cpp


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