Documentation
 All Classes Functions Variables Properties
AnnotationDocument.h
1 #include <List>
2 #include "AnnotationPage.h"
3 using namespace System::Collections::Generic;
4 namespace MST
5 {
6  namespace Imaging
7  {
8  namespace Annotations
9  {
14  public ref class MSTAnnotationDocument
15  {
16  public:
21  MSTAnnotationDocument(System::Windows::Forms::ScrollableControl^ Parent)
22  {
23  m_AnnPages = nullptr;
24  m_Parent = Parent;
25  }
26 
32  MSTAnnotationDocument(int nPageCount,System::Windows::Forms::ScrollableControl^ Parent)
33  {
34  m_AnnPages = gcnew array<MSTAnnotationPage^>(nPageCount);
35  m_Parent = Parent;
36  for(int i = 0 ; i < nPageCount ; i++)
37  {
38  m_AnnPages[i] = gcnew MSTAnnotationPage(m_Parent);
39  }
40  }
41 
46  void LoadXML(String^ strPath);
47 
52  void SaveXML(String^ strPath);
53 
57  property int Count
58  {
59  int get()
60  {
61  return (m_AnnPages!=nullptr)?m_AnnPages->Length:0;
62  }
63  }
64 
68  property MSTAnnotationPage^ default[int]
69  {
70  MSTAnnotationPage^ get(int nIndex)
71  {
72  if(m_AnnPages==nullptr || nIndex < 0 || nIndex >= Count)
73  return nullptr;
74  else return m_AnnPages[nIndex];
75  }
76  }
77  private:
78  array<MSTAnnotationPage^>^ m_AnnPages;
79  System::Windows::Forms::ScrollableControl^ m_Parent;
80  };
81  }
82  }
83 }
Definition: AnnotationPage.h:95
Definition: AnnotationDocument.h:14
MSTAnnotationDocument(int nPageCount, System::Windows::Forms::ScrollableControl^ Parent)
Constructor of a class.
Definition: AnnotationDocument.h:32
MSTAnnotationDocument(System::Windows::Forms::ScrollableControl^ Parent)
Constructor of a class.
Definition: AnnotationDocument.h:21