Loading...
Searching...
No Matches
Sound.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFAnnotsSound
6#define PDFTRON_H_CPPPDFAnnotsSound
7
8#include <PDF/Annots/Markup.h>
9
10namespace pdftron {
11 namespace PDF {
12 namespace Annots {
20class Sound : public Markup
21{
22 public:
32
40
47 Sound(const Annot& ann) : Markup(ann.GetSDFObj()) {}
48
57 static Sound Create(SDF::SDFDoc& doc, const Rect& pos, Icon icon = e_Speaker );
58 static Sound CreateAnnot(SDF::SDFDoc& doc, const Rect& pos, Icon icon = e_Speaker);
59
74 static Sound CreateWithData(SDF::SDFDoc& doc, const Rect& pos, Filters::Filter source_data, int bits_per_sample, int sample_freq, int num_channels, Icon icon = e_Speaker );
75
84 static Sound Create(SDF::SDFDoc& doc, const Point& pos, Icon icon = e_Speaker );
85 static Sound CreateAnnot(SDF::SDFDoc& doc, const Point& pos, Icon icon = e_Speaker);
86
95
104
114 Icon GetIcon() const;
115
127
142 const char* GetIconName() const;
143
159 void SetIcon(const char* type);
160
161// @cond PRIVATE_DOC
162#ifndef SWIGHIDDEN
163Sound(TRN_Annot sound);
164#endif
165// @endcond
166
167}; //class Sound
168 }; //namespace Annot
169 }; //namespace PDF
170}; //namespace pdftron
171#include <Impl/Page.inl>
172
173#endif // PDFTRON_H_CPPPDFAnnotsSound
Annot(SDF::Obj d=0)
SDF::Obj GetSDFObj() const
SDF::Obj GetSoundStream() const
static Sound Create(SDF::SDFDoc &doc, const Point &pos, Icon icon=e_Speaker)
static Sound CreateAnnot(SDF::SDFDoc &doc, const Point &pos, Icon icon=e_Speaker)
void SetIcon(Icon type=e_Speaker)
Sound(const Annot &ann)
Definition Sound.h:47
static Sound Create(SDF::SDFDoc &doc, const Rect &pos, Icon icon=e_Speaker)
void SetIcon(const char *type)
const char * GetIconName() const
void SetSoundStream(SDF::Obj icon)
static Sound CreateWithData(SDF::SDFDoc &doc, const Rect &pos, Filters::Filter source_data, int bits_per_sample, int sample_freq, int num_channels, Icon icon=e_Speaker)
static Sound CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, Icon icon=e_Speaker)
@ e_Unknown
Invalid or non-standard.
Definition Sound.h:30
@ e_Speaker
Speaker sound.
Definition Sound.h:28