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
10 namespace pdftron {
11 namespace PDF {
12 namespace Annots {
20 class Sound : public Markup
21{
22 public:
26 enum Icon
27 {
28 e_Speaker,
29 e_Mic,
30 e_Unknown
31 };
32
39 Sound(SDF::Obj d = 0);
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
94 SDF::Obj GetSoundStream() const;
95
103 void SetSoundStream(SDF::Obj icon);
104
114 Icon GetIcon() const;
115
126 void SetIcon(Icon type=e_Speaker);
127
142 const char* GetIconName() const;
143
159 void SetIcon(const char* type);
160
161// @cond PRIVATE_DOC
162#ifndef SWIGHIDDEN
163 Sound(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
Markup.h
pdftron::Filters::Filter
Definition Filter.h:46
pdftron::PDF::Annot::Annot
Annot(SDF::Obj d=0)
pdftron::PDF::Annot::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Annots::Markup::Markup
Markup(SDF::Obj d=0)
pdftron::PDF::Annots::Sound::GetSoundStream
SDF::Obj GetSoundStream() const
pdftron::PDF::Annots::Sound::Create
static Sound Create(SDF::SDFDoc &doc, const Point &pos, Icon icon=e_Speaker)
pdftron::PDF::Annots::Sound::CreateAnnot
static Sound CreateAnnot(SDF::SDFDoc &doc, const Point &pos, Icon icon=e_Speaker)
pdftron::PDF::Annots::Sound::SetIcon
void SetIcon(Icon type=e_Speaker)
pdftron::PDF::Annots::Sound::Sound
Sound(const Annot &ann)
Definition Sound.h:47
pdftron::PDF::Annots::Sound::Create
static Sound Create(SDF::SDFDoc &doc, const Rect &pos, Icon icon=e_Speaker)
pdftron::PDF::Annots::Sound::SetIcon
void SetIcon(const char *type)
pdftron::PDF::Annots::Sound::GetIconName
const char * GetIconName() const
pdftron::PDF::Annots::Sound::SetSoundStream
void SetSoundStream(SDF::Obj icon)
pdftron::PDF::Annots::Sound::Sound
Sound(SDF::Obj d=0)
pdftron::PDF::Annots::Sound::GetIcon
Icon GetIcon() const
pdftron::PDF::Annots::Sound::CreateWithData
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)
pdftron::PDF::Annots::Sound::CreateAnnot
static Sound CreateAnnot(SDF::SDFDoc &doc, const Rect &pos, Icon icon=e_Speaker)
pdftron::PDF::Annots::Sound::Icon
Icon
Definition Sound.h:27
pdftron::PDF::Annots::Sound::e_Unknown
@ e_Unknown
Invalid or non-standard.
Definition Sound.h:30
pdftron::PDF::Annots::Sound::e_Mic
@ e_Mic
Mic sound.
Definition Sound.h:29
pdftron::PDF::Annots::Sound::e_Speaker
@ e_Speaker
Speaker sound.
Definition Sound.h:28
pdftron::PDF::Point
Definition Point.h:13
pdftron::PDF::Rect
Definition Rect.h:29
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::PDF::Annots
Definition Caret.h:12
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10