Class: Gtk::CellRendererSpin

Inherits:
CellRendererText show all
Defined in:
(unknown)

Overview

Renders a spin button in a cell

GtkCellRendererSpin renders text in a cell like GtkCellRendererText from which it is derived. But while GtkCellRendererText offers a simple entry to edit the text, GtkCellRendererSpin offers a GtkSpinButton widget. Of course, that means that the text has to be parseable as a floating point number.

The range of the spinbutton is taken from the adjustment property of the cell renderer, which can be set explicitly or mapped to a column in the tree model, like all properties of cell renders. GtkCellRendererSpin also has properties for the GtkCellRendererSpin:climb-rate and the number of GtkCellRendererSpin:digits to display. Other GtkSpinButton properties can be set in a handler for the GtkCellRenderer::editing-started signal.

Instance Method Summary collapse

Methods inherited from CellRendererText

#align_set=, #align_set?, #alignment, #alignment=, #attributes, #attributes=, #background=, #background_rgba, #background_rgba=, #background_set=, #background_set?, #editable=, #editable?, #editable_set=, #editable_set?, #ellipsize, #ellipsize=, #ellipsize_set=, #ellipsize_set?, #family, #family=, #family_set=, #family_set?, #fixed_height_from_font=, #font, #font=, #font_desc, #font_desc=, #foreground=, #foreground_rgba, #foreground_rgba=, #foreground_set=, #foreground_set?, #language, #language=, #language_set=, #language_set?, #markup=, #max_width_chars, #max_width_chars=, #placeholder_text, #placeholder_text=, #rise, #rise=, #rise_set=, #rise_set?, #scale, #scale=, #scale_set=, #scale_set?, #single_paragraph_mode=, #single_paragraph_mode?, #size, #size=, #size_points, #size_points=, #size_set=, #size_set?, #stretch, #stretch=, #stretch_set=, #stretch_set?, #strikethrough=, #strikethrough?, #strikethrough_set=, #strikethrough_set?, #style, #style=, #style_set=, #style_set?, #text, #text=, #underline, #underline=, #underline_set=, #underline_set?, #variant, #variant=, #variant_set=, #variant_set?, #weight, #weight=, #weight_set=, #weight_set?, #width_chars, #width_chars=, #wrap_mode, #wrap_mode=, #wrap_width, #wrap_width=

Methods inherited from CellRenderer

#activate, #cell_background=, #cell_background_rgba, #cell_background_rgba=, #cell_background_set=, #cell_background_set?, #editing=, #editing?, #get_aligned_area, #get_alignment, #get_fixed_size, #get_padding, #get_preferred_height, #get_preferred_height_for_width, #get_preferred_size, #get_preferred_width, #get_preferred_width_for_height, #get_state, #height, #height=, #is_activatable, #is_expanded, #is_expanded=, #is_expanded?, #is_expander, #is_expander=, #is_expander?, #mode, #mode=, #request_mode, #sensitive, #sensitive=, #sensitive?, #set_alignment, #set_fixed_size, #set_padding, #snapshot, #start_editing, #stop_editing, #visible, #visible=, #visible?, #width, #width=, #xalign, #xalign=, #xpad, #xpad=, #yalign, #yalign=, #ypad, #ypad=

Constructor Details

#initializeGtk::CellRenderer

Creates a new GtkCellRendererSpin.

Instance Method Details

#adjustmentGtk::Adjustment

The adjustment that holds the value of the spinbutton. This must be non-nil for the cell renderer to be editable.

Returns:

#adjustment=(adjustment) ⇒ Gtk::Adjustment

The adjustment that holds the value of the spinbutton. This must be non-nil for the cell renderer to be editable.

Parameters:

Returns:

#climb_rateFloat

The acceleration rate when you hold down a button.

Returns:

  • (Float)

    climb-rate

#climb_rate=(climb_rate) ⇒ Float

The acceleration rate when you hold down a button.

Parameters:

  • climb_rate (Float)

Returns:

  • (Float)

    climb-rate

  • (Float)

    climb-rate

#digitsInteger

The number of decimal places to display.

Returns:

  • (Integer)

    digits

#digits=(digits) ⇒ Integer

The number of decimal places to display.

Parameters:

  • digits (Integer)

Returns:

  • (Integer)

    digits

  • (Integer)

    digits