annotate scripts/gui/private/__get_funcname__.m @ 31706:597f3ee61a48 stable

update Octave Project Developers copyright for the new year
author John W. Eaton <jwe@octave.org>
date Fri, 06 Jan 2023 13:11:27 -0500
parents 796f54d4ddbf
children 2e484f9f1f18
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 ##
31706
597f3ee61a48 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30564
diff changeset
3 ## Copyright (C) 2014-2023 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27263
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/>.
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
7 ##
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
8 ## This file is part of Octave.
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23220
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@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: 23220
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.
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
14 ##
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@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.
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
19 ##
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@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: 23220
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 ########################################################################
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
25
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
26 ## -*- texinfo -*-
20852
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20778
diff changeset
27 ## @deftypefn {} {@var{funcname} =} __get_funcname__ (@var{basename})
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
28 ## Internal function.
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
29 ##
20173
777f26aa8e3e doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19881
diff changeset
30 ## Build function name for the current graphics toolkit according to the schema
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
31 ## __[basename]_[graphics_toolkit]__, use fltk as default.
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
32 ## @end deftypefn
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
33
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
34 function funcname = __get_funcname__ (basename)
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
35
30195
a7981aa5822b event-manager: Add function to signal valid implementation of GUI dialogs (bug #60980).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
36 if (! __event_manager_enabled__ () || ! __event_manager_have_dialogs__ ())
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
37 tk = graphics_toolkit ();
20778
8513c84a13cb Use parser string concatenation rather than strcat() for performance in m-files.
Rik <rik@octave.org>
parents: 20173
diff changeset
38 funcname = [ "__" basename "_" tk "__"];
19833
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19697
diff changeset
39 if (numel (tk) > 0 && ! strcmp (tk, "fltk")
19881
75d1c4096ba7 gui/private/__get_funcname__.m: fix syntax error (extra ")" from 9fc020886ae9)
Carnë Draug <carandraug@octave.org>
parents: 19833
diff changeset
40 && ! __is_function__ (funcname))
19833
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19697
diff changeset
41 warning ("%s: no implementation for toolkit '%s', using 'fltk' instead",
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19697
diff changeset
42 basename, tk);
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
43 endif
20778
8513c84a13cb Use parser string concatenation rather than strcat() for performance in m-files.
Rik <rik@octave.org>
parents: 20173
diff changeset
44 funcname = ["__" basename "_fltk__"];
18971
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
45 else
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
46 funcname = "";
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
47 endif
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
48
f084aab05cd9 Move checks for graphics_toolkit GUI functions to own script.
Andreas Weber <andy.weber.aw@gmail.com>
parents:
diff changeset
49 endfunction