search/mag_sel search/close
SdtListItemCollection.h
1 // Copyright 2001-2021 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
9 #pragma once
10 
11 #include <system/string.h>
12 #include <system/collections/list.h>
13 #include <system/collections/ienumerable.h>
14 #include <cstdint>
15 
16 #include <Aspose.Words.Cpp/aspose_words_api_defs.h>
17 
18 namespace System { namespace Collections { namespace Generic { template <typename> class IEnumerator; } } }
19 namespace Aspose { namespace Words { namespace Markup { class SdtListItem; } } }
20 namespace Aspose { namespace Words { namespace Layout { namespace PreAps { class LayoutSpanSdtControl; } } } }
21 namespace Aspose { namespace Words { namespace Markup { class SdtDropDownListBase; } } }
22 namespace Aspose { namespace Words { namespace Markup { class XmlMapping; } } }
23 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxSdtWriter; } } } } }
24 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxSdtReader; } } } } }
25 
26 namespace Aspose {
27 
28 namespace Words {
29 
30 namespace Markup {
31 
91 class ASPOSE_WORDS_SHARED_CLASS SdtListItemCollection : public System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Words::Markup::SdtListItem>>
92 {
95 
96  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
97  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
98 
99  friend class Aspose::Words::Layout::PreAps::LayoutSpanSdtControl;
100  friend class Aspose::Words::Markup::SdtDropDownListBase;
102  friend class Aspose::Words::RW::Docx::Writer::DocxSdtWriter;
103  friend class Aspose::Words::RW::Docx::Reader::DocxSdtReader;
104 
105 public:
106 
108 
110 
112 
113 public:
114 
176 
179 
239  ASPOSE_WORDS_SHARED_API int32_t get_Count();
240 
301 
361  ASPOSE_WORDS_SHARED_API void Add(System::SharedPtr<Aspose::Words::Markup::SdtListItem> item);
362 
424  ASPOSE_WORDS_SHARED_API void RemoveAt(int32_t index);
425 
485  ASPOSE_WORDS_SHARED_API void Clear();
486 
546  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Markup::SdtListItem> idx_get(int32_t index);
547 
548  ASPOSE_WORDS_SHARED_API iterator begin() noexcept;
549 
550  ASPOSE_WORDS_SHARED_API iterator end() noexcept;
551 
552  ASPOSE_WORDS_SHARED_API const_iterator begin() const noexcept;
553 
554  ASPOSE_WORDS_SHARED_API const_iterator end() const noexcept;
555 
556  ASPOSE_WORDS_SHARED_API const_iterator cbegin() const noexcept;
557 
558  ASPOSE_WORDS_SHARED_API const_iterator cend() const noexcept;
559 
560 protected:
561 
562  System::String get_LastItemValue() const;
563  void set_LastItemValue(System::String value);
564  int32_t get_SelectedIndex() const;
565 
567 
568  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(SdtListItemCollection, CODEPORTING_ARGS());
569  System::SharedPtr<Aspose::Words::Markup::SdtListItemCollection> Clone();
570  int32_t IndexOfItemValue(System::String value);
571 
572  virtual ASPOSE_WORDS_SHARED_API ~SdtListItemCollection();
573 
574 private:
575 
576  int32_t mLastValueIdx;
577  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Aspose::Words::Markup::SdtListItem>>> mChildren;
578  System::String mLastItemValue;
579 
580 };
581 
582 }
583 }
584 }