mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-23 04:51:44 +00:00
6a50c27047
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.
67 lines
2.2 KiB
C
67 lines
2.2 KiB
C
/* The GIMP -- an image manipulation program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* gimpbrusheditor.h
|
|
* Copyright 1998 Jay Cox <jaycox@earthlink.net>
|
|
*
|
|
* 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 __GIMP_BRUSH_EDITOR_H__
|
|
#define __GIMP_BRUSH_EDITOR_H__
|
|
|
|
|
|
#include "gimpdataeditor.h"
|
|
|
|
|
|
#define GIMP_TYPE_BRUSH_EDITOR (gimp_brush_editor_get_type ())
|
|
#define GIMP_BRUSH_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_BRUSH_EDITOR, GimpBrushEditor))
|
|
#define GIMP_BRUSH_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_BRUSH_EDITOR, GimpBrushEditorClass))
|
|
#define GIMP_IS_BRUSH_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_BRUSH_EDITOR))
|
|
#define GIMP_IS_BRUSH_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_BRUSH_EDITOR))
|
|
#define GIMP_BRUSH_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_BRUSH_EDITOR, GimpBrushEditorClass))
|
|
|
|
|
|
typedef struct _GimpBrushEditorClass GimpBrushEditorClass;
|
|
|
|
struct _GimpBrushEditor
|
|
{
|
|
GimpDataEditor parent_instance;
|
|
|
|
GtkWidget *preview;
|
|
|
|
GtkWidget *shape_group;
|
|
GtkWidget *options_table;
|
|
GtkAdjustment *radius_data;
|
|
GtkAdjustment *spikes_data;
|
|
GtkAdjustment *hardness_data;
|
|
GtkAdjustment *angle_data;
|
|
GtkAdjustment *aspect_ratio_data;
|
|
GtkAdjustment *spacing_data;
|
|
};
|
|
|
|
struct _GimpBrushEditorClass
|
|
{
|
|
GimpDataEditorClass parent_class;
|
|
};
|
|
|
|
|
|
GType gimp_brush_editor_get_type (void) G_GNUC_CONST;
|
|
|
|
GtkWidget * gimp_brush_editor_new (Gimp *gimp);
|
|
|
|
|
|
#endif /* __GIMP_BRUSH_EDITOR_H__ */
|