本文整理汇总了C++中FindView函数的典型用法代码示例。如果您正苦于以下问题:C++ FindView函数的具体用法?C++ FindView怎么用?C++ FindView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FindView函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitGUI
/***********************************************************
* Constructor.
***********************************************************/
HAddTrackerWindow::HAddTrackerWindow(BRect rect,const char* name)
:BWindow(rect,name,B_TITLED_WINDOW_LOOK,B_MODAL_APP_WINDOW_FEEL,B_NOT_RESIZABLE|B_NOT_ZOOMABLE|B_ASYNCHRONOUS_CONTROLS)
{
InitGUI();
BTextControl *control = cast_as(FindView("name"),BTextControl);
control->MakeFocus(true);
}
示例2: ArpASSERT
status_t SeqStudioWindow::SetConfiguration(const BMessage* config)
{
ArpASSERT(config);
status_t err = SetDimensions(config, this);
if (err != B_OK) return err;
/* Set the columns
*/
BColumnListView* table = dynamic_cast<BColumnListView*>( FindView(ENDPOINT_LIST_STR) );
if (table) {
BMessage colMsg;
for (int32 k = 0; config->FindMessage("column", k, &colMsg) == B_OK; k++) {
const char* colName;
float colW;
bool colVis;
if (colMsg.FindString("name", &colName) == B_OK
&& colMsg.FindFloat("width", &colW) == B_OK
&& colMsg.FindBool("visible", &colVis) == B_OK) {
BColumn* col = col_named(colName, table);
if (col) {
col->SetWidth(colW);
col->SetVisible(colVis);
}
}
}
}
return B_OK;
}
示例3: SetOn
void HDialog::SetOn(const char *name, bool on)
{
BControl *ctrl;
ctrl = dynamic_cast<BControl *>(FindView(name));
if (ctrl)
ctrl->SetValue(on ? B_CONTROL_ON : B_CONTROL_OFF);
} /* HDialog::SetOn */
示例4: BMenu
void
BMenuField::_InitMenuBar(const BMessage* archive)
{
bool fixed;
if (archive->FindBool("be:fixeds", &fixed) == B_OK)
fFixedSizeMB = fixed;
fMenuBar = (BMenuBar*)FindView("_mc_mb_");
if (!fMenuBar) {
_InitMenuBar(new BMenu(""), BRect(0, 0, 100, 15), fFixedSizeMB);
InitObject2();
} else {
fMenuBar->AddFilter(new _BMCFilter_(this, B_MOUSE_DOWN));
// this is normally done in InitObject2()
}
fMenu = fMenuBar->SubmenuAt(0);
bool disable;
if (archive->FindBool("_disable", &disable) == B_OK)
SetEnabled(!disable);
bool dmark = false;
archive->FindBool("be:dmark", &dmark);
if (_BMCMenuBar_* menuBar = dynamic_cast<_BMCMenuBar_*>(fMenuBar))
menuBar->TogglePopUpMarker(dmark);
}
示例5: GetSelectedGump
CGumpPtr CGumpEditorDoc::GetSelectedGump(void)
{
CGumpPtr pDib;
CGumpView* pView = (CGumpView*)FindView(RUNTIME_CLASS(CGumpView));
if (pView) pDib = pView->GetGump();
return pDib;
}
示例6: SetLabel
void HDialog::SetLabel(const char *id, const char *label)
{
BControl *control = dynamic_cast<BControl*>(FindView(id));
if (control)
control->SetLabel(label);
else
THROW(("Control '%s' not found", id));
} // HDialog::SetLabel
示例7: switch
void PrefWindow::MessageReceived(BMessage *message) {
BView *tmpV;
int32 k;
switch (message->what) {
case QUIT:
Hide();
break;
case CHANGE_LANGUAGE:
tmpV = ChildAt(0);
if (tmpV != NULL) {
tmpV->RemoveSelf();
delete tmpV;
}
AddChild(new PrefView(Bounds()));
break;
case SET_FACTORY:
k = (new BAlert(NULL,Language.get("FACTORY_SURE"),Language.get("APPLY"),Language.get("CANCEL")))->Go();
if (k==0) {
Prefs.FactorySettings();
KeyBind.InstallDefaults();
tmpV = FindView("Prefs color");
if (tmpV != NULL) {
PostMessage(COLOR_SELECT, tmpV);
}
tmpV = FindView("Prefs keys");
if (tmpV != NULL) {
tmpV->LockLooper();
tmpV->Pulse();
tmpV->UnlockLooper();
} else {
be_app->PostMessage(CHANGE_LANGUAGE);
}
Pool.sample_view_dirty = true; // update the sample-view
Pool.update_draw_cache = true; // update the draw cache
Pool.update_index = true; // update the index cache
Pool.RedrawWindow();
}
break;
default:
BWindow::MessageReceived(message);
}
}
示例8: GetText
const char* HDialog::GetText(const char *name) const
{
BTextControl *t = dynamic_cast<BTextControl *>(FindView(name));
if (t)
return t->Text();
else
return NULL;
} /* HDialog::SetText */
示例9:
//------------------------------------------------------------------------------
void TPrefsView::GetChildPointers()
{
// タブ別に取得
// (コンテナ)
mTabViewPrefs = dynamic_cast<BTabView*>(FindView(VIEW_NAME_TAB_VIEW_PREFS));
mTabGeneral = mTabViewPrefs->TabAt(PT_GENERAL);
mTabHotKey = mTabViewPrefs->TabAt(PT_HOT_KEY);
mTabAsst = mTabViewPrefs->TabAt(PT_ASST);
// 全般タブ
mBoxClipboard = dynamic_cast<BBox*>(mTabGeneral->View()->FindView(VIEW_NAME_BOX_CLIPBOARD));
mTxtCtrlNumClipboardHistories = dynamic_cast<BTextControl*>(mTabGeneral->View()->FindView(VIEW_NAME_TXT_CTRL_NUM_CLIPBOARD_HISTORIES));
mCBoxSaveClipboard = dynamic_cast<BCheckBox*>(mTabGeneral->View()->FindView(VIEW_NAME_CBOX_SAVE_CLIPBOARD));
mCBoxLoseFocus = dynamic_cast<BCheckBox*>(mTabGeneral->View()->FindView(VIEW_NAME_CBOX_LOSE_FOCUS));
mCBoxMinimizedBoot = dynamic_cast<BCheckBox*>(mTabGeneral->View()->FindView(VIEW_NAME_CBOX_MINIMIZED_BOOT));
mCBoxLockTemplateOrder = dynamic_cast<BCheckBox*>(mTabGeneral->View()->FindView(VIEW_NAME_CBOX_LOCK_TEMPLATE_ORDER));
// ホットキータブ
mBoxActivate = dynamic_cast<BBox*>(mTabHotKey->View()->FindView(VIEW_NAME_BOX_ACTIVATE));
mCBoxActivateShift = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_ACTIVATE_SHIFT));
mCBoxActivateCtrl = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_ACTIVATE_CTRL));
mCBoxActivateAlt = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_ACTIVATE_ALT));
mTxtCtrlActivateChar = dynamic_cast<BTextControl*>(mTabHotKey->View()->FindView(VIEW_NAME_TXT_CTRL_ACTIVATE_CHAR));
mBoxDelete = dynamic_cast<BBox*>(mTabHotKey->View()->FindView(VIEW_NAME_BOX_DELETE));
mCBoxDeleteShift = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_DELETE_SHIFT));
mCBoxDeleteCtrl = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_DELETE_CTRL));
mCBoxDeleteAlt = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_DELETE_ALT));
mTxtCtrlDeleteChar = dynamic_cast<BTextControl*>(mTabHotKey->View()->FindView(VIEW_NAME_TXT_CTRL_DELETE_CHAR));
mBoxPopUp = dynamic_cast<BBox*>(mTabHotKey->View()->FindView(VIEW_NAME_BOX_POP_UP));
mCBoxPopUpShift = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_POP_UP_SHIFT));
mCBoxPopUpCtrl = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_POP_UP_CTRL));
mCBoxPopUpAlt = dynamic_cast<BCheckBox*>(mTabHotKey->View()->FindView(VIEW_NAME_CBOX_POP_UP_ALT));
mTxtCtrlPopUpChar = dynamic_cast<BTextControl*>(mTabHotKey->View()->FindView(VIEW_NAME_TXT_CTRL_POP_UP_CHAR));
mStrViewHintUsingHotKey = dynamic_cast<BStringView*>(mTabHotKey->View()->FindView(VIEW_NAME_STR_VIEW_HINT_USING_HOT_KEY));
// アシスタントタブ
mBoxAutoInstallAsst = dynamic_cast<BBox*>(mTabAsst->View()->FindView(VIEW_NAME_BOX_AUTO_INSTALL_ASST));
mRButtonEnableAutoInstallAsst = dynamic_cast<BRadioButton*>(mTabAsst->View()->FindView(VIEW_NAME_RBUTTON_ENABLE_AUTO_INSTALL_ASST));
mRButtonDisableAutoInstallAsst = dynamic_cast<BRadioButton*>(mTabAsst->View()->FindView(VIEW_NAME_RBUTTON_DISABLE_AUTO_INSTALL_ASST));
mButtonInstallAsst = dynamic_cast<BButton*>(mTabAsst->View()->FindView(VIEW_NAME_BUTTON_INSTALL_ASST));
mButtonUninstallAsst = dynamic_cast<BButton*>(mTabAsst->View()->FindView(VIEW_NAME_BUTTON_UNINSTALL_ASST));
mStrViewAsstStatus = dynamic_cast<BStringView*>(mTabAsst->View()->FindView(VIEW_NAME_STR_VIEW_ASST_STATUS));
// ボタン
mButtonHelp = dynamic_cast<BButton*>(FindView(VIEW_NAME_BUTTON_HELP));
mButtonDefaults = dynamic_cast<BButton*>(FindView(VIEW_NAME_BUTTON_DEFAULTS));
mButtonCancel = dynamic_cast<BButton*>(FindView(VIEW_NAME_BUTTON_CANCEL));
mButtonOK = dynamic_cast<BButton*>(FindView(VIEW_NAME_BUTTON_OK));
}
示例10: TQueueListView
void TQueueDialog::Init()
{
//
// Locate all child views
//
// Find buttons
m_StopButton = (BButton *)FindView("StopButton");
m_StartButton = (BButton *)FindView("StartButton");
m_AddButton = (BButton *)FindView("AddButton");
m_RemoveButton = (BButton *)FindView("RemoveButton");
// Find and setup list view
m_TracksListScrollView = (BScrollView *)FindView("TracksListScrollView");
BListView *tracksListView = (BListView *)FindView("TracksListView");
BRect frame = tracksListView->Frame();
frame.InsetBy(2, 2);
m_TracksListView = new TQueueListView(this, frame);
tracksListView->Parent()->AddChild(m_TracksListView);
tracksListView->RemoveSelf();
delete tracksListView;
// Set list view messages
BMessage *selectMessage = new BMessage(QUEUE_LIST_SELECT_MSG);
m_TracksListView->SetSelectionMessage(selectMessage);
BMessage *invokeMessage = new BMessage(QUEUE_LIST_INVOKE_MSG);
m_TracksListView->SetInvocationMessage(invokeMessage);
// Find status bar
m_EncodeStatusBar = (BStatusBar *)FindView("EncodeStatusBar");
m_EncodeStatusBar->Reset("Waiting...", "");
UpdateControls();
}
示例11: IsOn
bool HDialog::IsOn(const char *name) const
{
BControl *ctrl;
ctrl = dynamic_cast<BControl *>(FindView(name));
if (ctrl)
return ctrl->Value() == B_CONTROL_ON;
else
return false;
} /* HDialog::IsOn */
示例12: FindView
void CInfoDialog::Show()
{
HDialog::Show();
if (LockLooper())
{
HTabSheet* tabBook = (HTabSheet*)FindView("tabbook");
BRect okFrame = FindView("ok")->Frame();
if (tabBook) {
BPoint bottomRight = tabBook->AdjustBottomRightOfAllPanes();
if (bottomRight.x < okFrame.right)
bottomRight.x = okFrame.right;
if (bottomRight.y < okFrame.bottom)
bottomRight.y = okFrame.bottom;
ResizeTo(bottomRight.x+5, bottomRight.y+5);
}
UnlockLooper();
}
}
示例13: FindView
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);
}
示例14: HDialog
CCutContainingDialog::CCutContainingDialog(BRect frame, const char *name, window_type type, int flags,
BWindow *owner, BPositionIO* data)
: HDialog(frame, name, type, flags, owner, data)
{
SetOn("sel", sSelectionOnly);
BView *textView = FindView("text");
if (textView)
textView->MakeFocus(true);
} /* CCutContainingDialog::CCutContainingDialog */
示例15: DoPriority
void MainWindow::DoPriority()
{
BTextControl *PriorityValue = (BTextControl *)FindView("MainPriorityValue");
if (strcmp("", PriorityValue->Text())) {
int32 value;
value = atoi(PriorityValue->Text());
DoPriority(value);
}
}