gtk.HandleBox()
def set_shadow_type(type
)
def get_shadow_type()
def set_handle_position(position
)
def get_handle_position()
def set_snap_edge(edge
)
def get_snap_edge()
def get_child_detached()
|
gtk.HandleBox()
def set_shadow_type(type
)
def get_shadow_type()
def set_handle_position(position
)
def get_handle_position()
def set_snap_edge(edge
)
def get_snap_edge()
def get_child_detached()
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.HandleBox
|
gtk.Container Signal Prototypes
def callback( | |
def callback( |
The gtk.HandleBox
widget allows a portion of a window to be "torn off". It is a bin widget
which displays its child and a handle that the user can drag to tear off
into a separate floating window containing the child widget. A thin ghost is
drawn in the original location of the handlebox. The separate window can be
dragged back to its original location to be reattached. When reattaching,
the ghost and float window, must be aligned along one of the edges called
the snap edge that can be specified by the application, or specified
automatically using a reasonable default based on the handle position. The
snap edge is automatically set as gtk.POS_TOP
if the
handle position is gtk.POS_RIGHT
or
gtk.POS_LEFT
; otherwise, the snap edge will be set as
gtk.POS_LEFT
.
To make detaching and reattaching the handlebox as minimally
confusing as possible to the user, it is important to set the snap edge so
that the snap edge does not move when the handlebox is detached. For
example, if the handlebox is packed at the bottom of a gtk.VBox
, then when
the handlebox is detached, the bottom edge of the handlebox's allocation
will remain fixed as the height of the handlebox shrinks, so the snap edge
should be set to gtk.POS_BOTTOM
.
def set_shadow_type(type
)
| the shadow type:
gtk.SHADOW_NONE , gtk.SHADOW_IN ,
gtk.SHADOW_OUT , gtk.SHADOW_ETCHED_IN ,
gtk.SHADOW_ETCHED_OUT |
The set_shadow_type
() method sets the
type of shadow to be drawn around the border of the handle box as specified
by type
. The value of type
must be one of: gtk.SHADOW_NONE
,
gtk.SHADOW_IN
, gtk.SHADOW_OUT
,
gtk.SHADOW_ETCHED_IN
,
gtk.SHADOW_ETCHED_OUT
.
def get_shadow_type()
Returns : | the type of shadow currently drawn around the handle box. |
The get_shadow_type
() method gets the
type of shadow drawn around the handle box. The shadow type is one of:
gtk.SHADOW_NONE
, gtk.SHADOW_IN
,
gtk.SHADOW_OUT
, gtk.SHADOW_ETCHED_IN
,
gtk.SHADOW_ETCHED_OUT
. See set_shadow_type
().
def set_handle_position(position
)
| the side of the handlebox where the handle should be drawn. |
The set_handle_position
() method sets
the side of the handlebox where the handle is drawn using the value of
position
. The value of
position
must be one of:
gtk.POS_LEFT
, gtk.POS_RIGHT
,
gtk.POS_TOP
, gtk.POS_BOTTOM
def get_handle_position()
Returns : | the current handle position. |
The get_handle_position
() method gets
the handle position of the handle box; one of:
gtk.POS_LEFT
, gtk.POS_RIGHT
,
gtk.POS_TOP
, gtk.POS_BOTTOM
. See set_handle_position
().
def set_snap_edge(edge
)
| the edge to use as the snap edge or -1 to have PyGTK automatically pick the snap edge |
The set_snap_edge
() method sets the
snap edge of the handlebox to the value specified by
edge
. The value of edge
can be
one of: gtk.POS_LEFT
, gtk.POS_RIGHT
,
gtk.POS_TOP
, gtk.POS_BOTTOM
or -1 to
have the snap edge automatically specified.
The snap edge is the edge of the detached child that must be
aligned with the corresponding edge of the "ghost" left behind when the
child was detached to reattach the torn-off window. Usually, the snap edge
should be chosen so that it stays in the same place on the screen when the
handlebox is torn off. If the snap edge is not set, then an appropriate
value will be guessed from the handle position. If the handle position is
gtk.POS_RIGHT
or gtk.POS_LEFT
, then
the snap edge will be gtk.POS_TOP
, otherwise it will be
gtk.POS_LEFT
.
def get_snap_edge()
Returns : | the edge used for determining reattachment, or -1 if the snap edge is determined (as per default) from the handle position. |
The get_snap_edge
() method gets the
edge used for determining reattachment of the handle box. The return value
will be one of: gtk.POS_LEFT
,
gtk.POS_RIGHT
, gtk.POS_TOP
,
gtk.POS_BOTTOM
or -1 to indicate the snap edge is
automatically selected. See set_snap_edge
().
def callback(handlebox
, widget
, user_param1
, ...
)
| the widget that received the signal |
| the child widget |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "child-attached" signal is emitted when the contents of the handlebox are reattached to the main window.
def callback(handlebox
, widget
, user_param1
, ...
)
| the widget that received the signal |
| the child widget |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "child-detached" signal is emitted when the contents of the handlebox are detached from the main window.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.