当前位置: 首页>>代码示例>>C++>>正文


C++ BView::MakeFocus方法代码示例

本文整理汇总了C++中BView::MakeFocus方法的典型用法代码示例。如果您正苦于以下问题:C++ BView::MakeFocus方法的具体用法?C++ BView::MakeFocus怎么用?C++ BView::MakeFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BView的用法示例。


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

示例1: MessageReceived

void ArpConfigureView::MessageReceived(BMessage *message)
{
	switch( message->what ) {
		case DONE_MSG: {
			// This little bit of stupidity is to make any
			// text control that has focus to report its changes
			// before we apply the settings.
			BView* lastFocus = Window()->CurrentFocus();
			if (lastFocus) {
				MakeFocus();
				lastFocus->MakeFocus();
			}
			if (mDoneButton) mDoneButton->MakeFocus();
			Invoke();
		} break;
		case MAKEDEFAULT_MSG: {
			Config().WriteSettings();
		} break;
		case REVERT_MSG: {
			if( mPanel ) mPanel->Revert();
		} break;
		default: {
			inherited::MessageReceived(message);
		}
	}
}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:26,代码来源:ArpConfigurePanel.cpp

示例2: 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

示例3: makeFocusToPane

/**
 *	@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

示例4: focusDocumentView

void EventHandler::focusDocumentView()
{
    BView* view = m_frame->view()->platformWidget();
    if (view)
        view->MakeFocus();

    Page* page = m_frame->page();
    if (page)
        page->focusController()->setFocusedFrame(m_frame);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:10,代码来源:EventHandlerHaiku.cpp

示例5: MakeFocus

void LiveTextControl::MakeFocus(bool focusState) {
	if (focusState) {
		fTextView->MakeFocus();
	}
	else {
		BView::MakeFocus( false );
		BView *view;
		if (!(view = NextSibling()) && !(Parent()->NextSibling())) view = Parent();
		view->MakeFocus();
	}
}
开发者ID:diversys,项目名称:PecoRename,代码行数:11,代码来源:LiveTextControl.cpp

示例6: focusDocumentView

void EventHandler::focusDocumentView()
{
    BView* view = m_frame->view()->platformWidget();
    if (view && view->LockLooperWithTimeout(5000) == B_OK) {
        view->MakeFocus(true);
        view->UnlockLooper();
    }

    Page* page = m_frame->page();
    if (page)
        page->focusController()->setFocusedFrame(m_frame);
}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:12,代码来源:EventHandlerHaiku.cpp

示例7: Window

void
BMenuBar::_RestoreFocus()
{
	BWindow* window = Window();
	if (window != NULL && window->Lock()) {
		BHandler* handler = NULL;
		if (fPrevFocusToken != -1
			&& gDefaultTokens.GetToken(fPrevFocusToken, B_HANDLER_TOKEN,
				(void**)&handler) == B_OK) {
			BView* view = dynamic_cast<BView*>(handler);
			if (view != NULL && view->Window() == window)
				view->MakeFocus();
		} else if (IsFocus())
			MakeFocus(false);

		fPrevFocusToken = -1;
		window->Unlock();
	}
}
开发者ID:naveedasmat,项目名称:haiku,代码行数:19,代码来源:MenuBar.cpp


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