Class VGradeZoom
VGradeScale
--+
|
VGradeZoom
Widget that zooms a vertical graduated scale.
This class is an extension of the VGradeScale
class, to make it an
interactively zoomable widget. Interactions to change the zoom are
executed by clicking with the left mouse button and then dragging with
the left mouse button depressed, within the area of the widget.
Dragging upwards in the widget causes it to zoom in, whereas dragging
downwards causes it to zoom out. The widget hilights yellow when it has
the mouse focus to alert the user to the possibility of interaction. The
maximum and minimum possible values that may be shown on the scale are
the adjustment
.upper
and adjustment
.lower
values
respectively. The widget will refuse to zoom outside of these values.
The sensitivity of the zoom is controlled by the instance variable
called sensitivity
. The default value of
0.006
should be quite good. The value shouldn't be very much
greater than this, otherwise the scale becomes too jerky.
The interpretation of the gtk.Adjustment
object used as
the data model for this class is the same as for the VGradeScale
class. The lower bound
displayed by the widget is the value
of the adjustment
, whereas the upper bound is the
value+page_size
. Zooming interactively changes the
page_size
, and also possibly the value
, of the
adjustment
. However, the scale will not
change these values so that values outside the upper
and
lower
values of the adjustment
will be displayed.
Method Summary |
|
__init__ (self,
adjustment)
Initializes the widget. |
Inherited from VGradeScale |
|
__delattr__ (self,
name)
Delete attributes method. |
|
__setattr__ (self,
name,
value)
Set attributes method. |
|
set_adjustment (self,
adjustment)
Set the gtk.Adjustment used as the data model. |
|
set_bgcolor (self,
color)
Set the background color of the component. |
Instance Variable Summary |
gtk.Adjustment |
adjustment : Data model for the component. |
Tuple of (r, g, b) values in range
0 to 65535 . |
bgcolor : Background color of the component. |
Real number. |
sensitivity : Zoom sensitivity of the widget (around 0.006 is a good
value). |
gtk.DrawingArea |
widget : Read only pseudo-parent widget of the class. |
__init__(self,
adjustment=None)
(Constructor)
Initializes the widget.
-
- Parameters:
adjustment -
Data model for the vertical range of the widget. If
adjustment is None then a new, default
gtk.Adjustment is created.
(type=gtk.Adjustment )
- Overrides:
stripchart.vgradescale.VGradeScale.__init__
|
Instance Variable Details |
adjustment
Data model for the component.
-
- Type:
-
gtk.Adjustment
|
bgcolor
Background color of the component.
-
- Type:
-
Tuple of
(r, g, b) values in range
0 to 65535 .
|
sensitivity
Zoom sensitivity of the widget (around 0.006 is a good
value).
-
- Type:
-
Real number.
|
widget
Read only pseudo-parent widget of the class.
-
- Type:
-
gtk.DrawingArea
|