当前位置: 首页>>代码示例>>C++>>正文


C++ BTab::SetLabel方法代码示例

本文整理汇总了C++中BTab::SetLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ BTab::SetLabel方法的具体用法?C++ BTab::SetLabel怎么用?C++ BTab::SetLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BTab的用法示例。


在下文中一共展示了BTab::SetLabel方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Init

void TVideoSettingsTabView::Init() 
{
	BMessage *theMessage = NULL;
		
	//
	// Create all the tab views
	//
			
	// Get VideoCompressionView from resource
	BTab *compressionTab = new BTab(); 	
	theMessage = GetWindowFromResource("VideoCompressionView");
	ASSERT(theMessage);
	m_CompressionView = new TVideoCompressionView(this, theMessage);
	AddTab(m_CompressionView, compressionTab); 
	compressionTab->SetLabel("Compression"); 
	
	// Get VideoImageView from resource
	BTab *imageTab = new BTab(); 	
	theMessage = GetWindowFromResource("VideoImageView");
	ASSERT(theMessage);		
	m_ImageView = new TVideoImageView(this, theMessage);
	AddTab(m_ImageView, imageTab); 
	imageTab->SetLabel("Image"); 
	
	// Get VideoImageSource from resource
	BTab *sourceTab = new BTab(); 	
	theMessage = GetWindowFromResource("VideoSourceView");
	ASSERT(theMessage);		
	m_SourceView = new TVideoSourceView(this, theMessage);
	AddTab(m_SourceView, sourceTab); 
	sourceTab->SetLabel("Source"); 
}
开发者ID:ModeenF,项目名称:UltraDV,代码行数:32,代码来源:TVideoSettingsTabView.cpp

示例2: InterfaceHardwareView

status_t
InterfaceWindow::_PopulateTabs()
{
	BRect frame = fTabView->Bounds();
	protocols* supportedFamilies = fNetworkSettings->ProtocolVersions();

	BTab* hardwareTab = new BTab;
	fTabHardwareView = new InterfaceHardwareView(frame,
		fNetworkSettings);
	fTabView->AddTab(fTabHardwareView, hardwareTab);
	hardwareTab->SetLabel(B_TRANSLATE("Interface"));

	for (int index = 0; index < MAX_PROTOCOLS; index++) {
		if (supportedFamilies[index].present) {
			int inet_id = supportedFamilies[index].inet_id;
			fTabIPView[inet_id] = new InterfaceAddressView(frame,
				inet_id, fNetworkSettings);
			BTab* tab = new BTab;
			fTabView->AddTab(fTabIPView[inet_id], tab);
			tab->SetLabel(supportedFamilies[index].name);
		}
	}

	return B_OK;
}
开发者ID:mylegacy,项目名称:haiku,代码行数:25,代码来源:InterfaceWindow.cpp

示例3: BView

InTextView::InTextView(BRect rect, char *name) 
		: BView(rect, name, B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_FRAME_EVENTS |B_SUBPIXEL_PRECISE)
{

	BRect r;
	BTabView *tabView;
	BTab *tab;
	TOCView *tocView;
	
	r = Bounds();
	//r.InsetBy(5,5);
	
	tabView = new BTabView(r, "tab_view");
	tabView->SetViewColor(216,216,216,0);
	
	r = tabView->Bounds();
	r.InsetBy(5,5);
	r.bottom -= tabView->TabHeight();
	tab = new BTab();
	tocView = new TOCView(r, "TOC_View");
	tabView->AddTab(tocView, tab);
	tab->SetLabel("Table of Contents");
	tab = new BTab();
	unitView = new UnitView(r,"Unit_View");
	tabView->AddTab(unitView, tab);
	tab->SetLabel("Lesson"); 
	
	
	AddChild(tabView);
	
}
开发者ID:BackupTheBerlios,项目名称:osim-svn,代码行数:31,代码来源:InTextView.cpp

示例4: BWindow

/*
 * BLSettingsWindow(BRect frame);
 *
 * The constructor of the window adds the child to the view chain
 */
BLSettingsWindow::BLSettingsWindow(BRect frame, BLSettings* bls)
: BWindow(frame, SETTINGS_TITLE_WINDOW, B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE), Settings(bls)
{
	/* Offset to windows coordinates*/
	frame.OffsetTo(B_ORIGIN);
	BTab* tab;

	/* Create the background box (grey) */
	Box = new BBox(frame, "Background", B_FOLLOW_ALL_SIDES, B_PLAIN_BORDER);
	AddChild(Box);
	
	/* Create our rect and inset it by 5 px */
	BRect r = Bounds();
	r.InsetBy(5, 5);

	/* Create a TabView, and set its color. Then add it to the Box's Hierachy */
	TabView = new BTabView(r, "tabview");
	TabView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
	Box->AddChild(TabView);

	/* Calc the size of the views and inset by 5 px*/
	r = TabView->Bounds();
	r.InsetBy(5, 5);
	r.bottom -= TabView->TabHeight();
	
	/* Create the users tab */
	tab = new BTab();
	UserView = new BLSettingsUserView(r, Settings);
	TabView->AddTab(UserView, tab);
	tab->SetLabel("Users");
	
	/* Create the Blocked tab */
	tab = new BTab();
	BlockedView = new BLSettingsBlockedView(r, Settings);
	TabView->AddTab(BlockedView, tab);
	tab->SetLabel("Blocked");

	/* Create the Runnable tab */
	tab = new BTab();
	RunnableView = new BLSettingsRunnableView(r, Settings);
	TabView->AddTab(RunnableView, tab);
	tab->SetLabel("Runnable");

	/* Select the first one (users) */
	TabView->Select(0);

	/* Add some shortcuts */
	AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
	AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
	AddShortcut('Q', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
}
开发者ID:HaikuArchives,项目名称:BeLogin,代码行数:56,代码来源:BLSettingsWindow.cpp

示例5: BMessage

void 
TTimeWindow::_InitWindow()
{
	SetPulseRate(500000);

	fDateTimeView = new DateTimeView(Bounds());
	
	BRect bounds = fDateTimeView->Bounds();
	fTimeZoneView = new TimeZoneView(bounds);

	fBaseView = new TTimeBaseView(bounds, "baseView");
	AddChild(fBaseView);
	
	fBaseView->StartWatchingAll(fDateTimeView);
	fBaseView->StartWatchingAll(fTimeZoneView);

	bounds.OffsetBy(10.0, 10.0);
	BTabView *tabView = new BTabView(bounds.InsetByCopy(-5.0, -5.0),
		"tabView" , B_WIDTH_AS_USUAL, B_FOLLOW_NONE);
	
	BTab *tab = new BTab();
	tabView->AddTab(fDateTimeView, tab);
	tab->SetLabel("Date & Time");

	tab = new BTab();
	tabView->AddTab(fTimeZoneView, tab);
	tab->SetLabel("Time zone");

	fBaseView->AddChild(tabView);
	tabView->ResizeBy(0.0, tabView->TabHeight());

	BRect rect = Bounds();

	rect.left = 10;
	rect.top = rect.bottom - 10;

	fRevertButton = new BButton(rect, "revert", "Revert",
		new BMessage(kMsgRevert), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM, B_WILL_DRAW);
	
	fRevertButton->ResizeToPreferred();
	fRevertButton->SetEnabled(false);
	float buttonHeight = fRevertButton->Bounds().Height();
	fRevertButton->MoveBy(0, -buttonHeight);
	fBaseView->AddChild(fRevertButton);
	fRevertButton->SetTarget(this);

	fBaseView->ResizeTo(tabView->Bounds().Width() + 10.0, 
		tabView->Bounds().Height() + buttonHeight + 30.0);

	ResizeTo(fBaseView->Bounds().Width(), fBaseView->Bounds().Height());
}
开发者ID:mariuz,项目名称:haiku,代码行数:51,代码来源:TimeWindow.cpp

示例6: haikuTabsSetTabTitleAttrib

static int haikuTabsSetTabTitleAttrib(Ihandle* ih, int pos, const char* value)
{
  if (value)
  {
    BTabView* tv = (BTabView*)ih->handle;
	BTab* tab = tv->TabAt(pos);
	tab->SetLabel(value);
  }
  
  return 1;
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:11,代码来源:iuphaiku_tabs.cpp

示例7: GeneralView

PrefletView::PrefletView(SettingsHost* host)
	:
	BTabView("pages")
{
	// Pages
	GeneralView* general = new GeneralView(host);
	DisplayView* display = new DisplayView(host);
	NotificationsView* apps = new NotificationsView(host);

	// Page selector
	BTab* tab = new BTab();
	AddTab(general, tab);
	tab->SetLabel(B_TRANSLATE("General"));

	tab = new BTab();
	AddTab(display, tab);
	tab->SetLabel(B_TRANSLATE("Display"));

	tab = new BTab();
	AddTab(apps, tab);
	tab->SetLabel(B_TRANSLATE("Notifications"));
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:22,代码来源:PrefletView.cpp

示例8: rect

BBox*
DocInfoWindow::_CreateTabPanel(BTabView* tabView, const char* label)
{
	BRect rect(tabView->Bounds().InsetByCopy(3.0, 15.0));
	rect.OffsetTo(B_ORIGIN);
	BBox* panel = new BBox(rect, "top_panel", B_FOLLOW_ALL,
		B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE_JUMP, B_NO_BORDER);

	BTab* tab = new BTab();
	tabView->AddTab(panel, tab);
	tab->SetLabel(label);

	return panel;
}
开发者ID:mariuz,项目名称:haiku,代码行数:14,代码来源:DocInfoWindow.cpp

示例9: BMessage

/*!	\brief		Init user interface regardless of the parameter of constructor.
 */
void		EventEditorMainWindow::InitUI() 
{
	ClearUI();
	
	MainView = new BView( BWindow::Bounds(),
								  "Event Editor Main View",
								  B_FOLLOW_ALL,
								  B_WILL_DRAW | B_FRAME_EVENTS );
	if ( MainView != NULL )
	{
		MainView->SetViewColor( ui_color(B_PANEL_BACKGROUND_COLOR ) );
		BWindow::AddChild( MainView );
	}
	else
	{
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}
	
	BGridLayout* layout = new BGridLayout( B_VERTICAL );
	if ( !layout ) {
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}
	MainView->SetLayout( layout );
	layout->SetInsets( 0, 0, 0, 5 );
	layout->SetSpacing( 0, 2 );
	
	menuBar = CreateMenuBar();
	layout->AddView( menuBar, 0, 0 );
	
	BTabView* tabView = new BTabView( Bounds().InsetBySelf( 5, 30 ),
												 "Tab view" );
	if ( !tabView ) {
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}
	BLayoutItem* layoutItem = layout->AddView( tabView, 0, 1 );
	if ( layoutItem ) {
		layoutItem->SetExplicitAlignment( BAlignment( B_ALIGN_USE_FULL_WIDTH, B_ALIGN_USE_FULL_HEIGHT ) );
	}
	
	BRect individualTab = tabView->Bounds();
	individualTab.bottom -= ( tabView->TabHeight() + 20 + menuBar->Bounds().Height() );
	
	// Enable firing the activity in any case
	fData.SetEventActivityFired( false );
	
	// General view
	genView = new EventEditor_GeneralView( individualTab, &fData );
	if ( !genView || genView->InitCheck() != B_OK ) {		
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}	
	BTab* tab = new BTab();	
	tabView->AddTab( genView, tab );
	tab->SetLabel( "General" );
	
	// Reminder view
	remView = new EventEditor_ReminderView( individualTab, &fData );
	if ( !remView || remView->InitCheck() != B_OK ) {
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}	
	tab = new BTab();	
	tabView->AddTab( remView, tab );
	tab->SetLabel( "Reminder" );
	
	// Event activity
	actView = new ActivityView( individualTab.InsetByCopy( 5, 5 ), "Event activity", fData.GetEventActivity() );
	if ( !actView || actView->InitCheck() != B_OK ) {
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}	
	tab = new BTab();	
	tabView->AddTab( actView, tab );
	tab->SetLabel( "Activity" );
	
	// Note view
	noteView = new EventEditor_NoteView( individualTab.InsetByCopy( 5, 5 ), &fData );
	if ( !noteView || noteView->InitCheck() != B_OK ) {
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
	}
	tab = new BTab();	
	tabView->AddTab( noteView, tab );
	tab->SetLabel( "Note" );
	
	menuBar->SetTargetForItems( this );
	
	// Save button
	saveAndClose = new BButton( BRect( 0, 0, 1, 1 ),
												  "Save",
												  "Save",
												  new BMessage( kFileSave ) );
	if ( !saveAndClose ) {
		global_toReturn = B_NO_MEMORY;
		be_app->PostMessage( B_QUIT_REQUESTED );
//.........这里部分代码省略.........
开发者ID:HaikuArchives,项目名称:Eventual,代码行数:101,代码来源:EventEditorMainWindow.cpp

示例10: InitWindow

// ResourceUsageWindow::InitWindow -- Initialization Commands here
void ResourceUsageWindow::InitWindow(BList &list)
{
	BRect rtab = Bounds();
	BRect rlist = Bounds();
	rtab.top += 10;
	rlist.top += 10;
	rlist.left += 12;
	rlist.right -= 15 + B_V_SCROLL_BAR_WIDTH;
	rlist.bottom -= 47;

	// Create the TabView and Tabs
	BTabView *tabView = new BTabView(rtab,"resource_usage_tabview");
	tabView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
	
	rtab = tabView->Bounds();
	rtab.InsetBy(5,5);
	
	// Create the ListViews
	BListView *IRQListView = new BListView(rlist, "IRQListView",
		B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
		B_WILL_DRAW | B_NAVIGABLE);
	BListView *DMAListView = new BListView(rlist, "DMAListView",
		B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
		B_WILL_DRAW | B_NAVIGABLE);
	BListView *IORangeListView = new BListView(rlist, "IORangeListView",
		B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
		B_WILL_DRAW | B_NAVIGABLE);
	BListView *memoryListView = new BListView(rlist, "memoryListView",
		B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
		B_WILL_DRAW | B_NAVIGABLE);
	
	BScrollView *IRQScrollView = new BScrollView("scroll_list1", IRQListView,
		B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER);
	BScrollView *DMAScrollView = new BScrollView("scroll_list2", DMAListView,
		B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER);
	BScrollView *IORangeScrollView = new BScrollView("scroll_list3",
		IORangeListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true,
		B_FANCY_BORDER);
	BScrollView *memoryScrollView = new BScrollView("scroll_list4",
		memoryListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true,
		B_FANCY_BORDER);
	
	BTab *tab = new BTab();
	tabView->AddTab(IRQScrollView, tab);
	tab->SetLabel(B_TRANSLATE("IRQ"));
	tab = new BTab();
	tabView->AddTab(DMAScrollView, tab);
	tab->SetLabel(B_TRANSLATE("DMA"));
	tab = new BTab();
	tabView->AddTab(IORangeScrollView, tab);
	tab->SetLabel(B_TRANSLATE("IO Range"));
	tab = new BTab();
	tabView->AddTab(memoryScrollView, tab);
	tab->SetLabel(B_TRANSLATE("Memory Range"));
	
	{
		uint32 mask = 1;
		
		for (int i=0;i<16;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_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,
//.........这里部分代码省略.........
开发者ID:AmirAbrams,项目名称:haiku,代码行数:101,代码来源:ResourceUsageWindow.cpp

示例11: BView

void BeKESAMainWindow::initTab4(BTabView *tv) {
	BTab *tab;
	BBox *box;
	BRect r,s,sl,sr;

	r = tv->Bounds();
	r.InsetBy(5,10);
	BView *view = new BView(r, "viewtab4", B_FOLLOW_ALL_SIDES, 0);
	view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	tab = new BTab(view);
	tv->AddTab(view, tab);
	tab->SetLabel("Teren/Gleba");

	r = view->Bounds();
	r.top = 10; r.left = 10; r.right -= 10;
	r.bottom = r.top + 140;
	box = new BBox(r, "box4x1");
	box->SetLabel("Dostępność terenu");
	view->AddChild(box);

	sl = box->Bounds();
	sl.InsetBy(10,20);
	sl.right = sl.left + sl.Width()/2;
	sl.bottom = sl.top + 20;

	BPopUpMenu *menu;
	BMenuItem *item;
	BMessage *msg;
	menu = new BPopUpMenu("t3mzabudowa");
	msg = new BMessage(TC4Z); msg->AddInt32("_item", 0);
	item = new BMenuItem("[brak]", msg); item->SetMarked(true); menu->AddItem(item);
	t3zabitems[0] = item;
	msg = new BMessage(TC4Z); msg->AddInt32("_item", 1);
	item = new BMenuItem("niezabudowany", msg); menu->AddItem(item);
	t3zabitems[1] = item;
	msg = new BMessage(TC4Z); msg->AddInt32("_item", 2);
	item = new BMenuItem("średniozabudowany", msg); menu->AddItem(item);
	t3zabitems[2] = item;
	msg = new BMessage(TC4Z); msg->AddInt32("_item", 3);
	item = new BMenuItem("zabudowany", msg); menu->AddItem(item);
	t3zabitems[3] = item;
	BMenuField *t3zabudowa = new BMenuField(sl, "t3zabudowa", "Dostępność", menu, B_FOLLOW_LEFT, B_WILL_DRAW);
	t3zabudowa->SetDivider(100);
	box->AddChild(t3zabudowa);

	s = box->Bounds();
	s.InsetBy(10,20);
	s.top = s.top + sl.Height() + 5;
	s.right = s.left + s.Width()/3;
	s.bottom = s.top + 20;
	sl = s;
	s.OffsetBy(s.Width(), 0);
	sr = s;
	sr.OffsetBy(s.Width(), 0);
	t3tl = new BCheckBox(sl, "t3tl", "las", new BMessage(TC4));
	t3ts = new BCheckBox(s,  "t3ts", "sad", new BMessage(TC4));
	t3tp = new BCheckBox(sr, "t3tp", "park", new BMessage(TC4));
	sl.OffsetBy(0,20); s.OffsetBy(0,20); sr.OffsetBy(0,20);
	t3to = new BCheckBox(sl, "t3to", "pole orne", new BMessage(TC4));
	t3ta = new BCheckBox(s,  "t3ta", "łąka", new BMessage(TC4));
	t3tr = new BCheckBox(sr, "t3tr", "ter. roln. prywatny", new BMessage(TC4));
	sl.OffsetBy(0,20); s.OffsetBy(0,20); sr.OffsetBy(0,20);
	t3te = new BCheckBox(sl, "t3te", "ter. roln. społeczny", new BMessage(TC4));
	t3tz = new BCheckBox(s,  "t3tz", "teren przemysłowy", new BMessage(TC4));

	box->AddChild(t3tl); box->AddChild(t3ts); box->AddChild(t3tp);
	box->AddChild(t3to); box->AddChild(t3ta); box->AddChild(t3tr);
	box->AddChild(t3te); box->AddChild(t3tz);

	s = box->Bounds();
	s.InsetBy(10,20);
	sl.right = sl.left + s.Width();
	sl.OffsetBy(0,25);
	t3tokr = new BTextControl(sl, "t3tokr", "Okr. bliższe", NULL, new BMessage(TC4));
	t3tokr->SetDivider(100);
	box->AddChild(t3tokr);

	r.top += 145; r.bottom += 100;
	box = new BBox(r, "box4x2");
	box->SetLabel("Gleba");
	view->AddChild(box);

	sl = box->Bounds();
	sl.InsetBy(10,20);
	sl.right = sl.left + sl.Width()/3;
	sl.bottom = sl.top + 20;
	s = sl; s.OffsetBy(sl.Width(),0);
	sr = s; sr.OffsetBy(sl.Width(),0);
	sl.OffsetBy(0,10); sr.OffsetBy(0,10);

	menu = new BPopUpMenu("t3mkam");
	msg = new BMessage(TC4K); msg->AddInt32("_item", 0);
	item = new BMenuItem("[brak]", msg); item->SetMarked(true); menu->AddItem(item);
	t3kamitems[0] = item;
	msg = new BMessage(TC4K); msg->AddInt32("_item", 1);
	item = new BMenuItem("mała", msg); menu->AddItem(item);
	t3kamitems[1] = item;
	msg = new BMessage(TC4K); msg->AddInt32("_item", 2);
	item = new BMenuItem("średnia", msg); menu->AddItem(item);
//.........这里部分代码省略.........
开发者ID:louisdem,项目名称:beos-bekesa,代码行数:101,代码来源:tab4.cpp

示例12: BView

void BeKESAMainWindow::initTab1(BTabView *tv) {
	BTab *tab;
	BBox *box, *box2;
	BRect r,s,sl,sr;

	r = tv->Bounds();
	r.InsetBy(5,10);
	BView *view = new BView(r, "viewtab1", B_FOLLOW_ALL_SIDES, 0);
	view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));

	tab = new BTab(view);
	tv->AddTab(view, tab);
	tab->SetLabel("Lokalizacja");

	r = view->Bounds();
	r.top = 10; r.left = 10; r.right -= 10;
	r.bottom = r.top + 100;
	box = new BBox(r, "box1x1");
	box->SetLabel("Miejscowość");
	view->AddChild(box);
	// text controls for box1
	sl = box->Bounds();
	sl.right = sl.left+sl.right/2;
	sl.top = 10; sl.left = 10;
	sl.bottom = sl.top + 20; sl.right -= 10;
	sr = sl;
	sr.left = sl.left + sl.Width() + 10;
	sr.right = box->Bounds().right - 10;
	t1miejsc = new BTextControl(sl, "t1miejsc", "Miejscowość", NULL, new BMessage(TC1));
	t1nazwalokalna = new BTextControl(sr, "t1nazwalokalna", "Nazwa lokalna", NULL, new BMessage(TC1));
	sl.OffsetBy(0,30); sr.OffsetBy(0,30);
	t1gmina	= new BTextControl(sl, "t1gmina", "Gmina", NULL, new BMessage(TC1));
	t1powiat = new BTextControl(sr, "t1powiat", "Powiat", NULL, new BMessage(TC1));
	sl.OffsetBy(0,30); sr.OffsetBy(0,30);
	t1wojewodztwo = new BTextControl(sl, "t1wojewodztwo", "Województwo", NULL, new BMessage(TC1));

	box->AddChild(t1miejsc); box->AddChild(t1nazwalokalna);
	box->AddChild(t1gmina); box->AddChild(t1powiat);
	box->AddChild(t1wojewodztwo);

	r.top += 115; r.bottom += 115;
	box = new BBox(r, "box1x2");
	box->SetLabel("Obszar");
	view->AddChild(box);
	// text controls for box2
	sl = box->Bounds();
	sl.right = sl.left+sl.Width()/2;
	sl.top = 10; sl.left = 10;
	sl.bottom = sl.top + 20; sl.right -= 10;
	sr = sl;
	sr.left = sl.left + sl.Width() + 10;
	sr.right = box->Bounds().right - 10;
	t1nrobszaru = new BTextControl(sl, "t1nrobszaru", "Nr obszaru AZP", NULL, new BMessage(TC1));
	t1nrinwent = new BTextControl(sr, "t1nrinwent", "Nr inwentarza", NULL, new BMessage(TC1));
	sl.OffsetBy(0,30); sr.OffsetBy(0,30);
		s = sr; s.bottom += 30;
		box2 = new BBox(s, "box1x3");
		box2->SetLabel("Współrzędne na mapie 1:25000");
		s = box2->Bounds();
		s.InsetBy(10,15);
		s.right = s.left + s.Width()/2;
		t1x = new BTextControl(s, "t1x", "X", NULL, new BMessage(TC1));
		box2->AddChild(t1x);
		s.OffsetBy(s.Width(), 0);
		t1y = new BTextControl(s, "t1y", "Y", NULL, new BMessage(TC1));
		box2->AddChild(t1y);
	t1stanmiejsc = new BTextControl(sl, "t1stanmiejsc", "Nr stan/miejsc", NULL, new BMessage(TC1));
	sl.OffsetBy(0,30); sr.OffsetBy(0,30);
	t1stanobszar = new BTextControl(sl, "t1stanobszar", "Nr stan/obszar", NULL, new BMessage(TC1));

	box->AddChild(t1nrobszaru); box->AddChild(t1nrinwent);
	box->AddChild(t1stanmiejsc); box->AddChild(t1stanobszar);
	box->AddChild(box2);

	r.top += 115; r.bottom += 115;
	box = new BBox(r, "box1x3");
	box->SetLabel("Źródła informacji");
	view->AddChild(box);
	// text controls for box3
	sl = box->Bounds();
	sl.right = sl.left+sl.Width()/3; sl.top = 10; sl.left = 10;
	sl.bottom = sl.top + 20; sl.right -= 10;
	sr = sl; sr.OffsetBy(sl.Width(), 0);
	s = sl; s.OffsetBy(sl.Width()*2, 0);

	t1ca = new BCheckBox(sl, "t1ca", "archiwalne", new BMessage(TC1));
	t1cp = new BCheckBox(sr, "t1cp", "powierzchniowe", new BMessage(TC1));
	t1cz = new BCheckBox(s,  "t1cz", "zasłyszane", new BMessage(TC1));
	sl.OffsetBy(0,30); sr.OffsetBy(0,30); s.OffsetBy(0,30);
	t1ct = new BCheckBox(sl, "t1ct", "terenowe", new BMessage(TC1));
	t1cl = new BCheckBox(sr, "t1cl", "luźne", new BMessage(TC1));
	t1cs = new BCheckBox(s,  "t1cs", "samolot", new BMessage(TC1));
	sl.OffsetBy(0,30); sr.OffsetBy(0,30); s.OffsetBy(0,30);
	t1cw = new BCheckBox(sl, "t1cw", "wykopaliskowe", new BMessage(TC1));
	t1cr = new BCheckBox(sr, "t1cr", "rekonstrukcja lokaliz.", new BMessage(TC1));

	box->AddChild(t1ca); box->AddChild(t1ct);
	box->AddChild(t1cw); box->AddChild(t1cp);
	box->AddChild(t1cl); box->AddChild(t1cr);
	box->AddChild(t1cz); box->AddChild(t1cs);
//.........这里部分代码省略.........
开发者ID:louisdem,项目名称:beos-bekesa,代码行数:101,代码来源:tab1.cpp


注:本文中的BTab::SetLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。