本文整理汇总了C++中ListItem::Type方法的典型用法代码示例。如果您正苦于以下问题:C++ ListItem::Type方法的具体用法?C++ ListItem::Type怎么用?C++ ListItem::Type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListItem
的用法示例。
在下文中一共展示了ListItem::Type方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ClipDragOver
//---------------------------------------------------------------------------
// clip Drag'n'Drop
// clip Mouse
//.
//---------------------------------------------------------------------------
void __fastcall TClipMaker::ClipDragOver(TObject *Sender,
TObject *Source, int X, int Y, TDragState State, bool &Accept)
{
Accept = false;
TElTreeDragObject* obj = dynamic_cast<TElTreeDragObject*>(Source);
if (obj){
TMxPanel* A = dynamic_cast<TMxPanel*>(Sender);
if (A==paClips){
TElTree* tv = dynamic_cast<TElTree*>(obj->Control);
if (tv->SelectedCount){
for (TElTreeItem* item = tv->GetNextSelected(0); item; item = tv->GetNextSelected(item)){
ListItem* prop = (ListItem*)item->Tag;
if (prop&&(prop->Type()==emMotion)){
Accept = true;
}
}
}
}
}else{
Accept = (Sender==paClips);
}
}
示例2: OnParticleItemFocused
void CParticleTools::OnParticleItemFocused(ListItemsVec& items)
{
PropItemVec props;
m_EditMode = emEffect;
ButtonValue* B;
B=PHelper().CreateButton (props,"Transform\\Edit", "Reset", ButtonValue::flFirstOnly);
B->OnBtnClickEvent.bind (this,&CParticleTools::OnControlClick);
PHelper().CreateFlag32 (props,"Transform\\Type", &m_Flags, flSetXFORM,"Update","Set");
// reset to default
ResetCurrent ();
if (!items.empty()){
for (ListItemsIt it=items.begin(); it!=items.end(); it++){
ListItem* item = *it;
if (item){
m_EditMode = EEditMode(item->Type());
switch(m_EditMode){
case emEffect:{
PS::CPEDef* def = ((PS::CPEDef*)item->m_Object);
SetCurrentPE (def);
def->FillProp (EFFECT_PREFIX,props,item);
}break;
case emGroup:{
PS::CPGDef* def = ((PS::CPGDef*)item->m_Object);
SetCurrentPG (def);
def->FillProp (GROUP_PREFIX,props,item);
}break;
default: THROW;
}
}
}
}
m_ItemProps->AssignItems(props);
UI->RedrawScene();
}