PHP-GTK
Monday, September 22, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkRuler::upper
GtkScale::get_digitsnext

Last updated: Sun, 12 May 2013
view this page in English

GtkScale

Base class for GtkHScale and GtkVScale.

Object Hierarchy

Direct Subclasses

Description

A GtkScale is a widget that looks very like a GtkScrollbar without the arrow buttons at either end and with the ability to display the current value as text.

There are some issues with the value display, in that scrolling-aware container widgets will not allow their child's GtkAdjustment to be overwritten, which means that the GtkScale cannot have focus unless it takes the values given by the container to the scrollable widget. This in turn misconfigures the display area, which is calculated with regard to the upper value of the associated adjustment object. When a container sets an adjustment, each value is 0 at the start, and the later values are calculated on the fly after the widgets have been drawn.

Although it is possible to use the GtkWidget method queue_resize() to force the text area to resize according to the width of the new adjustment values, the widget does not fully redraw unless it has a configure event - that is, you need to manually resize it and then restore it.

For all these reasons, it is unadvisable to use the draw-value feature where the GtkScale is associated with a scrollable widget.

Methods

get_digits()
  Gets number of decimal places.
get_draw_value()
  Gets if value is displayed or not.
get_layout()
  Returns the PangoLayout for the scale.
get_layout_offsets()
  Returns the coordinates where the scale will draw the text in the scale.
get_value_pos()
  Gets position of numeric text.
set_digits()
  Sets number of decimal places.
set_draw_value()
  Toggles whether value is displayed.
set_value_pos()
  Sets position of numeric text.

Signals

"format-value"
  Signal which allows the display value of the scale to be changed.


User Contributed Notes
gtk.gtkscale.php
add a note about notes
There are no user contributed notes for this page.


previousGtkRuler::upper
GtkScale::get_digitsnext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:59 2013 CEST