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


C++ ProjectItem::GetType方法代码示例

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


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

示例1: Refresh

void ScoreErrorsDlg::Refresh()
{
	itmSel.ResetContent();

	ProjectItem *pi = prjTree->FirstChild(theProject->nlInfo);
	while (pi)
	{
		if (pi->GetType() == PRJNODE_NOTEFILE)
		{
			int ndx = itmSel.AddString(pi->GetName());
			itmSel.SetItemDataPtr(ndx, (void*)pi);
		}
		pi = prjTree->NextSibling(pi);
	}
	itmSel.SetCurSel(0);
	ShowErrors();
}
开发者ID:travisgoodspeed,项目名称:basicsynth,代码行数:17,代码来源:ScoreErrorsDlg.cpp

示例2: Save

int InstrList::Save(XmlSynthElem *node)
{
	XmlSynthElem *child = node->AddChild("instrlib");

	ProjectItem *pi = prjTree->FirstChild(this);
	while (pi)
	{
		if (pi->GetType() == PRJNODE_INSTR)
		{
			XmlSynthElem *instr = child->AddChild("instr");
			InstrItem *ii = (InstrItem *) pi;
			ii->Save(instr);
			delete instr;
		}
		pi = prjTree->NextSibling(pi);
	}
	delete child;
	return 0;
}
开发者ID:travisgoodspeed,项目名称:basicsynth,代码行数:19,代码来源:InstrItem.cpp

示例3: OnInitDialog

void WavetableSelectDlg::OnInitDialog(wxInitDialogEvent& evt)
{
	CenterOnParent();
	wxWindow *frm = FindWindow("IDC_WT_GRAPH");
	if (!frm)
		return;
	wxPoint pos = frm->GetPosition();
	wxSize  siz = frm->GetSize();
	frm->Destroy();

	plotter = new WavetableDraw(this, 99, pos, siz);
	plotter->index = initSelect;

	lst = (wxListBox*)FindWindow("IDC_WT_LIST");
	lst->Append("Sin", (void*)0);
	lst->Append("Sawtooth (sum)", (void*)1);
	lst->Append("Square (sum)", (void*)2);
	lst->Append("Triangle (sum)", (void*)3);
	lst->Append("Pulse (sum)", (void*)4);
	lst->Append("Sawtooth (direct)", (void*)5);
	lst->Append("Square (direct)", (void*)6);
	lst->Append("Triangle (direct)", (void*)7);
	lst->Append("Sawtooth (positive)", (void*)8);
	lst->Append("Triangle (positive)", (void*)9);

	int selected = initSelect;
	ProjectItem *pi = prjTree->FirstChild(theProject->synthInfo);
	while (pi)
	{
		if (pi->GetType() == PRJNODE_WVTABLE)
		{
			WavetableItem *wi = (WavetableItem*)pi;
			int index = lst->Append(wi->GetName(), (void*)(long)wi->GetID());
			if (wi->GetID() == initSelect)
				selected = index;
		}
		pi = prjTree->NextSibling(pi);
	}
	if ((unsigned int)selected < lst->GetCount())
		lst->SetSelection(selected);
}
开发者ID:travisgoodspeed,项目名称:basicsynth,代码行数:41,代码来源:WavetableSelectDlg.cpp

示例4: NextInum

int InstrList::NextInum()
{
	int inum = 1;
	InstrConfig *ic = 0;
	ProjectItem *pi = prjTree->FirstChild(theProject->instrInfo);
	while (pi)
	{
		if (pi->GetType() == PRJNODE_INSTR)
		{
			InstrItem *ii = (InstrItem *) pi;
			ic = ii->GetConfig();
			if (ic && ic->inum < 16384 && ic->inum >= inum)
				inum = ic->inum+1;
		}
		pi = prjTree->NextSibling(pi);
	}
	// check against library values...
	while ((ic = theProject->mgr.FindInstr(inum)) != 0)
		inum++;
	return inum;
}
开发者ID:travisgoodspeed,项目名称:basicsynth,代码行数:21,代码来源:InstrItem.cpp


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