Gtk2::Widget(3) User Contributed Perl Documentation Gtk2::Widget(3) NAME Gtk2::Widget - wrapper for GtkWidget HIERARCHY Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget INTERFACES Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable CONSTANTS "EVENT_STOP" and "EVENT_PROPAGATE" are designed for the return from widget event signal handlers and similar, being true to stop or false to propagate. The names can help you avoid confusion over which way is true and which is false. (You can also remember the return as meaning "handled", which is the jargon in a few other signal handler types.) Gtk2::EVENT_STOP # true Gtk2::EVENT_PROPAGATE # false METHODS $widget->set_accel_path ($accel_path, $accel_group) o $accel_path (string or undef) o $accel_group (Gtk2::AccelGroup or undef) object = $widget->get_accessible action or undef = $widget->get_action Since: gtk+ 2.10 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) o $accel_signal (string) o $accel_group (Gtk2::AccelGroup) o $accel_key (integer) o $accel_mods (Gtk2::Gdk::ModifierType) o $flags (Gtk2::AccelFlags) $widget->add_events ($events) o $events (Gtk2::Gdk::EventMask) $widget->add_mnemonic_label ($label) o $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) o $allocation (Gtk2::Gdk::Rectangle) Since: gtk+ 2.18 widget or undef = $widget->get_ancestor ($ancestor_package) o $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) o $app_paintable (boolean) boolean = $widget->can_activate_accel ($signal_id) o $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) o $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) o $can_focus (boolean) Since: gtk+ 2.18 boolean = $widget->child_focus ($direction) o $direction (Gtk2::DirectionType) $widget->child_notify ($child_property) o $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) o $is_visible (boolean) (path, path_reversed) = $widget->class_path clipboard = $widget->get_clipboard ($selection=GDK_SELECTION_CLIPBOARD) o $selection (Gtk2::Gdk::Atom) Since: gtk+ 2.2 colormap = $widget->get_colormap $widget->set_colormap ($colormap) o $colormap (Gtk2::Gdk::Colormap) $widget->composite_child ($boolean) boolean = $widget->composite_child string or undef = $widget->get_composite_name $widget->set_composite_name ($name) o $name (string) context = $widget->create_pango_context layout = $widget->create_pango_layout ($text=undef) o $text (string or undef) colormap = Gtk2::Widget->get_default_colormap colormap = $widget->get_default_colormap Gtk2::Widget->set_default_colormap ($colormap) $widget->set_default_colormap ($colormap) o $colormap (Gtk2::Gdk::Colormap) textdirection = Gtk2::Widget->get_default_direction Gtk2::Widget->set_default_direction ($dir) o $dir (Gtk2::TextDirection) style = Gtk2::Widget->get_default_style style = $widget->get_default_style visual = Gtk2::Widget->get_default_visual visual = $widget->get_default_visual $widget->destroy textdirection = $widget->get_direction $widget->set_direction ($dir) o $dir (Gtk2::TextDirection) display = $widget->get_display Since: gtk+ 2.2 $widget->double_buffered ($boolean) boolean = $widget->double_buffered boolean = $widget->get_double_buffered Since: gtk+ 2.18 $widget->set_double_buffered ($double_buffered) o $double_buffered (boolean) dragcontext = $widget->drag_begin ($targets, $actions, $button, $event) o $targets (Gtk2::TargetList) o $actions (Gtk2::Gdk::DragAction) o $button (integer) o $event (Gtk2::Gdk::Event) boolean = $widget->drag_check_threshold ($start_x, $start_y, $current_x, $current_y) o $start_x (integer) o $start_y (integer) o $current_x (integer) o $current_y (integer) $widget->drag_dest_add_image_targets Since: gtk+ 2.6 $widget->drag_dest_add_text_targets Since: gtk+ 2.6 $widget->drag_dest_add_uri_targets Since: gtk+ 2.6 atom = $widget->drag_dest_find_target ($context, $target_list) o $context (Gtk2::Gdk::DragContext) o $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, ...) o $flags (Gtk2::DestDefaults) o $actions (Gtk2::Gdk::DragAction) o ... (list) of Gtk2::TargetEntry's $widget->drag_dest_set_proxy ($proxy_window, $protocol, $use_coordinates) o $proxy_window (Gtk2::Gdk::Window) o $protocol (Gtk2::Gdk::DragProtocol) o $use_coordinates (boolean) $widget->drag_dest_set_target_list ($target_list) o $target_list (Gtk2::TargetList or undef) $widget->drag_dest_set_track_motion ($track_motion) o $track_motion (boolean) Since: gtk+ 2.10 $widget->drag_dest_unset $widget->drag_get_data ($context, $target, $time_) o $context (Gtk2::Gdk::DragContext) o $target (Gtk2::Gdk::Atom) o $time_ (unsigned) $widget->drag_highlight $widget->drag_source_add_image_targets Since: gtk+ 2.6 $widget->drag_source_add_text_targets Since: gtk+ 2.6 $widget->drag_source_add_uri_targets Since: gtk+ 2.6 targetlist or undef = $widget->drag_source_get_target_list Since: gtk+ 2.4 $widget->drag_source_set ($start_button_mask, $actions, ...) o $start_button_mask (Gtk2::Gdk::ModifierType) o $actions (Gtk2::Gdk::DragAction) o ... (list) of Gtk2::TargetEntry's $widget->drag_source_set_icon ($colormap, $pixmap, $mask) o $colormap (Gtk2::Gdk::Colormap or undef) o $pixmap (Gtk2::Gdk::Pixmap or undef) o $mask (Gtk2::Gdk::Bitmap or undef) $widget->drag_source_set_icon_name ($icon_name) o $icon_name (string) Since: gtk+ 2.8 $widget->drag_source_set_icon_pixbuf ($pixbuf) o $pixbuf (Gtk2::Gdk::Pixbuf or undef) $widget->drag_source_set_icon_stock ($stock_id) o $stock_id (string) $widget->drag_source_set_target_list ($target_list) o $target_list (Gtk2::TargetList or undef) Since: gtk+ 2.4 $widget->drag_source_unset $widget->drag_unhighlight $widget->drawable ($boolean) boolean = $widget->drawable $widget->ensure_style $widget->error_bell Since: gtk+ 2.12 boolean = $widget->event ($event) o $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. eventmask = $widget->get_events $widget->set_events ($events) o $events (Gtk2::Gdk::EventMask) extensionmode = $widget->get_extension_events $widget->set_extension_events ($mode) o $mode (Gtk2::Gdk::ExtensionMode) pspec or undef = $widget_or_class_name->find_style_property ($name) o $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) o $flags (Gtk2::WidgetFlags) $widget->freeze_child_notify $widget->grab_default $widget->grab_focus $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) o $has_tooltip (boolean) Since: gtk+ 2.12 boolean = $widget->get_has_window Since: gtk+ 2.18 $widget->set_has_window ($has_window) o $has_window (boolean) Since: gtk+ 2.18 $widget->hide $widget->hide_all boolean = Gtk2::Widget::hide_on_delete ($widget, ...) o $widget (Gtk2::Widget) o ... (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) o $shape_mask (Gtk2::Gdk::Bitmap or undef) o $offset_x (integer) o $offset_y (integer) Since: gtk+ 2.10 rectangle = $widget->intersect ($area) o $area (Gtk2::Gdk::Rectangle) Returns undef if $widget and $area do not intersect. boolean = $widget->is_ancestor ($ancestor) o $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) o $direction (Gtk2::DirectionType) Since: gtk+ 2.12 list = $widget->list_mnemonic_labels Since: gtk+ 2.4 list = $widget_or_class_name->list_style_properties 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->map $widget->mapped ($boolean) boolean = $widget->mapped boolean = $widget->get_mapped Since: gtk+ 2.20 $widget->set_mapped ($mapped) o $mapped (boolean) Since: gtk+ 2.20 boolean = $widget->mnemonic_activate ($group_cycling) o $group_cycling (boolean) rcstyle = $widget->get_modifier_style $widget->modify_base ($state, $color) o $state (Gtk2::StateType) o $color (Gtk2::Gdk::Color or undef) $widget->modify_bg ($state, $color) o $state (Gtk2::StateType) o $color (Gtk2::Gdk::Color or undef) $widget->modify_cursor ($primary, $secondary) o $primary (Gtk2::Gdk::Color or undef) o $secondary (Gtk2::Gdk::Color or undef) Since: gtk+ 2.12 $widget->modify_fg ($state, $color) o $state (Gtk2::StateType) o $color (Gtk2::Gdk::Color or undef) $widget->modify_font ($font_desc) o $font_desc (Pango::FontDescription or undef) $widget->modify_style ($style) o $style (Gtk2::RcStyle) $widget->modify_text ($state, $color) o $state (Gtk2::StateType) o $color (Gtk2::Gdk::Color or undef) string = $widget->get_name $widget->set_name ($name) o $name (string) boolean = $widget->get_no_show_all Since: gtk+ 2.4 $widget->set_no_show_all ($no_show_all) o $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) o $parent (Gtk2::Widget) window = $widget->get_parent_window $widget->set_parent_window ($parent_window) o $parent_window (Gtk2::Gdk::Window) (path, path_reversed) = $widget->path (x, y) = $widget->get_pointer Gtk2::Widget->pop_colormap (cmap) $widget->pop_colormap (cmap) Gtk2::Widget->pop_composite_child $widget->pop_composite_child $widget->propagate_event ($event) o $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) o $cmap (Gtk2::Gdk::Colormap) Gtk2::Widget->push_composite_child $widget->push_composite_child $widget->queue_draw $widget->queue_draw_area ($x, $y, $width, $height) o $x (integer) o $y (integer) o $width (integer) o $height (integer) $widget->queue_resize $widget->queue_resize_no_redraw Since: gtk+ 2.4 $widget->rc_style ($boolean) boolean = $widget->rc_style $widget->realize $widget->realized ($boolean) boolean = $widget->realized boolean = $widget->get_realized Since: gtk+ 2.20 $widget->set_realized ($realized) o $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) o $receives_default (boolean) Since: gtk+ 2.18 $widget->set_redraw_on_allocate ($redraw_on_allocate) o $redraw_on_allocate (boolean) region = $widget->region_intersect ($region) o $region (Gtk2::Gdk::Region) boolean = $widget->remove_accelerator ($accel_group, $accel_key, $accel_mods) o $accel_group (Gtk2::AccelGroup) o $accel_key (integer) o $accel_mods (Gtk2::Gdk::ModifierType) $widget->remove_mnemonic_label ($label) o $label (Gtk2::Widget) Since: gtk+ 2.4 pixbuf = $widget->render_icon ($stock_id, $size, $detail=undef) o $stock_id (string) o $size (Gtk2::IconSize) o $detail (string) $widget->reparent ($new_parent) o $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 $widget->reset_rc_styles $widget->reset_shapes window = $widget->get_root_window Since: gtk+ 2.2 statetype = $widget->saved_state screen = $widget->get_screen Since: gtk+ 2.2 boolean = $widget->set_scroll_adjustments ($hadjustment, $vadjustment) o $hadjustment (Gtk2::Adjustment or undef) o $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) o $selection (Gtk2::Gdk::Atom) o $target (Gtk2::Gdk::Atom) o $info (integer) $widget->selection_add_targets ($selection, ...) o $selection (Gtk2::Gdk::Atom) o ... (list) of Gtk2::TargetEntry's $widget->selection_clear_targets ($selection) o $selection (Gtk2::Gdk::Atom) boolean = $widget->selection_convert ($selection, $target, $time_) o $selection (Gtk2::Gdk::Atom) o $target (Gtk2::Gdk::Atom) o $time_ (unsigned) $widget->selection_remove_all boolean = $widget->send_focus_change ($event) o $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) o $sensitive (boolean) settings = $widget->get_settings $widget->shape_combine_mask ($shape_mask, $offset_x, $offset_y) o $shape_mask (Gtk2::Gdk::Bitmap or undef) o $offset_x (integer) o $offset_y (integer) $widget->show $widget->show_all $widget->show_now $widget->size_allocate ($allocation) o $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 () (width, height) = $widget->get_size_request 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) o $width (integer) o $height (integer) pixmap or undef = $widget->get_snapshot ($clip_rect=undef) o $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) o $state (Gtk2::StateType) style = $widget->style $style->style_attach Since: gtk+ 2.20 style = $widget->get_style list = $widget->style_get ($first_property_name, ...) o $first_property_name (string) o ... (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, ...) o $first_property_name (string) o ... (list) 0 or more additional property names An alias for style_get. Since: gtk+ 2.2 $widget->set_style ($style) o $style (Gtk2::Style or undef) $widget->thaw_child_notify string = $widget->get_tooltip_markup Since: gtk+ 2.12 $widget->set_tooltip_markup ($markup) o $markup (string or undef) Since: gtk+ 2.12 string = $widget->get_tooltip_text Since: gtk+ 2.12 $widget->set_tooltip_text ($text) o $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) o $custom_window (Gtk2::Window or undef) Since: gtk+ 2.12 $widget->toplevel ($value) boolean = $widget->toplevel widget = $widget->get_toplevel (dst_x, dst_y) = $src_widget->translate_coordinates ($dest_widget, $src_x, $src_y) o $dest_widget (Gtk2::Widget) o $src_x (integer) o $src_y (integer) Returns an empty list if either widget is not realized or if they do not share a common ancestor. $widget->trigger_tooltip_query Since: gtk+ 2.12 $widget->unmap $widget->unparent $widget->unrealize $widget->unset_flags ($flags) o $flags (Gtk2::WidgetFlags) $widget->visible ($boolean) boolean = $widget->visible boolean = $widget->get_visible Since: gtk+ 2.18 $widget->set_visible ($visible) o $visible (boolean) Since: gtk+ 2.18 visual = $widget->get_visual window or undef = $widget->window ($new=undef) o $new (Gtk2::Gdk::Window or undef) window or undef = $widget->get_window Since: gtk+ 2.14 $widget->set_window ($window) o $window (Gtk2::Gdk::Window) Since: gtk+ 2.18 PROPERTIES 'app-paintable' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the application will paint directly on the widget 'can-default' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the widget can be the default widget 'can-focus' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the widget can accept the input focus 'composite-child' (boolean : default false : readable / private / static-nick / static-blurb) Whether the widget is part of a composite widget 'double-buffered' (boolean : default true : readable / writable / private / static-nick / static-blurb) Whether or not the widget is double buffered 'events' (Gtk2::Gdk::EventMask : default structure-mask : readable / writable / private / static-nick / static-blurb) The event mask that decides what kind of GdkEvents this widget gets 'extension-events' (Gtk2::Gdk::ExtensionMode : default "none" : readable / writable / private / static-nick / static-blurb) The mask that decides what kind of extension events this widget gets 'has-default' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the widget is the default widget 'has-focus' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the widget has the input focus 'has-tooltip' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether this widget has a tooltip 'height-request' (integer : default -1 : readable / writable / private / static-nick / static-blurb) Override for height request of the widget, or -1 if natural request should be used 'is-focus' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the widget is the focus widget within the toplevel 'name' (string : default undef : readable / writable / private / static-nick / static-blurb) The name of the widget 'no-show-all' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether gtk_widget_show_all() should not affect this widget 'parent' (Gtk2::Container : default undef : readable / writable / private / static-nick / static-blurb) The parent widget of this widget. Must be a Container widget 'receives-default' (boolean : default false : readable / writable / private / static-nick / static-blurb) If TRUE, the widget will receive the default action when it is focused 'sensitive' (boolean : default true : readable / writable / private / static-nick / static-blurb) Whether the widget responds to input 'style' (Gtk2::Style : default undef : readable / writable / private / static-nick / static-blurb) The style of the widget, which contains information about how it will look (colors etc) 'tooltip-markup' (string : default undef : readable / writable / private / static-nick / static-blurb) The contents of the tooltip for this widget 'tooltip-text' (string : default undef : readable / writable / private / static-nick / static-blurb) The contents of the tooltip for this widget 'visible' (boolean : default false : readable / writable / private / static-nick / static-blurb) Whether the widget is visible 'width-request' (integer : default -1 : readable / writable / private / static-nick / static-blurb) Override for width request of the widget, or -1 if natural request should be used 'window' (Gtk2::Gdk::Window : default undef : readable / private / static-nick / static-blurb) The widget's window if it is realized STYLE PROPERTIES 'cursor-aspect-ratio' (float : default 0.04 : readable / private / static-nick / static-blurb) Aspect ratio with which to draw insertion cursor 'cursor-color' (Gtk2::Gdk::Color : default undef : readable / private / static-nick / static-blurb) Color with which to draw insertion cursor 'draw-border' (Gtk2::Border : default undef : readable / private / static-nick / static-blurb) Size of areas outside the widget's allocation to draw 'focus-line-pattern' (string : default "\1\1" : readable / private / static-nick / static-blurb) Dash pattern used to draw the focus indicator 'focus-line-width' (integer : default 1 : readable / private / static-nick / static-blurb) Width, in pixels, of the focus indicator line 'focus-padding' (integer : default 1 : readable / private / static-nick / static-blurb) Width, in pixels, between focus indicator and the widget 'box' 'interior-focus' (boolean : default true : readable / private / static-nick / static-blurb) Whether to draw the focus indicator inside widgets 'link-color' (Gtk2::Gdk::Color : default undef : readable / private / static-nick / static-blurb) Color of unvisited links 'scroll-arrow-hlength' (integer : default 16 : readable / private / static-nick / static-blurb) The length of horizontal scroll arrows 'scroll-arrow-vlength' (integer : default 16 : readable / private / static-nick / static-blurb) The length of vertical scroll arrows 'secondary-cursor-color' (Gtk2::Gdk::Color : default undef : readable / private / static-nick / static-blurb) Color with which to draw the secondary insertion cursor when editing mixed right-to-left and left-to-right text 'separator-height' (integer : default 0 : readable / private / static-nick / static-blurb) The height of separators if "wide-separators" is TRUE 'separator-width' (integer : default 0 : readable / private / static-nick / static-blurb) The width of separators if wide-separators is TRUE 'tooltip-alpha' (Glib::UChar : default 255 : readable / private / static-nick / static-blurb) The opacity to be used when drawing tooltips 'tooltip-radius' (Glib::UInt : default 0 : readable / private / static-nick / static-blurb) The radius to be used when drawing tooltips 'visited-link-color' (Gtk2::Gdk::Color : default undef : readable / private / static-nick / static-blurb) Color of visited links 'wide-separators' (boolean : default false : readable / private / static-nick / static-blurb) Whether separators have configurable width and should be drawn using a box instead of a line SIGNALS accel-closures-changed (Gtk2::Widget) boolean = button-press-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = button-release-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = can-activate-accel (Gtk2::Widget, Glib::UInt) child-notify (Gtk2::Widget, Glib::ParamSpec) boolean = client-event (Gtk2::Widget, Gtk2::Gdk::Event) composited-changed (Gtk2::Widget) boolean = configure-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = damage-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = delete-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = destroy-event (Gtk2::Widget, Gtk2::Gdk::Event) direction-changed (Gtk2::Widget, Gtk2::TextDirection) drag-begin (Gtk2::Widget, Gtk2::Gdk::DragContext) drag-data-delete (Gtk2::Widget, Gtk2::Gdk::DragContext) drag-data-get (Gtk2::Widget, Gtk2::Gdk::DragContext, Gtk2::SelectionData, Glib::UInt, Glib::UInt) drag-data-received (Gtk2::Widget, Gtk2::Gdk::DragContext, integer, integer, Gtk2::SelectionData, Glib::UInt, Glib::UInt) boolean = drag-drop (Gtk2::Widget, Gtk2::Gdk::DragContext, integer, integer, Glib::UInt) drag-end (Gtk2::Widget, Gtk2::Gdk::DragContext) boolean = drag-failed (Gtk2::Widget, Gtk2::Gdk::DragContext, Gtk2::DragResult) drag-leave (Gtk2::Widget, Gtk2::Gdk::DragContext, Glib::UInt) boolean = drag-motion (Gtk2::Widget, Gtk2::Gdk::DragContext, integer, integer, Glib::UInt) boolean = enter-notify-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = event (Gtk2::Widget, Gtk2::Gdk::Event) event-after (Gtk2::Widget, Gtk2::Gdk::Event) boolean = expose-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = focus (Gtk2::Widget, Gtk2::DirectionType) boolean = focus-in-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = focus-out-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = grab-broken-event (Gtk2::Widget, Gtk2::Gdk::Event) grab-focus (Gtk2::Widget) grab-notify (Gtk2::Widget, boolean) hide (Gtk2::Widget) hierarchy-changed (Gtk2::Widget, Gtk2::Widget) boolean = key-press-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = key-release-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = keynav-failed (Gtk2::Widget, Gtk2::DirectionType) boolean = leave-notify-event (Gtk2::Widget, Gtk2::Gdk::Event) map (Gtk2::Widget) boolean = map-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = mnemonic-activate (Gtk2::Widget, boolean) boolean = motion-notify-event (Gtk2::Widget, Gtk2::Gdk::Event) move-focus (Gtk2::Widget, Gtk2::DirectionType) boolean = no-expose-event (Gtk2::Widget, Gtk2::Gdk::Event) parent-set (Gtk2::Widget, Gtk2::Widget) boolean = popup-menu (Gtk2::Widget) boolean = property-notify-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = proximity-in-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = proximity-out-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = query-tooltip (Gtk2::Widget, integer, integer, boolean, Gtk2::Tooltip) realize (Gtk2::Widget) screen-changed (Gtk2::Widget, Gtk2::Gdk::Screen) boolean = scroll-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = selection-clear-event (Gtk2::Widget, Gtk2::Gdk::Event) selection-get (Gtk2::Widget, Gtk2::SelectionData, Glib::UInt, Glib::UInt) boolean = selection-notify-event (Gtk2::Widget, Gtk2::Gdk::Event) selection-received (Gtk2::Widget, Gtk2::SelectionData, Glib::UInt) boolean = selection-request-event (Gtk2::Widget, Gtk2::Gdk::Event) show (Gtk2::Widget) boolean = show-help (Gtk2::Widget, Gtk2::WidgetHelpType) size-allocate (Gtk2::Widget, Gtk2::Gdk::Rectangle) size-request (Gtk2::Widget, Gtk2::Requisition) state-changed (Gtk2::Widget, Gtk2::StateType) style-set (Gtk2::Widget, Gtk2::Style) unmap (Gtk2::Widget) boolean = unmap-event (Gtk2::Widget, Gtk2::Gdk::Event) unrealize (Gtk2::Widget) boolean = visibility-notify-event (Gtk2::Widget, Gtk2::Gdk::Event) boolean = window-state-event (Gtk2::Widget, Gtk2::Gdk::Event) ENUMS AND FLAGS flags Gtk2::AccelFlags o 'visible' / 'GTK_ACCEL_VISIBLE' o 'locked' / 'GTK_ACCEL_LOCKED' o 'mask' / 'GTK_ACCEL_MASK' flags Gtk2::DestDefaults o 'motion' / 'GTK_DEST_DEFAULT_MOTION' o 'highlight' / 'GTK_DEST_DEFAULT_HIGHLIGHT' o 'drop' / 'GTK_DEST_DEFAULT_DROP' o 'all' / 'GTK_DEST_DEFAULT_ALL' enum Gtk2::DirectionType o 'tab-forward' / 'GTK_DIR_TAB_FORWARD' o 'tab-backward' / 'GTK_DIR_TAB_BACKWARD' o 'up' / 'GTK_DIR_UP' o 'down' / 'GTK_DIR_DOWN' o 'left' / 'GTK_DIR_LEFT' o 'right' / 'GTK_DIR_RIGHT' enum Gtk2::DragResult o 'success' / 'GTK_DRAG_RESULT_SUCCESS' o 'no-target' / 'GTK_DRAG_RESULT_NO_TARGET' o 'user-cancelled' / 'GTK_DRAG_RESULT_USER_CANCELLED' o 'timeout-expired' / 'GTK_DRAG_RESULT_TIMEOUT_EXPIRED' o 'grab-broken' / 'GTK_DRAG_RESULT_GRAB_BROKEN' o 'error' / 'GTK_DRAG_RESULT_ERROR' flags Gtk2::Gdk::DragAction o 'default' / 'GDK_ACTION_DEFAULT' o 'copy' / 'GDK_ACTION_COPY' o 'move' / 'GDK_ACTION_MOVE' o 'link' / 'GDK_ACTION_LINK' o 'private' / 'GDK_ACTION_PRIVATE' o 'ask' / 'GDK_ACTION_ASK' enum Gtk2::Gdk::DragProtocol o 'motif' / 'GDK_DRAG_PROTO_MOTIF' o 'xdnd' / 'GDK_DRAG_PROTO_XDND' o 'rootwin' / 'GDK_DRAG_PROTO_ROOTWIN' o 'none' / 'GDK_DRAG_PROTO_NONE' o 'win32-dropfiles' / 'GDK_DRAG_PROTO_WIN32_DROPFILES' o 'ole2' / 'GDK_DRAG_PROTO_OLE2' o 'local' / 'GDK_DRAG_PROTO_LOCAL' flags Gtk2::Gdk::EventMask o 'exposure-mask' / 'GDK_EXPOSURE_MASK' o 'pointer-motion-mask' / 'GDK_POINTER_MOTION_MASK' o 'pointer-motion-hint-mask' / 'GDK_POINTER_MOTION_HINT_MASK' o 'button-motion-mask' / 'GDK_BUTTON_MOTION_MASK' o 'button1-motion-mask' / 'GDK_BUTTON1_MOTION_MASK' o 'button2-motion-mask' / 'GDK_BUTTON2_MOTION_MASK' o 'button3-motion-mask' / 'GDK_BUTTON3_MOTION_MASK' o 'button-press-mask' / 'GDK_BUTTON_PRESS_MASK' o 'button-release-mask' / 'GDK_BUTTON_RELEASE_MASK' o 'key-press-mask' / 'GDK_KEY_PRESS_MASK' o 'key-release-mask' / 'GDK_KEY_RELEASE_MASK' o 'enter-notify-mask' / 'GDK_ENTER_NOTIFY_MASK' o 'leave-notify-mask' / 'GDK_LEAVE_NOTIFY_MASK' o 'focus-change-mask' / 'GDK_FOCUS_CHANGE_MASK' o 'structure-mask' / 'GDK_STRUCTURE_MASK' o 'property-change-mask' / 'GDK_PROPERTY_CHANGE_MASK' o 'visibility-notify-mask' / 'GDK_VISIBILITY_NOTIFY_MASK' o 'proximity-in-mask' / 'GDK_PROXIMITY_IN_MASK' o 'proximity-out-mask' / 'GDK_PROXIMITY_OUT_MASK' o 'substructure-mask' / 'GDK_SUBSTRUCTURE_MASK' o 'scroll-mask' / 'GDK_SCROLL_MASK' o 'all-events-mask' / 'GDK_ALL_EVENTS_MASK' enum Gtk2::Gdk::ExtensionMode o 'none' / 'GDK_EXTENSION_EVENTS_NONE' o 'all' / 'GDK_EXTENSION_EVENTS_ALL' o 'cursor' / 'GDK_EXTENSION_EVENTS_CURSOR' flags Gtk2::Gdk::ModifierType o 'shift-mask' / 'GDK_SHIFT_MASK' o 'lock-mask' / 'GDK_LOCK_MASK' o 'control-mask' / 'GDK_CONTROL_MASK' o 'mod1-mask' / 'GDK_MOD1_MASK' o 'mod2-mask' / 'GDK_MOD2_MASK' o 'mod3-mask' / 'GDK_MOD3_MASK' o 'mod4-mask' / 'GDK_MOD4_MASK' o 'mod5-mask' / 'GDK_MOD5_MASK' o 'button1-mask' / 'GDK_BUTTON1_MASK' o 'button2-mask' / 'GDK_BUTTON2_MASK' o 'button3-mask' / 'GDK_BUTTON3_MASK' o 'button4-mask' / 'GDK_BUTTON4_MASK' o 'button5-mask' / 'GDK_BUTTON5_MASK' o 'super-mask' / 'GDK_SUPER_MASK' o 'hyper-mask' / 'GDK_HYPER_MASK' o 'meta-mask' / 'GDK_META_MASK' o 'release-mask' / 'GDK_RELEASE_MASK' o 'modifier-mask' / 'GDK_MODIFIER_MASK' enum Gtk2::IconSize o 'invalid' / 'GTK_ICON_SIZE_INVALID' o 'menu' / 'GTK_ICON_SIZE_MENU' o 'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR' o 'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR' o 'button' / 'GTK_ICON_SIZE_BUTTON' o 'dnd' / 'GTK_ICON_SIZE_DND' o 'dialog' / 'GTK_ICON_SIZE_DIALOG' enum Gtk2::StateType o 'normal' / 'GTK_STATE_NORMAL' o 'active' / 'GTK_STATE_ACTIVE' o 'prelight' / 'GTK_STATE_PRELIGHT' o 'selected' / 'GTK_STATE_SELECTED' o 'insensitive' / 'GTK_STATE_INSENSITIVE' enum Gtk2::TextDirection o 'none' / 'GTK_TEXT_DIR_NONE' o 'ltr' / 'GTK_TEXT_DIR_LTR' o 'rtl' / 'GTK_TEXT_DIR_RTL' flags Gtk2::WidgetFlags o 'toplevel' / 'GTK_TOPLEVEL' o 'no-window' / 'GTK_NO_WINDOW' o 'realized' / 'GTK_REALIZED' o 'mapped' / 'GTK_MAPPED' o 'visible' / 'GTK_VISIBLE' o 'sensitive' / 'GTK_SENSITIVE' o 'parent-sensitive' / 'GTK_PARENT_SENSITIVE' o 'can-focus' / 'GTK_CAN_FOCUS' o 'has-focus' / 'GTK_HAS_FOCUS' o 'can-default' / 'GTK_CAN_DEFAULT' o 'has-default' / 'GTK_HAS_DEFAULT' o 'has-grab' / 'GTK_HAS_GRAB' o 'rc-style' / 'GTK_RC_STYLE' o 'composite-child' / 'GTK_COMPOSITE_CHILD' o 'no-reparent' / 'GTK_NO_REPARENT' o 'app-paintable' / 'GTK_APP_PAINTABLE' o 'receives-default' / 'GTK_RECEIVES_DEFAULT' o 'double-buffered' / 'GTK_DOUBLE_BUFFERED' o 'no-show-all' / 'GTK_NO_SHOW_ALL' enum Gtk2::WidgetHelpType o 'tooltip' / 'GTK_WIDGET_HELP_TOOLTIP' o 'whats-this' / 'GTK_WIDGET_HELP_WHATS_THIS' SEE ALSO Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::TargetEntry COPYRIGHT Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.38.0 2023-07-25 Gtk2::Widget(3)