/
iupsplit.html
136 lines (116 loc) · 5.68 KB
/
iupsplit.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupSplit</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
font-size: large;
}
</style>
</head>
<body>
<div id="navigation">
<ul>
<li><a href="#Creation">Creation</a></li>
<li><a href="#Attributes">Attributes</a></li>
<li><a href="#Callbacks">Callbacks</a></li>
<li><a href="#Notes">Notes</a></li>
<li><a href="#Examples">Examples</a></li>
<li><a href="#SeeAlso">See Also</a></li>
</ul>
</div>
<h2>IupSplit <span class="style1">(since 3.1)</span></h2>
<p>Creates a void container that split its client area in two. Allows the provided controls to be
enclosed in a box that allows expanding and contracting the element <strong>size</strong> in one
direction, but when one is expanded the other is contracted.</p>
<p>
It does not have a native representation, but it contains also a <strong>IupCanvas</strong> to implement
the bar handler.</p>
<h3><a name="Creation">Creation</a></h3>
<pre>Ihandle* IupSplit(Ihandle*<strong> child1</strong>, Ihandle*<strong> child2</strong>); [in C]
iup.split{<strong>child1</strong>, <strong>child2</strong>: ihandle} -> (<strong>elem</strong>: ihandle) [in Lua]
split(<strong>child1</strong>, <strong>child2</strong>) [in LED]</pre>
<p><strong>child1</strong>: Identifier of an interface element that will be at
left or top. It can be NULL.<br>
<strong>child2</strong>: Identifier of an interface element that will be at
right or bottom. It can be NULL.</p>
<p>
<u>Returns:</u> the identifier of the
created element, or NULL if an error occurs.</p>
<h3><a name="Attributes">Attributes</a></h3>
<p><strong>AUTOHIDE</strong> (<font SIZE="3">non inheritable</font>): if the
child client area is smaller than the bar size, then automatically hide the
child. Default: NO.</p>
<p><strong>BARSIZE</strong> (<font SIZE="3">non inheritable</font>): controls
the size of the bar handler. Default: 5.</p>
<p><strong>COLOR</strong>: Changes the color of the
bar grip affordance. The value should be given in "R G B" color style.
Default: "192 192 192".</p>
<p><strong>ORIENTATION</strong> (creation only): Indicates the orientation of the bar handler.
The direction of the resize is perpendicular to the orientation. Possible values are "VERTICAL" or "HORIZONTAL". Default: "VERTICAL".</p>
<p><a href="../attrib/iup_expand.html">EXPAND</a> (<font SIZE="3">non inheritable</font>):
The default value is "YES".</p>
<p><strong>LAYOUTDRAG</strong> (<font SIZE="3">non inheritable</font>): When the
bar is moved automatically update the children layout. Default: YES. If set to
NO then the layout will be updated only when the mouse drag is released.</p>
<p><strong>MINMAX</strong> (<font SIZE="3">non inheritable</font>): sets minimum
and maximum crop values for VALUE, in the format "%d:%d" [min:max]. The min
value can not be less than 0, and the max value can not be larger than 1000.
This will constrain the interactive change of the bar handler. Default:
"0:1000". (Since 3.2)</p>
<p><strong>SHOWGRIP</strong> (<font SIZE="3">non inheritable</font>): Shows the
bar grip affordance. Default: YES. When set to NO, the BARSIZE is set to 3.</p>
<p><strong>VALUE</strong> (<font SIZE="3">non inheritable</font>): The proportion of the left or
top (child1) client area relative to the full available area. It is an
integer between 0 and 1000. If not defined or set to NULL, the Native size of
the two children will define its initial size.</p>
<p><b>WID</b> (read-only): returns -1 if mapped.</p>
<blockquote>
<hr>
</blockquote>
<p>
<a href="../attrib/iup_font.html">FONT</a>,
<a href="../attrib/iup_size.html">SIZE</a>,
<a href="../attrib/iup_rastersize.html">RASTERSIZE</a>,
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>,
<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>,
<a href="../attrib/iup_position.html">POSITION</a>,
<a href="../attrib/iup_minsize.html">
MINSIZE</a>, <a href="../attrib/iup_maxsize.html">
MAXSIZE</a>:
also accepted.</p>
<h3>Notes</h3>
<p>The controls that you want to be resized must have the EXPAND=YES attribute
set. See the <a href="../layout_guide.html">Layout Guide</a> for mode details
on sizes.</p>
<p>If you set the MINMAX attribute for a direct child, <strong>IupSplit</strong>
will respect that size. Nested children will also have their size limits
respected.</p>
<p>The <strong>IupCanvas</strong> bar handler is always the first child of the
split. It can be obtained using <strong>IupGetChild</strong> or <strong>
IupGetNextChild</strong>.</p>
<p>The <strong>IupSplit</strong> control looks just like the <strong>IupSbox</strong>,
but internally is very different. While the <strong>IupSbox </strong>controls only one element and can
push other elements outside the dialog, the <strong>IupSplit</strong> balance its internal size and
never push other elements outside its boundaries.</p>
<p>The container can be created with no elements and be dynamic filled using
<a href="../func/iupappend.html">IupAppend</a> or
<a href="../func/iupinsert.html">IupInsert</a>.</p>
<h3><a name="Examples">Examples</a></h3>
<p><a href="../../examples/">Browse for Example Files</a></p>
<div align="center">
<center>
<table border="0" cellpadding="6" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td><img border="0" src="images/iupsplit1.png"><br>
Natural Size</td>
<td><img border="0" src="images/iupsplit2.png"><br>
After Moving the Split Bar</td>
</tr>
</table>
</center>
</div>
</body>
</html>