Пример #1
0
void CHyperLink::OnClicked()
{
    int result = (int)GotoURL(m_strURL, SW_SHOW);
    m_bVisited = (result > HINSTANCE_ERROR);
    if (!m_bVisited) {
        MessageBeep(MB_ICONEXCLAMATION);     // Unable to follow link
        ReportError(result);
    } else 
        SetVisited();                        // Repaint to show visited colour
}
Пример #2
0
void CXHyperLink::OnClicked()
{
	if (!(m_bVisited = GotoURL(m_strURL, SW_SHOW)))
	{
		MessageBeep(MB_ICONEXCLAMATION);     // Unable to follow link
		ReportError();
	}		
	else 
	{
		SetVisited();                        // Repaint to show visited colour
	}
}
Пример #3
0
void CStaticHyperLink::OnClicked()
{
	int result = (int)GotoURL();
	m_bVisited = (result > HINSTANCE_ERROR);
	if (!m_bVisited)
	{
		ReportError(result);
		ASSERT(_T("CStaticHyperLink::OnClicked() Failed to load URL"));
	}
	else
		SetVisited();
}
Пример #4
0
void wxHyperlinkCtrl::SetURL(const wxString &url)
{
    if ( !HasNativeHyperlinkCtrl() )
    {
        wxGenericHyperlinkCtrl::SetURL( url );
        return;
    }

    if ( GetURL() != url )
        SetVisited( false );
    wxGenericHyperlinkCtrl::SetURL( url );
    wxWindow::SetLabel( GetLabelForSysLink(m_labelOrig, url) );
}
Пример #5
0
bool wxHyperlinkCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{
    if ( HasNativeHyperlinkCtrl() )
    {
        switch ( ((LPNMHDR) lParam)->code )
        {
            case NM_CLICK:
            case NM_RETURN:
                SetVisited();
                SendEvent();
                return 0;
        }
    }

   return wxGenericHyperlinkCtrl::MSWOnNotify(idCtrl, lParam, result);
}
///////////////////////////////////////////////////////////////////////////////
// OnClicked
void CXHyperLink::OnClicked()
{
	m_bOverControl = FALSE;
	int result = HINSTANCE_ERROR + 1;
	if (m_bIsURLEnabled)
		result = (int)(INT_PTR)GotoURL(m_strURL, SW_SHOW, m_bAlwaysOpenNew);
	m_bVisited = (result > HINSTANCE_ERROR);
	if (!m_bVisited)
	{
		MessageBeep(MB_ICONEXCLAMATION);	 // Unable to follow link
		ReportError(result);
	}
	else 
		SetVisited();						// Repaint to show visited colour

	NotifyParent();
}
Пример #7
0
/// Handles WM_LBUTTONDOWN to process URL requests
//
void
TUrlLink::EvLButtonDown(uint modKeys, const TPoint& point)
{
  TStatic::EvLButtonDown(modKeys, point);
  // set url !!!!!!!!!!!!!!!!!!1
  HINSTANCE result = GotoURL(UrlAddress.c_str(), SW_SHOW);
  if (result > reinterpret_cast<HINSTANCE>(HINSTANCE_ERROR)){
    ReleaseCapture();
    bOverControl = false;
    Invalidate();
    SetVisited();                        // Repaint to show visited colour
  }
  else{
    MessageBeep(MB_ICONEXCLAMATION);     // Unable to follow link
    ReportError(static_cast<int>(reinterpret_cast<INT_PTR>(result)));
  }
}
Пример #8
0
bool wxHyperlinkCtrl::Create(wxWindow *parent,
                             wxWindowID id,
                             const wxString& label, const wxString& url,
                             const wxPoint& pos,
                             const wxSize& size,
                             long style,
                             const wxString& name)
{
    if ( !HasNativeHyperlinkCtrl() )
    {
        return wxGenericHyperlinkCtrl::Create( parent, id, label, url, pos,
                                               size, style, name );
    }

    if ( !CreateControl(parent, id, pos, size, style,
                        wxDefaultValidator, name) )
    {
        return false;
    }

    SetURL( url );
    SetVisited( false );

    WXDWORD exstyle;
    WXDWORD msStyle = MSWGetStyle(style, &exstyle);

    if ( !MSWCreateControl(WC_LINK, msStyle, pos, size,
                           GetLabelForSysLink( label, url ), exstyle) )
    {
        return false;
    }

    // Make sure both the label and URL are non-empty strings.
    SetURL(url.empty() ? label : url);
    SetLabel(label.empty() ? url : label);

    ConnectMenuHandlers();

    return true;
}
void CHyperLink::OnClicked()
{
	m_bVisited = TRUE; //(result > HINSTANCE_ERROR);
	SetVisited();						 // Repaint to show visited Color
	GotoURL(m_strURL, SW_SHOW);
}
Пример #10
0
/*
	OnClicked()
*/
void CHyperLink::OnClicked(void)
{
	if(OpenUrl())
		SetVisited(TRUE);
}
Пример #11
0
void Traversal::AddNodeToVisit( SpatialGraphKDNode* pNode )
{
	_nodesToVisit.push_back( pNode );
	SetVisited(pNode);
}