Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

bool wxPdfDocument::SetLink ( int  link,
double  y = 0.,
int  page = -1 
) [virtual]

Defines the page and position a link points to.

Parameters:
linkThe link identifier returned by AddLink()
yOrdinate of target position; -1 indicates the current position. The default value is 0 (top of page)
pageNumber of target page; -1 indicates the current page. This is the default value
See also:
AddLink()

Definition at line 127 of file pdfannotation.cpp.

References m_inTemplate, m_page, m_templateId, m_y, and wxPdfLink::SetLink().

Referenced by WriteXmlCell().

{
  if (m_inTemplate)
  {
    wxLogError(_("wxPdfDocument::Link: Setting links in templates is impossible. Current template ID is %d."), m_templateId);
    return false;
  }

  bool isValid = false;
  // Set destination of internal link
  if (ypos == -1)
  {
    ypos = m_y;
  }
  if (page == -1)
  {
    page = m_page;
  }
  wxPdfLinkHashMap::iterator pLink = (*m_links).find(link);
  if (pLink != (*m_links).end())
  {
    isValid = true;
    wxPdfLink* currentLink = pLink->second;
    currentLink->SetLink(page,ypos);
  }
  return isValid;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index