Exemplo n.º 1
0
static BColumn* col_named(const char* name, BColumnListView* table)
{
	BColumn*	col;
	for (int32 k = 0; (col = table->ColumnAt(k)); k++) {
		BString		colName;
		col->GetColumnName( &colName );
		if (strcmp( name, colName.String() ) == 0) return col;
	}
	return NULL;
}
Exemplo n.º 2
0
static BColumn* column_named(const char* name, BColumnListView* fromTable)
{
	if (!fromTable) return NULL;
	BColumn*		col;
	for (uint32 k = 0; (col = fromTable->ColumnAt(k)); k++) {
		BString		n;
		col->GetColumnName(&n);
		if (strcmp( n.String(), name ) == 0) return col;
	}
	return NULL;
}
Exemplo n.º 3
0
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;
}