GtkRange

Name

GtkRange -- 

Synopsis


#include <gtk/gtk.h>


struct      GtkRange;
GtkAdjustment* gtk_range_get_adjustment     (GtkRange *range);
void        gtk_range_set_update_policy     (GtkRange *range,
                                             GtkUpdateType policy);
void        gtk_range_set_adjustment        (GtkRange *range,
                                             GtkAdjustment *adjustment);
gboolean    gtk_range_get_inverted          (GtkRange *range);
void        gtk_range_set_inverted          (GtkRange *range,
                                             gboolean setting);

Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkRange

Args


  "update-policy"        GtkUpdateType        : Read / Write
  "adjustment"           GtkAdjustment        : Read / Write
  "inverted"             gboolean             : Read / Write

Signal Prototypes


"move-slider"
            void        user_function      (GtkRange *range,
                                            GtkScrollType arg1,
                                            gpointer user_data);
"value-changed"
            void        user_function      (GtkRange *range,
                                            gpointer user_data);

Description

Details

struct GtkRange

struct GtkRange;


gtk_range_get_adjustment ()

GtkAdjustment* gtk_range_get_adjustment     (GtkRange *range);

Get the GtkAdjustment which is the "model" object for GtkRange. See gtk_range_set_adjustment() for details. The return value does not have a reference added, so should not be unreferenced.

range : a GtkRange
Returns : a GtkAdjustment


gtk_range_set_update_policy ()

void        gtk_range_set_update_policy     (GtkRange *range,
                                             GtkUpdateType policy);

Sets the update policy for the range. GTK_UPDATE_CONTINUOUS means that anytime the range slider is moved, the range value will change and the value_changed signal will be emitted. GTK_UPDATE_DELAYED means that the value will be updated after a brief timeout where no slider motion occurs, so updates are spaced by a short time rather than continuous. GTK_UPDATE_DISCONTINUOUS means that the value will only be updated when the user releases the button and ends the slider drag operation.

range : a GtkRange
policy : update policy


gtk_range_set_adjustment ()

void        gtk_range_set_adjustment        (GtkRange *range,
                                             GtkAdjustment *adjustment);

Sets the adjustment to be used as the "model" object for this range widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for GtkScale and nonzero for GtkScrollbar, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.

range : a GtkRange
adjustment : a GtkAdjustment


gtk_range_get_inverted ()

gboolean    gtk_range_get_inverted          (GtkRange *range);

Gets the value set by gtk_range_set_inverted().

range : a GtkRange
Returns : TRUE if the range is inverted


gtk_range_set_inverted ()

void        gtk_range_set_inverted          (GtkRange *range,
                                             gboolean setting);

Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.

range : a GtkRange
setting : TRUE to invert the range

Args

"update-policy" (GtkUpdateType : Read / Write)

"adjustment" (GtkAdjustment : Read / Write)

"inverted" (gboolean : Read / Write)

Signals

The "move-slider" signal

void        user_function                  (GtkRange *range,
                                            GtkScrollType arg1,
                                            gpointer user_data);

Virtual function that moves the slider. Used for keybindings.

range :the GtkRange
arg1 : 
user_data :user data set when the signal handler was connected.


The "value-changed" signal

void        user_function                  (GtkRange *range,
                                            gpointer user_data);

Emitted when the range value changes.

range :the GtkRange
user_data :user data set when the signal handler was connected.