mirror of https://github.com/GNOME/gimp.git
libgimpwidgets/Makefile.am libgimpwidgets/gimpwidgets.h
2004-05-02 Sven Neumann <sven@gimp.org> * libgimpwidgets/Makefile.am * libgimpwidgets/gimpwidgets.h * libgimpwidgets/gimpwidgetstypes.h * libgimpwidgets/gimpframe.[ch]: added new widget GimpFrame, a HIG compliant variant of GtkFrame. * app/gui/preferences-dialog.c: enable the HIG compliant mode by default and use the new GimpFrame widget for it. * themes/Small/gtkrc: set a smaller spacing between the GimpFrame title label and the frame content. 2004-05-02 Sven Neumann <sven@gimp.org> * libgimpwidgets/libgimpwidgets-docs.sgml * libgimpwidgets/libgimpwidgets-sections.txt * libgimpwidgets/libgimpwidgets.types * libgimpwidgets/tmpl/gimpframe.sgml: added docs for GimpFrame. * */tmpl/*.sgml: regenerated using gtk-doc-tools version 1.2.
This commit is contained in:
parent
8895917db2
commit
06631e959e
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2004-05-02 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/Makefile.am
|
||||
* libgimpwidgets/gimpwidgets.h
|
||||
* libgimpwidgets/gimpwidgetstypes.h
|
||||
* libgimpwidgets/gimpframe.[ch]: added new widget GimpFrame, a HIG
|
||||
compliant variant of GtkFrame.
|
||||
|
||||
* app/gui/preferences-dialog.c: enable the HIG compliant mode by
|
||||
default and use the new GimpFrame widget for it.
|
||||
|
||||
* themes/Small/gtkrc: set a smaller spacing between the GimpFrame
|
||||
title label and the frame content.
|
||||
|
||||
2004-05-02 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/actions/qmask-actions.c: renamed action "qmask-toggle" to
|
||||
|
|
|
@ -258,9 +258,6 @@ prefs_response (GtkWidget *widget,
|
|||
|
||||
gimp_rc_save (GIMP_RC (gimp->edit_config));
|
||||
|
||||
/* enable autosaving again */
|
||||
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
||||
|
||||
/* spit out a solely informational warning about changed values
|
||||
* which need restart
|
||||
*/
|
||||
|
@ -330,11 +327,11 @@ prefs_response (GtkWidget *widget,
|
|||
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
|
||||
|
||||
g_list_free (diff);
|
||||
|
||||
/* enable autosaving again */
|
||||
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
||||
}
|
||||
|
||||
/* enable autosaving again */
|
||||
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
|
@ -407,10 +404,10 @@ static void
|
|||
prefs_input_devices_dialog (GtkWidget *widget,
|
||||
gpointer user_data)
|
||||
{
|
||||
Gimp *gimp = GIMP (user_data);
|
||||
|
||||
static GtkWidget *input_dialog = NULL;
|
||||
|
||||
Gimp *gimp = GIMP (user_data);
|
||||
|
||||
if (input_dialog)
|
||||
{
|
||||
gtk_window_present (GTK_WINDOW (input_dialog));
|
||||
|
@ -477,7 +474,7 @@ prefs_notebook_append_page (Gimp *gimp,
|
|||
|
||||
gimp_help_set_help_data (event_box, NULL, help_id);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
gtk_container_add (GTK_CONTAINER (event_box), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
@ -604,51 +601,16 @@ prefs_frame_new (const gchar *label,
|
|||
GtkContainer *parent,
|
||||
gboolean expand)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
|
||||
gboolean hig_compliant = FALSE;
|
||||
const gboolean hig_compliant = TRUE;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
|
||||
if (hig_compliant)
|
||||
{
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *title;
|
||||
GtkWidget *space;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
frame = gimp_frame_new (label);
|
||||
|
||||
frame = gtk_vbox_new (FALSE, 4);
|
||||
|
||||
attrs = pango_attr_list_new ();
|
||||
|
||||
attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = -1;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
|
||||
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = -1;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
|
||||
title = gtk_label_new (label);
|
||||
gtk_misc_set_alignment (GTK_MISC (title), 0.0, 0.5);
|
||||
gtk_label_set_attributes (GTK_LABEL (title), attrs);
|
||||
gtk_box_pack_start (GTK_BOX (frame), title, FALSE, FALSE, 0);
|
||||
gtk_widget_show (title);
|
||||
|
||||
pango_attr_list_unref (attrs);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
space = gtk_label_new (" ");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), space, FALSE, FALSE, 0);
|
||||
gtk_widget_show (space);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), vbox);
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
}
|
||||
else
|
||||
|
@ -836,7 +798,7 @@ prefs_spin_button_add (GObject *config,
|
|||
GtkTable *table,
|
||||
gint table_row)
|
||||
{
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *spinbutton;
|
||||
|
||||
spinbutton = gimp_prop_spin_button_new (config, property_name,
|
||||
step_increment, page_increment,
|
||||
|
@ -1239,7 +1201,8 @@ prefs_dialog_new (Gimp *gimp,
|
|||
GTK_TABLE (table), 3);
|
||||
|
||||
/* Keyboard Shortcuts */
|
||||
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"), GTK_CONTAINER (vbox), FALSE);
|
||||
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (object, "can-change-accels",
|
||||
_("Use Dynamic _Keyboard Shortcuts"),
|
||||
|
|
|
@ -258,9 +258,6 @@ prefs_response (GtkWidget *widget,
|
|||
|
||||
gimp_rc_save (GIMP_RC (gimp->edit_config));
|
||||
|
||||
/* enable autosaving again */
|
||||
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
||||
|
||||
/* spit out a solely informational warning about changed values
|
||||
* which need restart
|
||||
*/
|
||||
|
@ -330,11 +327,11 @@ prefs_response (GtkWidget *widget,
|
|||
g_object_thaw_notify (G_OBJECT (gimp->edit_config));
|
||||
|
||||
g_list_free (diff);
|
||||
|
||||
/* enable autosaving again */
|
||||
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
||||
}
|
||||
|
||||
/* enable autosaving again */
|
||||
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
|
@ -407,10 +404,10 @@ static void
|
|||
prefs_input_devices_dialog (GtkWidget *widget,
|
||||
gpointer user_data)
|
||||
{
|
||||
Gimp *gimp = GIMP (user_data);
|
||||
|
||||
static GtkWidget *input_dialog = NULL;
|
||||
|
||||
Gimp *gimp = GIMP (user_data);
|
||||
|
||||
if (input_dialog)
|
||||
{
|
||||
gtk_window_present (GTK_WINDOW (input_dialog));
|
||||
|
@ -477,7 +474,7 @@ prefs_notebook_append_page (Gimp *gimp,
|
|||
|
||||
gimp_help_set_help_data (event_box, NULL, help_id);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
gtk_container_add (GTK_CONTAINER (event_box), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
@ -604,51 +601,16 @@ prefs_frame_new (const gchar *label,
|
|||
GtkContainer *parent,
|
||||
gboolean expand)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
|
||||
gboolean hig_compliant = FALSE;
|
||||
const gboolean hig_compliant = TRUE;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
|
||||
if (hig_compliant)
|
||||
{
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *title;
|
||||
GtkWidget *space;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
frame = gimp_frame_new (label);
|
||||
|
||||
frame = gtk_vbox_new (FALSE, 4);
|
||||
|
||||
attrs = pango_attr_list_new ();
|
||||
|
||||
attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = -1;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
|
||||
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = -1;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
|
||||
title = gtk_label_new (label);
|
||||
gtk_misc_set_alignment (GTK_MISC (title), 0.0, 0.5);
|
||||
gtk_label_set_attributes (GTK_LABEL (title), attrs);
|
||||
gtk_box_pack_start (GTK_BOX (frame), title, FALSE, FALSE, 0);
|
||||
gtk_widget_show (title);
|
||||
|
||||
pango_attr_list_unref (attrs);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (frame), hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
space = gtk_label_new (" ");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), space, FALSE, FALSE, 0);
|
||||
gtk_widget_show (space);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), vbox);
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
}
|
||||
else
|
||||
|
@ -836,7 +798,7 @@ prefs_spin_button_add (GObject *config,
|
|||
GtkTable *table,
|
||||
gint table_row)
|
||||
{
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *spinbutton;
|
||||
|
||||
spinbutton = gimp_prop_spin_button_new (config, property_name,
|
||||
step_increment, page_increment,
|
||||
|
@ -1239,7 +1201,8 @@ prefs_dialog_new (Gimp *gimp,
|
|||
GTK_TABLE (table), 3);
|
||||
|
||||
/* Keyboard Shortcuts */
|
||||
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"), GTK_CONTAINER (vbox), FALSE);
|
||||
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
|
||||
GTK_CONTAINER (vbox), FALSE);
|
||||
|
||||
prefs_check_button_add (object, "can-change-accels",
|
||||
_("Use Dynamic _Keyboard Shortcuts"),
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2004-05-02 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/libgimpwidgets-docs.sgml
|
||||
* libgimpwidgets/libgimpwidgets-sections.txt
|
||||
* libgimpwidgets/libgimpwidgets.types
|
||||
* libgimpwidgets/tmpl/gimpframe.sgml: added docs for GimpFrame.
|
||||
|
||||
* */tmpl/*.sgml: regenerated using gtk-doc-tools version 1.2.
|
||||
|
||||
2004-04-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpbase/libgimpbase-sections.txt
|
||||
|
|
|
@ -34,6 +34,13 @@ arbitrary #GType implementations loaded from disk.
|
|||
@info:
|
||||
@last_module_error:
|
||||
|
||||
<!-- ##### SIGNAL GimpModule::modified ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmodule: the object which received the signal.
|
||||
|
||||
<!-- ##### STRUCT GimpModuleInfo ##### -->
|
||||
<para>
|
||||
This structure contains information about a loadable module.
|
||||
|
@ -179,10 +186,3 @@ are compiled against.
|
|||
@info:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpModule::modified ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmodule: the object which received the signal.
|
||||
|
||||
|
|
|
@ -20,6 +20,30 @@ The #GimpModuleDB struct contains no public members.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpModuleDB::add ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmoduledb: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpModuleDB::module-modified ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmoduledb: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpModuleDB::remove ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmoduledb: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### FUNCTION gimp_module_db_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -65,27 +89,3 @@ The #GimpModuleDB struct contains no public members.
|
|||
@module_path:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpModuleDB::add ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmoduledb: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpModuleDB::module-modified ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmoduledb: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpModuleDB::remove ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmoduledb: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
|
|
|
@ -21,6 +21,51 @@ using object properties.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-filesize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-mtime ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-num-layers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:thumb-state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gimp_thumbnail_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -113,48 +158,3 @@ using object properties.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-filesize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-mtime ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-num-layers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:image-width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpThumbnail:thumb-state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<xi:include href="xml/gimpcolorselection.xml" />
|
||||
<xi:include href="xml/gimpdialog.xml" />
|
||||
<xi:include href="xml/gimpfileentry.xml" />
|
||||
<xi:include href="xml/gimpframe.xml" />
|
||||
<xi:include href="xml/gimpintcombobox.xml" />
|
||||
<xi:include href="xml/gimpintstore.xml" />
|
||||
<xi:include href="xml/gimpmemsizeentry.xml" />
|
||||
|
|
|
@ -121,6 +121,22 @@ GIMP_IS_FILE_ENTRY_CLASS
|
|||
GIMP_FILE_ENTRY_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gimpframe</FILE>
|
||||
<TITLE>GimpFrame</TITLE>
|
||||
GimpFrame
|
||||
gimp_frame_new
|
||||
<SUBSECTION Standard>
|
||||
GimpFrameClass
|
||||
GIMP_FRAME
|
||||
GIMP_IS_FRAME
|
||||
GIMP_TYPE_FRAME
|
||||
gimp_frame_get_type
|
||||
GIMP_FRAME_CLASS
|
||||
GIMP_IS_FRAME_CLASS
|
||||
GIMP_FRAME_GET_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gimppatheditor</FILE>
|
||||
<TITLE>GimpPathEditor</TITLE>
|
||||
|
|
|
@ -18,6 +18,7 @@ gimp_color_select_get_type
|
|||
gimp_color_selection_get_type
|
||||
gimp_dialog_get_type
|
||||
gimp_file_entry_get_type
|
||||
gimp_frame_get_type
|
||||
gimp_int_combo_box_get_type
|
||||
gimp_int_store_get_type
|
||||
gimp_memsize_entry_get_type
|
||||
|
|
|
@ -22,6 +22,14 @@ modifier keys pressed.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpButton::extended-clicked ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpbutton: the object which received the signal.
|
||||
@arg1: the state of modifier keys when the button was clicked
|
||||
|
||||
<!-- ##### FUNCTION gimp_button_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -39,11 +47,3 @@ modifier keys pressed.
|
|||
@state:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpButton::extended-clicked ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpbutton: the object which received the signal.
|
||||
@arg1: the state of modifier keys when the button was clicked
|
||||
|
||||
|
|
|
@ -32,6 +32,13 @@ up two GimpSizeEntries (see #GimpSizeEntry) linked with a #GimpChainButton.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpChainButton::toggled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpchainbutton: the object which received the signal.
|
||||
|
||||
<!-- ##### ENUM GimpChainPosition ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -69,10 +76,3 @@ up two GimpSizeEntries (see #GimpSizeEntry) linked with a #GimpChainButton.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpChainButton::toggled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpchainbutton: the object which received the signal.
|
||||
|
||||
|
|
|
@ -20,6 +20,13 @@ Displays a GimpRGB color, optionally with alpha-channel.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorArea::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorarea: the object which received the signal.
|
||||
|
||||
<!-- ##### ENUM GimpColorAreaType ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -85,10 +92,3 @@ Displays a GimpRGB color, optionally with alpha-channel.
|
|||
@draw_border:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorArea::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorarea: the object which received the signal.
|
||||
|
||||
|
|
|
@ -27,6 +27,13 @@ color, the "color_changed" signal is emitted.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorButton::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorbutton: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gimp_color_button_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -94,10 +101,3 @@ color, the "color_changed" signal is emitted.
|
|||
@type:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorButton::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorbutton: the object which received the signal.
|
||||
|
||||
|
|
|
@ -27,6 +27,18 @@ display color correction modules.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplay::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplay: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GimpColorDisplay:enabled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gimp_color_display_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -119,15 +131,3 @@ display color correction modules.
|
|||
@display:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplay::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplay: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GimpColorDisplay:enabled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -20,6 +20,39 @@ GimpColorDisplayStack
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::added ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::removed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::reordered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### FUNCTION gimp_color_display_stack_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -94,36 +127,3 @@ GimpColorDisplayStack
|
|||
@bpl:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::added ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::removed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpColorDisplayStack::reordered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolordisplaystack: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
|
|
|
@ -21,6 +21,16 @@ It serves as a container for #GimpColorSelectors.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GimpColorNotebook:tab-border ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpColorNotebook:tab-icon-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gimp_color_notebook_set_has_page ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -32,13 +42,3 @@ It serves as a container for #GimpColorSelectors.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ARG GimpColorNotebook:tab-border ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GimpColorNotebook:tab-icon-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -20,6 +20,13 @@ GimpColorSelection
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorSelection::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorselection: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gimp_color_selection_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -98,10 +105,3 @@ GimpColorSelection
|
|||
@selection:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorSelection::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorselection: the object which received the signal.
|
||||
|
||||
|
|
|
@ -27,6 +27,23 @@ selector modules.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorSelector::channel-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorselector: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpColorSelector::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorselector: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### MACRO GIMP_COLOR_SELECTOR_SIZE ##### -->
|
||||
<para>
|
||||
The suggested size for a color area in a #GimpColorSelector implementation.
|
||||
|
@ -128,20 +145,3 @@ The suggested width for a color bar in a #GimpColorSelector implementation.
|
|||
@selector:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpColorSelector::channel-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorselector: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GimpColorSelector::color-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpcolorselector: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
|
|
|
@ -21,6 +21,11 @@ dialog-related stuff.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GimpDialog:role ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gimp_dialog_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -69,8 +74,3 @@ dialog-related stuff.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ARG GimpDialog:role ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
|
|
@ -37,6 +37,13 @@ will be emitted.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpFileEntry::filename-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpfileentry: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gimp_file_entry_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -67,10 +74,3 @@ will be emitted.
|
|||
@filename:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpFileEntry::filename-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpfileentry: the object which received the signal.
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
GimpFrame
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GimpFrame ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GimpFrame:label-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gimp_frame_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
|
@ -22,6 +22,13 @@ The #GimpSizeEntry struct is considered private.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpMemsizeEntry::value-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmemsizeentry: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gimp_memsize_entry_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -51,10 +58,3 @@ The #GimpSizeEntry struct is considered private.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpMemsizeEntry::value-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpmemsizeentry: the object which received the signal.
|
||||
|
||||
|
|
|
@ -20,6 +20,15 @@ Widget to control image offsets.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpOffsetArea::offsets-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpoffsetarea: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### FUNCTION gimp_offset_area_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -50,12 +59,3 @@ Widget to control image offsets.
|
|||
@offset_y:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpOffsetArea::offsets-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpoffsetarea: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
|
|
|
@ -36,6 +36,22 @@ the search path, the "path_changed" signal will be emitted.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpPathEditor::path-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimppatheditor: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpPathEditor::writable-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimppatheditor: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@arg1:
|
||||
|
||||
<!-- ##### FUNCTION gimp_path_editor_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -106,19 +122,3 @@ the search path, the "path_changed" signal will be emitted.
|
|||
@writable:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpPathEditor::path-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimppatheditor: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpPathEditor::writable-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimppatheditor: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@arg1:
|
||||
|
||||
|
|
|
@ -22,14 +22,6 @@ from any point on the screen.
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_pick_button_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpPickButton::color-picked ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -38,3 +30,11 @@ from any point on the screen.
|
|||
@gimppickbutton: the object which received the signal.
|
||||
@arg1: pointer to a #GimpRGB structure that holds the picked color
|
||||
|
||||
<!-- ##### FUNCTION gimp_pick_button_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
|
|
|
@ -48,6 +48,27 @@ gimp_coordinates_new()
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpSizeEntry::refval-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpsizeentry: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpSizeEntry::unit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpsizeentry: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpSizeEntry::value-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpsizeentry: the object which received the signal.
|
||||
|
||||
<!-- ##### STRUCT GimpSizeEntryField ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -240,24 +261,3 @@ gimp_coordinates_new()
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpSizeEntry::refval-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpsizeentry: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpSizeEntry::unit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpsizeentry: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GimpSizeEntry::value-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpsizeentry: the object which received the signal.
|
||||
|
||||
|
|
|
@ -39,6 +39,13 @@ gimp_coordinates_new()
|
|||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpUnitMenu::unit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpunitmenu: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gimp_unit_menu_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -88,10 +95,3 @@ gimp_coordinates_new()
|
|||
@digits:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GimpUnitMenu::unit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gimpunitmenu: the object which received the signal.
|
||||
|
||||
|
|
|
@ -90,6 +90,8 @@ libgimpwidgets_2_0_la_sources = \
|
|||
gimpdialog.h \
|
||||
gimpfileentry.c \
|
||||
gimpfileentry.h \
|
||||
gimpframe.c \
|
||||
gimpframe.h \
|
||||
gimphelpui.c \
|
||||
gimphelpui.h \
|
||||
gimpintcombobox.c \
|
||||
|
@ -151,6 +153,7 @@ libgimpwidgetsinclude_HEADERS = \
|
|||
gimpcolorselection.h \
|
||||
gimpdialog.h \
|
||||
gimpfileentry.h \
|
||||
gimpframe.h \
|
||||
gimphelpui.h \
|
||||
gimpintcombobox.h \
|
||||
gimpintstore.h \
|
||||
|
|
|
@ -0,0 +1,293 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimpframe.c
|
||||
* Copyright (C) 2004 Sven Neumann <sven@gimp.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gimpwidgetstypes.h"
|
||||
|
||||
#include "gimpframe.h"
|
||||
|
||||
|
||||
#define DEFAULT_LABEL_SPACING 6
|
||||
|
||||
|
||||
static void gimp_frame_class_init (GimpFrameClass *klass);
|
||||
static void gimp_frame_init (GimpFrame *frame);
|
||||
static void gimp_frame_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gimp_frame_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void gimp_frame_child_allocate (GtkFrame *frame,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gimp_frame_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static void gimp_frame_label_widget_notify (GtkFrame *frame);
|
||||
|
||||
|
||||
static GtkVBoxClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_frame_get_type (void)
|
||||
{
|
||||
static GType frame_type = 0;
|
||||
|
||||
if (! frame_type)
|
||||
{
|
||||
static const GTypeInfo frame_info =
|
||||
{
|
||||
sizeof (GimpFrameClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_frame_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpFrame),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_frame_init,
|
||||
};
|
||||
|
||||
frame_type = g_type_register_static (GTK_TYPE_FRAME,
|
||||
"GimpFrame",
|
||||
&frame_info, 0);
|
||||
}
|
||||
|
||||
return frame_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_frame_class_init (GimpFrameClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class;
|
||||
GtkFrameClass *frame_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
widget_class = GTK_WIDGET_CLASS (klass);
|
||||
frame_class = GTK_FRAME_CLASS (klass);
|
||||
|
||||
widget_class->size_request = gimp_frame_size_request;
|
||||
widget_class->size_allocate = gimp_frame_size_allocate;
|
||||
widget_class->expose_event = gimp_frame_expose;
|
||||
|
||||
frame_class->compute_child_allocation = gimp_frame_child_allocate;
|
||||
|
||||
gtk_widget_class_install_style_property (widget_class,
|
||||
g_param_spec_int ("label_spacing",
|
||||
NULL, NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
DEFAULT_LABEL_SPACING,
|
||||
G_PARAM_READABLE));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gimp_frame_init (GimpFrame *frame)
|
||||
{
|
||||
g_signal_connect (frame, "notify::label-widget",
|
||||
G_CALLBACK (gimp_frame_label_widget_notify),
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_frame_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkFrame *frame = GTK_FRAME (widget);
|
||||
GtkBin *bin = GTK_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget))
|
||||
{
|
||||
gint spacing;
|
||||
|
||||
gtk_widget_size_request (frame->label_widget, requisition);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"label_spacing", &spacing,
|
||||
NULL);
|
||||
|
||||
requisition->height += spacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
requisition->width = 0;
|
||||
requisition->height = 0;
|
||||
}
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
requisition->width = MAX (requisition->width, child_requisition.width);
|
||||
requisition->height += child_requisition.height;
|
||||
}
|
||||
|
||||
requisition->width += GTK_CONTAINER (widget)->border_width;
|
||||
requisition->height += GTK_CONTAINER (widget)->border_width;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_frame_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkFrame *frame = GTK_FRAME (widget);
|
||||
GtkBin *bin = GTK_BIN (widget);
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
gimp_frame_child_allocate (frame, &frame->child_allocation);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
gtk_widget_size_allocate (bin->child, &frame->child_allocation);
|
||||
|
||||
if (frame->label_widget && GTK_WIDGET_VISIBLE (frame->label_widget))
|
||||
{
|
||||
GtkAllocation label_allocation;
|
||||
GtkRequisition label_requisition;
|
||||
gfloat xalign;
|
||||
|
||||
gtk_widget_get_child_requisition (frame->label_widget,
|
||||
&label_requisition);
|
||||
|
||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
||||
xalign = frame->label_xalign;
|
||||
else
|
||||
xalign = 1.0 - frame->label_xalign;
|
||||
|
||||
label_allocation.x = (allocation->x +
|
||||
xalign * (gfloat) (allocation->width -
|
||||
label_requisition.width));
|
||||
label_allocation.y = allocation->y;
|
||||
label_allocation.width = label_requisition.width;
|
||||
label_allocation.height = label_requisition.height;
|
||||
|
||||
gtk_widget_size_allocate (frame->label_widget, &label_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_frame_child_allocate (GtkFrame *frame,
|
||||
GtkAllocation *child_allocation)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (frame);
|
||||
GtkAllocation *allocation = &widget->allocation;
|
||||
PangoLayout *layout;
|
||||
gint border_width = GTK_CONTAINER (frame)->border_width;
|
||||
gint top_margin = 0;
|
||||
gint left_margin;
|
||||
|
||||
if (frame->label_widget)
|
||||
{
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
gtk_widget_get_child_requisition (frame->label_widget,
|
||||
&child_requisition);
|
||||
|
||||
gtk_widget_style_get (widget,
|
||||
"label_spacing", &top_margin,
|
||||
NULL);
|
||||
|
||||
top_margin += child_requisition.height;
|
||||
}
|
||||
|
||||
/* the HIG suggests to use four spaces so do just that */
|
||||
layout = gtk_widget_create_pango_layout (widget, " ");
|
||||
pango_layout_get_pixel_size (layout, &left_margin, NULL);
|
||||
g_object_unref (layout);
|
||||
|
||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
||||
child_allocation->x = border_width + left_margin;
|
||||
else
|
||||
child_allocation->x = border_width;
|
||||
|
||||
child_allocation->y = border_width + top_margin;
|
||||
child_allocation->width = MAX (1,
|
||||
allocation->width -
|
||||
2 * border_width - left_margin);
|
||||
child_allocation->height = MAX (1,
|
||||
allocation->height -
|
||||
child_allocation->y - border_width);
|
||||
|
||||
child_allocation->x += allocation->x;
|
||||
child_allocation->y += allocation->y;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_frame_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
GtkWidgetClass *widget_class = g_type_class_peek_parent (parent_class);
|
||||
|
||||
return widget_class->expose_event (widget, event);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_frame_label_widget_notify (GtkFrame *frame)
|
||||
{
|
||||
if (frame->label_widget && GTK_IS_LABEL (frame->label_widget))
|
||||
{
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
|
||||
attrs = pango_attr_list_new ();
|
||||
|
||||
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
||||
attr->start_index = 0;
|
||||
attr->end_index = -1;
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
|
||||
gtk_label_set_attributes (GTK_LABEL (frame->label_widget), attrs);
|
||||
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_frame_new:
|
||||
* @label: text to set as the frame's title label (or %NULL for no title)
|
||||
*
|
||||
* Creates a #GimpFrame widget. A #GimpFrame is a HIG-compliant
|
||||
* variant of #GtkFrame. It doesn't render a frame at all but
|
||||
* otherwise behaves like a frame. The frame's title is rendered in
|
||||
* bold and the frame content is indented four spaces as suggested by
|
||||
* the GNOME HIG (see http://developer.gnome.org/projects/gup/hig/).
|
||||
*
|
||||
* Return value: a new #GimpFrame widget
|
||||
*
|
||||
* Since: GIMP 2.2
|
||||
**/
|
||||
GtkWidget *
|
||||
gimp_frame_new (const gchar *label)
|
||||
{
|
||||
return g_object_new (GIMP_TYPE_FRAME,
|
||||
"label", label,
|
||||
NULL);
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimpframe.h
|
||||
* Copyright (C) 2004 Sven Neumann <sven@gimp.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_FRAME_H__
|
||||
#define __GIMP_FRAME_H__
|
||||
|
||||
#include <gtk/gtkframe.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
#define GIMP_TYPE_FRAME (gimp_frame_get_type ())
|
||||
#define GIMP_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FRAME, GimpFrame))
|
||||
#define GIMP_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FRAME, GimpFrameClass))
|
||||
#define GIMP_IS_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FRAME))
|
||||
#define GIMP_IS_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FRAME))
|
||||
#define GIMP_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FRAME, GimpFrameClass))
|
||||
|
||||
|
||||
typedef struct _GimpFrameClass GimpFrameClass;
|
||||
|
||||
struct _GimpFrame
|
||||
{
|
||||
GtkFrame parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpFrameClass
|
||||
{
|
||||
GtkFrameClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_frame_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget * gimp_frame_new (const gchar *label);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_FRAME_H__ */
|
|
@ -40,6 +40,7 @@
|
|||
#include <libgimpwidgets/gimpcolorselection.h>
|
||||
#include <libgimpwidgets/gimpdialog.h>
|
||||
#include <libgimpwidgets/gimpfileentry.h>
|
||||
#include <libgimpwidgets/gimpframe.h>
|
||||
#include <libgimpwidgets/gimphelpui.h>
|
||||
#include <libgimpwidgets/gimpintcombobox.h>
|
||||
#include <libgimpwidgets/gimpintstore.h>
|
||||
|
|
|
@ -69,6 +69,7 @@ typedef struct _GimpColorSelect GimpColorSelect;
|
|||
typedef struct _GimpColorSelection GimpColorSelection;
|
||||
typedef struct _GimpDialog GimpDialog;
|
||||
typedef struct _GimpFileEntry GimpFileEntry;
|
||||
typedef struct _GimpFrame GimpFrame;
|
||||
typedef struct _GimpIntComboBox GimpIntComboBox;
|
||||
typedef struct _GimpIntStore GimpIntStore;
|
||||
typedef struct _GimpMemsizeEntry GimpMemsizeEntry;
|
||||
|
|
|
@ -56,6 +56,7 @@ style "gimp-default-style"
|
|||
GimpEditor::content_spacing = 1
|
||||
GimpEditor::button_spacing = 1
|
||||
GimpEditor::button_icon_size = menu
|
||||
GimpFrame::label_spacing = 2
|
||||
GtkDialog::content_area_border = 0
|
||||
GtkDialog::button_spacing = 4
|
||||
GtkDialog::action_area_border = 6
|
||||
|
|
Loading…
Reference in New Issue