Gtk2::Widget(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

ok so bestie, Gtk2::Widget is literally just the Perl wrapper for GtkWidget. that's the whole vibe. the humble little building block everything in GTK+ is made of. iconic behavior honestly. πŸŽ€


🌈 HIERARCHY 🌈

the family tree, so you know where she comes from:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget

πŸ¦‹ INTERFACES πŸ¦‹

she also does these, like a queen with multiple side quests:

Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable

✨ CONSTANTS ✨

ok so EVENT_STOP and EVENT_PROPAGATE?? these are for when you're returning from widget event signal handlers and stuff like that. EVENT_STOP is true = stop, EVENT_PROPAGATE is false = propagate. the whole point of these names is so you don't have to play the "wait which one is true again 😭" game. and if you wanna remember it another way: think of the return value as meaning "handled" β€” that's the jargon some other signal handler types use. iykyk πŸ’…

Gtk2::EVENT_STOP         # true
Gtk2::EVENT_PROPAGATE    # false

🌸 METHODS 🌸

$widget->set_accel_path ($accel_path, $accel_group)

  • $accel_path</p> (string or undef)
  • $accel_group</p> (Gtk2::AccelGroup or undef)

object = $widget->get_accessible

action or undef = $widget->get_action

Since: gtk+ 2.10

boolean = $widget->activate

so this one works by emitting an action signal that the various widget subclasses nominate. normally that signal is called activate, but like... it doesn't have to be. no cap.

heads up: right now if you make a widget subclass in Perl, there's genuinely no way to nominate a signal for $widget->activate to emit. a signal that's just named activate does not get automatically hooked up. sorry bestie 😭

$widget->add_accelerator ($accel_signal, $accel_group, $accel_key, $accel_mods, $flags)

  • $accel_signal</p> (string)
  • $accel_group</p> (Gtk2::AccelGroup)
  • $accel_key</p> (integer)
  • $accel_mods</p> (Gtk2::Gdk::ModifierType)
  • $flags</p> (Gtk2::AccelFlags)

$widget->add_events ($events)

  • $events</p> (Gtk2::Gdk::EventMask)

$widget->add_mnemonic_label ($label)

  • $label</p> (Gtk2::Widget)

Since: gtk+ 2.4

rectangle = $widget->allocation

gives you back the current allocated size and position of $widget inside its parent widget. and like, the allocated size is not necessarily the same as the requested size, ok, they're different things.

⚠️ the returned rect object points into $widget, so it's only usable for as long as $widget exists. she's a loan, not a gift πŸ’€

rectangle = $widget->get_allocation

Since: gtk+ 2.18

$widget->set_allocation ($allocation)

  • $allocation</p> (Gtk2::Gdk::Rectangle)

Since: gtk+ 2.18

widget or undef = $widget->get_ancestor ($ancestor_package)

  • $ancestor_package</p> (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</p> (boolean)

boolean = $widget->can_activate_accel ($signal_id)

  • $signal_id</p> (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</p> (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</p> (boolean)

Since: gtk+ 2.18

boolean = $widget->child_focus ($direction)

  • $direction</p> (Gtk2::DirectionType)

$widget->child_notify ($child_property)

  • $child_property</p> (string)

requisition = $widget->get_child_requisition

ok this one is strictly for widget implementations, like behind-the-scenes only, not for the general public bestie. it obtains $widget->requisition... unless somebody has forced a particular geometry onto the widget (for example 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, it emits the size-request signal) on the $widget to compute the size request and fill in $widget->requisition, and only then returns $widget->requisition.

and 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</p> (boolean)

(path, path_reversed) = $widget->class_path

clipboard = $widget->get_clipboard ($selection=GDK_SELECTION_CLIPBOARD)

  • $selection</p> (Gtk2::Gdk::Atom)

Since: gtk+ 2.2

colormap = $widget->get_colormap

$widget->set_colormap ($colormap)

  • $colormap</p> (Gtk2::Gdk::Colormap)

$widget->composite_child ($boolean)

boolean = $widget->composite_child

string or undef = $widget->get_composite_name

$widget->set_composite_name ($name)

  • $name</p> (string)

context = $widget->create_pango_context

layout = $widget->create_pango_layout ($text=undef)

  • $text</p> (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)

  • $colormap</p> (Gtk2::Gdk::Colormap)

textdirection = Gtk2::Widget->get_default_direction

Gtk2::Widget->set_default_direction ($dir)

  • $dir</p> (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)

  • $dir</p> (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)

  • $double_buffered</p> (boolean)

dragcontext = $widget->drag_begin ($targets, $actions, $button, $event)

  • $targets</p> (Gtk2::TargetList)
  • $actions</p> (Gtk2::Gdk::DragAction)
  • $button</p> (integer)
  • $event</p> (Gtk2::Gdk::Event)

boolean = $widget->drag_check_threshold ($start_x, $start_y, $current_x, $current_y)

  • $start_x</p> (integer)
  • $start_y</p> (integer)
  • $current_x</p> (integer)
  • $current_y</p> (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)

  • $context</p> (Gtk2::Gdk::DragContext)
  • $target_list</p> (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</p> (Gtk2::DestDefaults)
  • $actions</p> (Gtk2::Gdk::DragAction)
  • ...</p> (list) of Gtk2::TargetEntry's

$widget->drag_dest_set_proxy ($proxy_window, $protocol, $use_coordinates)

  • $proxy_window</p> (Gtk2::Gdk::Window)
  • $protocol</p> (Gtk2::Gdk::DragProtocol)
  • $use_coordinates</p> (boolean)

$widget->drag_dest_set_target_list ($target_list)

  • $target_list</p> (Gtk2::TargetList or undef)

$widget->drag_dest_set_track_motion ($track_motion)

  • $track_motion</p> (boolean)

Since: gtk+ 2.10

$widget->drag_dest_unset

$widget->drag_get_data ($context, $target, $time_)

  • $context</p> (Gtk2::Gdk::DragContext)
  • $target</p> (Gtk2::Gdk::Atom)
  • $time_</p> (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, ...)

  • $start_button_mask</p> (Gtk2::Gdk::ModifierType)
  • $actions</p> (Gtk2::Gdk::DragAction)
  • ...</p> (list) of Gtk2::TargetEntry's

$widget->drag_source_set_icon ($colormap, $pixmap, $mask)

  • $colormap</p> (Gtk2::Gdk::Colormap or undef)
  • $pixmap</p> (Gtk2::Gdk::Pixmap or undef)
  • $mask</p> (Gtk2::Gdk::Bitmap or undef)

$widget->drag_source_set_icon_name ($icon_name)

  • $icon_name</p> (string)

Since: gtk+ 2.8

$widget->drag_source_set_icon_pixbuf ($pixbuf)

  • $pixbuf</p> (Gtk2::Gdk::Pixbuf or undef)

$widget->drag_source_set_icon_stock ($stock_id)

  • $stock_id</p> (string)

$widget->drag_source_set_target_list ($target_list)

  • $target_list</p> (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)

  • $event</p> (Gtk2::Gdk::Event)

ok so this one is rarely-used, she emits an event signal on $widget. do NOT use this to synthesize events β€” use Gtk2->main_do_event instead. do NOT synthesize expose events β€” use $gdkwindow->invalidate_rect instead. basically, the main use for this in gtk2-perl is passing motion notify events to rulers from other widgets. that's it, that's the whole job πŸ’…

eventmask = $widget->get_events

$widget->set_events ($events)

  • $events</p> (Gtk2::Gdk::EventMask)

extensionmode = $widget->get_extension_events

$widget->set_extension_events ($mode)

  • $mode</p> (Gtk2::Gdk::ExtensionMode)

pspec or undef = $widget_or_class_name->find_style_property ($name)

  • $name</p> (string)

returns a Glib::ParamSpec for the style property $name on widget $widget_or_class_name. and if there's no property $name?? it returns 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</p> (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)

  • $has_tooltip</p> (boolean)

Since: gtk+ 2.12

boolean = $widget->get_has_window

Since: gtk+ 2.18

$widget->set_has_window ($has_window)

  • $has_window</p> (boolean)

Since: gtk+ 2.18

$widget->hide

$widget->hide_all

boolean = Gtk2::Widget::hide_on_delete ($widget, ...)

  • $widget</p> (Gtk2::Widget)
  • ...</p> (list) other arguments ignored (event etc)

this is a lil helper function meant to be used as the callback for the delete-event signal:

$wiget->signal_connect (
  delete_event => \&Gtk2::Widget::hide_on_delete);
(yes, $wiget is spelled like that in the source. we don't fix it, we preserve it, that's the rule bestie πŸ“)

$widget->input_shape_combine_mask ($shape_mask, $offset_x, $offset_y)

  • $shape_mask</p> (Gtk2::Gdk::Bitmap or undef)
  • $offset_x</p> (integer)
  • $offset_y</p> (integer)

✨ to be continued, bestie β€” this was just part 1 of 4, more chaos incoming ✨

Since: gtk+ 2.10

  • rectangle = $widget->intersect ($area) β€” bestie, this checks if your widget and $area intersect. ✨
    • $area (Gtk2::Gdk::Rectangle)
    • Returns undef if $widget and $area do not intersect. πŸ’€
  • boolean = $widget->is_ancestor ($ancestor) β€” is $ancestor an ancestor of $widget? πŸ‘€
    • $ancestor (Gtk2::Widget)
  • boolean = $widget->is_composited β€” returns whether the widget is composited. πŸ¦‹ Since: gtk+ 2.10
  • boolean = $widget->is_drawable β€” can it be drawn on? 🎨 Since: gtk+ 2.18
  • boolean = $widget->is_focus β€” does it have focus? πŸ‘‘
  • $widget->is_sensitive ($boolean) and boolean = $widget->is_sensitive β€” set or get sensitivity. πŸ’…
  • boolean = $widget->is_toplevel β€” is it a toplevel? 🌟 Since: gtk+ 2.18
  • boolean = $widget->keynav_failed ($direction) β€” keynav failed? 😭
    • $direction (Gtk2::DirectionType) Since: gtk+ 2.12
  • list = $widget->list_mnemonic_labels β€” list of mnemonic labels. 🏷️ Since: gtk+ 2.4
  • list = $widget_or_class_name->list_style_properties β€” returns 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 β€” map or check mapped status. πŸ—ΊοΈ Since: gtk+ 2.20
  • $widget->set_mapped ($mapped) β€” set mapped. πŸ”§
    • $mapped (boolean) Since: gtk+ 2.20
  • boolean = $widget->mnemonic_activate ($group_cycling) β€” activate mnemonic. ⌨️
    • $group_cycling (boolean)
  • rcstyle = $widget->get_modifier_style β€” get modifier style. πŸŽ€
  • $widget->modify_base ($state, $color) β€” modify base color. 🎨
    • $state (Gtk2::StateType)
    • $color (Gtk2::Gdk::Color or undef)
  • $widget->modify_bg ($state, $color) β€” modify background. 🌈
    • $state (Gtk2::StateType)
    • $color (Gtk2::Gdk::Color or undef)
  • $widget->modify_cursor ($primary, $secondary) β€” modify cursor colors. πŸ–±οΈ
    • $primary (Gtk2::Gdk::Color or undef)
    • $secondary (Gtk2::Gdk::Color or undef) Since: gtk+ 2.12
  • $widget->modify_fg ($state, $color) β€” modify foreground. ✨
    • $state (Gtk2::StateType)
    • $color (Gtk2::Gdk::Color or undef)
  • $widget->modify_font ($font_desc) β€” modify font. πŸ”€
    • $font_desc (Pango::FontDescription or undef)
  • $widget->modify_style ($style) β€” modify style. πŸ’…
    • $style (Gtk2::RcStyle)
  • $widget->modify_text ($state, $color) β€” modify text color. πŸ“
    • $state (Gtk2::StateType)
    • $color (Gtk2::Gdk::Color or undef)
  • string = $widget->get_name and $widget->set_name ($name) β€” get or set the widget name. 🏷️
    • $name (string)
  • boolean = $widget->get_no_show_all β€” get no-show-all flag. πŸ™ˆ Since: gtk+ 2.4
  • $widget->set_no_show_all ($no_show_all) β€” set no-show-all. 🚫
    • $no_show_all (boolean) Since: gtk+ 2.4
  • $widget->no_window ($boolean) and boolean = $widget->no_window β€” no window? πŸͺŸ
  • context = $widget->get_pango_context β€” get Pango context. πŸ–‹οΈ
  • widget or undef = $widget->parent and widget or undef = $widget->get_parent β€” get parent widget. πŸ‘ͺ
  • $widget->parent_sensitive ($boolean) and boolean = $widget->parent_sensitive β€” parent sensitive? πŸ’–
  • $widget->set_parent ($parent) β€” set parent. πŸ‘¨β€πŸ‘§
    • $parent (Gtk2::Widget)
  • window = $widget->get_parent_window and $widget->set_parent_window ($parent_window) β€” get or set parent window. πŸͺŸ
    • $parent_window (Gtk2::Gdk::Window)
  • (path, path_reversed) = $widget->path β€” get path. πŸ›€οΈ
  • (x, y) = $widget->get_pointer β€” get pointer coords. πŸ–±οΈ
  • Gtk2::Widget->pop_colormap (cmap) and $widget->pop_colormap (cmap) β€” pop colormap. 🎨
  • Gtk2::Widget->pop_composite_child and $widget->pop_composite_child β€” pop composite child. πŸ‘Ά
  • $widget->propagate_event ($event) β€” propagate an 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) and $widget->push_colormap (cmap) β€” push colormap. 🌈
    • $cmap (Gtk2::Gdk::Colormap)
  • Gtk2::Widget->push_composite_child and $widget->push_composite_child β€” push composite child. πŸ‘Ά
  • $widget->queue_draw β€” queue a draw. 🎨
  • $widget->queue_draw_area ($x, $y, $width, $height) β€” queue draw for area. πŸ–ŒοΈ
    • $x (integer)
    • $y (integer)
    • $width (integer)
    • $height (integer)
  • $widget->queue_resize β€” queue resize. πŸ“
  • $widget->queue_resize_no_redraw β€” queue resize without redraw. 🚫🎨 Since: gtk+ 2.4
  • $widget->rc_style ($boolean) and boolean = $widget->rc_style β€” rc style? πŸŽ€
  • $widget->realize β€” realize the widget. ✨
  • $widget->realized ($boolean), boolean = $widget->realized, boolean = $widget->get_realized β€” realized status. βœ… Since: gtk+ 2.20
  • $widget->set_realized ($realized) β€” set realized. πŸ”§
    • $realized (boolean) Since: gtk+ 2.20
  • $widget->receives_default ($boolean), boolean = $widget->receives_default, boolean = $widget->get_receives_default β€” receives default? 🎯 Since: gtk+ 2.18
  • $widget->set_receives_default ($receives_default) β€” set receives default. 🎯
    • $receives_default (boolean) Since: gtk+ 2.18
  • $widget->set_redraw_on_allocate ($redraw_on_allocate) β€” set redraw on allocate. πŸ”„
    • $redraw_on_allocate (boolean)
  • region = $widget->region_intersect ($region) β€” intersect region. πŸ—ΊοΈ
    • $region (Gtk2::Gdk::Region)
  • boolean = $widget->remove_accelerator ($accel_group, $accel_key, $accel_mods) β€” remove accelerator. ⌨️
    • $accel_group (Gtk2::AccelGroup)
    • $accel_key (integer)
    • $accel_mods (Gtk2::Gdk::ModifierType)
  • $widget->remove_mnemonic_label ($label) β€” remove mnemonic label. 🏷️
    • $label (Gtk2::Widget) Since: gtk+ 2.4
  • pixbuf = $widget->render_icon ($stock_id, $size, $detail=undef) β€” render icon. πŸ–ΌοΈ
    • $stock_id (string)
    • $size (Gtk2::IconSize)
    • $detail (string)
  • $widget->reparent ($new_parent) β€” reparent. πŸ‘ͺ
    • $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 β€” get requisition. πŸ“ Since: gtk+ 2.20
  • $widget->reset_rc_styles β€” reset rc styles. πŸŽ€
  • $widget->reset_shapes β€” reset shapes. πŸ”·
  • window = $widget->get_root_window β€” get root window. πŸͺŸ Since: gtk+ 2.2
  • statetype = $widget->saved_state β€” saved state. πŸ’Ύ
  • screen = $widget->get_screen β€” get screen. πŸ–₯️ Since: gtk+ 2.2
  • boolean = $widget->set_scroll_adjustments ($hadjustment, $vadjustment) β€” set scroll adjustments. πŸ“œ
    • $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) β€” add selection target. 🎯
    • $selection (Gtk2::Gdk::Atom)
    • $target (Gtk2::Gdk::Atom)
    • $info (integer)
  • $widget->selection_add_targets ($selection, ...) β€” add multiple selection targets. 🎯
    • $selection (Gtk2::Gdk::Atom)
    • ... (list) of Gtk2::TargetEntry's
  • $widget->selection_clear_targets ($selection) β€” clear selection targets. 🧹
    • $selection (Gtk2::Gdk::Atom)
  • boolean = $widget->selection_convert ($selection, $target, $time_) β€” convert selection. πŸ”„
    • $selection (Gtk2::Gdk::Atom)
    • $target (Gtk2::Gdk::Atom)
    • $time_ (unsigned)
  • $widget->selection_remove_all β€” remove all selections. πŸ—‘οΈ
  • boolean = $widget->send_focus_change ($event) β€” send focus change. 🎯
    • $event (Gtk2::Gdk::Event) Since: gtk+ 2.22
  • $widget->sensitive ($boolean), boolean = $widget->sensitive, boolean = $widget->get_sensitive β€” sensitivity. πŸ’– Since: gtk+ 2.18
  • $widget->set_sensitive ($sensitive) β€” set sensitive. πŸ’–
    • $sensitive (boolean)
  • settings = $widget->get_settings β€” get settings. βš™οΈ
  • $widget->shape_combine_mask ($shape_mask, $offset_x, $offset_y) β€” combine shape mask. πŸ”·
    • $shape_mask (Gtk2::Gdk::Bitmap or undef)
    • $offset_x (integer)
    • $offset_y (integer)
  • $widget->show, $widget->show_all, $widget->show_now β€” show the widget. πŸ‘€
  • $widget->size_allocate ($allocation) β€” allocate size. πŸ“
    • $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) β€” set size request. πŸ“
    • $width (integer)
    • $height (integer)
  • pixmap or undef = $widget->get_snapshot ($clip_rect=undef) β€” get snapshot. πŸ“Έ
    • $clip_rect (Gtk2::Gdk::Rectangle or undef) Since: gtk+ 2.14
  • statetype = $widget->state, statetype = $widget->get_state β€” state. πŸ’Ύ Since: gtk+ 2.18
  • $widget->set_state ($state) β€” set state. πŸ’Ύ
    • $state (Gtk2::StateType)
  • style = $widget->style, $style->style_attach β€” style and attach. 🎨 Since: gtk+ 2.20
  • style = $widget->get_style β€” get style. 🎨
  • list = $widget->style_get ($first_property_name, ...) β€” get style properties. πŸ“‹
    • $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, ...) β€” an alias for style_get. πŸ“‹
    • $first_property_name (string)
    • ... (list) 0 or more additional property names Since: gtk+ 2.2
  • $widget->set_style ($style) β€” set style. 🎨
    • $style (Gtk2::Style or undef)
  • $widget->thaw_child_notify β€” thaw child notify. πŸ”₯
  • string = $widget->get_tooltip_markup β€” get tooltip markup. πŸ’¬ Since: gtk+ 2.12
  • $widget->set_tooltip_markup ($markup) β€” set tooltip markup. πŸ’¬
    • $markup (string or undef) Since: gtk+ 2.12
  • string = $widget->get_tooltip_text β€” get tooltip text. πŸ’¬ Since: gtk+ 2.12
  • $widget->set_tooltip_text ($text) β€” set tooltip text. πŸ’¬
    • $text (string or undef) Since: gtk+ 2.12
  • window or undef = $widget->get_tooltip_window β€” get tooltip window. πŸͺŸ Since: gtk+ 2.12
  • $widget->set_tooltip_window ($custom_window) β€” set tooltip window. πŸͺŸ
    • $custom_window (Gtk2::Window or undef) Since: gtk+ 2.12
  • $widget->toplevel ($value), boolean = $widget->toplevel, widget = $widget->get_toplevel β€” toplevel stuff. 🌟
  • (dst_x, dst_y) = $src_widget->translate_coordinates ($dest_widget, $src_x, $src_y) β€” translate coordinates. πŸ—ΊοΈ
    • $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->trigger_tooltip_query β€” trigger tooltip query. πŸ’¬ Since: gtk+ 2.12
  • $widget->unmap, $widget->unparent, $widget->unrealize β€” unmap, unparent, unrealize. πŸšͺ
  • $widget->unset_flags ($flags) β€” unset flags. 🚩
    • $flags (Gtk2::WidgetFlags)
  • $widget->visible ($boolean), boolean = $widget->visible, boolean = $widget->get_visible β€” visibility. πŸ‘€ Since: gtk+ 2.18
  • $widget->set_visible ($visible) β€” set visible. πŸ‘€
    • $visible (boolean) Since: gtk+ 2.18
  • visual = $widget->get_visual β€” get visual. 🎨
  • window or undef = $widget->window ($new=undef) β€” window. πŸͺŸ
    • $new (Gtk2::Gdk::Window or undef)
window or undef = $widget->get_window

Since: gtk+ 2.14 ✨ β€” bestie, you get back the widget's window, or undef if it hasn't got one yet. No window, no undef-crisis, just vibes.

$widget->set_window ($window)
  • $window (Gtk2::Gdk::Window) β€” the window you're handing over 🫢

Since: gtk+ 2.18


🌸 PROPERTIES 🌸

Every single one of these is a real, certified property, okay? Type, default and flags included, no gatekeeping πŸ’…

  • 'app-paintable' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the application will paint directly on the widget 🎨
  • 'can-default' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the widget can be the default widget πŸ‘‘
  • 'can-focus' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the widget can accept the input focus ✨
  • 'composite-child' β€” type boolean, default false, flags readable / private / static-nick / static-blurb. Whether the widget is part of a composite widget 🧩
  • 'double-buffered' β€” type boolean, default true, flags readable / writable / private / static-nick / static-blurb. Whether or not the widget is double buffered πŸͺž
  • 'events' β€” type Gtk2::Gdk::EventMask, default structure-mask, flags readable / writable / private / static-nick / static-blurb. The event mask that decides what kind of GdkEvents this widget gets 🎟️
  • 'extension-events' β€” type Gtk2::Gdk::ExtensionMode, default "none", flags readable / writable / private / static-nick / static-blurb. The mask that decides what kind of extension events this widget gets 🌈
  • 'has-default' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the widget is the default widget πŸ‘‘
  • 'has-focus' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the widget has the input focus ✨
  • 'has-tooltip' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether this widget has a tooltip πŸ’¬
  • 'height-request' β€” type integer, default -1, flags readable / writable / private / static-nick / static-blurb. Override for height request of the widget, or -1 if the natural request should be used πŸ“
  • 'is-focus' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the widget is the focus widget within the toplevel 🎯
  • 'name' β€” type string, default undef, flags readable / writable / private / static-nick / static-blurb. The name of the widget 🏷️
  • 'no-show-all' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether gtk_widget_show_all() should not affect this widget πŸ™ˆ
  • 'parent' β€” type Gtk2::Container, default undef, flags readable / writable / private / static-nick / static-blurb. The parent widget of this widget. Must be a Container widget πŸ‘¨β€πŸ‘©β€πŸ‘§
  • 'receives-default' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. If TRUE, the widget will receive the default action when it is focused πŸ‘‘
  • 'sensitive' β€” type boolean, default true, flags readable / writable / private / static-nick / static-blurb. Whether the widget responds to input 🫢
  • 'style' β€” type Gtk2::Style, default undef, flags readable / writable / private / static-nick / static-blurb. The style of the widget, which contains information about how it will look (colors etc) πŸ’…
  • 'tooltip-markup' β€” type string, default undef, flags readable / writable / private / static-nick / static-blurb. The contents of the tooltip for this widget πŸ’¬
  • 'tooltip-text' β€” type string, default undef, flags readable / writable / private / static-nick / static-blurb. The contents of the tooltip for this widget πŸ’¬
  • 'visible' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Whether the widget is visible πŸ‘€
  • 'width-request' β€” type integer, default -1, flags readable / writable / private / static-nick / static-blurb. Override for width request of the widget, or -1 if the natural request should be used πŸ“
  • 'window' β€” type Gtk2::Gdk::Window, default undef, flags readable / private / static-nick / static-blurb. The widget's window if it is realized πŸͺŸ

πŸŽ€ STYLE PROPERTIES πŸŽ€

These ones are style, not vibes-only β€” they're the actual style properties, and yes every single flag is coming with us πŸ’–

  • 'cursor-aspect-ratio' β€” type float, default 0.04, flags readable / private / static-nick / static-blurb. Aspect ratio with which to draw insertion cursor ✏️
  • 'cursor-color' β€” type Gtk2::Gdk::Color, default undef, flags readable / private / static-nick / static-blurb. Color with which to draw insertion cursor ✏️
  • 'draw-border' β€” type Gtk2::Border, default undef, flags readable / private / static-nick / static-blurb. Size of areas outside the widget's allocation to draw πŸ–ΌοΈ
  • 'focus-line-pattern' β€” type string, default "\1\1", flags readable / private / static-nick / static-blurb. Dash pattern used to draw the focus indicator 🎯
  • 'focus-line-width' β€” type integer, default 1, flags readable / private / static-nick / static-blurb. Width, in pixels, of the focus indicator line 🎯
  • 'focus-padding' β€” type integer, default 1, flags readable / private / static-nick / static-blurb. Width, in pixels, between focus indicator and the widget 'box' 🎯
  • 'interior-focus' β€” type boolean, default true, flags readable / private / static-nick / static-blurb. Whether to draw the focus indicator inside widgets 🎯
  • 'link-color' β€” type Gtk2::Gdk::Color, default undef, flags readable / private / static-nick / static-blurb. Color of unvisited links πŸ”—
  • 'scroll-arrow-hlength' β€” type integer, default 16, flags readable / private / static-nick / static-blurb. The length of horizontal scroll arrows ↔️
  • 'scroll-arrow-vlength' β€” type integer, default 16, flags readable / private / static-nick / static-blurb. The length of vertical scroll arrows ↕️
  • 'secondary-cursor-color' β€” type Gtk2::Gdk::Color, default undef, flags 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' β€” type integer, default 0, flags readable / private / static-nick / static-blurb. The height of separators if "wide-separators" is TRUE βž–
  • 'separator-width' β€” type integer, default 0, flags readable / private / static-nick / static-blurb. The width of separators if wide-separators is TRUE βž–
  • 'tooltip-alpha' β€” type Glib::UChar, default 255, flags readable / private / static-nick / static-blurb. The opacity to be used when drawing tooltips πŸ’¬
  • 'tooltip-radius' β€” type Glib::UInt, default 0, flags readable / private / static-nick / static-blurb. The radius to be used when drawing tooltips πŸ’¬
  • 'visited-link-color' β€” type Gtk2::Gdk::Color, default undef, flags readable / private / static-nick / static-blurb. Color of visited links πŸ”—
  • 'wide-separators' β€” type boolean, default false, flags readable / private / static-nick / static-blurb. Whether separators have configurable width and should be drawn using a box instead of a line βž–
  • 'window-dragging' β€” type boolean, default false, flags readable / writable / private / static-nick / static-blurb. Window dragging πŸͺŸ

πŸ”₯ SIGNALS πŸ”₯

Okay so here's the whole signal list, every last one, signatures verbatim because I do not play about accuracy 🫢 Where you see boolean = at the front, that's the listing telling you the return value is a boolean, iykyk.

  • 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)
πŸ’€ that's 68 signals, bestie. All of them. Not one skipped, not one merged, periodt.

🌈 ENUMS AND FLAGS 🌈

okay bestie, this is the big ol' bucket of all the enums and flags you might bump into while messing with widgets πŸ’– each one shows you the cute Perl name and the C name it's chillin' with, so you can pass whichever and nobody's gonna be mad at you.


flags Gtk2::AccelFlags

  • 'visible' / 'GTK_ACCEL_VISIBLE'
  • 'locked' / 'GTK_ACCEL_LOCKED'
  • 'mask' / 'GTK_ACCEL_MASK'

flags Gtk2::DestDefaults

  • 'motion' / 'GTK_DEST_DEFAULT_MOTION'
  • 'highlight' / 'GTK_DEST_DEFAULT_HIGHLIGHT'
  • 'drop' / 'GTK_DEST_DEFAULT_DROP'
  • 'all' / 'GTK_DEST_DEFAULT_ALL'

enum Gtk2::DirectionType

  • 'tab-forward' / 'GTK_DIR_TAB_FORWARD'
  • 'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
  • 'up' / 'GTK_DIR_UP'
  • 'down' / 'GTK_DIR_DOWN'
  • 'left' / 'GTK_DIR_LEFT'
  • 'right' / 'GTK_DIR_RIGHT'

enum Gtk2::DragResult

  • 'success' / 'GTK_DRAG_RESULT_SUCCESS'
  • 'no-target' / 'GTK_DRAG_RESULT_NO_TARGET'
  • 'user-cancelled' / 'GTK_DRAG_RESULT_USER_CANCELLED'
  • 'timeout-expired' / 'GTK_DRAG_RESULT_TIMEOUT_EXPIRED'
  • 'grab-broken' / 'GTK_DRAG_RESULT_GRAB_BROKEN'
  • 'error' / 'GTK_DRAG_RESULT_ERROR'

flags Gtk2::Gdk::DragAction

  • 'default' / 'GDK_ACTION_DEFAULT'
  • 'copy' / 'GDK_ACTION_COPY'
  • 'move' / 'GDK_ACTION_MOVE'
  • 'link' / 'GDK_ACTION_LINK'
  • 'private' / 'GDK_ACTION_PRIVATE'
  • 'ask' / 'GDK_ACTION_ASK'

enum Gtk2::Gdk::DragProtocol

  • 'motif' / 'GDK_DRAG_PROTO_MOTIF'
  • 'xdnd' / 'GDK_DRAG_PROTO_XDND'
  • 'rootwin' / 'GDK_DRAG_PROTO_ROOTWIN'
  • 'none' / 'GDK_DRAG_PROTO_NONE'
  • 'win32-dropfiles' / 'GDK_DRAG_PROTO_WIN32_DROPFILES'
  • 'ole2' / 'GDK_DRAG_PROTO_OLE2'
  • 'local' / 'GDK_DRAG_PROTO_LOCAL'

flags Gtk2::Gdk::EventMask

like, this one is the list β€” every single mask is here, no skips, we don't gatekeep πŸ’…

  • 'exposure-mask' / 'GDK_EXPOSURE_MASK'
  • 'pointer-motion-mask' / 'GDK_POINTER_MOTION_MASK'
  • 'pointer-motion-hint-mask' / 'GDK_POINTER_MOTION_HINT_MASK'
  • 'button-motion-mask' / 'GDK_BUTTON_MOTION_MASK'
  • 'button1-motion-mask' / 'GDK_BUTTON1_MOTION_MASK'
  • 'button2-motion-mask' / 'GDK_BUTTON2_MOTION_MASK'
  • 'button3-motion-mask' / 'GDK_BUTTON3_MOTION_MASK'
  • 'button-press-mask' / 'GDK_BUTTON_PRESS_MASK'
  • 'button-release-mask' / 'GDK_BUTTON_RELEASE_MASK'
  • 'key-press-mask' / 'GDK_KEY_PRESS_MASK'
  • 'key-release-mask' / 'GDK_KEY_RELEASE_MASK'
  • 'enter-notify-mask' / 'GDK_ENTER_NOTIFY_MASK'
  • 'leave-notify-mask' / 'GDK_LEAVE_NOTIFY_MASK'
  • 'focus-change-mask' / 'GDK_FOCUS_CHANGE_MASK'
  • 'structure-mask' / 'GDK_STRUCTURE_MASK'
  • 'property-change-mask' / 'GDK_PROPERTY_CHANGE_MASK'
  • 'visibility-notify-mask' / 'GDK_VISIBILITY_NOTIFY_MASK'
  • 'proximity-in-mask' / 'GDK_PROXIMITY_IN_MASK'
  • 'proximity-out-mask' / 'GDK_PROXIMITY_OUT_MASK'
  • 'substructure-mask' / 'GDK_SUBSTRUCTURE_MASK'
  • 'scroll-mask' / 'GDK_SCROLL_MASK'
  • 'all-events-mask' / 'GDK_ALL_EVENTS_MASK'

enum Gtk2::Gdk::ExtensionMode

  • 'none' / 'GDK_EXTENSION_EVENTS_NONE'
  • 'all' / 'GDK_EXTENSION_EVENTS_ALL'
  • 'cursor' / 'GDK_EXTENSION_EVENTS_CURSOR'

flags Gtk2::Gdk::ModifierType

keyboard warriors assemble ⌨️✨

  • 'shift-mask' / 'GDK_SHIFT_MASK'
  • 'lock-mask' / 'GDK_LOCK_MASK'
  • 'control-mask' / 'GDK_CONTROL_MASK'
  • 'mod1-mask' / 'GDK_MOD1_MASK'
  • 'mod2-mask' / 'GDK_MOD2_MASK'
  • 'mod3-mask' / 'GDK_MOD3_MASK'
  • 'mod4-mask' / 'GDK_MOD4_MASK'
  • 'mod5-mask' / 'GDK_MOD5_MASK'
  • 'button1-mask' / 'GDK_BUTTON1_MASK'
  • 'button2-mask' / 'GDK_BUTTON2_MASK'
  • 'button3-mask' / 'GDK_BUTTON3_MASK'
  • 'button4-mask' / 'GDK_BUTTON4_MASK'
  • 'button5-mask' / 'GDK_BUTTON5_MASK'
  • 'super-mask' / 'GDK_SUPER_MASK'
  • 'hyper-mask' / 'GDK_HYPER_MASK'
  • 'meta-mask' / 'GDK_META_MASK'
  • 'release-mask' / 'GDK_RELEASE_MASK'
  • 'modifier-mask' / 'GDK_MODIFIER_MASK'

enum Gtk2::IconSize

  • 'invalid' / 'GTK_ICON_SIZE_INVALID'
  • 'menu' / 'GTK_ICON_SIZE_MENU'
  • 'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR'
  • 'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR'
  • 'button' / 'GTK_ICON_SIZE_BUTTON'
  • 'dnd' / 'GTK_ICON_SIZE_DND'
  • 'dialog' / 'GTK_ICON_SIZE_DIALOG'

enum Gtk2::StateType

  • 'normal' / 'GTK_STATE_NORMAL'
  • 'active' / 'GTK_STATE_ACTIVE'
  • 'prelight' / 'GTK_STATE_PRELIGHT'
  • 'selected' / 'GTK_STATE_SELECTED'
  • 'insensitive' / 'GTK_STATE_INSENSITIVE'

enum Gtk2::TextDirection

  • 'none' / 'GTK_TEXT_DIR_NONE'
  • 'ltr' / 'GTK_TEXT_DIR_LTR'
  • 'rtl' / 'GTK_TEXT_DIR_RTL'

flags Gtk2::WidgetFlags

ngl this is the one you'll actually be reaching for β€” it's basically the widget's whole mood board 🫢

  • 'toplevel' / 'GTK_TOPLEVEL'
  • 'no-window' / 'GTK_NO_WINDOW'
  • 'realized' / 'GTK_REALIZED'
  • 'mapped' / 'GTK_MAPPED'
  • 'visible' / 'GTK_VISIBLE'
  • 'sensitive' / 'GTK_SENSITIVE'
  • 'parent-sensitive' / 'GTK_PARENT_SENSITIVE'
  • 'can-focus' / 'GTK_CAN_FOCUS'
  • 'has-focus' / 'GTK_HAS_FOCUS'
  • 'can-default' / 'GTK_CAN_DEFAULT'
  • 'has-default' / 'GTK_HAS_DEFAULT'
  • 'has-grab' / 'GTK_HAS_GRAB'
  • 'rc-style' / 'GTK_RC_STYLE'
  • 'composite-child' / 'GTK_COMPOSITE_CHILD'
  • 'no-reparent' / 'GTK_NO_REPARENT'
  • 'app-paintable' / 'GTK_APP_PAINTABLE'
  • 'receives-default' / 'GTK_RECEIVES_DEFAULT'
  • 'double-buffered' / 'GTK_DOUBLE_BUFFERED'
  • 'no-show-all' / 'GTK_NO_SHOW_ALL'

enum Gtk2::WidgetHelpType

  • 'tooltip' / 'GTK_WIDGET_HELP_TOOLTIP'
  • 'whats-this' / 'GTK_WIDGET_HELP_WHATS_THIS'

πŸ‘€ SEE ALSO πŸ‘€

go read these next, they're all connected fr fr 🧚

  • Gtk2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gtk2::TargetEntry

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


okay that's the whole page bestie, you made it to the end πŸŽ€ and fun lil' footnote for the archivists in the chat: this was built from perl v5.42.0, dated 2025-07-25, and it's the Gtk2::Widget(3) page β€” icon behavior, no cap πŸ‘‘ go forth and slay your widget game, ily, bye βœ¨πŸ¦‹

πŸ“¦ where this page comes from