diff --git a/ChangeLog b/ChangeLog index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3236fbb8d9..6b1903f5a5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson + + * docs/man: new directory for v1.0 man pages + * docs/man/gtk.pod + docs/man/gtk_button.pod + docs/man/gtk_hbox.pod + docs/man/gtk_vbox.pod: Beginning of man pages + Tue Aug 4 10:59:19 1998 Owen Taylor * gtk/gtktable.[ch]: Empty rows/columns of the table diff --git a/docs/man/gtk.pod b/docs/man/gtk.pod new file mode 100644 index 0000000000..3fc68a5ea3 --- /dev/null +++ b/docs/man/gtk.pod @@ -0,0 +1,26 @@ + +=head1 NAME + +GTK+ - The GIMP Toolkit + +=head1 SYNOPSIS + + For information on GTK+, see the man pages below. + +=head1 COMMANDS + +=head1 CONTAINER WIDGETS + + gtk_box(3) + gtk_vbox(3) + gtk_hbox(3) + +=head1 WIDGETS + + gtk_button(3) + +=head1 AUTHORS + + The author of this man page is Shawn T. Amundson Eamundson@gtk.orgE. + For the authors of GTK+, see the AUTHORS file in the GTK+ distribution. + diff --git a/docs/man/gtk_button.pod b/docs/man/gtk_button.pod new file mode 100644 index 0000000000..d9d3921b04 --- /dev/null +++ b/docs/man/gtk_button.pod @@ -0,0 +1,206 @@ + +=head1 NAME + +gtk_button - GTK+ push button widget + +=head1 SYNOPSIS + + #include + + GtkType gtk_button_get_type (void); + GtkWidget* gtk_button_new (void); + GtkWidget* gtk_button_new_with_label (const gchar *label); + void gtk_button_pressed (GtkButton *button); + void gtk_button_released (GtkButton *button); + void gtk_button_clicked (GtkButton *button); + void gtk_button_enter (GtkButton *button); + void gtk_button_leave (GtkButton *button); + +=head1 DESCRIPTION + +This widget is a standard push button widget. Push button widgets +are generally used for allowing the user to click on them to initiate +a command. + +This widget is a container widget which contains one child. + +=head1 OBJECT HIERARCHY + + gtk_object + gtk_widget + gtk_container + gtk_button + +=head1 SIGNAL PROTOTYPES + + "clicked" void user_function (GtkWidget *widget, gpointer data); + "pressed" void user_function (GtkWidget *widget, gpointer data); + "released" void user_function (GtkWidget *widget, gpointer data); + "enter" void user_function (GtkWidget *widget, gpointer data); + "leave" void user_function (GtkWidget *widget, gpointer data); + +=head1 USAGE + +=head2 Creation + +The most common way to create a button is with a label in it, which +contains text for the user to read. The child of the button will then +be a L widget with the text you passwd in. You can +do this in one command: + + GtkWidget *button; + button = gtk_button_new_with_label ("This is a button"); + +To create a gtk_button widget which does not already have a child, +use gtk_button_new(): + + GtkWidget *button; + button = gtk_button_new (); + +After you have created a button you can then add a widget to the +button (such as a label or pixmap) using gtk_container_add(). See +L for more information on adding widgets to +containers. + +=head2 Creating a pixmap in a button in a window + +After we have an empty gtk_button, such as above, and we have a gtk_pixmap, +we can simply add the gtk_pixmap to the gtk_button with gtk_container_add(). + +The following code will open the file "gimp.xpm" and place it in a +button. + + #include + + int main (int argc, char *argv[]) + { + GtkWidget *window; + GtkWidget *button; + GtkWidget *pixmap; + GtkStyle *style; + GdkPixmap *gdkpixmap; + GdkBitmap *mask; + char *filename = "gimp.xpm"; + + gtk_init (&argc, &argv); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + + button = gtk_button_new (); + gtk_container_add (GTK_CONTAINER (window), button); + + /* The button is realized now, which creates button->window + used below to create the pixmap. */ + gtk_widget_realize (button); + + style = gtk_widget_get_style (button); + gdkpixmap = gdk_pixmap_create_from_xpm (button->window, &mask, + &style->bg[GTK_STATE_NORMAL], + filename); + pixmap = gtk_pixmap_new (gdkpixmap, mask); + + gtk_container_add (GTK_CONTAINER (button), pixmap); + + gtk_widget_show (pixmap); + gtk_widget_show (button); + gtk_widget_show (window); + + gtk_main (); + return 0; + } + +=head2 Executing a command when the button is pressed + +To execute a function when a button is pressed, use +gtk_signal_connect() to connect to the "clicked" signal. + + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (user_function), + NULL); + +user_function is a user defined function, like the following: + + void user_function (GtkWidget *button, gpointer data) + { + printf("clicked\n"); + } + +=head1 FUNCTIONS + +GtkType gtk_button_get_type (void); + + This function returns the GtkType which is assigned to the + object class for gtk_button. + +GtkWidget* gtk_button_new (void); + + This functions returns a new button widget which can then be + used as a container for another widget. + +GtkWidget* gtk_button_new_with_label (const gchar *label); + + This function returns a new button widget with a label widget + as a child. The label widget will have the text passed into + the commant. + +void gtk_button_pressed (GtkButton *button); + + This function sends a "pressed" signal to the button. + +void gtk_button_released (GtkButton *button); + + This function sends a "released" signal to the button. + +void gtk_button_clicked (GtkButton *button); + + This function sends a "clicked" signal to the button. + +void gtk_button_enter (GtkButton *button); + + This function sends a "enter" signal to the button. + +void gtk_button_leave (GtkButton *button); + + This function sends a "leave" signal to the button. + +=head1 SIGNALS + +"clicked" + + void user_function (GtkWidget *widget, gpointer data); + + Gets emitted when the button is clicked. A click is + a press and release of the button when the cursor is + inside the button on release. + +"pressed" + + void user_function (GtkWidget *widget, gpointer data); + + Gets emitted when the left mouse button is pressed. + +"released" + + void user_function (GtkWidget *widget, gpointer data); + + Gets emitted when the left mouse button is released and + the widget was previously pressed. + +"enter" + + void user_function (GtkWidget *widget, gpointer data); + + Emitted when the mouse cursor enters the button. + +"leave" + + void user_function (GtkWidget *widget, gpointer data); + + Emitted when the mouse cursor leaves the button. + +=head1 AUTHORS + +The author of this man page is Shawn T. Amundson Eamundson@gtk.orgE. +For the authors of GTK+, see the AUTHORS file in the GTK+ distribution. + + diff --git a/docs/man/gtk_hbox.pod b/docs/man/gtk_hbox.pod new file mode 100644 index 0000000000..25f69e38c9 --- /dev/null +++ b/docs/man/gtk_hbox.pod @@ -0,0 +1,73 @@ + +=head1 NAME + +gtk_hbox - GTK+ horizontal box widget + +=head1 SYNOPSIS + + #include + + guint gtk_hbox_get_type (void); + GtkWidget* gtk_hbox_new (gint homogeneous, + gint spacing); + +=head1 DESCRIPTION + +This widget is a container used to place widgets horizontally in relation +to each other. This is done by "packing" them into the box with +the functions gtk_box_pack_start and gtk_box_pack_end. + +General box functions can be found in gtk_box(1). + +=head1 OBJECT HIERARCHY + + gtk_object + gtk_widget + gtk_container + gtk_box + gtk_hbox + +=head1 USAGE + +=head2 Creation + +To create a hbox, use the function gtk_hbox_new(). The arguments +you pass to gtk_hbox_new indicate if the hbox should be homogeneous +(that is, if the children should all be given the same amount of +space all the time), and the amount of space inbetween the children. + +The following creates a hbox which is non-homogeneous and will have +4 spacing pixels between the children: + + GtkWidget *hbox; + hbox = gtk_hbox_new (FALSE, 4); + +For instructions on adding children to this newly created hbox, +consult gtk_box(3). + +=head1 FUNCTIONS + +guint gtk_hbox_get_type (void); + + This function returns the GtkType which is assigned to the + object class for gtk_hbox. + +GtkWidget* gtk_hbox_new (gint homogeneous, gint spacing); + + This functions returns a new hbox widget which can then be + used as a container for other widgets. Homogeneous can be + either TRUE or FALSE and indicates if the children widgets + will be always be allocated equal area. Spacing is the + number of pixels to put inbetween the children of the box. + + +=head1 SEE ALSO + +gtk_box(3), gtk_vbox(3), gtk_container(3), gtk_widget(3) + +=head1 AUTHORS + +The author of this man page is Shawn T. Amundson Eamundson@gtk.orgE. +For the authors of GTK+, see the AUTHORS file in the GTK+ distribution. + + diff --git a/docs/man/gtk_vbox.pod b/docs/man/gtk_vbox.pod new file mode 100644 index 0000000000..6e193e2247 --- /dev/null +++ b/docs/man/gtk_vbox.pod @@ -0,0 +1,73 @@ + +=head1 NAME + +gtk_vbox - GTK+ vertical box widget + +=head1 SYNOPSIS + + #include + + guint gtk_vbox_get_type (void); + GtkWidget* gtk_vbox_new (gint homogeneous, + gint spacing); + +=head1 DESCRIPTION + +This widget is a container used to place widgets vertically in relation +to each other. This is done by "packing" them into the boxes with +the functions gtk_box_pack_start and gtk_box_pack_end. + +General box functions can be found in gtk_box(1). + +=head1 OBJECT HIERARCHY + + gtk_object + gtk_widget + gtk_container + gtk_box + gtk_vbox + +=head1 USAGE + +=head2 Creation + +To create a vbox, use the function gtk_vbox_new(). The arguments +you pass to gtk_vbox_new indicate if the vbox should be homogeneous +(that is, if the children should all be given the same amount of +space all the time), and the amount of space inbetween the children. + +The following creates a vbox which is non-homogeneous and will have +4 spacing pixels between the children: + + GtkWidget *vbox; + vbox = gtk_vbox_new (FALSE, 4); + +For instructions on adding children to this newly created vbox, +consult gtk_box(3). + +=head1 FUNCTIONS + +guint gtk_vbox_get_type (void); + + This function returns the GtkType which is assigned to the + object class for gtk_vbox. + +GtkWidget* gtk_vbox_new (gint homogeneous, gint spacing); + + This functions returns a new vbox widget which can then be + used as a container for other widgets. Homogeneous can be + either TRUE or FALSE and indicates if the children widgets + will be always be allocated equal area. Spacing is the + number of pixels to put inbetween the children of the box. + + +=head1 SEE ALSO + +gtk_box(3), gtk_hbox(3), gtk_container(3), gtk_widget(3) + +=head1 AUTHORS + +The author of this man page is Shawn T. Amundson Eamundson@gtk.orgE. +For the authors of GTK+, see the AUTHORS file in the GTK+ distribution. + +