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

C++ FindView函数代码示例

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

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



在下文中一共展示了FindView函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:HAddTrackerWindow.cpp


示例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;
}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:27,代码来源:SeqStudioWindow.cpp


示例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 */
开发者ID:HaikuArchives,项目名称:Pe,代码行数:7,代码来源:HDialog.cpp


示例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);
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:27,代码来源:MenuField.cpp


示例5: GetSelectedGump

CGumpPtr 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,代码来源:GumpEditorDoc.cpp


示例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
开发者ID:HaikuArchives,项目名称:Pe,代码行数:8,代码来源:HDialog.cpp


示例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);
    }
}
开发者ID:BackupTheBerlios,项目名称:beae-svn,代码行数:46,代码来源:PrefWindow.cpp


示例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 */
开发者ID:HaikuArchives,项目名称:Pe,代码行数:8,代码来源:HDialog.cpp


示例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));
}
开发者ID:BackupTheBerlios,项目名称:textbank,代码行数:46,代码来源:PrefsView.cpp


示例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();	
}
开发者ID:HaikuArchives,项目名称:UltraEncode,代码行数:35,代码来源:TQueueDialog.cpp


示例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 */
开发者ID:HaikuArchives,项目名称:Pe,代码行数:9,代码来源:HDialog.cpp


示例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();
	}
}
开发者ID:jscipione,项目名称:Paladin,代码行数:18,代码来源:CInfoDialog.cpp


示例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);
}
开发者ID:dtbinh,项目名称:Sequitur,代码行数:9,代码来源:SeqStudioWindow.cpp


示例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 */
开发者ID:jscipione,项目名称:Paladin,代码行数:9,代码来源:CutContaining.cpp


示例15: DoPriority

void MainWindow::DoPriority()
{
	BTextControl *PriorityValue = (BTextControl *)FindView("MainPriorityValue");
	if (strcmp("", PriorityValue->Text())) {
		int32 value;
		value = atoi(PriorityValue->Text());
		DoPriority(value);
	}
}
开发者ID:HaikuArchives,项目名称:Slayer,代码行数:9,代码来源:MainWindow.cpp


示例16: bounds

void
BTextControl::InitData(const char *label, const char *initial_text,
							BMessage *data)
{
	BRect bounds(Bounds());

	fText = NULL;
	//fLabel = NULL;
	fModificationMessage = NULL;
	fLabelAlign = B_ALIGN_LEFT;
	fDivider = 0.0f;
	fPrevWidth = 0;
	fPrevHeight = 0;
	//fClean = true;
	fSkipSetFlags = false;

	int32 flags = 0;

	BFont font(be_bold_font);

	if (!data || !data->HasString("_fname"))
		flags |= B_FONT_FAMILY_AND_STYLE;

	if (!data || !data->HasFloat("_fflt"))
		flags |= B_FONT_SIZE;

	if (flags != 0)
		SetFont(&font, flags);

	if (label)
		fDivider = bounds.Width() / 2.0f;

	if (Flags() & B_NAVIGABLE) {
		fSkipSetFlags = true;
		SetFlags(Flags() & ~B_NAVIGABLE);
		fSkipSetFlags = false;
	}

	if (data)
		fText = static_cast<_BTextInput_ *>(FindView("_input_"));
	else {
		BRect frame(fDivider, bounds.top + 2.0f, bounds.right - 2.0f,
			bounds.bottom - 2.0f);
		BRect textRect(frame.OffsetToCopy(0.0f, 0.0f));
	
		fText = new _BTextInput_(frame, textRect,
			B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS |
			B_NAVIGABLE);

		AddChild(fText);
		
		SetText(initial_text);
		fText->SetAlignment(B_ALIGN_LEFT);
		fText->AlignTextRect();
	}
}
开发者ID:Ithamar,项目名称:cosmoe,代码行数:56,代码来源:TextControl.cpp


示例17: FindView

/**
 *	@brief	Diff ペインにフォーカスを与えます。
 *	@param[in]	paneIndex	フォーカスを与えるペイン
 */
void TextDiffView::makeFocusToPane(TextDiffView::PaneIndex /* paneIndex */)
{
	// ホイールイベントのために常に右ペインにフォーカスを与えます。
	// 必要ならここでフォーカスのあるはずのペインを記憶してもいいかも
	BView* rightPaneView = FindView(NAME_RIGHT_PANE);
	if (NULL != rightPaneView)
	{
		rightPaneView->MakeFocus();
	}
}
开发者ID:ModeenF,项目名称:ponpokodiff,代码行数:14,代码来源:TextDiffView.cpp


示例18: cast_as

/***********************************************************
 * AccountName
 ***********************************************************/
const char*
HAddressView::AccountName()
{
	BMenuField *field = cast_as(FindView("FromMenu"),BMenuField);
	BMenu *menu = field->Menu();
	BMenuItem *item = menu->FindMarked();
	if(!item)
		return NULL;
	return item->Label();
}
开发者ID:HaikuArchives,项目名称:Scooby,代码行数:13,代码来源:HAddressView.cpp


示例19: BMenuItem

void
BMailProtocolConfigView::AddFlavor(const char *label)
{
	BMenuField *menu = (BMenuField *)(FindView("flavor"));
	if (menu != NULL) {
		menu->Menu()->AddItem(new BMenuItem(label,NULL));
		if (menu->Menu()->FindMarked() == NULL)
			menu->Menu()->ItemAt(0)->SetMarked(true);
	}
}
开发者ID:mylegacy,项目名称:haiku,代码行数:10,代码来源:ProtocolConfigView.cpp


示例20: while

int32 ToolTip::Tool_Thread(){
   BPoint loc;
   BPoint oldloc;
   ulong button;
   int32 count = 0;
   BView *v = NULL;
   
   // Wait until the BApplication becomes valid, in case
   // someone creates this as a global variable.
   while(!be_app_messenger.IsValid()){
      snooze(200000);
   }
   
   // while the app is valid, run. This is a 
   // easy way to let the thread natually die
	while(be_app_messenger.IsValid()){
		if(ttWin->Lock()){
			ttWin->ChildAt(0)->GetMouse(&loc, &button);
			ttWin->ConvertToScreen(&loc);
			if((loc == oldloc) && !button){
				if(count == 5){
					if(ttWin->IsHidden()){
						BPoint tr = loc;
						v = FindView(tr);
						const char *tip = NULL;
						while(v && (tip = GetTip(v)) == NULL){
							v = v->Parent();
						}
						if(tip){
							if(tip && strcmp(tip,"")){
								ttWin->Tip(loc,tip);
							}else{
								//ttWin->Tip(loc,"whats up with the No tip haven tool?");
							}
						}
					}
				}else{
					count++;
				}
			}else{
				count = 0;
				if(!(ttWin->IsHidden())){
					ttWin->Bye();
				}
			}
			oldloc = loc;
			ttWin->Unlock();
			//snooze(250000);
			snooze(150000);
		}else{
			snooze(1000000);
		}
	}
	return B_OK;
}
开发者ID:BackupTheBerlios,项目名称:beae-svn,代码行数:55,代码来源:ToolTip.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ FindWidget函数代码示例发布时间:2022-05-30
下一篇:
C++ FindUser函数代码示例发布时间: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