• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ B_TRANSLATE_SYSTEM_NAME函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中B_TRANSLATE_SYSTEM_NAME函数的典型用法代码示例。如果您正苦于以下问题:C++ B_TRANSLATE_SYSTEM_NAME函数的具体用法?C++ B_TRANSLATE_SYSTEM_NAME怎么用?C++ B_TRANSLATE_SYSTEM_NAME使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: BWindow

PulseWindow::PulseWindow(BRect rect)
	:
	BWindow(rect, B_TRANSLATE_SYSTEM_NAME("Pulse"), B_TITLED_WINDOW,
		B_NOT_RESIZABLE | B_NOT_ZOOMABLE)
{
	SetPulseRate(200000);
	
	PulseApp *pulseapp = (PulseApp *)be_app;
	BRect bounds = Bounds();
	fNormalPulseView = new NormalPulseView(bounds);
	AddChild(fNormalPulseView);

	fMiniPulseView = new MiniPulseView(bounds, "MiniPulseView", 
		pulseapp->prefs);
	AddChild(fMiniPulseView);

	fMode = pulseapp->prefs->window_mode;
	if (fMode == MINI_WINDOW_MODE) {
		SetLook(B_MODAL_WINDOW_LOOK);
		SetFeel(B_NORMAL_WINDOW_FEEL);
		SetFlags(B_NOT_ZOOMABLE);
		fNormalPulseView->Hide();
		SetSizeLimits(GetMinimumViewWidth() - 1, 4096, 2, 4096);
		ResizeTo(rect.Width(), rect.Height());
	} else
		fMiniPulseView->Hide();

	fPrefsWindow = NULL;
}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:29,代码来源:PulseWindow.cpp


示例2: B_TRANSLATE_SYSTEM_NAME

void
PulseApp::ShowAbout(bool asApplication)
{
	// static version to be used in replicant mode
	BString name;
	if (asApplication)
		name = B_TRANSLATE_SYSTEM_NAME("Pulse");
	else
		name = B_TRANSLATE("Pulse");

	BString message = B_TRANSLATE(
		"%s\n\nBy David Ramsey and Arve Hjønnevåg\n"
		"Revised by Daniel Switkin\n");
	message.ReplaceFirst("%s", name);
	BAlert *alert = new BAlert(B_TRANSLATE("Info"),
		message.String(), B_TRANSLATE("OK"));

	BTextView* view = alert->TextView();
	BFont font;
				
	view->SetStylable(true);			
	view->GetFont(&font);
	
	font.SetSize(18);
	font.SetFace(B_BOLD_FACE);
	view->SetFontAndColor(0, name.Length(), &font);
	alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
	// Use the asynchronous version so we don't block the window's thread
	alert->Go(NULL);
}
开发者ID:MaddTheSane,项目名称:haiku,代码行数:30,代码来源:PulseApp.cpp


示例3: BWindow

CDPlayerWindow::CDPlayerWindow()
	:
	BWindow(BRect (100, 100, 405, 280), B_TRANSLATE_SYSTEM_NAME("CDPlayer"), 
		B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
		| B_ASYNCHRONOUS_CONTROLS)
{
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:7,代码来源:CDPlayer.cpp


示例4: BAboutWindow

void
WorkspacesView::_AboutRequested()
{
	BAboutWindow* window = new BAboutWindow(
		B_TRANSLATE_SYSTEM_NAME("Workspaces"), kSignature);

	const char* authors[] = {
		"Axel Dörfler",
		"Oliver \"Madison\" Kohl",
		"Matt Madia",
		"François Revol",
		NULL
	};

	const char* extraCopyrights[] = {
		"2002 François Revol",
		NULL
	};

	const char* extraInfo = "Send windows behind using the Option key. "
		"Move windows to front using the Control key.\n";

	window->AddCopyright(2002, "Haiku, Inc.",
			extraCopyrights);
	window->AddAuthors(authors);
	window->AddExtraInfo(extraInfo);

	window->Show();
}
开发者ID:MaddTheSane,项目名称:haiku,代码行数:29,代码来源:Workspaces.cpp


示例5: switch

bool
WindowTitlePlaceholderMapper::MapPlaceholder(char placeholder, int64 number,
	bool numberGiven, BString& _string)
{
	switch (placeholder) {
		case 'T':
			// The Terminal application name for the current locale
			_string = B_TRANSLATE_SYSTEM_NAME("Terminal");
			return true;

		case 'i':
			// window index
			_string.Truncate(0);
			if (fWindowIndex != 0)
				_string << fWindowIndex;
			return true;

		case 't':
			// the tab title
			_string = fTabTitle;
			return true;
	}

	return TitlePlaceholderMapper::MapPlaceholder(placeholder, number,
		numberGiven, _string);
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:26,代码来源:TitlePlaceholderMapper.cpp


示例6: BAboutWindow

void
MainWindow::AboutRequested()
{
	BAboutWindow* about = new BAboutWindow(
		B_TRANSLATE_SYSTEM_NAME("BeMines"), "application/x-vnd.dw-BeMines");

	const char* kCopyright = "Kevin Adams, Humdinger, Janus";

	const char* kExtraCopyrights[] = {
		"2015 Justin Stressman",
		"2009 DarkWyrm",
		NULL
	};

	const char* kAuthors[] = {
		B_TRANSLATE("DarkWyrm (original author)"),
		"Kevin Adams",
		"Adrien Destugues",
		"Humdinger",
		"Janus",
		"Justin Stressman",
		NULL
	};
	about->AddDescription(
		B_TRANSLATE("A themable, open-source rendition of Minesweeper."));
	about->AddCopyright(2018, kCopyright, kExtraCopyrights);
	about->AddAuthors(kAuthors);
	about->Show();
}
开发者ID:HaikuArchives,项目名称:BeMines,代码行数:29,代码来源:MainWindow.cpp


示例7: BWindow

ScreenSaverWindow::ScreenSaverWindow()
	:
	BWindow(BRect(50.0f, 50.0f, 50.0f + kWindowWidth, 50.0f + kWindowHeight),
		B_TRANSLATE_SYSTEM_NAME("ScreenSaver"), B_TITLED_WINDOW,
		B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
	fSettings.Load();

	fMinWidth = floorf(be_control_look->DefaultItemSpacing()
		* (kWindowWidth / kDefaultItemSpacingAt12pt));

	font_height fontHeight;
	be_plain_font->GetHeight(&fontHeight);
	float textHeight = ceilf(fontHeight.ascent + fontHeight.descent);

	fMinHeight = ceilf(std::max(kWindowHeight, textHeight * 28));

	// Create the password editing window
	fPasswordWindow = new PasswordWindow(fSettings);
	fPasswordWindow->Run();

	// Create the tab view
	fTabView = new TabView();
	fTabView->SetBorder(B_NO_BORDER);

	// Create the controls inside the tabs
	fFadeView = new FadeView(B_TRANSLATE("General"), fSettings);
	fModulesView = new ModulesView(B_TRANSLATE("Screensavers"), fSettings);

	fTabView->AddTab(fFadeView);
	fTabView->AddTab(fModulesView);

	// Create the topmost background view
	BView* topView = new BView("topView", B_WILL_DRAW);
	topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
	topView->SetExplicitAlignment(BAlignment(B_ALIGN_USE_FULL_WIDTH,
		B_ALIGN_USE_FULL_HEIGHT));
	topView->SetExplicitMinSize(BSize(fMinWidth, fMinHeight));
	BLayoutBuilder::Group<>(topView, B_VERTICAL)
		.SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING)
		.Add(fTabView)
		.End();

	SetLayout(new BGroupLayout(B_VERTICAL));
	GetLayout()->AddView(topView);

	fTabView->Select(fSettings.WindowTab());

	if (fSettings.WindowFrame().left > 0 && fSettings.WindowFrame().top > 0)
		MoveTo(fSettings.WindowFrame().left, fSettings.WindowFrame().top);

	if (fSettings.WindowFrame().Width() > 0
		&& fSettings.WindowFrame().Height() > 0) {
		ResizeTo(fSettings.WindowFrame().Width(),
			fSettings.WindowFrame().Height());
	}

	CenterOnScreen();
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:59,代码来源:ScreenSaverWindow.cpp


示例8: BWindow

UninstallWindow::UninstallWindow()
	:
	BWindow(BRect(100, 100, 600, 300),
		B_TRANSLATE_SYSTEM_NAME("InstalledPackages"), B_TITLED_WINDOW,
		B_NOT_ZOOMABLE | B_QUIT_ON_WINDOW_CLOSE | B_AUTO_UPDATE_SIZE_LIMITS)
{
	SetLayout(new BGroupLayout(B_HORIZONTAL));
	AddChild(new UninstallView());
}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:9,代码来源:UninstallWindow.cpp


示例9: BWindow

NetworkWindow::NetworkWindow()
	:
	BWindow(BRect(50, 50, 269, 302), B_TRANSLATE_SYSTEM_NAME("Network"),
		B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
		| B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_QUIT_ON_WINDOW_CLOSE)
{
	SetLayout(new BGroupLayout(B_HORIZONTAL));
	GetLayout()->AddView(new EthernetSettingsView());
}
开发者ID:dakk,项目名称:Haiku-WIPs,代码行数:9,代码来源:NetworkWindow.cpp


示例10: BWindow

KeyboardWindow::KeyboardWindow()
	:
	BWindow(BRect(0, 0, 200, 200), B_TRANSLATE_SYSTEM_NAME("Keyboard"),
		B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE
		| B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
	MoveTo(fSettings.WindowCorner());

	// Add the main settings view
	fSettingsView = new KeyboardView();
	BBox* fSettingsBox = new BBox("keyboard_box");
	fSettingsBox->AddChild(fSettingsView);

	// Add the "Default" button..
	fDefaultsButton = new BButton(B_TRANSLATE("Defaults"), new BMessage(BUTTON_DEFAULTS));

	// Add the "Revert" button...
	fRevertButton = new BButton(B_TRANSLATE("Revert"), new BMessage(BUTTON_REVERT));
	fRevertButton->SetEnabled(false);

	// Build the layout
	SetLayout(new BGroupLayout(B_VERTICAL));

	AddChild(BGroupLayoutBuilder(B_VERTICAL, 10)
		.Add(fSettingsBox)
		.AddGroup(B_HORIZONTAL, 7)
			.Add(fDefaultsButton)
			.Add(fRevertButton)
			.AddGlue()
		.End()
		.SetInsets(10, 10, 10, 10)
	);

	BSlider* slider = (BSlider* )FindView("key_repeat_rate");
	if (slider !=NULL)
		slider->SetValue(fSettings.KeyboardRepeatRate());

	slider = (BSlider* )FindView("delay_until_key_repeat");
	if (slider !=NULL)
		slider->SetValue(fSettings.KeyboardRepeatDelay());

	fDefaultsButton->SetEnabled(fSettings.IsDefaultable());

	// center window if it would be off-screen
	BScreen screen;
	if (screen.Frame().right < Frame().right
		|| screen.Frame().bottom < Frame().bottom) {
		CenterOnScreen();
	}

#ifdef DEBUG
	fSettings.Dump();
#endif

	Show();
}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:56,代码来源:KeyboardWindow.cpp


示例11: BApplication

HApp::HApp()
	:
	BApplication("application/x-vnd.Haiku-Sounds")
{
	BRect rect;
	rect.Set(200, 150, 590, 570);

	HWindow* window = new HWindow(rect, B_TRANSLATE_SYSTEM_NAME("Sounds"));
	window->Show();
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:10,代码来源:HApp.cpp


示例12: B_TRANSLATE_SYSTEM_NAME

void
MainWin::UpdateWindowTitle()
{
	BString title;
	title.SetToFormat("%s - %d x %d, %.3f:%.3f => %.0f x %.0f",
		B_TRANSLATE_SYSTEM_NAME(NAME),
		fSourceWidth, fSourceHeight, fWidthScale, fHeightScale,
		fVideoView->Bounds().Width() + 1, fVideoView->Bounds().Height() + 1);
	SetTitle(title);
}
开发者ID:mmadia,项目名称:Haiku-services-branch,代码行数:10,代码来源:MainWin.cpp


示例13: BWindow

TTimeWindow::TTimeWindow()
	:
	BWindow(BRect(0, 0, 0, 0), B_TRANSLATE_SYSTEM_NAME("Time"), B_TITLED_WINDOW,
		B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
	_InitWindow();
	_AlignWindow();

	AddShortcut('A', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
}
开发者ID:looncraz,项目名称:haiku,代码行数:10,代码来源:TimeWindow.cpp


示例14: BWindow

PowerStatusWindow::PowerStatusWindow()
	:
	BWindow(BRect(100, 150, 281, 299), B_TRANSLATE_SYSTEM_NAME("PowerStatus"),
		B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS)
{
	BView* topView = new BView(Bounds(), NULL, B_FOLLOW_ALL, B_WILL_DRAW);
	topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
	AddChild(topView);

	topView->AddChild(new PowerStatusReplicant(Bounds(), B_FOLLOW_ALL));
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:11,代码来源:PowerStatusWindow.cpp


示例15: VideoWindow

void
CodyCam::ReadyToRun()
{
	fWindow = new VideoWindow(BRect(28, 28, 28, 28),
		(const char*) B_TRANSLATE_SYSTEM_NAME("CodyCam"), B_TITLED_WINDOW,
		B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, &fPort);

	_SetUpNodes();

	((VideoWindow*)fWindow)->ApplyControls();
}
开发者ID:mmadia,项目名称:haiku,代码行数:11,代码来源:CodyCam.cpp


示例16: BWindow

DevicesWindow::DevicesWindow()
	:
	BWindow(BRect(50, 50, 750, 550), B_TRANSLATE_SYSTEM_NAME("Devices"),
		B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS  | B_AUTO_UPDATE_SIZE_LIMITS
			| B_QUIT_ON_WINDOW_CLOSE)
{
	BLayoutBuilder::Group<>(this, B_VERTICAL)
		.SetInsets(0)
		.Add(fDevicesView = new DevicesView());
	GetLayout()->SetExplicitMinSize(BSize(600, 300));
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:11,代码来源:DevicesApplication.cpp


示例17: VideoWindow

void
CodyCam::ReadyToRun()
{
	fWindow = new VideoWindow(
		(const char*) B_TRANSLATE_SYSTEM_NAME("CodyCam"), B_TITLED_WINDOW,
		B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS, &fPort);

	if (_SetUpNodes() != B_OK)
		fWindow->ToggleMenuOnOff();

	((VideoWindow*)fWindow)->ApplyControls();
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:12,代码来源:CodyCam.cpp


示例18: BWindow

MainWindow::MainWindow()
	: BWindow(BRect(0, 0, 1, 1), B_TRANSLATE_SYSTEM_NAME("Fonts"), B_TITLED_WINDOW,
		B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
	fDefaultsButton = new BButton("defaults", B_TRANSLATE("Defaults"),
		new BMessage(kMsgSetDefaults), B_WILL_DRAW);
	fDefaultsButton->SetEnabled(false);

	fRevertButton = new BButton("revert", B_TRANSLATE("Revert"),
		new BMessage(kMsgRevert), B_WILL_DRAW);
	fRevertButton->SetEnabled(false);

//	BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);

	BBox* box = new BBox(B_FANCY_BORDER, NULL);

	fFontsView = new FontView();

//	tabView->AddTab(fFontsView);
	box->AddChild(fFontsView);

	fFontsView->UpdateFonts();

	const float kInset = be_control_look->DefaultItemSpacing();
	BLayoutBuilder::Group<>(this, B_VERTICAL)
		.SetInsets(kInset, kInset, kInset, kInset)
		.Add(box)
//		.Add(tabView)
		.AddStrut(kInset)
		.AddGroup(B_HORIZONTAL)
			.Add(fDefaultsButton)
			.AddStrut(kInset)
			.Add(fRevertButton)
			.AddGlue();

	if (fSettings.WindowCorner() == BPoint(-1, -1)) {
		// center window on screen
		CenterOnScreen();
	} else {
		MoveTo(fSettings.WindowCorner());

		// make sure window is on screen
		BScreen screen(this);
		if (!screen.Frame().InsetByCopy(10, 10).Intersects(Frame()))
			CenterOnScreen();
	}

	fRunner = new BMessageRunner(this, new BMessage(kMsgCheckFonts), 3000000);
		// every 3 seconds

	fDefaultsButton->SetEnabled(fFontsView->IsDefaultable());
}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:52,代码来源:MainWindow.cpp


示例19: BWindow

PackageWindow::PackageWindow(const entry_ref *ref)
	:
	BWindow(BRect(100, 100, 600, 300),
		B_TRANSLATE_SYSTEM_NAME("PackageInstaller"),
		B_TITLED_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE)
{
	//SetLayout(new BGroupLayout(B_HORIZONTAL));

	fBackground = new PackageView(Bounds(), ref);
	AddChild(fBackground);

	ResizeTo(Bounds().Width(), fBackground->Bounds().Height());
}
开发者ID:DonCN,项目名称:haiku,代码行数:13,代码来源:PackageWindow.cpp


示例20: about

void
CalcView::AboutRequested()
{
	const char* authors[] = {
		"Timothy Wayper",
		"Stephan Aßmus",
		"Ingo Weinhold",
		NULL
	};
	BAboutWindow about(B_TRANSLATE_SYSTEM_NAME("DeskCalc"), 2006, authors,
		B_UTF8_COPYRIGHT "1997, 1998 R3 Software Ltd.");
	about.Show();
}
开发者ID:RTOSkit,项目名称:haiku,代码行数:13,代码来源:CalcView.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BadPtr函数代码示例发布时间:2022-05-30
下一篇:
C++ B_TRANSLATE_COMMENT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap