Adobe 65007312 Programming Guide - Page 108

Relative placement of sibling nodes, Placement within the parent, Layout property, Datatype

Page 108 highlights

CHAPTER 5: Creating a User Interface for Your Plug-in Determining layout 108 Relative placement of sibling nodes These properties determine how child nodes are placed relative to one another. They apply only to containers. A margin is the interior margin of a container, the distance between the edge of the container and its children; spacing is the distance between children. All numeric values are in pixels. Layout property place margin margin_horizontal margin_vertical margin_left, margin_right margin_top, margin_bottom spacing Datatype string number number number number number number Description The placement style. One of: vertical (default): Children are placed in a column top down. horizontal: Children are placed in a row left to right. overlapping: Children are placed on top of one another. Space around children within the containing node. Overrides the margin value for both the right and left sides. Overrides the margin value for both the top and bottom. Overrides the margin value for the left and right sides, respectively. Overrides the margin value for the top and bottom, respectively. The amount of space placed between each child. Ignored if place is overlapping. Placement within the parent These can be set on any view or control. These properties determine how child nodes are placed and sized within the parent node. All numeric values are percentages, between 0 and 1. Layout property fill_horizontal fill_vertical Datatype number [0..1] Description The amount of free space that the node is sized to fill in the given direction. These determine how a node is sized relative to its siblings. No node is made smaller than its minimum size. Each child's fill size is first treated as a proportion of the total space desired; that is, 0.25 makes the node 25% of the parent's size. If any of the child node fill needs cannot be met, they are given a percentage of the extra space in the proportion to how much they specified. For instance, if three nodes specify 0.2, 0.2, and 0.4, and there is not enough extra space, the nodes get 25%, 25% and 50% of the extra space that is available.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204

C
HAPTER
5: Creating a User Interface for Your Plug-in
Determining layout
108
Relative placement of sibling nodes
These properties determine how child nodes are placed relative to one another. They apply only to
containers. A margin is the interior margin of a container, the distance between the edge of the container
and its children; spacing is the distance between children. All numeric values are in pixels.
Placement within the parent
These can be set on any view or control. These properties determine how child nodes are placed and sized
within the parent node. All numeric values are percentages, between 0 and 1.
Layout property
Datatype
Description
place
string
The placement style. One of:
vertical
(default): Children are placed in a column top down.
horizontal
: Children are placed in a row left to right.
overlapping
: Children are placed on top of one another.
margin
number
Space around children within the containing node.
margin_horizontal
number
Overrides the
margin
value for both the right and left sides.
margin_vertical
number
Overrides the
margin
value for both the top and bottom.
margin_left,
margin_right
number
Overrides the
margin
value for the left and right sides,
respectively.
margin_top,
margin_bottom
number
Overrides the
margin
value for the top and bottom,
respectively.
spacing
number
The amount of space placed between each child.
Ignored if
place
is
overlapping
.
Layout property
Datatype
Description
fill_horizontal
fill_vertical
number
[0..1]
The amount of free space that the node is sized to fill in
the given direction. These determine how a node is sized
relative to its siblings.
No node is made smaller than its minimum size. Each
child’s fill size is first treated as a proportion of the total
space desired; that is, 0.25 makes the node 25% of the
parent’s size.
If any of the child node fill needs cannot be met, they are
given a percentage of the extra space in the proportion
to how much they specified. For instance, if three nodes
specify 0.2, 0.2, and 0.4, and there is not enough extra
space, the nodes get 25%, 25% and 50% of the extra
space that is available.