本文整理汇总了C++中BListView::SortItems方法的典型用法代码示例。如果您正苦于以下问题:C++ BListView::SortItems方法的具体用法?C++ BListView::SortItems怎么用?C++ BListView::SortItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BListView
的用法示例。
在下文中一共展示了BListView::SortItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitWindow
//.........这里部分代码省略.........
B_IRQ_RESOURCE);
for (int32 k=0;k<num;k++) {
get_nth_resource_descriptor_of_type(current, k, B_IRQ_RESOURCE,
&r, sizeof(resource_descriptor));
if (mask & r.d.m.mask) {
IRQListView->AddItem(new IRQDMAItem(first ? i : -1,
deviceInfo->GetCardName()));
first = false;
}
}
}
if (first) {
IRQListView->AddItem(new IRQDMAItem(i, ""));
}
}
}
{
uint32 mask = 1;
for (int i=0;i<8;mask<<=1,i++) {
bool first = true;
for (int32 j=0; j<list.CountItems(); j++) {
DevicesInfo *deviceInfo = (DevicesInfo *)list.ItemAt(j);
struct device_configuration *current = deviceInfo->GetCurrent();
resource_descriptor r;
int32 num = count_resource_descriptors_of_type(current,
B_DMA_RESOURCE);
for (int32 k=0;k<num;k++) {
get_nth_resource_descriptor_of_type(current, k,
B_DMA_RESOURCE, &r, sizeof(resource_descriptor));
if (mask & r.d.m.mask) {
DMAListView->AddItem(new IRQDMAItem(first ? i : -1,
deviceInfo->GetCardName()));
first = false;
}
}
}
if (first) {
DMAListView->AddItem(new IRQDMAItem(i, ""));
}
}
}
{
for (int32 j=0; j<list.CountItems(); j++) {
DevicesInfo *deviceInfo = (DevicesInfo *)list.ItemAt(j);
struct device_configuration *current = deviceInfo->GetCurrent();
resource_descriptor r;
int32 num = count_resource_descriptors_of_type(current,
B_IO_PORT_RESOURCE);
for (int32 k=0;k<num;k++) {
get_nth_resource_descriptor_of_type(current, k,
B_IO_PORT_RESOURCE, &r, sizeof(resource_descriptor));
IORangeListView->AddItem(new RangeItem(r.d.r.minbase,
r.d.r.minbase + r.d.r.len - 1, deviceInfo->GetCardName()));
}
}
IORangeListView->SortItems(&RangeItem::Compare);
}
{
for (int32 j=0; j<list.CountItems(); j++) {
DevicesInfo *deviceInfo = (DevicesInfo *)list.ItemAt(j);
struct device_configuration *current = deviceInfo->GetCurrent();
resource_descriptor r;
int32 num = count_resource_descriptors_of_type(current,
B_MEMORY_RESOURCE);
for (int32 k=0;k<num;k++) {
get_nth_resource_descriptor_of_type(current, k, B_MEMORY_RESOURCE,
&r, sizeof(resource_descriptor));
memoryListView->AddItem(new RangeItem(r.d.r.minbase,
r.d.r.minbase + r.d.r.len - 1, deviceInfo->GetCardName()));
}
}
memoryListView->SortItems(&RangeItem::Compare);
}
BBox *background = new BBox(Bounds(), "background");
background->SetBorder(B_NO_BORDER);
AddChild(background);
background->AddChild(tabView);
}