Aspose::Slides::Control Class Reference

Represents an ActiveX control. More...

Inherits Aspose::Slides::IControl, and Aspose::Slides::IDOMObject.

Public Member Functions

PersistenceType get_Persistence ()
 Gets the method used to store properties of the ActiveX control. Read only PersistenceType. More...
 
System::String get_Name ()
 Gets the name of this control. Read System::String. More...
 
void set_Name (System::String value)
 Sets the name of this control. Write System::String. More...
 
System::Guid get_ClassId ()
 Gets class id of this control. Read-only Guid. More...
 
void set_ClassId (System::Guid value)
 Gets class id of this control. Read-only Guid. More...
 
System::SharedPtr< IPictureFillFormatget_SubstitutePictureFormat ()
 Returns Control image fill properties object. Read-only IPictureFillFormat. More...
 
System::SharedPtr< IShapeFrameget_Frame ()
 Returns control's frame. Read IShapeFrame. More...
 
void set_Frame (System::SharedPtr< IShapeFrame > value)
 Sets control's frame. Write IShapeFrame. More...
 
System::SharedPtr< IControlPropertiesCollectionget_Properties ()
 Returns a collection of ActiveX properties. More...
 
System::ArrayPtr< uint8_t > get_ActiveXControlBinary ()
 Specifies the persistence of an ActiveX control when the method used to persist is either PersistStream, PersistStreamInit or PersistStorage. More...
 
System::SharedPtr< IDOMObjectget_Parent_Immediate ()
 Returns Parent_Immediate object. Read-only IDOMObject. More...
 
System::SharedPtr< IBaseSlideget_Slide ()
 Returns the base slide. Read-only IBaseSlide. More...
 
System::SharedPtr< IPresentationget_Presentation ()
 Returns the presentation. Read-only IPresentation. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 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...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual 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< UnsupportedProps::PPTXUnsupportedProps::ControlPPTXUnsupportedProps > get_PPTXUnsupportedProps ()
 
System::SharedPtr< DOM::UnsupportedProps::PPTUnsupportedProps::ControlPPTUnsupportedProps > get_PPTUnsupportedProps ()
 
void set_Persistence (PersistenceType value)
 Gets the method used to store properties of the ActiveX control. Read only PersistenceType. More...
 
void set_ActiveXControlBinary (System::ArrayPtr< uint8_t > value)
 Specifies the persistence of an ActiveX control when the method used to persist is either PersistStream, PersistStreamInit or PersistStorage. More...
 
bool get_Unprocessed () const
 Determines whether control will be serialized in XML. More...
 
void set_Unprocessed (bool value)
 Determines whether control will be serialized in XML. More...
 
 Control (System::SharedPtr< ControlCollection > parentImmediate)
 
void Draw (System::SharedPtr< Drawing::Canvas > canvas, System::SharedPtr< Drawing::RenderContext > rc)
 

Additional Inherited Members

- 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

Represents an ActiveX control.

Constructor & Destructor Documentation

◆ Control()

Aspose::Slides::Control::Control ( System::SharedPtr< ControlCollection parentImmediate)
protected

Member Function Documentation

◆ Draw()

void Aspose::Slides::Control::Draw ( System::SharedPtr< Drawing::Canvas >  canvas,
System::SharedPtr< Drawing::RenderContext >  rc 
)
protected

◆ get_ActiveXControlBinary()

System::ArrayPtr<uint8_t> Aspose::Slides::Control::get_ActiveXControlBinary ( )
virtual

Specifies the persistence of an ActiveX control when the method used to persist is either PersistStream, PersistStreamInit or PersistStorage.

Next example shows the using ActiveXControlBinary property for changing ActiveX properties:

if (control->get_Persistence() == PersistenceType::PersistPropertyBag)
{
control->get_Properties()->idx_set(u"Value", value);
}
else
{
// Use your own method for managing ActiveX properties stored in its binary file
YourMethodHere(control->get_ActiveXControlBinary());
}

Implements Aspose::Slides::IControl.

◆ get_ClassId()

System::Guid Aspose::Slides::Control::get_ClassId ( )
virtual

Gets class id of this control. Read-only Guid.

Implements Aspose::Slides::IControl.

◆ get_Frame()

System::SharedPtr<IShapeFrame> Aspose::Slides::Control::get_Frame ( )
virtual

Returns control's frame. Read IShapeFrame.

Implements Aspose::Slides::IControl.

◆ get_Name()

System::String Aspose::Slides::Control::get_Name ( )
virtual

Gets the name of this control. Read System::String.

Implements Aspose::Slides::IControl.

◆ get_Parent_Immediate()

System::SharedPtr<IDOMObject> Aspose::Slides::Control::get_Parent_Immediate ( )
virtual

Returns Parent_Immediate object. Read-only IDOMObject.

Implements Aspose::Slides::IDOMObject.

◆ get_Persistence()

PersistenceType Aspose::Slides::Control::get_Persistence ( )
virtual

Gets the method used to store properties of the ActiveX control. Read only PersistenceType.

Next example shows the using Persistence property for checking if properties of ActiveX object may be changed as XML based ActiveX properties:

if (control->get_Persistence() == PersistenceType::PersistPropertyBag)
{
control->get_Properties()->idx_set(u"Value", value);
}
else
{
// Use your own method for managing ActiveX properties stored in its binary file
YourMethodHere(control->get_ActiveXControlBinary());
}

Implements Aspose::Slides::IControl.

◆ get_PPTUnsupportedProps()

System::SharedPtr<DOM::UnsupportedProps::PPTUnsupportedProps::ControlPPTUnsupportedProps> Aspose::Slides::Control::get_PPTUnsupportedProps ( )
protected

◆ get_PPTXUnsupportedProps()

System::SharedPtr<UnsupportedProps::PPTXUnsupportedProps::ControlPPTXUnsupportedProps> Aspose::Slides::Control::get_PPTXUnsupportedProps ( )
protected

◆ get_Presentation()

System::SharedPtr<IPresentation> Aspose::Slides::Control::get_Presentation ( )
virtual

Returns the presentation. Read-only IPresentation.

Implements Aspose::Slides::IPresentationComponent.

◆ get_Properties()

System::SharedPtr<IControlPropertiesCollection> Aspose::Slides::Control::get_Properties ( )
virtual

Returns a collection of ActiveX properties.

Note: Aspose.Slides supports only XML based ActiveX properties. If properties stored in binary format, this property will return null.

Read-only IControlPropertiesCollection.

Implements Aspose::Slides::IControl.

◆ get_Slide()

System::SharedPtr<IBaseSlide> Aspose::Slides::Control::get_Slide ( )
virtual

Returns the base slide. Read-only IBaseSlide.

Implements Aspose::Slides::ISlideComponent.

◆ get_SubstitutePictureFormat()

System::SharedPtr<IPictureFillFormat> Aspose::Slides::Control::get_SubstitutePictureFormat ( )
virtual

Returns Control image fill properties object. Read-only IPictureFillFormat.

Implements Aspose::Slides::IControl.

◆ get_Unprocessed()

bool Aspose::Slides::Control::get_Unprocessed ( ) const
protected

Determines whether control will be serialized in XML.

◆ set_ActiveXControlBinary()

void Aspose::Slides::Control::set_ActiveXControlBinary ( System::ArrayPtr< uint8_t >  value)
protected

Specifies the persistence of an ActiveX control when the method used to persist is either PersistStream, PersistStreamInit or PersistStorage.

Next example shows the using ActiveXControlBinary property for changing ActiveX properties:

if (control->get_Persistence() == PersistenceType::PersistPropertyBag)
{
control->get_Properties()->idx_set(u"Value", value);
}
else
{
// Use your own method for managing ActiveX properties stored in its binary file
YourMethodHere(control->get_ActiveXControlBinary());
}

◆ set_ClassId()

void Aspose::Slides::Control::set_ClassId ( System::Guid  value)

Gets class id of this control. Read-only Guid.

◆ set_Frame()

void Aspose::Slides::Control::set_Frame ( System::SharedPtr< IShapeFrame value)
virtual

Sets control's frame. Write IShapeFrame.

Implements Aspose::Slides::IControl.

◆ set_Name()

void Aspose::Slides::Control::set_Name ( System::String  value)
virtual

Sets the name of this control. Write System::String.

Implements Aspose::Slides::IControl.

◆ set_Persistence()

void Aspose::Slides::Control::set_Persistence ( PersistenceType  value)
protected

Gets the method used to store properties of the ActiveX control. Read only PersistenceType.

Next example shows the using Persistence property for checking if properties of ActiveX object may be changed as XML based ActiveX properties:

if (control->get_Persistence() == PersistenceType::PersistPropertyBag)
{
control->get_Properties()->idx_set(u"Value", value);
}
else
{
// Use your own method for managing ActiveX properties stored in its binary file
YourMethodHere(control->get_ActiveXControlBinary());
}

◆ set_Unprocessed()

void Aspose::Slides::Control::set_Unprocessed ( bool  value)
protected

Determines whether control will be serialized in XML.