annotate scripts/gui/uipanel.m @ 30564:796f54d4ddbf stable

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2021. In all .txi and .texi files except gpl.txi and gpl.texi in the doc/liboctave and doc/interpreter directories, change the copyright to "Octave Project Developers", the same as used for other source files. Update copyright notices for 2022 (not done since 2019). For gpl.txi and gpl.texi, change the copyright notice to be "Free Software Foundation, Inc." and leave the date at 2007 only because this file only contains the text of the GPL, not anything created by the Octave Project Developers. Add Paul Thomas to contributors.in.
author John W. Eaton <jwe@octave.org>
date Tue, 28 Dec 2021 18:22:40 -0500
parents 0a5b15007766
children 5d3faba0342e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
3 ## Copyright (C) 2012-2022 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26877
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
7 ##
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
8 ## This file is part of Octave.
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23396
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23396
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
13 ## (at your option) any later version.
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 ## 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
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
18 ## GNU General Public License for more details.
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
19 ##
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
20 ## 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
21 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23396
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
25
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
26 ## -*- texinfo -*-
23271
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
27 ## @deftypefn {} {} uipanel (@var{property}, @var{value}, @dots{})
26577
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
28 ## @deftypefnx {} {} uipanel (@var{parent}, @var{property}, @var{value}, @dots{})
23271
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
29 ## @deftypefnx {} {@var{hui} =} uipanel (@dots{})
20597
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
30 ##
23271
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
31 ## Create a uipanel object.
20597
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
32 ##
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
33 ## 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
34 ##
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
35 ## 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
36 ## 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
37 ##
20715
5b7643257978 Remove trailing whitespace at end of lines.
Rik <rik@octave.org>
parents: 20615
diff changeset
38 ## 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
39 ##
20716
1ecee53513d7 doc: Peridodic grammar check of documentation.
Rik <rik@octave.org>
parents: 20715
diff changeset
40 ## 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
41 ## created uipanel object.
20597
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
42 ##
26877
83774c2a1b92 doc: Place cross-reference from list of graphics object properties back to object (bug #46076).
Rik <rik@octave.org>
parents: 26577
diff changeset
43 ## The full list of properties is documented at @ref{Uipanel Properties}.
20615
93d96da9ff3e Update uiXXXXX documentation for autogenerated properties
John Donoghue
parents: 20597
diff changeset
44 ##
23271
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
45 ## The optional return value @var{hui} is a graphics handle to the created
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
46 ## uipanel object.
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
47 ##
20597
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
48 ## Examples:
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
49 ##
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
50 ## @example
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
51 ## @group
26577
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
52 ## ## create figure and panel on it
20597
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
53 ## f = figure;
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
54 ## 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
55 ##
26577
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
56 ## ## add two buttons to the panel
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
57 ## b1 = uicontrol ("parent", p, "string", "A Button", ...
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
58 ## "position", [18 10 150 36]);
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
59 ## b2 = uicontrol ("parent", p, "string", "Another Button", ...
ae1542fb58ba documentation: Avoid some overfull lines in the PDF manual.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
60 ## "position",[18 60 150 36]);
20597
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
61 ##
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
62 ## @end group
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
63 ## @end example
7890893a0e69 Add uiXXXX documentation (Bug #46076)
John Donoghue <john.donoghue@ieee.org>
parents: 19833
diff changeset
64 ## @seealso{figure, uicontrol}
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
65 ## @end deftypefn
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
66
19833
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19697
diff changeset
67 function hui = uipanel (varargin)
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
68
19833
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19697
diff changeset
69 [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
70 {"figure", "uipanel", "uibuttongroup"});
23271
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
71 htmp = __go_uipanel__ (h, args{:});
23396
945b53af4655 maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents: 23271
diff changeset
72
23271
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
73 if (nargout > 0)
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
74 hui = htmp;
cc9dcadcef6b Only return a handle from ui* functions if nargout > 0 (bug #49751).
Rik <rik@octave.org>
parents: 23220
diff changeset
75 endif
13284
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
76
5ab9c721ce59 Add uicontrol and uipanel m-scripts.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff changeset
77 endfunction