Add GtkScaleButton documentation
[cl-gtk2.git] / doc / gtk.widgets.texi
index 8e90fc0..f5825df 100644 (file)
@@ -2450,10 +2450,22 @@ Signals:
 @Class link-button
 Superclass: @ref{button} @ref{atk-implementor-iface} @ref{activatable} @ref{buildable}
 
+A @ref{link-button} is a @ref{button} with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.
+
+@ref{link-button} offers a global hook, which is called when the used clicks on it: see @ref{link-button-global-uri-hook}.
+
 Slots:
 @itemize
 @item @anchor{slot.link-button.uri}uri. Type: @code{string}. Accessor: @anchor{fn.link-button-uri}@code{link-button-uri}.
+
+The URI bound to this button.
+
+Default value: NIL
 @item @anchor{slot.link-button.visited}visited. Type: @code{boolean}. Accessor: @anchor{fn.link-button-visited}@code{link-button-visited}.
+
+The 'visited' state of this button. A visited link is drawn in a different color.
+
+Default value: False
 @end itemize
 
 
@@ -2461,8 +2473,16 @@ Signals:
 @itemize
 @end itemize
 
+@RFunction link-button-global-uri-hook
+@lisp
+(setf (link-button-gloval-uri-hook) function)
+@end lisp
 
+Sets function as the function that should be invoked every time a user clicks a @ref{link-button}. This function is called before every callback registered for the @SignalRef{button,clicked} signal.
 
+If @var{function} is NIL, GTK+ defaults to calling gtk_show_uri() (default function that opens the default application for a URI).
+
+@var{function} is a function of two arguments: a @ref{link-button} and a @code{string}. First argument is the button that was clicked and the second is the URI of the button.
 
 @node menu
 @section menu
@@ -3105,20 +3125,48 @@ Superclass: @ref{button} @ref{atk-implementor-iface} @ref{activatable} @ref{buil
 
 Subclasses: @ref{volume-button}
 
+@ref{scale-button} provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK+ provides a @ref{volume-button} subclass that is tailored for this use case.
+
 Slots:
 @itemize
 @item @anchor{slot.scale-button.adjustment}adjustment. Type: @ref{adjustment}. Accessor: @anchor{fn.scale-button-adjustment}@code{scale-button-adjustment}.
-@item @anchor{slot.scale-button.icons}icons. Type: @code{GStrv}. Accessor: @anchor{fn.scale-button-icons}@code{scale-button-icons}.
+
+The @ref{adjustment} that contains the current value of this scale button object.
+@item @anchor{slot.scale-button.icons}icons. Type: list of @code{string}. Accessor: @anchor{fn.scale-button-icons}@code{scale-button-icons}.
+
+The names of the icons to be used by the scale button. The first item in the list will be used in the button when the current value is the lowest value, the second item for the highest value. All the subsequent icons will be used for all the other values, spread evenly over the range of values.
+
+If there's only one icon name in the icons array, it will be used for all the values. If only two icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and the second one for the top 50%.
+
+It is recommended to use at least 3 icons so that the @ref{scale-button} reflects the current value of the scale better for the users.
 @item @anchor{slot.scale-button.size}size. Type: @ref{icon-size}. Accessor: @anchor{fn.scale-button-size}@code{scale-button-size}.
+
+The icon size.
+
+Default value: @EnumVRef{icon-size,small-toolbar}
 @item @anchor{slot.scale-button.value}value. Type: @code{double-float}. Accessor: @anchor{fn.scale-button-value}@code{scale-button-value}.
+
+The value of the scale.
+
+Default value: 0
 @end itemize
 
 
 Signals:
 @itemize
 @item @anchor{signal.scale-button.popdown}"popdown". Signature: (instance @ref{scale-button}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to popdown the scale widget.
+
+The default binding for this signal is Escape.
 @item @anchor{signal.scale-button.popup}"popup". Signature: (instance @ref{scale-button}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to popup the scale widget.
+
+The default bindings for this signal are Space, Enter and Return.
 @item @anchor{signal.scale-button.value-changed}"value-changed". Signature: (instance @ref{scale-button}), (arg-1 @code{double-float}) @result{} void. Options: run-last.
+
+This signal is emitted when the value field has changed.
 @end itemize
 
 
@@ -3472,17 +3520,35 @@ Superclass: @ref{button} @ref{atk-implementor-iface} @ref{activatable} @ref{buil
 
 Subclasses: @ref{check-button}
 
+A @ref{toggle-button} is a @ref{button} which will remain 'pressed-in' when clicked. Clicking again will cause the toggle button to return to its normal state.
+
+The state of a @ref{toggle-button} is stored in @SlotRef{toggle-button,active} and @SlotRef{toggle-button,inconsistent}.
+
 Slots:
 @itemize
 @item @anchor{slot.toggle-button.active}active. Type: @code{boolean}. Accessor: @anchor{fn.toggle-button-active}@code{toggle-button-active}.
+
+If the toggle button should be pressed in or not.
+
+Default value: False
 @item @anchor{slot.toggle-button.draw-indicator}draw-indicator. Type: @code{boolean}. Accessor: @anchor{fn.toggle-button-draw-indicator}@code{toggle-button-draw-indicator}.
+
+If the toggle part of the button is displayed.
+
+Default value: False
 @item @anchor{slot.toggle-button.inconsistent}inconsistent. Type: @code{boolean}. Accessor: @anchor{fn.toggle-button-inconsistent}@code{toggle-button-inconsistent}.
+
+If the toggle button is in an "in between" state.
+
+Default value: False
 @end itemize
 
 
 Signals:
 @itemize
 @item @anchor{signal.toggle-button.toggled}"toggled". Signature: (instance @ref{toggle-button}) @result{} void. Options: run-first.
+
+Should be connected if you wish to perform an action whenever the @ref{toggle-button}'s state is changed.
 @end itemize