您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetDocument函数代码示例

51自学网 2021-06-01 21:06:49
  C++
这篇教程C++ GetDocument函数代码示例写得很实用,希望能帮到您。

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

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

示例1: WXUNUSED

/// Edit a custom propertyvoid ctConfigToolView::OnEditCustomProperty(wxCommandEvent& WXUNUSED(event)){    ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();    ctConfigItem* sel = GetSelection();    ctPropertyEditor* editor = wxGetApp().GetMainFrame()->GetPropertyEditor();    if (doc && sel && editor)    {        int row;        ctProperty* property = editor->FindSelectedProperty(row) ;        if (property && property->IsCustom())        {            wxString oldName = property->GetName();            wxString oldDescription = property->GetDescription();            wxString oldType = property->GetVariant().GetType();            wxString oldEditorType = property->GetEditorType();            wxArrayString oldChoices = property->GetChoices();            ctCustomPropertyDialog dialog(wxGetApp().GetMainFrame(),                wxID_ANY, _("Edit custom property"));            dialog.SetPropertyName(oldName);            dialog.SetPropertyType(oldType);            dialog.SetPropertyDescription(oldDescription);            if (dialog.ShowModal() == wxID_OK)            {                wxString name = dialog.GetPropertyName();                wxString type = dialog.GetPropertyType();                wxString editorType = dialog.GetEditorType();                wxArrayString choices = dialog.GetChoices();                wxString descr = dialog.GetPropertyDescription();                if (name != oldName && sel->GetProperties().FindProperty(name))                {                    wxMessageBox(_("Sorry, this name already exists."), _T("Add custom property"),                        wxOK|wxICON_INFORMATION);                    return;                }                if (type != oldType)                {                    if (type == wxT("bool"))                        property->GetVariant() = wxVariant(false, name);                    else if (type == wxT("double"))                        property->GetVariant() = wxVariant((double) 0.0, name);                    else if (type == wxT("long"))                        property->GetVariant() = wxVariant((long) 0, name);                    else                        property->GetVariant() = wxVariant(wxEmptyString, name);                }                if (name != oldName)                    property->GetVariant().SetName(name);                if (choices != oldChoices)                    property->SetChoices(choices);                if (editorType != oldEditorType)                    property->SetEditorType(editorType);                if (name != oldName)                    property->GetVariant().SetName(name);                property->SetCustom(true);                if (descr != oldDescription)                    property->SetDescription(descr);                editor->ShowItem(sel);                OnChangeFilename();            }        }    }}
开发者ID:gitrider,项目名称:wxsj2,代码行数:71,


示例2: SkipWhiteSpace

TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ){	TiXmlNode* returnNode = 0;	p = SkipWhiteSpace( p, encoding );	if( !p || !*p || *p != '<' )	{		return 0;	}	TiXmlDocument* doc = GetDocument();	p = SkipWhiteSpace( p, encoding );	if ( !p || !*p )	{		return 0;	}	// What is this thing? 	// - Elements start with a letter or underscore, but xml is reserved.	// - Comments: <!--	// - Decleration: <?xml	// - Everthing else is unknown to tinyxml.	//	const char* xmlHeader = { "<?xml" };	const char* commentHeader = { "<!--" };	const char* dtdHeader = { "<!" };	if ( StringEqual( p, xmlHeader, true, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Declaration/n" );		#endif		returnNode = new TiXmlDeclaration();	}	else if ( StringEqual( p, commentHeader, false, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Comment/n" );		#endif		returnNode = new TiXmlComment();	}	else if ( StringEqual( p, dtdHeader, false, encoding ) )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Unknown(1)/n" );		#endif		returnNode = new TiXmlUnknown();	}	else if (    IsAlpha( *(p+1), encoding )			  || *(p+1) == '_' )	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Element/n" );		#endif		returnNode = new TiXmlElement( "" );	}	else	{		#ifdef DEBUG_PARSER			TIXML_LOG( "XML parsing Unknown(2)/n" );		#endif		returnNode = new TiXmlUnknown();	}	if ( returnNode )	{		// Set the parent, so it can report errors		returnNode->parent = this;	}	else	{		if ( doc )			doc->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );	}	return returnNode;}
开发者ID:bsmr-worldforge,项目名称:libwfut,代码行数:78,


万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。