SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
IImageAnchor.cs
Go to the documentation of this file.
1 ï»¿// SmartAPI - .Net programmatic access to RedDot servers
2 //
3 // Copyright (C) 2013 erminas GbR
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free Software Foundation,
7 // either version 3 of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 // See the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program.
14 // If not, see <http://www.gnu.org/licenses/>.
15 
16 using System.Xml;
17 using erminas.SmartAPI.CMS.Converter;
18 using erminas.SmartAPI.CMS.Project.Folder;
19 
20 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
21 {
22  public interface IImageAnchor : IAnchor
23  {
24  ImageAlignment Align { get; set; }
25 
26  ILanguageDependentValue<string> AltText { get; }
27 
28  string Border { get; set; }
29 
30  IFolder Folder { get; set; }
31 
32  string HSpace { get; set; }
33 
34  string Height { get; set; }
35 
36  string ImageLinkSupplement { get; set; }
37 
38  bool IsAltPreassignedAutomatically { get; set; }
39 
40  bool IsBorderAutomaticallyInsertedIntoPage { get; set; }
41 
42  bool IsHeightAutomaticallyInsertedIntoPage { get; set; }
43 
44  bool IsWidthAutomaticallyInsertedIntoPage { get; set; }
45 
46  ILanguageDependentValue<IFile> SrcFile { get; }
47 
48  string Usemap { get; set; }
49 
50  string VSpace { get; set; }
51 
52  string Width { get; set; }
53  }
54 
55  internal class ImageAnchor : Anchor, IImageAnchor
56  {
57  internal ImageAnchor(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
58  {
59  }
60 
61  [RedDot("eltalign", ConverterType = typeof (StringEnumConverter<ImageAlignment>))]
62  public ImageAlignment Align
63  {
64  get { return GetAttributeValue<ImageAlignment>(); }
65  set { SetAttributeValue(value); }
66  }
67 
68  [RedDot("eltalt")]
69  public ILanguageDependentValue<string> AltText
70  {
71  get { return GetAttributeValue<ILanguageDependentValue<string>>(); }
72  }
73 
74  [RedDot("eltborder")]
75  public string Border
76  {
77  get { return GetAttributeValue<string>(); }
78  set { SetAttributeValue(value); }
79  }
80 
81  [RedDot("eltfolderguid", ConverterType = typeof (FolderConverter))]
82  public IFolder Folder
83  {
84  get { return GetAttributeValue<IFolder>(); }
85  set { SetAttributeValue(value); }
86  }
87 
88  [RedDot("elthspace")]
89  public string HSpace
90  {
91  get { return GetAttributeValue<string>(); }
92  set { SetAttributeValue(value); }
93  }
94 
95  [RedDot("eltheight")]
96  public string Height
97  {
98  get { return GetAttributeValue<string>(); }
99  set { SetAttributeValue(value); }
100  }
101 
102  [RedDot("eltimagesupplement")]
103  public string ImageLinkSupplement
104  {
105  get { return GetAttributeValue<string>(); }
106  set { SetAttributeValue(value); }
107  }
108 
109  [RedDot("eltpresetalt")]
110  public bool IsAltPreassignedAutomatically
111  {
112  get { return GetAttributeValue<bool>(); }
113  set { SetAttributeValue(value); }
114  }
115 
116  [RedDot("eltautoborder")]
117  public bool IsBorderAutomaticallyInsertedIntoPage
118  {
119  get { return GetAttributeValue<bool>(); }
120  set { SetAttributeValue(value); }
121  }
122 
123  [RedDot("eltautoheight")]
124  public bool IsHeightAutomaticallyInsertedIntoPage
125  {
126  get { return GetAttributeValue<bool>(); }
127  set { SetAttributeValue(value); }
128  }
129 
130  [RedDot("eltautowidth")]
131  public bool IsWidthAutomaticallyInsertedIntoPage
132  {
133  get { return GetAttributeValue<bool>(); }
134  set { SetAttributeValue(value); }
135  }
136 
137  [RedDot("__srcfile", ConverterType = typeof (SrcFileConverter))]
138  public ILanguageDependentValue<IFile> SrcFile
139  {
140  get { return GetAttributeValue<ILanguageDependentValue<IFile>>(); }
141  }
142 
143  [RedDot("eltusermap")]
144  public string Usemap
145  {
146  get { return GetAttributeValue<string>(); }
147  set { SetAttributeValue(value); }
148  }
149 
150  [RedDot("eltvspace")]
151  public string VSpace
152  {
153  get { return GetAttributeValue<string>(); }
154  set { SetAttributeValue(value); }
155  }
156 
157  [RedDot("eltwidth")]
158  public string Width
159  {
160  get { return GetAttributeValue<string>(); }
161  set { SetAttributeValue(value); }
162  }
163  }
164 }