$widget->set_accel_path ($accel_path,
$accel_group)
- $accel_path (string or undef)
- $accel_group (Gtk2::AccelGroup or undef)
boolean = $widget->activate
This function works by emitting an action signal nominated by the
various widget subclasses. The signal is normally called
"activate", but it doesn't have to be.
Currently if you make a widget subclass in Perl there's no way to
nominate a signal to be emitted by
"$widget->activate". A signal merely
named "activate" is not automatically
hooked up.
$widget->add_accelerator ($accel_signal, $accel_group,
$accel_key, $accel_mods, $flags)
- $accel_signal (string)
- $accel_group (Gtk2::AccelGroup)
- $accel_key (integer)
- $accel_mods (Gtk2::Gdk::ModifierType)
- $flags (Gtk2::AccelFlags)
$widget->add_events ($events)
- •
- $events (Gtk2::Gdk::EventMask)
$widget->add_mnemonic_label ($label)
- •
- $label (Gtk2::Widget)
Since: gtk+ 2.4
rectangle = $widget->allocation
Return the current allocated size and position of
$widget within its parent widget. The allocated size
is not necessarily the same as the requested size.
The returned rect object points into
$widget and can only be used as long as
$widget exists.
rectangle = $widget->get_allocation
Since: gtk+ 2.18
$widget->set_allocation ($allocation)
- •
- $allocation (Gtk2::Gdk::Rectangle)
Since: gtk+ 2.18
widget or undef = $widget->get_ancestor
($ancestor_package)
- •
- $ancestor_package (string)
$widget->app_paintable ($boolean)
boolean = $widget->app_paintable
boolean = $widget->get_app_paintable
Since: gtk+ 2.18
$widget->set_app_paintable ($app_paintable)
- •
- $app_paintable (boolean)
boolean = $widget->can_activate_accel ($signal_id)
- •
- $signal_id (integer)
Since: gtk+ 2.4
$widget->can_default ($boolean)
boolean = $widget->can_default
boolean = $widget->get_can_default
Since: gtk+ 2.18
$widget->set_can_default ($can_default)
- •
- $can_default (boolean)
Since: gtk+ 2.18
$widget->can_focus ($boolean)
boolean = $widget->can_focus
boolean = $widget->get_can_focus
Since: gtk+ 2.18
$widget->set_can_focus ($can_focus)
- •
- $can_focus (boolean)
Since: gtk+ 2.18
boolean = $widget->child_focus ($direction)
- •
- $direction (Gtk2::DirectionType)
$widget->child_notify ($child_property)
- •
- $child_property (string)
requisition = $widget->get_child_requisition
This function is only for use in widget implementations. Obtains
"$widget->requisition", unless someone
has forced a particular geometry on the widget (e.g., with
"set_usize()", in which case it returns
that geometry instead of the widget's requisition.
This function differs from size_request() in that it
retrieves the last size request value from
"$widget->requisition", while
"size_request()" actually calls the
"size_request" virtual method (that is,
emits the "size-request" signal) on the
$widget to compute the size
request and fill in
"$widget->requisition", and only then
returns "$widget->requisition".
Because this function does not call the
"size_request" method, it can only be used
when you know that
"$widget->requisition" is up-to-date.
In general, only container implementations have this information;
applications should use "size_request
()".
boolean = $widget->get_child_visible
$widget->set_child_visible ($is_visible)
- •
- $is_visible (boolean)
(path, path_reversed) = $widget->class_path
- •
- $selection (Gtk2::Gdk::Atom)
Since: gtk+ 2.2
colormap = $widget->get_colormap
$widget->set_colormap ($colormap)
- •
- $colormap (Gtk2::Gdk::Colormap)
$widget->composite_child ($boolean)
boolean = $widget->composite_child
$widget->set_composite_name ($name)
- •
- $name (string)
context = $widget->create_pango_context
- •
- $text (string or undef)
colormap = $widget->get_default_colormap
Gtk2::Widget->set_default_colormap ($colormap)
$widget->set_default_colormap ($colormap)
- •
- $colormap (Gtk2::Gdk::Colormap)
Gtk2::Widget->set_default_direction ($dir)
- •
- $dir (Gtk2::TextDirection)
style = $widget->get_default_style
visual = $widget->get_default_visual
$widget->set_direction ($dir)
- •
- $dir (Gtk2::TextDirection)
$widget->double_buffered ($boolean)
boolean = $widget->double_buffered
boolean = $widget->get_double_buffered
Since: gtk+ 2.18
$widget->set_double_buffered ($double_buffered)
- •
- $double_buffered (boolean)
- $targets (Gtk2::TargetList)
- $actions (Gtk2::Gdk::DragAction)
- $button (integer)
- $event (Gtk2::Gdk::Event)
boolean = $widget->drag_check_threshold ($start_x,
$start_y, $current_x, $current_y)
- $start_x (integer)
- $start_y (integer)
- $current_x (integer)
- $current_y (integer)
- $context (Gtk2::Gdk::DragContext)
- $target_list (Gtk2::TargetList or undef)
targetlist or undef =
$widget->drag_dest_get_target_list
boolean = $widget->drag_dest_get_track_motion
Since: gtk+ 2.10
$widget->drag_dest_set ($flags, $actions, ...)
- $flags (Gtk2::DestDefaults)
- $actions (Gtk2::Gdk::DragAction)
- ... (list) of Gtk2::TargetEntry's
$widget->drag_dest_set_proxy ($proxy_window, $protocol,
$use_coordinates)
- $proxy_window (Gtk2::Gdk::Window)
- $protocol (Gtk2::Gdk::DragProtocol)
- $use_coordinates (boolean)
$widget->drag_dest_set_target_list ($target_list)
- •
- $target_list (Gtk2::TargetList or undef)
$widget->drag_dest_set_track_motion
($track_motion)
- •
- $track_motion (boolean)
Since: gtk+ 2.10
$widget->drag_get_data ($context, $target, $time_)
- $context (Gtk2::Gdk::DragContext)
- $target (Gtk2::Gdk::Atom)
- $time_ (unsigned)
targetlist or undef =
$widget->drag_source_get_target_list
Since: gtk+ 2.4
$widget->drag_source_set ($start_button_mask, $actions,
...)
- $start_button_mask (Gtk2::Gdk::ModifierType)
- $actions (Gtk2::Gdk::DragAction)
- ... (list) of Gtk2::TargetEntry's
$widget->drag_source_set_icon ($colormap, $pixmap,
$mask)
- $colormap (Gtk2::Gdk::Colormap or undef)
- $pixmap (Gtk2::Gdk::Pixmap or undef)
- $mask (Gtk2::Gdk::Bitmap or undef)
$widget->drag_source_set_icon_name ($icon_name)
- •
- $icon_name (string)
Since: gtk+ 2.8
$widget->drag_source_set_icon_pixbuf ($pixbuf)
- •
- $pixbuf (Gtk2::Gdk::Pixbuf or undef)
$widget->drag_source_set_icon_stock ($stock_id)
- •
- $stock_id (string)
$widget->drag_source_set_target_list
($target_list)
- •
- $target_list (Gtk2::TargetList or undef)
Since: gtk+ 2.4
$widget->drawable ($boolean)
boolean = $widget->drawable
boolean = $widget->event ($event)
- •
- $event (Gtk2::Gdk::Event)
This rarely-used function emits an event signal on
$widget. Don't use this to
synthesize events; use
"Gtk2->main_do_event" instead. Don't
synthesize expose events; use
"$gdkwindow->invalidate_rect" instead.
Basically, the main use for this in gtk2-perl will be to pass motion notify
events to rulers from other widgets.
$widget->set_events ($events)
- •
- $events (Gtk2::Gdk::EventMask)
$widget->set_extension_events ($mode)
- •
- $mode (Gtk2::Gdk::ExtensionMode)
- •
- $name (string)
Return a "Glib::ParamSpec" for
style property $name on widget
$widget_or_class_name. If there's no property
$name then return
"undef". See Glib::Object
"list_properties" for the fields in a
ParamSpec.
Since: gtk+ 2.2
widgetflags = $widget->flags
widgetflags = $widget->get_flags
$widget->set_flags ($flags)
- •
- $flags (Gtk2::WidgetFlags)
$widget->has_default ($boolean)
boolean = $widget->has_default
$widget->has_focus ($boolean)
boolean = $widget->has_focus
$widget->has_grab ($boolean)
boolean = $widget->has_grab
boolean = $widget->has_rc_style
Since: gtk+ 2.20
boolean = $widget->has_screen
Since: gtk+ 2.2
boolean = $widget->get_has_tooltip
Since: gtk+ 2.12
$widget->set_has_tooltip ($has_tooltip)
- •
- $has_tooltip (boolean)
Since: gtk+ 2.12
boolean = $widget->get_has_window
Since: gtk+ 2.18
$widget->set_has_window ($has_window)
- •
- $has_window (boolean)
Since: gtk+ 2.18
- $widget (Gtk2::Widget)
- ... (list) other arguments ignored (event etc)
This is a helper function intended to be used as the callback for
the "delete-event" signal:
$wiget->signal_connect (
delete_event => \&Gtk2::Widget::hide_on_delete);
$widget->input_shape_combine_mask ($shape_mask,
$offset_x, $offset_y)
- $shape_mask (Gtk2::Gdk::Bitmap or undef)
- $offset_x (integer)
- $offset_y (integer)
Since: gtk+ 2.10
rectangle = $widget->intersect ($area)
- •
- $area (Gtk2::Gdk::Rectangle)
Returns undef if
$widget and
$area do not intersect.
boolean = $widget->is_ancestor ($ancestor)
- •
- $ancestor (Gtk2::Widget)
boolean = $widget->is_composited
Since: gtk+ 2.10
boolean = $widget->is_drawable
Since: gtk+ 2.18
boolean = $widget->is_focus
$widget->is_sensitive ($boolean)
boolean = $widget->is_sensitive
boolean = $widget->is_toplevel
Since: gtk+ 2.18
boolean = $widget->keynav_failed ($direction)
- •
- $direction (Gtk2::DirectionType)
Since: gtk+ 2.12
list = $widget->list_mnemonic_labels
Since: gtk+ 2.4
Return a list of
"Glib::ParamSpec" objects which are the
style properties available on $widget_or_class_name.
See Glib::Object "list_properties" for the
fields in a ParamSpec.
Since: gtk+ 2.2
$widget->mapped ($boolean)
boolean = $widget->mapped
boolean = $widget->get_mapped
Since: gtk+ 2.20
$widget->set_mapped ($mapped)
- •
- $mapped (boolean)
Since: gtk+ 2.20
boolean = $widget->mnemonic_activate
($group_cycling)
- •
- $group_cycling (boolean)
$widget->modify_base ($state, $color)
- $state (Gtk2::StateType)
- $color (Gtk2::Gdk::Color or undef)
$widget->modify_bg ($state, $color)
- $state (Gtk2::StateType)
- $color (Gtk2::Gdk::Color or undef)
$widget->modify_cursor ($primary, $secondary)
- $primary (Gtk2::Gdk::Color or undef)
- $secondary (Gtk2::Gdk::Color or undef)
Since: gtk+ 2.12
$widget->modify_fg ($state, $color)
- $state (Gtk2::StateType)
- $color (Gtk2::Gdk::Color or undef)
$widget->modify_font ($font_desc)
- •
- $font_desc (Pango::FontDescription or undef)
$widget->modify_style ($style)
- •
- $style (Gtk2::RcStyle)
$widget->modify_text ($state, $color)
- $state (Gtk2::StateType)
- $color (Gtk2::Gdk::Color or undef)
string = $widget->get_name
$widget->set_name ($name)
- •
- $name (string)
boolean = $widget->get_no_show_all
Since: gtk+ 2.4
$widget->set_no_show_all ($no_show_all)
- •
- $no_show_all (boolean)
Since: gtk+ 2.4
$widget->no_window ($boolean)
boolean = $widget->no_window
context = $widget->get_pango_context
widget or undef = $widget->parent
widget or undef = $widget->get_parent
$widget->parent_sensitive ($boolean)
boolean = $widget->parent_sensitive
$widget->set_parent ($parent)
- •
- $parent (Gtk2::Widget)
window = $widget->get_parent_window
$widget->set_parent_window ($parent_window)
- •
- $parent_window (Gtk2::Gdk::Window)
(path, path_reversed) = $widget->path
Gtk2::Widget->pop_colormap (cmap)
$widget->pop_colormap (cmap)
$widget->propagate_event ($event)
- •
- $event (Gtk2::Gdk::Event)
From gtk+'s API documentation:
You most likely don't want to use any of these functions;
synthesizing events is rarely needed. Consider asking on the mailing list
for better ways to achieve your goals. For example, use
Gtk2::Gdk::invalidate_rect or Gtk2::Widget::queue_draw instead of making up
expose events.
Gtk2::Widget->push_colormap (cmap)
$widget->push_colormap (cmap)
- •
- $cmap (Gtk2::Gdk::Colormap)
$widget->queue_draw_area ($x, $y, $width, $height)
- $x (integer)
- $y (integer)
- $width (integer)
- $height (integer)
$widget->rc_style ($boolean)
boolean = $widget->rc_style
$widget->realized ($boolean)
boolean = $widget->realized
boolean = $widget->get_realized
Since: gtk+ 2.20
$widget->set_realized ($realized)
- •
- $realized (boolean)
Since: gtk+ 2.20
$widget->receives_default ($boolean)
boolean = $widget->receives_default
boolean = $widget->get_receives_default
Since: gtk+ 2.18
$widget->set_receives_default ($receives_default)
- •
- $receives_default (boolean)
Since: gtk+ 2.18
$widget->set_redraw_on_allocate
($redraw_on_allocate)
- •
- $redraw_on_allocate (boolean)
- •
- $region (Gtk2::Gdk::Region)
boolean = $widget->remove_accelerator ($accel_group,
$accel_key, $accel_mods)
- $accel_group (Gtk2::AccelGroup)
- $accel_key (integer)
- $accel_mods (Gtk2::Gdk::ModifierType)
$widget->remove_mnemonic_label ($label)
- •
- $label (Gtk2::Widget)
Since: gtk+ 2.4
- $stock_id (string)
- $size (Gtk2::IconSize)
- $detail (string)
$widget->reparent ($new_parent)
- •
- $new_parent (Gtk2::Widget)
requisition = $widget->requisition
Return the currently desired width and height of
$widget. Basically this is the result from the last
"size_request" call on
$widget, and therefore may not be up-to-date if
$widget has asked for a resize but its container
parent has not yet called
"size_request".
The returned requisition object points into
$widget and can only be used as long as
$widget exists.
requisition = $widget->get_requisition
Since: gtk+ 2.20
window = $widget->get_root_window
Since: gtk+ 2.2
statetype = $widget->saved_state
boolean = $widget->set_scroll_adjustments
($hadjustment, $vadjustment)
- $hadjustment (Gtk2::Adjustment or undef)
- $vadjustment (Gtk2::Adjustment or undef)
This function works by emitting a setter signal nominated by the
various widget types which have "native" scrolling. The signal is
normally called "set-scroll-adjustments",
but it doesn't have to be.
If you make a widget subclass in Perl and create a signal in it
called "set-scroll-adjustments" taking two
Gtk2::Adjustment parameters then the subclassing automatically hooks that up
to be emitted by
"$widget->set_scroll_adjustments".
(Your "class closure" default handler code should then store the
adjustment objects somewhere.)
$widget->selection_add_target ($selection, $target,
$info)
- $selection (Gtk2::Gdk::Atom)
- $target (Gtk2::Gdk::Atom)
- $info (integer)
$widget->selection_add_targets ($selection, ...)
- $selection (Gtk2::Gdk::Atom)
- ... (list) of Gtk2::TargetEntry's
$widget->selection_clear_targets ($selection)
- •
- $selection (Gtk2::Gdk::Atom)
boolean = $widget->selection_convert ($selection,
$target, $time_)
- $selection (Gtk2::Gdk::Atom)
- $target (Gtk2::Gdk::Atom)
- $time_ (unsigned)
boolean = $widget->send_focus_change ($event)
- •
- $event (Gtk2::Gdk::Event)
Since: gtk+ 2.22
$widget->sensitive ($boolean)
boolean = $widget->sensitive
boolean = $widget->get_sensitive
Since: gtk+ 2.18
$widget->set_sensitive ($sensitive)
- •
- $sensitive (boolean)
$widget->shape_combine_mask ($shape_mask, $offset_x,
$offset_y)
- $shape_mask (Gtk2::Gdk::Bitmap or undef)
- $offset_x (integer)
- $offset_y (integer)
$widget->size_allocate ($allocation)
- •
- $allocation (Gtk2::Gdk::Rectangle)
requisition = $widget->size_request
This function is typically used when implementing a GtkContainer
subclass. Obtains the preferred size of a widget. The container uses this
information to arrange its child widgets and decide what size allocations to
give them with size_allocate ().
You can also call this function from an application, with some
caveats. Most notably, getting a size request requires the widget to be
associated with a screen, because font information may be needed.
Multihead-aware applications should keep this in mind.
Also remember that the size request is not necessarily the size a
widget will actually be allocated.
See also get_child_requisition ()
Gets the size request that was explicitly set for the widget using
"set_size_request()". A value of -1 for
width or height indicates that the dimension has not been
explicitly set and the natural requisition of the widget will be used
instead. See set_size_request(). To get the size a widget will
actually use, call size_request() instead of this function.
$widget->set_size_request ($width=-1, $height=-1)
- $width (integer)
- $height (integer)
- •
- $clip_rect (Gtk2::Gdk::Rectangle or undef)
Since: gtk+ 2.14
statetype = $widget->state
statetype = $widget->get_state
Since: gtk+ 2.18
$widget->set_state ($state)
- •
- $state (Gtk2::StateType)
style = $widget->get_style
list = $widget->style_get ($first_property_name,
...)
- $first_property_name (string)
- ... (list) 0 or more additional property names
Returns the values of the requested style properties.
Since: gtk+ 2.2
list = $widget->style_get_property
($first_property_name, ...)
- $first_property_name (string)
- ... (list) 0 or more additional property names
An alias for style_get.
Since: gtk+ 2.2
$widget->set_style ($style)
- •
- $style (Gtk2::Style or undef)
string = $widget->get_tooltip_markup
Since: gtk+ 2.12
$widget->set_tooltip_markup ($markup)
- •
- $markup (string or undef)
Since: gtk+ 2.12
string = $widget->get_tooltip_text
Since: gtk+ 2.12
$widget->set_tooltip_text ($text)
- •
- $text (string or undef)
Since: gtk+ 2.12
window or undef = $widget->get_tooltip_window
Since: gtk+ 2.12
$widget->set_tooltip_window ($custom_window)
- •
- $custom_window (Gtk2::Window or undef)
Since: gtk+ 2.12
$widget->toplevel ($value)
boolean = $widget->toplevel
- $dest_widget (Gtk2::Widget)
- $src_x (integer)
- $src_y (integer)
Returns an empty list if either widget is not realized or if they
do not share a common ancestor.
$widget->unset_flags ($flags)
- •
- $flags (Gtk2::WidgetFlags)
$widget->visible ($boolean)
boolean = $widget->visible
boolean = $widget->get_visible
Since: gtk+ 2.18
$widget->set_visible ($visible)
- •
- $visible (boolean)
Since: gtk+ 2.18
visual = $widget->get_visual
window or undef = $widget->window ($new=undef)
- •
- $new (Gtk2::Gdk::Window or undef)
window or undef = $widget->get_window
Since: gtk+ 2.14
$widget->set_window ($window)
- •
- $window (Gtk2::Gdk::Window)
Since: gtk+ 2.18