1
# The GIMP -- an image manipulation program
1
# GIMP - The GNU Image Manipulation Program
2
2
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
4
# This program is free software; you can redistribute it and/or modify
18
18
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
21
$author = 'Sven Neumann <sven@gimp.org>';
22
$copyright = 'Sven Neumann';
27
21
$blurb = 'Invokes the Gimp font selection.';
29
$help = 'This procedure popups the font selection dialog.';
22
$help = 'This procedure opens the font selection dialog.';
24
&neo_pdb_misc('2003');
34
27
{ name => 'font_callback', type => 'string',
35
desc => 'The callback PDB proc to call when font selection is
28
desc => 'The callback PDB proc to call when font selection is made' },
37
29
{ name => 'popup_title', type => 'string',
38
desc => 'Title to give the font popup window' },
39
{ name => 'initial_font', type => 'string',
40
desc => 'The name of the font to set as the first selected',
30
desc => 'Title of the font selection dialog' },
31
{ name => 'initial_font', type => 'string', null_ok => 1,
32
desc => 'The name of the font to set as the first selected' }
47
38
if (gimp->no_interface ||
48
! procedural_db_lookup (gimp, font_callback) ||
49
! gimp_pdb_dialog_new (gimp, context, gimp->fonts,
39
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
40
! gimp_pdb_dialog_new (gimp, context, progress, gimp->fonts,
50
41
popup_title, font_callback, initial_font,
58
49
sub fonts_close_popup {
59
$blurb = 'Popdown the Gimp font selection.';
61
$help = 'This procedure closes an opened font selection dialog.';
50
$blurb = 'Close the font selection dialog.';
51
$help = 'This procedure closes an opened font selection dialog.';
53
&neo_pdb_misc('2003');
66
56
{ name => 'font_callback', type => 'string',
67
desc => 'The name of the callback registered for this popup' }
57
desc => 'The name of the callback registered for this pop-up' }
73
63
if (gimp->no_interface ||
74
! procedural_db_lookup (gimp, font_callback) ||
64
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
75
65
! gimp_pdb_dialog_close (gimp, gimp->fonts, font_callback))
82
72
sub fonts_set_popup {
83
$blurb = 'Sets the current font selection in a popup.';
73
$blurb = 'Sets the current font in a font selection dialog.';
76
&neo_pdb_misc('2003');
90
79
{ name => 'font_callback', type => 'string',
91
desc => 'The name of the callback registered for this popup' },
80
desc => 'The name of the callback registered for this pop-up' },
92
81
{ name => 'font_name', type => 'string',
93
82
desc => 'The name of the font to set as selected' }
99
88
if (gimp->no_interface ||
100
! procedural_db_lookup (gimp, font_callback) ||
89
! gimp_pdb_lookup_procedure (gimp->pdb, font_callback) ||
101
90
! gimp_pdb_dialog_set (gimp, gimp->fonts, font_callback, font_name,