本文整理汇总了C++中BListView::SetInvocationMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ BListView::SetInvocationMessage方法的具体用法?C++ BListView::SetInvocationMessage怎么用?C++ BListView::SetInvocationMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BListView
的用法示例。
在下文中一共展示了BListView::SetInvocationMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InsertNewList
void NavigatorEditor::InsertNewList(BListView *source)
{
TRACE();
int32 selection = -1;
BaseListItem *item = NULL;
selection = source->CurrentSelection(0);
if (selection>=0)
{
item =(BaseListItem *) source->ItemAt(selection);
//vorher alle überfüssigen Views löschen
BView *sibling=source->Parent()->NextSibling();
while (sibling != NULL)
{
RemoveChild(sibling);
sibling=source->Parent()->NextSibling();
}
if (item->GetSupportedType() == P_C_CLASS_TYPE)
{
BRect listrect = Bounds();
listrect.left = source->Parent()->Frame().right+5;
listrect.right = listrect.left +400;
if (listrect.right > Bounds().right)
{
ResizeTo(listrect.right+B_V_SCROLL_BAR_WIDTH+5,Bounds().bottom);
}
BListView *list = new MessageListView(doc,listrect,((NodeItem *)item)->GetNode());
BMessage *invoked = new BMessage(N_A_INVOKATION);
invoked->AddPointer("ListView",list);
list->SetInvocationMessage(invoked);
list->SetTarget(this);
AddChild(new BScrollView("root",list,B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM,0,false,true));
}
Invalidate();
}
}
示例2: str
status_t
PListView::SetProperty(const char *name, PValue *value, const int32 &index)
{
if (!name || !value)
return B_ERROR;
BString str(name);
PProperty *prop = FindProperty(name,index);
if (!prop)
return B_NAME_NOT_FOUND;
if (FlagsForProperty(prop) & PROPERTY_READ_ONLY)
return B_READ_ONLY;
BListView *backend = (BListView*)fView;
BoolValue boolval;
CharValue charval;
ColorValue colorval;
FloatValue floatval;
IntValue intval;
PointValue pointval;
RectValue rectval;
StringValue stringval;
status_t status = prop->SetValue(value);
if (status != B_OK)
return status;
if (backend->Window())
backend->Window()->Lock();
else if (str.ICompare("SelectionMessage") == 0)
{
BMessage selMsg(*intval.value);
backend->SetSelectionMessage(&selMsg);
}
else if (str.ICompare("InvocationMessage") == 0)
{
BMessage invMsg(*intval.value);
backend->SetInvocationMessage(&invMsg);
}
else if (str.ICompare("SelectionType") == 0)
{
prop->GetValue(&intval);
backend->SetListType((list_view_type)*intval.value);
}
else
{
if (backend->Window())
backend->Window()->Unlock();
return PView::SetProperty(name, value, index);
}
if (backend->Window())
backend->Window()->Unlock();
return prop->GetValue(value);
}