ms_oforms/controls/form/stream.rs
1bitflags! {
2 /// Specifies the properties of the control that are not set to the file format default.
3 ///
4 /// For each bit, a value of zero specifies that the corresponding property is the file format default and is not stored in the file.
5 pub struct FormPropMask: u32 {
6 /// Specifies whether the BackColor property is stored in the DataBlock.BackColor of the FormControl that contains this FormPropMask.
7 const BACK_COLOR = 0x00000002;
8 /// Specifies whether the ForeColor property is stored in the DataBlock.ForeColor of the FormControl that contains this FormPropMask.
9 const FORE_COLOR = 0x00000004;
10 /// Specifies whether the NextAvailableID property is stored in the DataBlock.NextAvailableID of the FormControl that contains this FormPropMask.
11 const NEXT_AVAILABLE_ID = 0x00000008;
12
13 /// Specifies whether the BooleanProperties property is stored in the DataBlock.BooleanProperties of the FormControl that contains this FormPropMask.
14 const BOOLEAN_PROPERTIES = 0x00000040;
15 /// Specifies whether the BorderStyle property is stored in the DataBlock.BorderStyle of the FormControl that contains this FormPropMask.
16 const BORDER_STYLE = 0x00000080;
17 /// Specifies whether the MousePointer property is stored in the DataBlock.MousePointer of the FormControl that contains this FormPropMask.
18 const MOUSE_POINTER = 0x00000100;
19 /// Specifies whether the ScrollBars property is stored in the DataBlock.ScrollBars of the FormControl that contains this FormPropMask.
20 const SCROLL_BARS = 0x00000200;
21 /// Specifies whether the DisplayedSize property is stored in the ExtraDataBlock.DisplayedSize of the FormControl that contains this FormPropMask.
22 const DISPLAYED_SIZE = 0x00000400;
23 /// Specifies whether the LogicalSize property is stored in the ExtraDataBlock.LogicalSize of the FormControl that contains this FormPropMask.
24 const LOGICAL_SIZE = 0x00000800;
25 /// Specifies whether the ScrollPosition property is stored in the ExtraDataBlock.ScrollPosition of the FormControl that contains this FormPropMask.
26 const SCROLL_POSITION = 0x00001000;
27 /// Specifies whether the GroupCount property is stored in the DataBlock.GroupCnt of the FormControl that contains this FormPropMask.
28 const GROUP_CNT = 0x00002000;
29
30 /// Specifies whether the MouseIcon property is stored in the StreamData.MouseIcon of the FormControl that contains this FormPropMask. When this bit is set to 1, a value of 0xFFFF MUST be stored in the DataBlock.MouseIcon of the FormControl.
31 const MOUSE_ICON = 0x00008000;
32 /// Specifies whether the Cycle property is stored in the DataBlock.Cycle of the FormControl that contains this FormPropMask.
33 const CYCLE = 0x00010000;
34 /// Specifies whether the SpecialEffect property is stored in the DataBlock.SpecialEffect of the FormControl that contains this FormPropMask.
35 const SPECIAL_EFFECT = 0x00020000;
36 /// Specifies whether the BorderColor property is stored in the DataBlock.BorderColor of the FormControl that contains this FormPropMask.
37 const BORDER_COLOR = 0x00040000;
38 /// Specifies whether the size and compression flag of the Caption property are stored in the DataBlock.LengthAndCompression of the FormControl that contains this FormPropMask and the Caption string is stored in the ExtraDataBlock.Caption of the FormControl.
39 const CAPTION = 0x00080000;
40 /// Specifies whether the Font property is stored in the StreamData.GuidAndFont of the FormControl that contains this FormPropMask.
41 const FONT = 0x00100000;
42 /// Specifies whether the Picture property is stored in the StreamData.Picture of the FormControl that contains this FormPropMask.
43 const PICTURE = 0x00200000;
44 /// Specifies whether the Zoom property is stored in the DataBlock.Zoom of the FormControl that contains this FormPropMask.
45 const ZOOM = 0x00400000;
46 /// Specifies whether the PictureAlignment property is stored in the DataBlock.PictureAlignment of the FormControl that contains this FormPropMask.
47 const PICTURE_ALIGNMENT = 0x00800000;
48 /// Specifies whether the value of the PictureTiling property is not the file format default.
49 const PICTURE_TILING = 0x01000000;
50 /// Specifies whether the PictureSizeMode property is stored in the DataBlock.PictureSizeMode of the FormControl that contains this FormPropMask.
51 const PICTURE_SIZE_MODE = 0x02000000;
52 /// Specifies whether the ShapeCookie property is stored in the DataBlock.ShapeCookie of the FormControl that contains this FormPropMask.
53 const SHAPE_COOKIE = 0x04000000;
54 /// Specifies whether the DrawBuffer property is stored in the DataBlock.DrawBuffer of the FormControl that contains this FormPropMask. MUST be set to 1.
55 const DRAW_BUFFER = 0x08000000;
56 }
57}
58
59bitflags! {
60 /// Specifies the properties of the SiteClassInfo that contains this ClassInfoPropMask that are
61 /// not set to the file format default.
62 ///
63 /// For each bit, a value of zero specifies that the corresponding property is the file format
64 /// default and is not stored in the file.
65 pub struct ClassInfoPropMask: u32 {
66 /// Specifies whether ExtraDataBlock.ClsID is stored in the SiteClassInfo that contains
67 /// this ClassInfoPropMask.
68 const CLS_ID = 0x00000001;
69 /// Specifies whether ExtraDataBlock.DispEvent is stored in the SiteClassInfo that contains
70 /// this ClassInfoPropMask.
71 const DISP_EVENT = 0x00000002;
72
73 /// Specifies whether ExtraDataBlock.DefaultProg is stored in the SiteClassInfo that
74 /// contains this ClassInfoPropMask.
75 const DEFAULT_PROC = 0x00000008;
76 /// Specifies whether DataBlock.ClassTableFlags and DataBlock.VarFlags are stored in the
77 /// SiteClassInfo that contains this ClassInfoPropMask.
78 const CLASS_FLAGS = 0x00000010;
79 /// Specifies whether DataBlock.CountOfMethods is stored in the SiteClassInfo that contains
80 /// this ClassInfoPropMask.
81 const COUNT_OF_METHODS = 0x00000020;
82 /// Specifies whether DataBlock.DispidBind is stored in the SiteClassInfo that contains
83 /// this ClassInfoPropMask.
84 const DISPID_BIND = 0x00000040;
85 /// Specifies whether DataBlock.GetBindIndex is stored in the SiteClassInfo that contains
86 /// this ClassInfoPropMask.
87 const GET_BIND_INDEX = 0x00000080;
88 /// Specifies whether DataBlock.PutBindIndex is stored in the SiteClassInfo that contains
89 /// this ClassInfoPropMask.
90 const PUT_BIND_INDEX = 0x00000100;
91 /// Specifies whether DataBlock.BindType is stored in the SiteClassInfo that contains this
92 /// ClassInfoPropMask.
93 const BIND_TYPE = 0x00000200;
94 /// Specifies whether DataBlock.GetValueIndex is stored in the SiteClassInfo that contains
95 /// this ClassInfoPropMask.
96 const GET_VALUE_INDEX = 0x00000400;
97 /// Specifies whether DataBlock.PutValueIndex is stored in the SiteClassInfo that contains
98 /// this ClassInfoPropMask.
99 const PUT_VALUE_INDEX = 0x00000800;
100 /// Specifies whether DataBlock.ValueType is stored in the SiteClassInfo that contains this
101 /// ClassInfoPropMask.
102 const VALUE_TYPE = 0x00001000;
103 /// Specifies whether DataBlock.DispidRowset is stored in the SiteClassInfo that contains
104 /// this ClassInfoPropMask.
105 const DISPID_ROWSET = 0x00002000;
106 /// Specifies whether DataBlock.SetRowset is stored in the SiteClassInfo that contains this
107 /// ClassInfoPropMask.
108 const SET_ROWSET = 0x00004000;
109 }
110}
111
112bitflags! {
113 /// Specifies the type of this site or the count of sites with a following type
114 pub struct TypeOrCount: u8 {
115 /// Mask for the data part fo this field
116 const TYPE_OR_COUNT = 0x7F;
117 /// Flag fCount
118 const IS_COUNT = 0x80;
119 }
120}
121
122#[repr(u8)]
123#[derive(Debug, Copy, Clone, FromPrimitive, ToPrimitive)]
124/// The type of a concrete site
125pub enum SiteType {
126 /// An OleSiteConcrete
127 Ole = 0x01,
128}
129
130/// The depth and type of a site
131#[derive(Debug, Copy, Clone)]
132pub struct SiteDepthAndType {
133 /// The depth of the site
134 pub depth: u8,
135 /// The type of the site
136 pub r#type: SiteType,
137}