2004-09-26 Michael Natterer <mitch@gimp.org> * app/widgets/gimpdialogfactory.[ch]: added "name", "blurb", "stock_id" and "help_id" to struct GimpDialogFactoryEntry and to gimp_dialog_factory_dialog_register(). Added typedef GimpDialogConstructor which takes a GimpDialogFactoryEntry in addition to the parameters GimpDialogNewFunc takes. Added a constructor function pointer to GimpDialogFactory which defaults to a function that just returns entry->new_func(). Use that constructor instead of entry->new_func() for creating dialogs. Added public API gimp_dialog_factory_set_constructor(). * app/dialogs/dialogs.c: register name, blurb, stock_id and help_id for all dockables so all the dialog info lives in one huge ugly table now. For the global_toolbox_factory and the global_dock_factory, set a constructor which creates a dockable around the widget returned by entry->new_func(). * app/dialogs/dialogs-constructors.[ch]: don't create the dockable in each dialog constructor. Removes tons of code and reduces most constructors to a "return gimp_foo_new(...)" one-liner. Got rid of all static variables, they were from a time when GimpDialogFactory was unable to manage singletons. * app/widgets/gimpbrusheditor.[ch] * app/widgets/gimpgradienteditor.[ch] * app/widgets/gimppaletteeditor.[ch]: return GtkWidget, not GimpDataEditor from gimp_foo_editor_new(). * app/widgets/gimpdataeditor.c: minor cleanups.
195 lines
12 KiB
C
195 lines
12 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __DIALOGS_CONSTRUCTORS_H__
|
|
#define __DIALOGS_CONSTRUCTORS_H__
|
|
|
|
|
|
/* toplevel dialogs */
|
|
|
|
GtkWidget * dialogs_image_new_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_file_open_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_file_open_location_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_file_save_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_preferences_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_module_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_tips_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_about_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_error_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_quit_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
|
|
/* docks */
|
|
|
|
GtkWidget * dialogs_toolbox_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_dock_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
|
|
/* dockables */
|
|
|
|
GtkWidget * dialogs_dockable_constructor (GimpDialogFactory *factory,
|
|
GimpDialogFactoryEntry *entry,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_tool_options_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_device_status_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_error_console_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_image_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_brush_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_pattern_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_gradient_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_palette_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_font_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_tool_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_buffer_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_document_list_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_template_list_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_image_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_brush_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_pattern_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_gradient_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_palette_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_font_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_tool_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_buffer_grid_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_document_grid_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_layer_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_channel_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_vectors_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_path_list_view_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_colormap_editor_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_histogram_editor_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_selection_editor_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
GtkWidget * dialogs_undo_editor_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_navigation_editor_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_color_editor_new (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
|
|
GtkWidget * dialogs_brush_editor_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
void dialogs_edit_brush_func (GimpData *data,
|
|
GtkWidget *parent);
|
|
|
|
GtkWidget * dialogs_gradient_editor_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
void dialogs_edit_gradient_func (GimpData *data,
|
|
GtkWidget *parent);
|
|
|
|
GtkWidget * dialogs_palette_editor_get (GimpDialogFactory *factory,
|
|
GimpContext *context,
|
|
gint preview_size);
|
|
void dialogs_edit_palette_func (GimpData *data,
|
|
GtkWidget *parent);
|
|
|
|
|
|
#endif /* __DIALOGS_CONSTRUCTORS_H__ */
|