]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtktogglebutton.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtktogglebutton.sgml
index 4b2b60968a537a7042d2b815386e76873a28e3af..815d6a480b681bba01caecbfbf706594d6fe4970 100644 (file)
@@ -2,12 +2,12 @@
 GtkToggleButton
 
 <!-- ##### SECTION Short_Description ##### -->
-create buttons which retain their state.
+Create buttons which retain their state
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
 A #GtkToggleButton is a #GtkButton which will remain 'pressed-in' when
-clicked. Clicking again will cause the toggle button to return to it's
+clicked. Clicking again will cause the toggle button to return to its
 normal state.
 </para>
 <para>
@@ -25,28 +25,28 @@ gtk_toggle_button_get_active().
 To simply switch the state of a toggle button, use gtk_toggle_button_toggled.
 </para>
 <example>
-<title>Creating two #GtkToggleButton widgets.</title>
+<title>Creating two <structname>GtkToggleButton</structname> widgets.</title>
 <programlisting>
 
-void make_toggles(void) {
+void make_toggles (void) {
    GtkWidget *dialog, *toggle1, *toggle2;
 
-   dialog = gtk_dialog_new();
-   toggle1 = gtk_toggle_button_new_with_label("Hi, i'm a toggle button.");
+   dialog = gtk_dialog_new (<!-- -->);
+   toggle1 = gtk_toggle_button_new_with_label ("Hi, i'm a toggle button.");
 
    /* Makes this toggle button invisible */
    gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE);
    
-   gtk_signal_connect (GTK_OBJECT (toggle1), "toggled",
-                       GTK_SIGNAL_FUNC (output_state), NULL);
-   gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area),
+   g_signal_connect (toggle1, "toggled",
+                     G_CALLBACK (output_state), NULL);
+   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                        toggle1, FALSE, FALSE, 2);
 
-   toggle2 = gtk_toggle_button_new_with_label("Hi, i'm another toggle button.");
+   toggle2 = gtk_toggle_button_new_with_label ("Hi, i'm another toggle button.");
    gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE);
-   gtk_signal_connect (GTK_OBJECT (toggle2), "toggled",
-                       GTK_SIGNAL_FUNC (output_state), NULL);
-   gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area),
+   g_signal_connect (toggle2, "toggled",
+                     G_CALLBACK (output_state), NULL);
+   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                        toggle2, FALSE, FALSE, 2);
 
    gtk_widget_show_all (dialog);
@@ -58,32 +58,66 @@ void make_toggles(void) {
 <!-- ##### SECTION See_Also ##### -->
 <para>
 <variablelist>
+
 <varlistentry>
-<term>#GtkButton</term>
-<listitem><para>a more general button.</para></listitem>
+  <term>#GtkButton</term>
+  <listitem><para>a more general button.</para></listitem>
 </varlistentry>
+
 <varlistentry>
-<term>#GtkCheckButton</term>
-<listitem><para>another way of presenting a toggle option.</para></listitem>
+  <term>#GtkCheckButton</term>
+  <listitem><para>another way of presenting a toggle option.</para></listitem>
 </varlistentry>
+
 <varlistentry>
-<term>#GtkCheckMenuItem</term>
-<listitem><para>a #GtkToggleButton  as a menu item.</para></listitem>
+  <term>#GtkCheckMenuItem</term>
+  <listitem><para>a #GtkToggleButton  as a menu item.</para></listitem>
 </varlistentry>
+
 </variablelist>
 </para>
 
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### STRUCT GtkToggleButton ##### -->
 <para>
 The #GtkToggleButton struct contains private data only, and should be manipulated using the functions below.
 </para>
 
 
+<!-- ##### SIGNAL GtkToggleButton::toggled ##### -->
+<para>
+Should be connected if you wish to perform an action whenever the
+#GtkToggleButton's state is changed.
+</para>
+
+@togglebutton: the object which received the signal.
+
+<!-- ##### ARG GtkToggleButton:active ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkToggleButton:draw-indicator ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkToggleButton:inconsistent ##### -->
+<para>
+
+</para>
+
 <!-- ##### FUNCTION gtk_toggle_button_new ##### -->
 <para>
 Creates a new toggle button. A widget should be packed into the button, as in gtk_button_new().
 </para>
 
+@void: 
 @Returns: a new toggle button.
 
 
@@ -107,11 +141,10 @@ Creates a new toggle button with a text label.
 
 <!-- ##### FUNCTION gtk_toggle_button_set_mode ##### -->
 <para>
-Determines whether or not the toggle button is drawn on screen. The default mode is FALSE, which results in the button being displayed. To make the button invisible, set <structfield>draw_indicator</structfield> to TRUE.
 </para>
 
-@toggle_button: a #GtkToggleButton.
-@draw_indicator: TRUE or FALSE.
+@toggle_button: 
+@draw_indicator: 
 
 
 <!-- ##### FUNCTION gtk_toggle_button_get_mode ##### -->
@@ -123,13 +156,6 @@ Determines whether or not the toggle button is drawn on screen. The default mode
 @Returns: 
 
 
-<!-- ##### MACRO gtk_toggle_button_set_state ##### -->
-<para>
-This is a deprecated macro, and is only maintained for compatability reasons.
-</para>
-
-
-
 <!-- ##### FUNCTION gtk_toggle_button_toggled ##### -->
 <para>
 Emits the <link linkend="GtkToggleButton-toggled">toggled</link>
@@ -142,8 +168,8 @@ application ever to call this function.
 
 <!-- ##### FUNCTION gtk_toggle_button_get_active ##### -->
 <para>
-Queries a #GtkToggleButton and returns it's current state. Returns TRUE if
-the toggle button is pressed in and FALSE if it is raised.
+Queries a #GtkToggleButton and returns its current state. Returns %TRUE if
+the toggle button is pressed in and %FALSE if it is raised.
 </para>
 
 @toggle_button: a #GtkToggleButton.
@@ -152,13 +178,13 @@ the toggle button is pressed in and FALSE if it is raised.
 
 <!-- ##### FUNCTION gtk_toggle_button_set_active ##### -->
 <para>
-Sets the status of the toggle button. Set to TRUE if you want the
-GtkToggleButton to be 'pressed in', and FALSE to raise it.
+Sets the status of the toggle button. Set to %TRUE if you want the
+GtkToggleButton to be 'pressed in', and %FALSE to raise it.
 This action causes the toggled signal to be emitted.
 </para>
 
 @toggle_button: a #GtkToggleButton.
-@is_active: TRUE or FALSE.
+@is_active: %TRUE or %FALSE.
 
 
 <!-- ##### FUNCTION gtk_toggle_button_get_inconsistent ##### -->
@@ -179,27 +205,3 @@ This action causes the toggled signal to be emitted.
 @setting: 
 
 
-<!-- ##### SIGNAL GtkToggleButton::toggled ##### -->
-<para>
-Should be connected if you wish to perform an action whenever the
-#GtkToggleButton's state is changed.
-</para>
-
-@togglebutton: the object which received the signal.
-
-<!-- ##### ARG GtkToggleButton:active ##### -->
-<para>
-Sets whether the toggle button should be pressed in or not.
-</para>
-
-<!-- ##### ARG GtkToggleButton:inconsistent ##### -->
-<para>
-
-</para>
-
-<!-- ##### ARG GtkToggleButton:draw-indicator ##### -->
-<para>
-A value of TRUE causes the toggle button to be invisible. FALSE displays it
-again.
-</para>
-