poco/PDF/include/Poco/PDF/LinkAnnotation.h
Roger Meier b0581433a7 LICENSE: add info about SPDX-License-Identifier usage and use it
fix: remove executable flag and change back to 100644 (was 100755)

Signed-off-by: Roger Meier <r.meier@siemens.com>
2014-05-14 08:38:09 +02:00

84 lines
1.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// LinkAnnotation.h
//
// $Id: //poco/Main/PDF/include/Poco/PDF/LinkAnnotation.h#4 $
//
// Library: PDF
// Package: PDFCore
// Module: LinkAnnotation
//
// Definition of the LinkAnnotation class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef PDF_LinkAnnotation_INCLUDED
#define PDF_LinkAnnotation_INCLUDED
#include "Poco/PDF/PDF.h"
#include "Poco/PDF/Resource.h"
#include "Poco/PDF/Destination.h"
namespace Poco {
namespace PDF {
class PDF_API LinkAnnotation: public Resource<HPDF_Annotation>
/// A LinkAnnotation represents a PDF annotation resource.
{
public:
enum Highlight
{
HIGHTLIGHT_NONE = HPDF_ANNOT_NO_HIGHTLIGHT,
/// No highlighting.
HIGHTLIGHT_INVERT_BOX = HPDF_ANNOT_INVERT_BOX,
/// Invert the contents of the area of annotation.
HIGHTLIGHT_INVERT_BORDER = HPDF_ANNOT_INVERT_BORDER,
/// Invert the annotations border.
HIGHTLIGHT_DOWN_APPEARANCE = HPDF_ANNOT_DOWN_APPEARANCE
/// Dent the annotation.
};
LinkAnnotation(HPDF_Doc* pPDF,
const HPDF_Annotation& annotation,
const std::string& name = "");
/// Creates the annotation.
virtual ~LinkAnnotation();
/// Destroys the annotation.
void setHighlight(Highlight mode);
/// Sets highlighting of the link.
void setBorderStyle(float width, Poco::UInt32 dashOn, Poco::UInt32 dashOff);
/// Sets the link border style.
};
//
// inlines
//
inline void LinkAnnotation::setHighlight(Highlight mode)
{
HPDF_LinkAnnot_SetHighlightMode(handle(),
static_cast<HPDF_AnnotHighlightMode>(mode));
}
inline void LinkAnnotation::setBorderStyle(float width, Poco::UInt32 dashOn, Poco::UInt32 dashOff)
{
HPDF_LinkAnnot_SetBorderStyle(handle(), width, dashOn, dashOff);
}
} } // namespace Poco::PDF
#endif // PDF_LinkAnnotation_INCLUDED