本文整理汇总了C++中BTranslatorRoster::StartWatching方法的典型用法代码示例。如果您正苦于以下问题:C++ BTranslatorRoster::StartWatching方法的具体用法?C++ BTranslatorRoster::StartWatching怎么用?C++ BTranslatorRoster::StartWatching使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BTranslatorRoster
的用法示例。
在下文中一共展示了BTranslatorRoster::StartWatching方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BWindow
DataTranslationsWindow::DataTranslationsWindow()
: BWindow(BRect(0, 0, 550, 350), "DataTranslations", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
| B_AUTO_UPDATE_SIZE_LIMITS)
{
MoveTo(dynamic_cast<DataTranslationsApplication *>(be_app)->WindowCorner());
_SetupViews();
// Make sure that the window isn't positioned off screen
BScreen screen;
BRect screenFrame = screen.Frame();
if (!screenFrame.Contains(Frame()))
CenterOnScreen();
BTranslatorRoster *roster = BTranslatorRoster::Default();
roster->StartWatching(this);
Show();
}
示例2:
DataTranslationsWindow::DataTranslationsWindow()
:
BWindow(BRect(0, 0, 550, 350), B_TRANSLATE_SYSTEM_NAME("DataTranslations"),
B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE
| B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
MoveTo(DataTranslationsSettings::Instance()->WindowCorner());
_SetupViews();
// Make sure that the window isn't positioned off screen
BScreen screen;
BRect screenFrame = screen.Frame();
if (!screenFrame.Contains(Frame()))
CenterOnScreen();
BTranslatorRoster* roster = BTranslatorRoster::Default();
roster->StartWatching(this);
Show();
}