Aspose::Pdf::Annotations::AppearanceDictionary Class Referencefinal

Annotation appearance dictionary specifying how the annotation shall be presented visually on the page. More...

Inherits System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

Classes

class  AppearanceKey
 

Public Member Functions

bool get_IsReadOnly () const
 Gets a value indicating whether dictionary is read-only. More...
 
bool get_IsFixedSize ()
 Gets a value indicating whether dictionary has a fixed size. More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::String > > get_Keys () const
 Gets keys of the dictionary. If appearance dictionary has subditionaries, then Keys contains (N|R|D).state values, where N - normal appearance, R - rollover appearance, D - down appearance and state - the name of the state (e.g. On, Off for checkboxes). More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::SharedPtr< XForm > > > get_Values () const
 Gets the list of the dictionary values. Result collection contains the list of XForm objects. More...
 
bool get_IsSynchronized ()
 Gets a value indicating whether access to the dictionary is synchronized (thread safe). More...
 
System::SharedPtr< System::Objectget_SyncRoot ()
 Gets an object that can be used to synchronize access to the dictionary. More...
 
int32_t get_Count () const
 Gets the number of elements contained in the dictionary. More...
 
void Clear ()
 Removes all elements from the dictionary. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm > > > > GetEnumerator ()
 Returns an IDictionaryEnumerator object for the dictionary. More...
 
void CopyTo (System::ArrayPtr< System::SharedPtr< XForm >> array, int32_t index)
 Copies the elements of the dictionary to an Array, starting at a particular Array index. More...
 
System::SharedPtr< XFormidx_get (System::String const &key) const
 Represents convenient form for getting appearance streams. More...
 
void idx_set (System::String const &key, System::SharedPtr< XForm > value)
 Represents convenient form for getting appearance streams. More...
 
void Add (System::String const &key, System::SharedPtr< XForm > const &value)
 Add X form for specifed key. More...
 
bool ContainsKey (System::String const &key) const
 Determines does this dictionary contasins specified key. More...
 
bool Remove (System::String const &key)
 Removes key from the dictionary. More...
 
bool TryGetValue (System::String const &key, System::SharedPtr< XForm > &value)
 Tries to find key in the dictionary and retreives value if found. More...
 
void Add (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >> const &item)
 Adds pair with key and value into the dictionary. More...
 
bool Contains (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >> const &item) const
 Checks does specified key-value pair is contained in the dictionary. More...
 
void CopyTo (System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >>> array, int32_t arrayIndex)
 Copies the elements of the ICollection to an Array, starting at a particular Array index. More...
 
bool Remove (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >> const &item)
 Removes key/value pair from the colleciton. More...
 
- Public Member Functions inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >
bool get_IsFixedSize () const
 
bool get_IsSynchronized () const
 
SharedPtr< Objectget_SyncRoot ()
 
virtual void CopyTo (ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > >> arr, int index) override
 
virtual System::SharedPtr< Aspose::Pdf::XFormGetValueOrDefault (const System::String &key) const
 Returns value if found; or Value() otherwise. More...
 
virtual System::SharedPtr< Aspose::Pdf::XFormGetValueOrDefault (const System::String &key, const System::SharedPtr< Aspose::Pdf::XForm > &defaultValue) const
 Returns value if found; or defaultValue otherwise. More...
 
virtual System::SharedPtr< Aspose::Pdf::XFormGetValueOrNull (const System::String &key) const
 Returns value if found; or null otherwise, make sense only for reference types. More...
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > >
virtual void Add (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > &item)=0
 
virtual bool Contains (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > &item) const=0
 
virtual bool Remove (const KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > &item)=0
 
virtual void CopyTo (System::ArrayPtr< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > > array, int arrayIndex)=0
 
ICollectionoperator= (ICollection &&)
 
ICollectionoperator= (const ICollection &)
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&)
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

System::SharedPtr< System::Collections::Generic::ICollection< System::String > > get_KeysInternal () const
 Implementation of get_Keys() method. More...
 
System::SharedPtr< System::Collections::Generic::ICollection< System::SharedPtr< XForm > > > get_ValuesInternal () const
 Implementation of get_Values() method. More...
 
 AppearanceDictionary (System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > dict)
 
System::SharedPtr< XFormgetForm (System::ArrayPtr< System::String > key)
 Gets form by the key. More...
 
void setForm (System::ArrayPtr< System::String > key, System::SharedPtr< XForm > form)
 Sets the form for given key. More...
 
System::SharedPtr< XFormgetForm (System::String key)
 Retreives form by the string key. More...
 
void setForm (System::String key, System::SharedPtr< XForm > form)
 Sets form for given key. More...
 
virtual ~AppearanceDictionary ()
 
- Protected Member Functions inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >
 ~IDictionary () override
 Destructor. More...
 
- Protected Member Functions inherited from System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > >
 ~IEnumerable () override
 Destructor. More...
 

Protected Attributes

System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > dict
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >
typedef ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > > BaseType
 Base interface type. More...
 
typedef KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > KeyValuePairType
 Key value pair type. More...
 
- Public Types inherited from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > >
typedef KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > ValueType
 Value type name. More...
 
typedef ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > >
typedef IEnumerator< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > > IEnumeratorType
 Enumerator type. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Annotation appearance dictionary specifying how the annotation shall be presented visually on the page.

Constructor & Destructor Documentation

◆ AppearanceDictionary()

Aspose::Pdf::Annotations::AppearanceDictionary::AppearanceDictionary ( System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary >  dict)
protected

◆ ~AppearanceDictionary()

virtual Aspose::Pdf::Annotations::AppearanceDictionary::~AppearanceDictionary ( )
protectedvirtual

Member Function Documentation

◆ Add() [1/2]

void Aspose::Pdf::Annotations::AppearanceDictionary::Add ( System::String const &  key,
System::SharedPtr< XForm > const &  value 
)
virtual

Add X form for specifed key.

Parameters
keyElement key.
valueXForm object value.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ Add() [2/2]

void Aspose::Pdf::Annotations::AppearanceDictionary::Add ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >> const &  item)

Adds pair with key and value into the dictionary.

Parameters
itemItem to be added.

◆ Clear()

void Aspose::Pdf::Annotations::AppearanceDictionary::Clear ( )
virtual

◆ Contains()

bool Aspose::Pdf::Annotations::AppearanceDictionary::Contains ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >> const &  item) const

Checks does specified key-value pair is contained in the dictionary.

Parameters
itemKey-value pair.
Returns
true if this pauir was found.

◆ ContainsKey()

bool Aspose::Pdf::Annotations::AppearanceDictionary::ContainsKey ( System::String const &  key) const
virtual

Determines does this dictionary contasins specified key.

Parameters
keyKey to search in the dictionary.
Returns
true if key is found.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ CopyTo() [1/2]

void Aspose::Pdf::Annotations::AppearanceDictionary::CopyTo ( System::ArrayPtr< System::SharedPtr< XForm >>  array,
int32_t  index 
)

Copies the elements of the dictionary to an Array, starting at a particular Array index.

Parameters
arrayArray where items must be copied.
indexIndex where items must be copied.

◆ CopyTo() [2/2]

void Aspose::Pdf::Annotations::AppearanceDictionary::CopyTo ( System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >>>  array,
int32_t  arrayIndex 
)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters
arrayThe one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.

◆ get_Count()

int32_t Aspose::Pdf::Annotations::AppearanceDictionary::get_Count ( ) const
virtual

◆ get_IsFixedSize()

bool Aspose::Pdf::Annotations::AppearanceDictionary::get_IsFixedSize ( )

Gets a value indicating whether dictionary has a fixed size.

◆ get_IsReadOnly()

bool Aspose::Pdf::Annotations::AppearanceDictionary::get_IsReadOnly ( ) const
virtual

Gets a value indicating whether dictionary is read-only.

Reimplemented from System::Collections::Generic::ICollection< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > >.

◆ get_IsSynchronized()

bool Aspose::Pdf::Annotations::AppearanceDictionary::get_IsSynchronized ( )

Gets a value indicating whether access to the dictionary is synchronized (thread safe).

◆ get_Keys()

System::SharedPtr<System::Collections::Generic::ICollection<System::String> > Aspose::Pdf::Annotations::AppearanceDictionary::get_Keys ( ) const
virtual

Gets keys of the dictionary. If appearance dictionary has subditionaries, then Keys contains (N|R|D).state values, where N - normal appearance, R - rollover appearance, D - down appearance and state - the name of the state (e.g. On, Off for checkboxes).

Reimplemented from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ get_KeysInternal()

System::SharedPtr<System::Collections::Generic::ICollection<System::String> > Aspose::Pdf::Annotations::AppearanceDictionary::get_KeysInternal ( ) const
protectedvirtual

◆ get_SyncRoot()

System::SharedPtr<System::Object> Aspose::Pdf::Annotations::AppearanceDictionary::get_SyncRoot ( )

Gets an object that can be used to synchronize access to the dictionary.

◆ get_Values()

System::SharedPtr<System::Collections::Generic::ICollection<System::SharedPtr<XForm> > > Aspose::Pdf::Annotations::AppearanceDictionary::get_Values ( ) const
virtual

Gets the list of the dictionary values. Result collection contains the list of XForm objects.

Reimplemented from System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ get_ValuesInternal()

System::SharedPtr<System::Collections::Generic::ICollection<System::SharedPtr<XForm> > > Aspose::Pdf::Annotations::AppearanceDictionary::get_ValuesInternal ( ) const
protectedvirtual

◆ GetEnumerator()

Returns an IDictionaryEnumerator object for the dictionary.

Returns
Enumerator of the dictionary.

Implements System::Collections::Generic::IEnumerable< KeyValuePair< System::String, System::SharedPtr< Aspose::Pdf::XForm > > >.

◆ getForm() [1/2]

System::SharedPtr<XForm> Aspose::Pdf::Annotations::AppearanceDictionary::getForm ( System::ArrayPtr< System::String key)
protected

Gets form by the key.

Parameters
keyString array whcih is key of the form.
Returns
Retreived form.

◆ getForm() [2/2]

System::SharedPtr<XForm> Aspose::Pdf::Annotations::AppearanceDictionary::getForm ( System::String  key)
protected

Retreives form by the string key.

Parameters
keyString key.
Returns
Retreived form.

◆ idx_get()

System::SharedPtr<XForm> Aspose::Pdf::Annotations::AppearanceDictionary::idx_get ( System::String const &  key) const
virtual

Represents convenient form for getting appearance streams.

Parameters
keyRepresents path to appearance stream. If appearance dictionary has subdictionaries, then path must contain 2 parts (Keys), else path has only one part.
Returns
XForm object (appearance stream) which corresponds to the given key.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ idx_set()

void Aspose::Pdf::Annotations::AppearanceDictionary::idx_set ( System::String const &  key,
System::SharedPtr< XForm value 
)
virtual

Represents convenient form for getting appearance streams.

Parameters
keyRepresents path to appearance stream. If appearance dictionary has subdictionaries, then path must contain 2 parts (Keys), else path has only one part.
Returns
XForm object (appearance stream) which corresponds to the given key.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ Remove() [1/2]

bool Aspose::Pdf::Annotations::AppearanceDictionary::Remove ( System::String const &  key)
virtual

Removes key from the dictionary.

Parameters
keyKey to be removed from the dictionary.
Returns
true if key was successfully removed.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

◆ Remove() [2/2]

bool Aspose::Pdf::Annotations::AppearanceDictionary::Remove ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< XForm >> const &  item)

Removes key/value pair from the colleciton.

Parameters
itemKey/value pair to be removed.
Returns
true if pair was found and removed.

◆ setForm() [1/2]

void Aspose::Pdf::Annotations::AppearanceDictionary::setForm ( System::ArrayPtr< System::String key,
System::SharedPtr< XForm form 
)
protected

Sets the form for given key.

Parameters
keyKey for the form.
formForm which will be associated with the key.

◆ setForm() [2/2]

void Aspose::Pdf::Annotations::AppearanceDictionary::setForm ( System::String  key,
System::SharedPtr< XForm form 
)
protected

Sets form for given key.

Parameters
keyString key.
formForm to be associated with the key.

◆ TryGetValue()

bool Aspose::Pdf::Annotations::AppearanceDictionary::TryGetValue ( System::String const &  key,
System::SharedPtr< XForm > &  value 
)
virtual

Tries to find key in the dictionary and retreives value if found.

Parameters
keyKey to search in the dictionary.
valueRetreived value.
Returns
true if key was found.

Implements System::Collections::Generic::IDictionary< System::String, System::SharedPtr< Aspose::Pdf::XForm > >.

Member Data Documentation

◆ dict

System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfDictionary> Aspose::Pdf::Annotations::AppearanceDictionary::dict
protected