Documented gimp_color_button and cleaned up the framework.

Seems to be working now.


--Sven
This commit is contained in:
Sven Neumann
2000-02-03 02:35:08 +00:00
parent bdad9ab156
commit bbcc2ecc7b
9 changed files with 108 additions and 6 deletions

View File

@ -1,3 +1,7 @@
Fri Feb 4 01:29:08 CET 2000 Sven Neumann <sven@gimp.org>
* libgimp/gimpcolorbutton.c: documented GimpColorButton
Fri Feb 4 00:37:43 CET 2000 Sven Neumann <sven@gimp.org>
* Makefile.am

View File

@ -5,3 +5,8 @@ Fri Feb 4 00:40:47 CET 2000 Sven Neumann <sven@gimp.org>
All the information so far is purely autogenerated. We will
want to resort the chapters, add short explanantions and of
course, most importantly, add comment blocks into the source.
Fri Feb 4 01:27:41 CET 2000 Sven Neumann <sven@gimp.org>
* libgimp/tmpl/gimpcolorbutton.sgml: documented GimpColorButton
to give you an example.

View File

@ -2,4 +2,3 @@ Makefile
Makefile.in
html
sgml
libgimp.signals

View File

@ -55,6 +55,7 @@ libgimp_docdir = $(HTML_DIR)
EXTRA_DIST = \
libgimp.hierarchy \
libgimp.signals \
libgimp.types \
libgimp-include.c \
libgimp-decl.txt \

View File

@ -63,7 +63,7 @@
<chapter id="libgimpui">
<title>GIMP User Interface Library</title>
&GimpChainButton;
&GimpColorButton;
&GimpColorButton;
&GimpFileSelection;
&GimpPathEditor;
&GimpSizeEntry;

View File

@ -0,0 +1,42 @@
<SIGNAL>
<NAME>GimpColorButton::color-changed</NAME>
<RETURNS>void</RETURNS>
GimpColorButton *gimpcolorbutton
</SIGNAL>
<SIGNAL>
<NAME>GimpFileSelection::filename-changed</NAME>
<RETURNS>void</RETURNS>
GimpFileSelection *gimpfileselection
</SIGNAL>
<SIGNAL>
<NAME>GimpPathEditor::path-changed</NAME>
<RETURNS>void</RETURNS>
GimpPathEditor *gimppatheditor
</SIGNAL>
<SIGNAL>
<NAME>GimpSizeEntry::value-changed</NAME>
<RETURNS>void</RETURNS>
GimpSizeEntry *gimpsizeentry
</SIGNAL>
<SIGNAL>
<NAME>GimpSizeEntry::refval-changed</NAME>
<RETURNS>void</RETURNS>
GimpSizeEntry *gimpsizeentry
</SIGNAL>
<SIGNAL>
<NAME>GimpSizeEntry::unit-changed</NAME>
<RETURNS>void</RETURNS>
GimpSizeEntry *gimpsizeentry
</SIGNAL>
<SIGNAL>
<NAME>GimpUnitMenu::unit-changed</NAME>
<RETURNS>void</RETURNS>
GimpUnitMenu *gimpunitmenu
</SIGNAL>

View File

@ -2,11 +2,16 @@
GimpColorButton
<!-- ##### SECTION Short_Description ##### -->
Widget for selecting a color.
<!-- ##### SECTION Long_Description ##### -->
<para>
This widget provides a simple button with a preview showing the color.
On click a GtkColorSelectionDialog is opened. Additionally the button
supports Drag and Drop and has a right-click menu that allows to choose
the color from the current FG or BG color. If the user changes the
color, the "color_changed" signal is emitted. Note that the color is
changed in place.
</para>
<!-- ##### SECTION See_Also ##### -->

View File

@ -208,7 +208,22 @@ gimp_color_button_get_type (void)
return gcb_type;
}
/**
* gimp_color_button_new:
* @title: String that wil be used as title for the color_selector.
* @width: Width of the colorpreview in pixels.
* @height: Height of the colorpreview in pixels.
* @color: An array of guchar holding the color (RGB or RGBA)
* @bpp: May be 3 for RGB or 4 for RGBA.
*
* Creates a new GimpColorbutton widget. This returns a button with
* a preview showing the color. When the button is clicked a
* GtkColorSelectionDialog is opened. If the user changes the color
* the new color is written into the array that was used to pass
* the initial color and the "color_changed" signal is emitted.
*
* Returns: Pointer to the new GimpColorButton widget.
*/
GtkWidget*
gimp_color_button_new (gchar *title,
@ -293,6 +308,14 @@ gimp_color_button_new (gchar *title,
return (GTK_WIDGET (gcb));
}
/**
* gimp_color_button_update:
* @gcb: Pointer to a #GimpColorButton.
*
* Should be used after the color controlled by a #GimpColorButton
* was changed. The color is then reread and the change is propagated
* to the preview and the GtkColorSelectionDialog if one is open.
*/
void
gimp_color_button_update (GimpColorButton *gcb)
{

View File

@ -208,7 +208,22 @@ gimp_color_button_get_type (void)
return gcb_type;
}
/**
* gimp_color_button_new:
* @title: String that wil be used as title for the color_selector.
* @width: Width of the colorpreview in pixels.
* @height: Height of the colorpreview in pixels.
* @color: An array of guchar holding the color (RGB or RGBA)
* @bpp: May be 3 for RGB or 4 for RGBA.
*
* Creates a new GimpColorbutton widget. This returns a button with
* a preview showing the color. When the button is clicked a
* GtkColorSelectionDialog is opened. If the user changes the color
* the new color is written into the array that was used to pass
* the initial color and the "color_changed" signal is emitted.
*
* Returns: Pointer to the new GimpColorButton widget.
*/
GtkWidget*
gimp_color_button_new (gchar *title,
@ -293,6 +308,14 @@ gimp_color_button_new (gchar *title,
return (GTK_WIDGET (gcb));
}
/**
* gimp_color_button_update:
* @gcb: Pointer to a #GimpColorButton.
*
* Should be used after the color controlled by a #GimpColorButton
* was changed. The color is then reread and the change is propagated
* to the preview and the GtkColorSelectionDialog if one is open.
*/
void
gimp_color_button_update (GimpColorButton *gcb)
{