Class VGrade
Widget that shows a zoomable, scrollable vertical scale.
This class is a composite megawidget in the form of a graduated,
interactive vertical numerical scale that is both zoomable and
scrollable. The zoom is adjusted by dragging in the scale region of the
widget to the left, whereas the widget can be scrolled by dragging in the
trackbar on the right. Both regions of the widget hilight when the mouse
is moved over them, to hint to the user that interaction is possible.
The widget is composed of a VGradeZoom widget and a
gtk.DrawingArea widget. These widgets are packaged within a
gtk.HBox widget.
The data model of the VGrade widget is a
gtk.Adjustment object. The interpretation of the adjustment is as follows: The
value of the adjustment is the minimum value displayed
on the widget. The maximum value displayed on the widget is the
value plus the page_size of the adjustment. The widget will not allow the
user to change the adjustment so that any part of the display
lies outside the range from the lower to upper
values of the adjustment.
The underlying gtk.HBox widget container can be accessed
via the special widget attribute. This attribute cannot be
changed nor deleted.
See Also: VGradeZoom
| Method Summary |
| |
__init__(self,
adjustment)
Initializes the widget. |
| |
__delattr__(self,
name)
Delete attributes method. |
| |
__getattr__(self,
name)
Get attributes method. |
| |
__setattr__(self,
name,
value)
Set attributes method. |
| |
set_adjustment(self,
adjustment)
Set the adjustment used as the data model. |
| Instance Variable Summary |
gtk.Adjustment |
adjustment: Adjustment data model for controlling the range of the widget. |
gtk.HBox |
widget: Read-only pseudo-parent widget. |
__init__(self,
adjustment=None)
(Constructor)
Initializes the widget.
-
- Parameters:
adjustment -
Data model for controlling the vertical range shown by the
widget. If adjustment is None then a
default gtk.Adjustment is created.
(type=gtk.Adjustment)
|
__delattr__(self,
name)
Delete attributes method.
-
|
__getattr__(self,
name)
(Qualification operator)
Get attributes method.
-
|
__setattr__(self,
name,
value)
Set attributes method.
-
|
set_adjustment(self,
adjustment)
Set the adjustment used as the data model.
If adjustment is None then a new, default
adjustment is created.
This method is equivalent to setting:
object.adjustment = adjustment
EG:
>>> import gtk, vgrade
>>> v = vgrade.VGrade()
>>> a1 = gtk.Adjustment()
>>> a2 = gtk.Adjustment()
>>> v.set_adjustment(a1)
>>> v.adjustment is a1
1
>>> v.adjustment = a2
>>> v.adjustment is a2
1
>>> v.adjustment is a1
0
-
- Parameters:
adjustment -
Data model to control the range of the widget.
(type=gtk.Adjustment)
|
| Instance Variable Details |
adjustment
Adjustment data model for controlling the range of the widget.
-
- Type:
-
gtk.Adjustment
|
widget
Read-only pseudo-parent widget.
-
- Type:
-
gtk.HBox
|