Mercurial > octave
annotate scripts/gui/uipanel.m @ 23220:092078913d54
maint: Merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 22 Feb 2017 12:58:07 -0500 |
parents | ef4d915df748 3ac9f9ecfae5 |
children | cc9dcadcef6b |
rev | line source |
---|---|
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
1 ## Copyright (C) 2012-2017 Michael Goffioul |
13284
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 ## |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 ## This file is part of Octave. |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 ## |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
5 ## Octave is free software; you can redistribute it and/or modify it |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 ## under the terms of the GNU General Public License as published by |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
7 ## the Free Software Foundation; either version 3 of the License, or |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
8 ## (at your option) any later version. |
13284
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 ## |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 ## Octave is distributed in the hope that it will be useful, but |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
13 ## GNU General Public License for more details. |
13284
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 ## |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 ## You should have received a copy of the GNU General Public License |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 ## along with Octave; see the file COPYING. If not, see |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 ## <http://www.gnu.org/licenses/>. |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 ## -*- texinfo -*- |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20719
diff
changeset
|
20 ## @deftypefn {} {@var{hui} =} uipanel (@var{property}, @var{value}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20719
diff
changeset
|
21 ## @deftypefnx {} {@var{hui} =} uipanel (@var{parent}, "@var{property}, @var{value}, @dots{}) |
20597
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
22 ## |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
23 ## Create a uipanel object and return a handle to it. |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
24 ## |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
25 ## uipanels are used as containers to group other uicontrol objects. |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
26 ## |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
27 ## If @var{parent} is omitted then a uipanel for the current figure is |
20716
1ecee53513d7
doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents:
20715
diff
changeset
|
28 ## created. If no figure is available, a new figure is created first. |
20597
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
29 ## |
20715
5b7643257978
Remove trailing whitespace at end of lines.
Rik <rik@octave.org>
parents:
20615
diff
changeset
|
30 ## If @var{parent} is given then a uipanel relative to @var{parent} is created. |
5b7643257978
Remove trailing whitespace at end of lines.
Rik <rik@octave.org>
parents:
20615
diff
changeset
|
31 ## |
20716
1ecee53513d7
doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents:
20715
diff
changeset
|
32 ## Any provided property value pairs will override the default values of the |
1ecee53513d7
doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents:
20715
diff
changeset
|
33 ## created uipanel object. |
20597
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
34 ## |
20719
d903cccb8de8
doc: Periodic spellcheck of documentation.
Rik <rik@octave.org>
parents:
20716
diff
changeset
|
35 ## Uipanel properties are documented at @ref{Uipanel Properties}. |
20615
93d96da9ff3e
Update uiXXXXX documentation for autogenerated properties
John Donoghue
parents:
20597
diff
changeset
|
36 ## |
20597
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
37 ## Examples: |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
38 ## |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
39 ## @example |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
40 ## @group |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
41 ## % create figure and panel on it |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
42 ## f = figure; |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
43 ## p = uipanel ("title", "Panel Title", "position", [.25 .25 .5 .5]); |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
44 ## |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
45 ## % add two buttons to the panel |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
46 ## b1 = uicontrol ("parent", p, "string", "A Button", "position",[18 10 150 36]); |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
47 ## b2 = uicontrol ("parent", p, "string", "Another Button", "position",[18 60 150 36]); |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
48 ## |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
49 ## @end group |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
50 ## @end example |
7890893a0e69
Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents:
19833
diff
changeset
|
51 ## @seealso{figure, uicontrol} |
13284
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
52 ## @end deftypefn |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
53 |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
54 ## Author: goffioul |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
55 |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
56 function hui = uipanel (varargin) |
13284
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
57 |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
58 [h, args] = __uiobject_split_args__ ("uipanel", varargin, |
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
59 {"figure", "uipanel", "uibuttongroup"}); |
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
60 hui = __go_uipanel__ (h, args{:}); |
13284
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
61 |
5ab9c721ce59
Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
62 endfunction |