这篇教程C++ FindView函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FindView函数的典型用法代码示例。如果您正苦于以下问题:C++ FindView函数的具体用法?C++ FindView怎么用?C++ FindView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FindView函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);}
开发者ID:HaikuArchives,项目名称:SilverWing,代码行数:10,
示例2: ArpASSERTstatus_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;}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:27,
示例3: SetOnvoid 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 */
开发者ID:HaikuArchives,项目名称:Pe,代码行数:7,
示例4: BMenuvoidBMenuField::_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);}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:27,
示例5: GetSelectedGumpCGumpPtr CGumpEditorDoc::GetSelectedGump(void){ CGumpPtr pDib; CGumpView* pView = (CGumpView*)FindView(RUNTIME_CLASS(CGumpView)); if (pView) pDib = pView->GetGump(); return pDib;}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:8,
示例6: SetLabelvoid 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
开发者ID:HaikuArchives,项目名称:Pe,代码行数:8,
示例7: switchvoid 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); }}
开发者ID:BackupTheBerlios,项目名称:beae-svn,代码行数:46,
示例8: GetTextconst char* HDialog::GetText(const char *name) const{ BTextControl *t = dynamic_cast<BTextControl *>(FindView(name)); if (t) return t->Text(); else return NULL;} /* HDialog::SetText */
开发者ID:HaikuArchives,项目名称:Pe,代码行数:8,
|