本文整理汇总了C++中BColumn::IsVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ BColumn::IsVisible方法的具体用法?C++ BColumn::IsVisible怎么用?C++ BColumn::IsVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BColumn
的用法示例。
在下文中一共展示了BColumn::IsVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToggleColumn
void SeqStudioWindow::ToggleColumn(const char* name)
{
BColumnListView* table = dynamic_cast<BColumnListView*>( FindView(ENDPOINT_LIST_STR) );
if (!table) return;
BColumn* col = column_named(name, table);
if (!col) return;
if (col->IsVisible() ) col->SetVisible(false);
else col->SetVisible(true);
}
示例2: MenusBeginning
void SeqManageRosterWindow::MenusBeginning()
{
inherited::MenusBeginning();
BMenuBar* bar = KeyMenuBar();
if (!bar) return;
BColumnListView* table = dynamic_cast<BColumnListView*>( FindView(TABLE_STR) );
if (!table) return;
BMenu* menu;
BMenuItem* item;
// Entry menu
bool canEdit = false, canDuplicate = false;
BString key, filePath;
bool readOnly;
if (GetSelectionInfo(key, filePath, &readOnly) == B_OK) {
canEdit = !readOnly;
canDuplicate = true;
}
if ( (menu = bar->SubmenuAt(ENTRY_MENU_INDEX)) != NULL) {
if ( (item = menu->FindItem(EDIT_ENTRY_MSG)) != NULL) item->SetEnabled(canEdit);
if ( (item = menu->FindItem(DUPLICATE_ENTRY_MSG)) != NULL) item->SetEnabled(canDuplicate);
if ( (item = menu->FindItem(DELETE_ENTRY_MSG)) != NULL) item->SetEnabled(canEdit);
}
// Attributes menu
if ( (menu = bar->SubmenuAt(ATTRIBUTES_MENU_INDEX)) != NULL) {
for (int32 k = 0; (item = menu->ItemAt(k)) != NULL; k++) {
const char* n;
if (item->Message() && item->Message()->FindString(COLUMN_NAME_STR, &n) == B_OK) {
BColumn* col = column_named(n, table);
if (col && col->IsVisible() ) {
if (!item->IsMarked() ) item->SetMarked(true);
} else {
if (item->IsMarked() ) item->SetMarked(false);
}
}
}
}
}
示例3: MenusBeginning
void SeqStudioWindow::MenusBeginning()
{
inherited::MenusBeginning();
BMenuBar* bar = KeyMenuBar();
if (!bar) return;
BColumnListView* table = dynamic_cast<BColumnListView*>( FindView(ENDPOINT_LIST_STR) );
if (!table) return;
if (mDeviceCtrl && mDeviceCtrl->Menu() ) add_device_menu_items(mDeviceCtrl->Menu() );
// MIDI Port menu
if (mPortMenu) {
bool deleteEnabled = false;
_EndpointRow* r = dynamic_cast<_EndpointRow*>(table->CurrentSelection() );
if (r && !r->mIsValid && r->mEndpoint.channel < 0) deleteEnabled = true;
BMenuItem* deleteItem = mPortMenu->FindItem(DELETE_STR);
if (deleteItem && deleteItem->IsEnabled() != deleteEnabled) deleteItem->SetEnabled(deleteEnabled);
}
// Attributes menu
BMenu* menu;
BMenuItem* item;
if ( (menu = bar->SubmenuAt(ATTRIBUTES_MENU_INDEX)) != NULL) {
for (int32 k = 0; (item = menu->ItemAt(k)) != NULL; k++) {
const char* n;
if (item->Message() && item->Message()->FindString(COLUMN_NAME_STR, &n) == B_OK) {
BColumn* col = column_named(n, table);
if (col && col->IsVisible() ) {
if (!item->IsMarked() ) item->SetMarked(true);
} else {
if (item->IsMarked() ) item->SetMarked(false);
}
}
}
}
}
示例4: GetConfiguration
status_t SeqManageRosterWindow::GetConfiguration(BMessage* config)
{
ArpASSERT(config);
config->what = ConfigWhat();
status_t err = GetDimensions(config, this);
if (err != B_OK) return err;
/* Add the columns
*/
BColumnListView* table = dynamic_cast<BColumnListView*>( FindView(TABLE_STR) );
if (table) {
BColumn* col;
for( int32 k = 0; (col = table->ColumnAt(k)); k++ ) {
BMessage colMsg;
BString colName;
col->GetColumnName(&colName);
if( colMsg.AddString("name", colName.String() ) == B_OK
&& colMsg.AddFloat("width", col->Width() ) == B_OK
&& colMsg.AddBool("visible", col->IsVisible() ) == B_OK ) {
config->AddMessage("column", &colMsg);
}
}
}
return B_OK;
}