CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
control.h
1
2#ifndef _aspose_system_windows_forms_control_h_
3#define _aspose_system_windows_forms_control_h_
4
5#include <system/object.h>
6#include <system/reflection.h>
7#include <system/shared_ptr.h>
8#include <system/collections/ilist.h>
9#include <system/string.h>
10#include <system/array.h>
11
12namespace System
13{
14namespace Drawing
15{
16class Graphics;
17}
18namespace Windows
19{
20namespace Forms
21{
22
28class ASPOSECPP_SHARED_CLASS Control : public System::Object
29{
31 RTTI_INFO(System::Windows::Forms::Control, System::BaseTypesInfo<System::Object>)
32
33public:
36
39 class ControlCollection : public System::Collections::Generic::IList<System::SharedPtr<Control>>
40 {
41 private:
43 const System::SharedPtr<Control> mOwner;
44
45 public:
47 ASPOSECPP_SHARED_API ControlCollection(const System::SharedPtr<Control>& owner);
48
50 virtual ASPOSECPP_SHARED_API System::SharedPtr<Control> idx_get(int index) const override;
52 virtual ASPOSECPP_SHARED_API void idx_set(int index, System::SharedPtr<Control> value) override;
54 virtual ASPOSECPP_SHARED_API System::SharedPtr<Control> idx_get(System::String key) const;
56 virtual ASPOSECPP_SHARED_API void idx_set(System::String key, System::SharedPtr<Control> value);
57
59 ASPOSECPP_SHARED_API System::SharedPtr<Control> get_Owner() const;
61 ASPOSECPP_SHARED_API int get_Count() const override;
62
64 virtual ASPOSECPP_SHARED_API void Add(const System::SharedPtr<Control>& value) override;
66 virtual ASPOSECPP_SHARED_API void AddRange(System::ArrayPtr<System::SharedPtr<Control>> controls);
68 virtual ASPOSECPP_SHARED_API void Clear() override;
70 virtual ASPOSECPP_SHARED_API bool Contains(const System::SharedPtr<Control>& control) const override;
72 virtual ASPOSECPP_SHARED_API bool ContainsKey(System::String key) const;
74 ASPOSECPP_SHARED_API System::ArrayPtr<System::SharedPtr<Control>> Find(const System::String& key, bool searchAllChildren) const;
76 ASPOSECPP_SHARED_API int GetChildIndex(const System::SharedPtr<Control>& child) const;
78 virtual ASPOSECPP_SHARED_API int GetChildIndex(const System::SharedPtr<Control>& child, bool throwException) const;
82 virtual ASPOSECPP_SHARED_API int IndexOf(const System::SharedPtr<Control>& control) const override;
84 virtual ASPOSECPP_SHARED_API int IndexOfKey(System::String key) const;
86 virtual ASPOSECPP_SHARED_API bool Remove(const System::SharedPtr<Control>& value) override;
88 virtual ASPOSECPP_SHARED_API void RemoveAt(int index) override;
90 virtual ASPOSECPP_SHARED_API void RemoveByKey(System::String key);
92 virtual ASPOSECPP_SHARED_API void SetChildIndex(const System::SharedPtr<Control>& child, int newIndex);
94 virtual ASPOSECPP_SHARED_API void Insert(int index, const System::SharedPtr<Control>& item) override;
96 virtual ASPOSECPP_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<Control>> array, int arrayIndex) override;
97 protected:
99 ASPOSECPP_SHARED_API ~ControlCollection() override;
100 };
101};
102
103}
104}
105}
106
107#endif
Interface of indexed container of elements. Objects of this class should only be allocated using Syst...
Definition: ilist.h:19
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Collection of controls. Not implemented.
Definition: control.h:40
System::SharedPtr< Control > get_Owner() const
Gets collection owner control.
int GetChildIndex(const System::SharedPtr< Control > &child) const
Looks for specific control.
virtual void idx_set(System::String key, System::SharedPtr< Control > value)
By-name accessor.
virtual void RemoveByKey(System::String key)
Removes control from collection.
virtual int IndexOfKey(System::String key) const
Looks for named control in collection.
virtual int IndexOf(const System::SharedPtr< Control > &control) const override
Looks for control in collection.
virtual void AddRange(System::ArrayPtr< System::SharedPtr< Control > > controls)
Adds several controls into collection.
virtual void Insert(int index, const System::SharedPtr< Control > &item) override
Inserts control into collection.
virtual bool ContainsKey(System::String key) const
Checks if control with specific name is present in collection.
virtual void SetChildIndex(const System::SharedPtr< Control > &child, int newIndex)
Moves control to a new position.
virtual void RemoveAt(int index) override
Removes control from collection.
int get_Count() const override
Gets number of controls in collection.
virtual void idx_set(int index, System::SharedPtr< Control > value) override
By-index accessor.
ControlCollection(const System::SharedPtr< Control > &owner)
Constructor.
virtual SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< Control > > > GetEnumerator() override
Gets enumerator to iterate through collection.
virtual void Clear() override
Deletes all controls from collection.
virtual void CopyTo(System::ArrayPtr< System::SharedPtr< Control > > array, int arrayIndex) override
Copies collection contents into existing array elements.
virtual int GetChildIndex(const System::SharedPtr< Control > &child, bool throwException) const
Looks for specific control.
virtual System::SharedPtr< Control > idx_get(System::String key) const
By-name accessor.
virtual bool Remove(const System::SharedPtr< Control > &value) override
Removes control from collection.
virtual void Add(const System::SharedPtr< Control > &value) override
Adds control into collection.
System::ArrayPtr< System::SharedPtr< Control > > Find(const System::String &key, bool searchAllChildren) const
Looks for the named control in collection. Optionally checks contained controls' collections recursiv...
virtual bool Contains(const System::SharedPtr< Control > &control) const override
Checks if specific control is present in collection.
virtual System::SharedPtr< Control > idx_get(int index) const override
By-index accessor.
Dummy class to make translated code that uses Control class compilable. Methods are not implemented....
Definition: control.h:29
System::SharedPtr< System::Drawing::Graphics > CreateGraphics()
RTTI information.
Definition: db_command.h:9