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

C++ wxHelpEvent类代码示例

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

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



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

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


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


示例3: wxStaticCast

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


示例6: OnHelp

void CDlgPreferences::OnHelp(wxHelpEvent& event) {
    wxLogTrace(wxT("Function Start/End"), wxT("CDlgPreferences::OnHelp - Function Begin"));

    if (IsShown()) {
    	wxString strURL = wxGetApp().GetSkinManager()->GetAdvanced()->GetOrganizationHelpUrl();

		wxString wxurl;
		wxurl.Printf(
            wxT("%s?target=simple_preferences&version=%s&controlid=%d"),
            strURL.c_str(),
            wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
            event.GetId()
        );
        wxLaunchDefaultBrowser(wxurl);
    }

    wxLogTrace(wxT("Function Start/End"), wxT("CDlgPreferences::OnHelp - Function End"));
}
开发者ID:drshawnkwang,项目名称:boinc,代码行数:18,代码来源:sg_DlgPreferences.cpp


示例7: OnContextHelp

void MainWindow::OnContextHelp(wxHelpEvent& event) {
	HelpManager::OpenHelpById((WindowIDS)event.GetId());
}
开发者ID:asarium,项目名称:wxlauncher,代码行数:3,代码来源:MainWindow.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ wxHtmlLinkEvent类代码示例发布时间:2022-05-31
下一篇:
C++ wxGridEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap