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


C++ wxHelpEvent::Skip方法代码示例

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


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

示例1: OnContextHelp

void GlobalReplaceDialog::OnContextHelp ( wxHelpEvent& e )
{
	int id = e.GetId();
	if ( id == ID_FIND )
		new wxTipWindow (
		    this,
		    _ ( "Provides a space for you to type the text you want to find" ) );
	else if ( id == ID_REPLACE )
		new wxTipWindow (
		    this,
		    _ ( "Provides a space for you to type the text you want to replace the text you typed in Find what" ) );
	else if ( id == ID_MATCHCASE )
		new wxTipWindow (
		    this,
		    _ ( "Finds only text with lowercase and uppercase letters as specified in Find what" ) );
	else if ( id == ID_ALLDOCUMENTS )
		new wxTipWindow (
		    this,
		    _ ( "Extends the scope to all open documents" ) );
	else if ( id == ID_REGEX )
		new wxTipWindow (
		    this,
		    _ ( "Interprets the text specified in Find what as a regular expression" ) );
	else if ( id == wxID_OK )
		new wxTipWindow (
		    this,
		    _ ( "Finds all instances of the text specified in Find what and replaces them with the text in Replace with" ) );
	else if ( id == wxID_CANCEL )
		new wxTipWindow (
		    this,
		    _ ( "Closes the dialog box without saving any changes you have made" ) );
	else
		{ }
	e.Skip();
}
开发者ID:aurex-linux,项目名称:xmlcopyeditor,代码行数:35,代码来源:globalreplacedialog.cpp

示例2: OnContextHelp

void AssociateDialog::OnContextHelp ( wxHelpEvent& e )
{
	int id = e.GetId();
	if ( id == ID_URL )
		new wxTipWindow (
		    this,
		    _ ( "Provides a space for you to type the path of the file" ) );
	else if ( id == ID_BROWSE )
		new wxTipWindow (
		    this,
		    _ ( "Opens a standard file dialog" ) );
	else if ( id == ID_AUX )
		new wxTipWindow (
		    this,
		    _ ( "Provides a space for you to type additional information" ) );
	else if ( id == wxID_CANCEL )
		new wxTipWindow (
		    this,
		    _ ( "Closes this dialog without making any changes" ) );
	else if ( id == wxID_OK )
		new wxTipWindow (
		    this,
		    _ ( "Selects the file specified" ) );
	else
		{ }
	e.Skip();
}
开发者ID:aurex-linux,项目名称:xmlcopyeditor,代码行数:27,代码来源:associatedialog.cpp

示例3: OnHelp

void wxBookCtrlBase::OnHelp(wxHelpEvent& event)
{
    // determine where does this even originate from to avoid redirecting it
    // back to the page which generated it (resulting in an infinite loop)

    // notice that we have to check in the hard(er) way instead of just testing
    // if the event object == this because the book control can have other
    // subcontrols inside it (e.g. wxSpinButton in case of a notebook in wxUniv)
    wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow);
    while ( source && source != this && source->GetParent() != this )
    {
        source = source->GetParent();
    }

    if ( source && m_pages.Index(source) == wxNOT_FOUND )
    {
        // this event is for the book control itself, redirect it to the
        // corresponding page
        wxWindow *page = NULL;

        if ( event.GetOrigin() == wxHelpEvent::Origin_HelpButton )
        {
            // show help for the page under the mouse
            const int pagePos = HitTest(ScreenToClient(event.GetPosition()));

            if ( pagePos != wxNOT_FOUND)
            {
                page = GetPage((size_t)pagePos);
            }
        }
        else // event from keyboard or unknown source
        {
            // otherwise show the current page help
            page = GetCurrentPage();
        }

        if ( page )
        {
            // change event object to the page to avoid infinite recursion if
            // we get this event ourselves if the page doesn't handle it
            event.SetEventObject(page);

            if ( page->GetEventHandler()->ProcessEvent(event) )
            {
                // don't call event.Skip()
                return;
            }
        }
    }
    //else: event coming from one of our pages already

    event.Skip();
}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:53,代码来源:bookctrl.cpp

示例4: OnHelp

// show help for this window
void ecConfigTreeCtrl::OnHelp(wxHelpEvent& event)
{
    wxPoint pt = ScreenToClient(event.GetPosition());
    int flags = 0;
    wxTreeItemId id = HitTest(pt, flags);
    wxHelpProvider *helpProvider = wxHelpProvider::Get();
    if ( helpProvider && id > 0)
    {
        ecConfigItem* item = ((ecTreeItemData*) GetItemData(id))->GetConfigItem();

        if (item)
        {
            wxGetApp().GetHelpController().DisplayTextPopup(item->GetDescription(), event.GetPosition());
            return;
	}
    }

    event.Skip();
}
开发者ID:perryhg,项目名称:terkos,代码行数:20,代码来源:configtree.cpp

示例5: OnHelp

// Show help for this window
void ctConfigTreeCtrl::OnHelp(wxHelpEvent& event)
{
    wxPoint pt = ScreenToClient(event.GetPosition());
    int flags = 0;
    wxTreeItemId id = HitTest(pt, flags);
    ctTreeItemData *itemData = (ctTreeItemData*) GetItemData(id);
    wxHelpProvider *helpProvider = wxHelpProvider::Get();
    if ( helpProvider && itemData)
    {
        ctConfigItem* item = itemData->GetConfigItem();
        if (item)
        {
            wxString helpTopic = item->GetPropertyString(wxT("help-topic"));
            if (!helpTopic.IsEmpty())
            {
                wxGetApp().GetReferenceHelpController().DisplaySection(helpTopic);
                return;
            }
        }
    }

    event.Skip();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:24,代码来源:configtree.cpp


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