本文整理汇总了C++中wxHtmlLinkInfo类的典型用法代码示例。如果您正苦于以下问题:C++ wxHtmlLinkInfo类的具体用法?C++ wxHtmlLinkInfo怎么用?C++ wxHtmlLinkInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxHtmlLinkInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: OnLeftClickHtmlWindow
/**
* 左クリック時に起こるイベント
*/
void ThreadContentWindow::OnLeftClickHtmlWindow(wxHtmlLinkEvent& event)
{
const wxHtmlLinkInfo linkInfo = event.GetLinkInfo();
const wxString href = linkInfo.GetHref();
const wxString target = linkInfo.GetTarget();
wxString rest = wxEmptyString;
long res = 0;
// bmp,jpg,jpeg,png,gifなどの拡張子が末尾に付いている場合ダウンロードを行う
if (regexImage.IsValid())
{
// 正規表現のコンパイルにエラーがなければマッチさせる
if (regexImage.Matches(href))
{
// 画像ファイルをクリックしたのでダウンロードする
const wxString ext = regexImage.GetMatch(href, 3);
this->SetJaneCloneImageViewer(href, ext);
}
else if (href.StartsWith(wxT("#"), &rest) && rest.ToLong(&res, 10))
{
if ( 0 < res && res <= 1000)
{
OnLeftClickResponseNumber(event, href, res);
}
}
else
{
// 通常のリンクかどうか判定して処理
OnClickOrdinaryLink(href);
}
}
}
开发者ID:Hiroyuki-Nagata,项目名称:JaneClone,代码行数:36,代码来源:threadcontentwindow.cpp
示例2: addAtom
INLINE
void wxeReturn::add(const wxHtmlLinkInfo &val) {
addAtom("wxHtmlLinkInfo");
add(val.GetHref());
add(val.GetTarget());
addTupleCount(3);
}
开发者ID:AlainODea,项目名称:otp,代码行数:7,代码来源:wxe_return.cpp
示例3: wxHtmlLinkInfo
void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link)
{
if (m_Link) delete m_Link;
m_Link = NULL;
if (link.GetHref() != wxEmptyString)
m_Link = new wxHtmlLinkInfo(link);
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:7,代码来源:htmlcell.cpp
示例4: OnLinkClicked
void HtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString linkhref = link.GetHref();
if(!wxLaunchDefaultBrowser(linkhref))
// failed to launch externally, so open internally
wxHtmlWindow::OnLinkClicked(link);
}
开发者ID:DirtGamer301,项目名称:rigs-of-rods,代码行数:7,代码来源:wizard.cpp
示例5: OnLinkClicked
//! Link is in format: "protocol://action?name=value&name=value...etc.
void PrintableHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString addr = link.GetHref();
URI uri(addr);
if (uri.protocol == "info") // not really a link
return;
if (uri.protocol != "fr") // call default handler for other protocols
{
wxHtmlWindow::OnLinkClicked(link);
return;
}
// open in new tab if control/command key is down
// open in new window if shift key is down
bool openInTab;
if (wxPlatformInfo::Get().GetOperatingSystemId() & wxOS_MAC)
openInTab = ::wxGetKeyState(WXK_COMMAND);
else
openInTab = ::wxGetKeyState(WXK_CONTROL);
if (openInTab)
uri.addParam("target=new_tab");
else if (::wxGetKeyState(WXK_SHIFT))
uri.addParam("target=new");
if (!getURIProcessor().handleURI(uri))
notImplementedMessage(this);
}
开发者ID:AlfiyaZi,项目名称:flamerobin,代码行数:28,代码来源:PrintableHtmlWindow.cpp
示例6: OnLinkClicked
void extHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString href = link.GetHref();
wxString target = link.GetTarget();
if (target.StartsWith(wxT("TV:"))) {
TextViewer *tw = new TextViewer(this);
tw->LoadFile(href);
target = target.AfterFirst(wxT(':'));
if (!target.IsEmpty())
tw->SetTitle(target);
tw->ShowModal();
return;
}
#ifdef __WXMSW__
ShellExecute((HWND)GetHandle(), wxT("open"), href.c_str(), NULL, NULL, SW_SHOWNORMAL);
#else
::wxLaunchDefaultBrowser(href, wxBROWSER_NEW_WINDOW);
#endif
}
开发者ID:carriercomm,项目名称:opennx-1,代码行数:19,代码来源:ExtHtmlWindow.cpp
示例7: OnLinkClicked
void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString href = link.GetHref();
if( href.StartsWith(wxT("innerlink:")) )
{
this->SetPage( HelpText( href.Mid( 10 )));
this->GetParent()->SetLabel( TitleText( href.Mid( 10 )));
return;
}
OpenInDefaultBrowser(link);
}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:11,代码来源:LinkingHtmlWindow.cpp
示例8: OpenInDefaultBrowser
void OpenInDefaultBrowser(const wxHtmlLinkInfo& link)
{
#ifdef __WXMAC__
wxString openCmd = wxT("open ") + link.GetHref();
::wxExecute(openCmd);
#else
#ifdef __WXMSW__
wxFileType* pFileType = wxTheMimeTypesManager->GetFileTypeFromExtension(wxT(".htm"));
if (pFileType == NULL)
return;
wxString openCmd = pFileType->GetOpenCommand(link.GetHref());
if (openCmd.Contains(wxT("iexplore.exe")))
// GetOpenCommand is not quite right for Internet Explorer.
openCmd.Replace(wxT("WWW_OpenURL#\"file://"), wxT("WWW_OpenURL#\""));
::wxExecute(openCmd);
delete pFileType;
#else
wxLaunchDefaultBrowser(link.GetHref());
#endif
#endif
};
开发者ID:ruthmagnus,项目名称:audacity,代码行数:21,代码来源:LinkingHtmlWindow.cpp
示例9: OnLinkClicked
void SjHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString href = link.GetHref();
wxString rest;
if( href.StartsWith(wxT("ext://"), &rest) )
{
g_tools->ExploreUrl(rest);
return;
}
else if( href.StartsWith(wxT("http://")) )
{
g_tools->ExploreUrl(href);
return;
}
else if( href.StartsWith(wxT("web:"), &rest) )
{
// explore the silverjuke homepage
long homepageId;
rest.AfterLast(',').ToLong(&homepageId);
if( homepageId >= 0 && homepageId < SJ_HOMEPAGE_MAX_PAGE_INDEX )
{
g_tools->ExploreHomepage((SjHomepageId)homepageId);
return;
}
}
else if( href.StartsWith(wxT("id:"), &rest) )
{
// just send the id as an command event to the top level window where
// this html windows is placed in
long id;
rest.ToLong(&id);
wxCommandEvent fwd(wxEVT_COMMAND_MENU_SELECTED, id);
SjDialog::FindTopLevel(this)->AddPendingEvent(fwd);
return;
}
else if( href.StartsWith(wxT("page:"), &m_clickedLink) )
{
// go to another page, used by the help window;
// needed at least for "more..." in the page after buying silverjuke
wxCommandEvent fwd(wxEVT_COMMAND_MENU_SELECTED, IDO_LINKCLICKED);
SjDialog::FindTopLevel(this)->AddPendingEvent(fwd);
return;
}
wxLogError(wxT("Unknown link \"%s\"."), href.c_str());
}
开发者ID:thorstenb,项目名称:silverjuke,代码行数:47,代码来源:htmlwindow.cpp
示例10: OnLinkClicked
void MyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) {
wxString url = link.GetHref();
if ( url.StartsWith(wxT("http:")) || url.StartsWith(wxT("mailto:")) )
{
// pass http/mailto URL to user's preferred browser/emailer
#ifdef __WXMAC__
// wxLaunchDefaultBrowser doesn't work on Mac with IE
// but it's easier just to use the Mac OS X open command
if ( wxExecute(wxT("open ") + url, wxEXEC_ASYNC) == -1 )
wxLogWarning(wxT("Could not open URL!"));
#else
if ( !wxLaunchDefaultBrowser(url) )
wxLogWarning(wxT("Could not launch browser!"));
#endif
}
else
{
LoadPage(url);
}
}
开发者ID:BackupTheBerlios,项目名称:musik-svn,代码行数:20,代码来源:MusikAboutDlg.cpp
示例11: OnLinkClicked
void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString href = link.GetHref();
if( href.StartsWith(wxT("innerlink:")) )
{
wxString FileName =
wxFileName( FileNames::HtmlHelpDir(), href.Mid( 10 ) + wxT(".htm") ).GetFullPath();
if( wxFileExists( FileName ) )
{
HelpSystem::ShowHelpDialog(NULL, FileName, wxT(""));
return;
}
else
{
SetPage( HelpText( href.Mid( 10 )));
wxGetTopLevelParent(this)->SetLabel( TitleText( href.Mid( 10 )));
}
}
else if( href.StartsWith(wxT("mailto:")) || href.StartsWith(wxT("file:")) )
{
OpenInDefaultBrowser( link );
return;
}
else if( !href.StartsWith( wxT("http:")) && !href.StartsWith( wxT("https:")) )
{
HtmlWindow::OnLinkClicked( link );
}
else
{
OpenInDefaultBrowser(link);
return;
}
BrowserFrame * pDlg = wxDynamicCast( GetRelatedFrame(), BrowserFrame );
if( pDlg )
{
pDlg->UpdateButtons();
};
}
开发者ID:Avi2011class,项目名称:audacity,代码行数:38,代码来源:LinkingHtmlWindow.cpp
示例12: OnLinkClicked
void HtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
if(wxLaunchDefaultBrowser(link.GetHref()) == FALSE)
wxLogStatus(_T("Failed to launch default browser: "+link.GetHref()));
}
开发者ID:ashengmz,项目名称:espeak,代码行数:5,代码来源:espeakedit.cpp
示例13: OnLinkClicked
/****************************************************************************
PARAMETERS:
URL - String URL that we are navigating to
REMARKS:
Called when the user navigates to a new URL from the current page. We simply
call the LoadPage function above to load the new page and display it.
****************************************************************************/
void wxHtmlAppletWindow::OnLinkClicked(
const wxHtmlLinkInfo& link)
{
LoadPage(link.GetHref());
}
开发者ID:nealey,项目名称:vera,代码行数:13,代码来源:appletwindow.cpp
示例14: OpenInDefaultBrowser
void OpenInDefaultBrowser(const wxHtmlLinkInfo& link)
{
wxLaunchDefaultBrowser(link.GetHref());
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:4,代码来源:LinkingHtmlWindow.cpp
示例15: OnLinkClicked
void OnLinkClicked(const wxHtmlLinkInfo& link)
{
LaunchBrowser(link.GetHref());
}
开发者ID:idrassi,项目名称:wxFormBuilder,代码行数:4,代码来源:about.cpp
示例16: OnHTMLLinkClicked
void ContentBoxCtrol::OnHTMLLinkClicked(const wxHtmlLinkInfo& link)
{
OnLinkClicked(GetItemForCell(link.GetHtmlCell()), link);
}
开发者ID:gouchi,项目名称:lenmus,代码行数:4,代码来源:lenmus_content_box_ctrol.cpp
示例17: OnLinkClicked
void TAboutHtml::OnLinkClicked(const wxHtmlLinkInfo& link)
{
SpawnBrowser(link.GetHref());
}
开发者ID:astojilj,项目名称:astoj_oolongengine,代码行数:4,代码来源:Help.cpp
示例18: OnHTMLLinkClicked
void wxHtmlListBox::OnHTMLLinkClicked(const wxHtmlLinkInfo& link)
{
OnLinkClicked(GetItemForCell(link.GetHtmlCell()), link);
}
开发者ID:beanhome,项目名称:dev,代码行数:4,代码来源:htmllbox.cpp
示例19: OpenInDefaultBrowser
void OpenInDefaultBrowser(const wxHtmlLinkInfo& link)
{
wxURI uri(link.GetHref());
wxLaunchDefaultBrowser(uri.BuildURI());
}
开发者ID:Avi2011class,项目名称:audacity,代码行数:5,代码来源:LinkingHtmlWindow.cpp
示例20: OnLinkClicked
//---------------------------------------------------------
void CACTIVE_HTMLExtraInfo::OnLinkClicked(const wxHtmlLinkInfo &Link)
{
Open_WebBrowser(Link.GetHref());
}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:5,代码来源:active_HTMLExtraInfo.cpp
注:本文中的wxHtmlLinkInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论