-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathInterface--Wx--DockNotebook.html
More file actions
191 lines (151 loc) · 7.94 KB
/
Copy pathInterface--Wx--DockNotebook.html
File metadata and controls
191 lines (151 loc) · 7.94 KB
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Interface::Wx::DockNotebook - Notebook control which supports undocking of its children : OpenKore source code documentation</title>
<link rel="stylesheet" type="text/css" href="openkore.css">
<link rel="stylesheet" type="text/css" href="highlight.css">
<!-- Fix broken PNG transparency for IE/Win5-6+ -->
<!--[if gte IE 5.5000]>
<script type="text/javascript" src="pngfix.js"></script>
<![endif]-->
</head>
<body>
<div id="title">OpenKore source code documentation</div>
<div id="navigation">
<ul>
<li><a href="http://www.openkore.com/">Main website</a></li>
<li><a href="index.html">Table of contents</a></li>
<li><b>Interface::Wx::DockNotebook</b></li>
</ul>
</div>
<div id="main">
<h1>Interface::Wx::DockNotebook - Notebook control which supports undocking of its children</h1>
This is a special notebook control. It hides the tab when there's only one child.
All children in this notebook control will have a title bar, and can be detached
into a dialog.
<p>
This control is designed to only contain one instance for each type of child
controls. For example, in OpenKore you can only have one Advanced Configuration
panel.
<p><table class="functionIndex">
<tr><th colspan="3">Constructor</th></tr><tr onclick="location.href='#Interface::Wx::DockNotebook->new';">
<td class="return-type"></td>
<td class="func"><a href="#Interface::Wx::DockNotebook->new">Interface::Wx::DockNotebook->new</a></td>
<td class="decl">(<span class="type">parent,</span> id)</td>
</tr>
</table>
<p><table class="functionIndex">
<tr><th colspan="3">Methods</th></tr><tr onclick="location.href='#$docknotebook->closePage';">
<td class="return-type"></td>
<td class="func"><a href="#$docknotebook->closePage">$docknotebook->closePage</a></td>
<td class="decl">(page)</td>
</tr><tr onclick="location.href='#$docknotebook->hasPage';">
<td class="return-type"></td>
<td class="func"><a href="#$docknotebook->hasPage">$docknotebook->hasPage</a></td>
<td class="decl">(title)</td>
</tr><tr onclick="location.href='#$docknotebook->newPage';">
<td class="return-type"></td>
<td class="func"><a href="#$docknotebook->newPage">$docknotebook->newPage</a></td>
<td class="decl">(<span class="type">show_buttons,</span> title, [select = 1])</td>
</tr>
</table>
<p><hr class="details_sep">
<h2>Details</h2>
<div class="details">
<p>
<div class="function"><a name="$docknotebook->closePage"></a>
<h3>$docknotebook->closePage</h3>
<dl>
<dt class="decl">
<span class="return-type"> </span><strong>$docknotebook->closePage</strong>(page)
</dt>
<dd>
<dl class="params_and_returns">
<dt class="params"><strong>Parameters:</strong></dt>
<dd class="param"><code>page</code> : Either an Interface::Wx::DockNotebook::Page object, or the title of a page.</dd>
</dl><p>
<div class="desc">Close a page. If the page has been detached to a dialog, then the dialog will be closed.</div>
</dd>
</dl>
</div>
<p><hr class="function_sep"><p>
<div class="function"><a name="$docknotebook->hasPage"></a>
<h3>$docknotebook->hasPage</h3>
<dl>
<dt class="decl">
<span class="return-type"> </span><strong>$docknotebook->hasPage</strong>(title)
</dt>
<dd>
<dl class="params_and_returns">
<dt class="returns"><strong>Returns:</strong></dt>
<dd class="returns">1 on success, 0 on failure.</dd>
</dl><p>
<div class="desc">Make sure the page with title <code>$title</code> is visible. If the page has been
detached to a dialog, then that dialog will be raised.</div>
</dd>
</dl>
</div>
<p><hr class="function_sep"><p>
<div class="function"><a name="$docknotebook->newPage"></a>
<h3>$docknotebook->newPage</h3>
<dl>
<dt class="decl">
<span class="return-type"> </span><strong>$docknotebook->newPage</strong>(<span class="type">show_buttons,</span> title, [select = 1])
</dt>
<dd>
<dl class="params_and_returns">
<dt class="params"><strong>Parameters:</strong></dt>
<dd class="param"><code>show_buttons</code> : Whether this page should have detach/close buttons.</dd>
<dd class="param"><code>title</code> : a title for this tab.</dd>
<dt class="returns"><strong>Returns:</strong></dt>
<dd class="returns">a Interface::Wx::DockNotebook::Page control.</dd>
</dl><p>
<div class="desc">Adds a new page to the notebook.
<p>
See also: <code>Interface::Wx::DockNotebook::Page->set()</code></div>
<dl class="example">
<dt><strong>Example:</strong></dt>
<dd><pre><span class="hl kwc">my</span> <span class="hl kwb">$page</span><span class="hl sym">;</span>
<span class="hl kwb">$page</span> <span class="hl sym">=</span> <span class="hl kwb">$docknotebook</span><span class="hl sym">-></span><span class="hl kwd">newPage</span><span class="hl sym">(</span><span class="hl num">1</span><span class="hl sym">,</span> <span class="hl str">"Tab 1"</span><span class="hl sym">);</span>
<span class="hl kwb">$page</span><span class="hl sym">-></span><span class="hl kwd">set</span><span class="hl sym">(</span>new Wx<span class="hl sym">::</span><span class="hl kwd">Button</span><span class="hl sym">(</span><span class="hl kwb">$page</span><span class="hl sym">, -</span><span class="hl num">1</span><span class="hl sym">,</span> <span class="hl str">"Click Me!"</span><span class="hl sym">));</span>
<span class="hl kwb">$page</span> <span class="hl sym">=</span> <span class="hl kwb">$docknotebook</span><span class="hl sym">-></span><span class="hl kwd">newPage</span><span class="hl sym">(</span><span class="hl num">1</span><span class="hl sym">,</span> <span class="hl str">"Tab 2"</span><span class="hl sym">);</span>
<span class="hl kwb">$page</span><span class="hl sym">-></span><span class="hl kwd">set</span><span class="hl sym">(</span>new Wx<span class="hl sym">::</span><span class="hl kwd">Button</span><span class="hl sym">(</span><span class="hl kwb">$page</span><span class="hl sym">, -</span><span class="hl num">1</span><span class="hl sym">,</span> <span class="hl str">"Hello World"</span><span class="hl sym">));</span>
</pre></dd>
</dl>
</dd>
</dl>
</div>
<p><hr class="function_sep"><p>
<div class="function"><a name="Interface::Wx::DockNotebook->new"></a>
<h3>Interface::Wx::DockNotebook->new</h3>
<dl>
<dt class="decl">
<span class="return-type"> </span><strong>Interface::Wx::DockNotebook->new</strong>(<span class="type">parent,</span> id)
</dt>
<dd>
<dl class="params_and_returns">
<dt class="params"><strong>Parameters:</strong></dt>
<dd class="param"><code>parent</code> : The parent window. Must not be undef.</dd>
<dd class="param"><code>id</code> : The window identifier.</dd>
<dt class="returns"><strong>Returns:</strong></dt>
<dd class="returns">a new Interface::Wx::DockNotebook control.</dd>
</dl><p>
<div class="desc">Creates a new Interface::Wx::DockNotebook control.
You can add pages by using <a href="Interface--Wx--DockNotebook.html#$docknotebook->newPage"><code>$docknotebook->newPage()</code></a></div>
</dd>
</dl>
</div>
</div>
<p><hr><p>
<div id="footer">
<ul>
<li><a href="http://validator.w3.org/check?uri=referer" title="Valid HTML 4.01!"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a></li>
<li><a href="http://www.mozilla.com/" title="Get Firefox - Take Back the Web"><img width="104" height="32" src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox - Take Back the Web"></a></li>
<li><a href="http://www.mozilla.com/" title="If you were looking at this page in any browser but Microsoft Internet Explorer, it would look and run better and faster"><img width="45" height="45" src="http://linuxart.com/img/noIE-small.png" alt="If you were looking at this page in any browser but Microsoft Internet Explorer, it would look and run better and faster"></a></li>
</ul>
Last modified: Fri Nov 16 10:05:11 2012
</div>
</div>
</body>
</html>