本文整理汇总了C++中wxHtmlLinkEvent类的典型用法代码示例。如果您正苦于以下问题:C++ wxHtmlLinkEvent类的具体用法?C++ wxHtmlLinkEvent怎么用?C++ wxHtmlLinkEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wxHtmlLinkEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: onHTMLLinkClicked
/* MainWindow::onHTMLLinkClicked
* Called when a link is clicked on the HTML Window, so that
* external (http) links are opened in the default browser
*******************************************************************/
void MainWindow::onHTMLLinkClicked(wxHtmlLinkEvent &e) {
string href = e.GetLinkInfo().GetHref();
if (href.StartsWith("http://"))
wxLaunchDefaultBrowser(e.GetLinkInfo().GetHref());
else if (href.StartsWith("recent://")) {
// Recent file
string rs = href.Right(1);
unsigned long index = 0;
rs.ToULong(&index);
index++;
panel_archivemanager->handleAction(S_FMT("aman_recent%d", index));
}
else if (href.StartsWith("action://")) {
// Action
if (href.EndsWith("open"))
theApp->doAction("aman_open");
else if (href.EndsWith("newwad"))
theApp->doAction("aman_newwad");
else if (href.EndsWith("newzip"))
theApp->doAction("aman_newzip");
else if (href.EndsWith("reloadstartpage"))
createStartPage();
}
else
html_startpage->OnLinkClicked(e.GetLinkInfo());
}
开发者ID:doomtech,项目名称:slade,代码行数:32,代码来源:MainWindow.cpp
示例2: OnDescEdit
void MainFrame::OnDescEdit(wxHtmlLinkEvent& evt)
{
if (evt.GetLinkInfo().GetHref() == wxT("edit_key"))
{
OTL::ObjectPtr<Omega::Registry::IKey> ptrKey(m_strSelection.c_str());
EditKeyDescDlg dialog(this,-1,wxT(""));
dialog.m_strName = m_strSelection;
dialog.m_strDesc = ptrKey->GetDescription().c_wstr();
if (dialog.ShowModal() == wxID_OK)
{
ptrKey->SetDescription(Omega::string_t(dialog.m_strDesc.wc_str(),Omega::string_t::npos));
SetKeyDescription(m_pTree->GetSelection());
}
}
else if (evt.GetLinkInfo().GetHref() == wxT("edit_value"))
{
OTL::ObjectPtr<Omega::Registry::IKey> ptrKey(m_strSelection.c_str());
EditValueDescDlg dialog(this,-1,wxT(""));
dialog.m_strName = m_strSelection;
dialog.m_strValue = evt.GetLinkInfo().GetTarget();
dialog.m_strDesc = ptrKey->GetValueDescription(Omega::string_t(dialog.m_strValue.wc_str(),Omega::string_t::npos)).c_wstr();
if (dialog.ShowModal() == wxID_OK)
{
ptrKey->SetValueDescription(Omega::string_t(dialog.m_strValue.wc_str(),Omega::string_t::npos),Omega::string_t(dialog.m_strDesc.wc_str(),Omega::string_t::npos));
SetValueDescription(dialog.m_strValue,dialog.m_strDesc);
}
}
}
开发者ID:omegaonline,项目名称:oocore,代码行数:34,代码来源:MainFrame.cpp
示例3: wxLaunchDefaultBrowser
void frmScanforDevices::OnHtmlwindow3LinkClicked(wxHtmlLinkEvent& event)
{
if (event.GetLinkInfo().GetHref().StartsWith(_("http://"))) {
wxLaunchDefaultBrowser(event.GetLinkInfo().GetHref());
event.Skip(false);
return;
}
event.Skip();
}
开发者ID:BlueAndi,项目名称:vscp_software,代码行数:10,代码来源:frmscanfordevices.cpp
示例4: GetParent
void S57QueryDialog::OnHtmlLinkClicked(wxHtmlLinkEvent &event)
{
S57ExtraQueryInfoDlg* ExtraObjInfoDlg = new S57ExtraQueryInfoDlg( GetParent(), wxID_ANY, _("Extra Object Info"), wxPoint(GetPosition().x+20, GetPosition().y+20 ), wxSize( g_S57_extradialog_sx, g_S57_extradialog_sy ) );
ExtraObjInfoDlg->m_phtml->LoadPage(event.GetLinkInfo().GetHref());
ExtraObjInfoDlg->SetColorScheme();
ExtraObjInfoDlg->Show(true);
}
开发者ID:OpenCPN,项目名称:OpenCPN,代码行数:7,代码来源:S57QueryDialog.cpp
示例5: OnLinkClicked
void moDirectorStartFrame::OnLinkClicked(wxHtmlLinkEvent& event) {
wxHtmlLinkInfo link( event.GetLinkInfo());
wxString href = link.GetHref();
if (href.StartsWith(_T("MO_CMD_")))
{
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, MODIRECTOR_OPENPROJECT );
wxString pathproject = href.SubString( 7, href.Length()-1);
evt.SetString( pathproject );
wxPostEvent( this->GetParent(), evt);
//return true;
return;
}
if(href.IsSameAs(_T("http://moldeo.computaciongrafica.com/"))
|| href.StartsWith(_T("http")))
{
//wxTextDataObject *data = new wxTextDataObject(revInfo);
//wxTheClipboard->SetData(data);
wxLaunchDefaultBrowser(link.GetHref());
}
if(href.IsSameAs(_T("rev")))
{
//wxTextDataObject *data = new wxTextDataObject(revInfo);
//wxTheClipboard->SetData(data);
//return true;
return;
}
//return false;
}
开发者ID:inaes-tic,项目名称:tv-moldeo,代码行数:34,代码来源:moDirectorStartFrame.cpp
示例6: 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
示例7: OnLeftClickMarkersList
void DIALOG_ERC::OnLeftClickMarkersList( wxHtmlLinkEvent& event )
{
wxString link = event.GetLinkInfo().GetHref();
m_lastMarkerFound = NULL;
long index;
if( !link.ToLong( &index ) )
return;
const SCH_MARKER* marker = m_MarkersList->GetItem( index );
if( marker == NULL )
return;
// Search for the selected marker
SCH_SHEET_PATH* sheet;
SCH_SHEET_LIST SheetList;
bool notFound = true;
for( sheet = SheetList.GetFirst(); sheet; sheet = SheetList.GetNext() )
{
SCH_ITEM* item = (SCH_ITEM*) sheet->LastDrawList();
for( ; item; item = item->Next() )
{
if( item == marker )
{
notFound = false;
break;
}
}
if( notFound == false )
break;
}
if( notFound ) // Error
{
wxMessageBox( _( "Marker not found" ) );
// The marker was deleted, so rebuild marker list
DisplayERC_MarkersList();
return;
}
if( *sheet != m_parent->GetCurrentSheet() )
{
sheet->LastScreen()->SetZoom( m_parent->GetScreen()->GetZoom() );
m_parent->SetCurrentSheet( *sheet );
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
}
m_lastMarkerFound = marker;
m_parent->SetCrossHairPosition( marker->m_Pos );
m_parent->RedrawScreen( marker->m_Pos, false);
}
开发者ID:bpkempke,项目名称:kicad-source-mirror,代码行数:58,代码来源:dialog_erc.cpp
示例8: onHtmlLinkClicked
//リンクがクリックされたときの処理
void TweetList::onHtmlLinkClicked(wxHtmlLinkEvent &event){
cout << "Html Click:" << event.GetId() << "(" << event.GetLinkInfo().GetHref() << ") pos(" << event.GetSelection() << ")" << endl;
wxString hrefStr = event.GetLinkInfo().GetHref();
if(hrefStr.StartsWith("#reply")){
//返信イベントだった場合
wxVector<wxString> items;
wxStringUtil::split(&items, hrefStr, "\t");
ReplyEvent* replyEvent = new ReplyEvent(
items[1],
atol(items[2].ToStdString().c_str())
);
//イベントを親に渡す
wxQueueEvent(parentHandler_, replyEvent);
}
}
开发者ID:bobmk2,项目名称:EaudeColon,代码行数:19,代码来源:TweetList.cpp
示例9: OnHtmlLinkClicked
void MyFrame::OnHtmlLinkClicked(wxHtmlLinkEvent &event)
{
wxLogMessage(wxT("The url '%s' has been clicked!"), event.GetLinkInfo().GetHref().c_str());
if (GetMyBox())
{
GetMyBox()->m_linkClicked = true;
GetMyBox()->RefreshRow(1);
}
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:10,代码来源:htlbox.cpp
示例10: OnLinkClicked
void CProjectListCtrl::OnLinkClicked( wxHtmlLinkEvent& event )
{
// Fire Event
ProjectListCtrlEvent evt(
wxEVT_PROJECTLIST_ITEM_DISPLAY,
wxEmptyString,
event.GetLinkInfo().GetHref(),
true
);
evt.SetEventObject(this);
GetParent()->AddPendingEvent( evt );
}
开发者ID:FpgaAtHome,项目名称:seti_fpga,代码行数:13,代码来源:ProjectListCtrl.cpp
示例11: OnUrlClick
void kitchenFrame::OnUrlClick(wxHtmlLinkEvent& event)
{
long templong;
wxString link = event.GetLinkInfo().GetHref();
link.Mid(0,link.Find(_T(":"))).ToLong(&templong);
href=true;
int num = templong;
wxString temp;
temp << num;
mysqlpp::Query query = conn->query();
wxString dishId = link.Mid(link.Find(_T(":"))+1);
query <<"UPDATE `orders_dishes` SET `ready` = '1' \
WHERE `orders_dishes`.`id` =" << wx2std(dishId, wxConvUI) << " LIMIT 1";
query.execute(); //we just set to ready only one dish from order
int orderId;
query << "SELECT `order_id` FROM `orders_dishes` WHERE `id`="<< wx2std(dishId, wxConvUI);
mysqlpp::StoreQueryResult res = query.store();
if(res)
{
mysqlpp::Row row;
row = res.at(0);
orderId = int(row["order_id"]);
}
query << "SELECT `id` FROM `orders_dishes` WHERE `ready`=0 AND `order_id`="<< orderId;
res = query.store();
if(res)
{
if(!res.num_rows()) //no dishes to prepare
{
query << "UPDATE `orders` SET `status` = '4' WHERE `orders`.`id` ="<< orderId <<" LIMIT 1 ";
query.execute(); //set the whole order to ready state
//redo the pages to update status
fillAll();
wxString tem;
tem << _T("r:") << orderId;
sendMessageToServer(SocketClient1, tem);
}
}
wxString prodName = StaticText9->GetLabel();
fillDetails(prodName);
fillMain();
}
开发者ID:Leonti,项目名称:estescook,代码行数:49,代码来源:kitchenMain.cpp
示例12: OnLinkClicked
//---------------------------------------------------------------------------------------
void BooksDlg::OnLinkClicked(wxHtmlLinkEvent& event)
{
const wxHtmlLinkInfo& link = event.GetLinkInfo();
wxString sLocation = link.GetHref();
//study guide
if (sLocation == "lenmus#study-guide")
{
HelpSystem* pHelp = m_appScope.get_help_controller();
pHelp->display_section(10101); //study-guide
//show_html_document("study-guide.htm");
return;
}
//verify if it is a LenMus command link
int iPos = sLocation.Find("lenmus#");
if (iPos == wxNOT_FOUND)
{
// external link
::wxLaunchDefaultBrowser(sLocation);
}
else
{
wxString filename = sLocation.substr(12);
Paths* pPaths = m_appScope.get_paths();
wxString sPath = pPaths->GetBooksPath();
wxFileName oFile(sPath, filename, wxPATH_NATIVE);
if (!oFile.FileExists())
{
//try to use the english version
sPath = pPaths->GetLocaleRootPath();
oFile.AssignDir(sPath);
oFile.AppendDir("en");
oFile.AppendDir("books");
oFile.SetFullName(filename);
if (!oFile.FileExists())
{
wxMessageBox(_("Sorry: File not found!"));
LOMSE_LOG_WARN(str(boost::format("File '%s' not found!")
% oFile.GetFullPath().wx_str() ));
return;
}
}
m_fullName = oFile.GetFullPath();
EndModal(wxID_OK);
}
}
开发者ID:gouchi,项目名称:lenmus,代码行数:49,代码来源:lenmus_dlg_books.cpp
示例13: OnLinkClicked
void MANFrame::OnLinkClicked(wxHtmlLinkEvent &event)
{
wxString link = event.GetLinkInfo().GetHref();
if (link.StartsWith(_T("man:"), &link))
{
if (link.Last() == _T(')'))
{
link.RemoveLast();
wxString name = link.BeforeLast(_T('('));
if (name.IsEmpty())
{
return;
}
wxString section = link.AfterLast(_T('('));
if (!section.IsEmpty())
{
name += _T(".") + section;
}
SearchManPage(name);
}
}
else if (link.StartsWith(_T("fman:"), &link))
{
wxString man_page = GetManPage(link);
if (man_page.IsEmpty())
{
SetPage(ManPageNotFound);
return;
}
SetPage(cbC2U(man2html_buffer(cbU2C(man_page))));
}
else if (wxFileName(link).GetExt().Mid(0, 3).CmpNoCase(_T("htm")) == 0)
{
m_htmlWindow->LoadPage(link);
}
}
开发者ID:WinterMute,项目名称:codeblocks_sf,代码行数:43,代码来源:MANFrame.cpp
示例14: followLink
/**
* Follow a clicked URL using the default web browser.
* @param event The click event.
*/
void HelpFrame::followLink(wxHtmlLinkEvent& event) {
wxString theURL = event.GetLinkInfo().GetHref();
if ( ! wxLaunchDefaultBrowser(theURL)) {
Tools::log(_T("An error occurred while trying to start the default web browser."));
}
}
开发者ID:mju-oss-13-a,项目名称:team6-crowd3,代码行数:10,代码来源:HelpFrame.cpp
示例15: OnLinkClicked
void mmAboutDialog::OnLinkClicked(wxHtmlLinkEvent& event)
{
wxHtmlLinkInfo link_info = event.GetLinkInfo();
wxString sURL = link_info.GetHref();
wxLaunchDefaultBrowser(sURL);
}
开发者ID:4silvertooth,项目名称:moneymanagerex,代码行数:6,代码来源:aboutdialog.cpp
示例16: OnLink
void AboutDialog::OnLink(wxHtmlLinkEvent & event)
{
wxLaunchDefaultBrowser(event.GetLinkInfo().GetHref());
}
开发者ID:AndresPozo,项目名称:phd2,代码行数:4,代码来源:about_dialog.cpp
示例17: OnClickLink
void ExtensionsDialog::OnClickLink(wxHtmlLinkEvent& evt)
{
::wxLaunchDefaultBrowser(evt.GetLinkInfo().GetHref(), wxBROWSER_NEW_WINDOW);
}
开发者ID:LaloHao,项目名称:rme,代码行数:4,代码来源:extension_window.cpp
示例18: OnLinkClicked
void slHtmlWindow::OnLinkClicked( wxHtmlLinkEvent& evt )
{
wxString url = evt.GetLinkInfo().GetHref();
OpenWebBrowser( url );
}
开发者ID:Mailaender,项目名称:springlobby,代码行数:5,代码来源:slhtmlwindow.cpp
示例19: onHtmlLinkClicked
void DIALOG_ABOUT::onHtmlLinkClicked( wxHtmlLinkEvent& event )
{
::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
}
开发者ID:cpavlina,项目名称:kicad,代码行数:4,代码来源:dialog_about.cpp
示例20: OnLinkClicked
void PluginsConfigurationDlg::OnLinkClicked(wxHtmlLinkEvent& event)
{
wxLaunchDefaultBrowser(event.GetLinkInfo().GetHref());
}
开发者ID:stahta01,项目名称:codeblocks_backup,代码行数:4,代码来源:pluginsconfigurationdlg.cpp
注:本文中的wxHtmlLinkEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论