|
NAMEGtk2::Widget - wrapper for GtkWidgetHIERARCHYGlib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget INTERFACESGlib::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)
object = $widget->get_accessibleaction or undef = $widget->get_actionSince: gtk+ 2.10boolean = $widget->activateThis 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)
$widget->add_events ($events)
$widget->add_mnemonic_label ($label)
Since: gtk+ 2.4 rectangle = $widget->allocationReturn 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_allocationSince: gtk+ 2.18$widget->set_allocation ($allocation)
Since: gtk+ 2.18 widget or undef = $widget->get_ancestor ($ancestor_package)
$widget->app_paintable ($boolean)boolean = $widget->app_paintableboolean = $widget->get_app_paintableSince: gtk+ 2.18$widget->set_app_paintable ($app_paintable)
boolean = $widget->can_activate_accel ($signal_id)
Since: gtk+ 2.4 $widget->can_default ($boolean)boolean = $widget->can_defaultboolean = $widget->get_can_defaultSince: gtk+ 2.18$widget->set_can_default ($can_default)
Since: gtk+ 2.18 $widget->can_focus ($boolean)boolean = $widget->can_focusboolean = $widget->get_can_focusSince: gtk+ 2.18$widget->set_can_focus ($can_focus)
Since: gtk+ 2.18 boolean = $widget->child_focus ($direction)
$widget->child_notify ($child_property)
requisition = $widget->get_child_requisitionThis 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)
(path, path_reversed) = $widget->class_pathclipboard = $widget->get_clipboard ($selection=GDK_SELECTION_CLIPBOARD)
Since: gtk+ 2.2 colormap = $widget->get_colormap$widget->set_colormap ($colormap)
$widget->composite_child ($boolean)boolean = $widget->composite_childstring or undef = $widget->get_composite_name$widget->set_composite_name ($name)
context = $widget->create_pango_contextlayout = $widget->create_pango_layout ($text=undef)
colormap = Gtk2::Widget->get_default_colormapcolormap = $widget->get_default_colormapGtk2::Widget->set_default_colormap ($colormap)$widget->set_default_colormap ($colormap)
textdirection = Gtk2::Widget->get_default_directionGtk2::Widget->set_default_direction ($dir)
style = Gtk2::Widget->get_default_stylestyle = $widget->get_default_stylevisual = Gtk2::Widget->get_default_visualvisual = $widget->get_default_visual$widget->destroytextdirection = $widget->get_direction$widget->set_direction ($dir)
display = $widget->get_displaySince: gtk+ 2.2$widget->double_buffered ($boolean)boolean = $widget->double_bufferedboolean = $widget->get_double_bufferedSince: gtk+ 2.18$widget->set_double_buffered ($double_buffered)
dragcontext = $widget->drag_begin ($targets, $actions, $button, $event)
boolean = $widget->drag_check_threshold ($start_x, $start_y, $current_x, $current_y)
$widget->drag_dest_add_image_targetsSince: gtk+ 2.6$widget->drag_dest_add_text_targetsSince: gtk+ 2.6$widget->drag_dest_add_uri_targetsSince: gtk+ 2.6atom = $widget->drag_dest_find_target ($context, $target_list)
targetlist or undef = $widget->drag_dest_get_target_listboolean = $widget->drag_dest_get_track_motionSince: gtk+ 2.10$widget->drag_dest_set ($flags, $actions, ...)
$widget->drag_dest_set_proxy ($proxy_window, $protocol, $use_coordinates)
$widget->drag_dest_set_target_list ($target_list)
$widget->drag_dest_set_track_motion ($track_motion)
Since: gtk+ 2.10 $widget->drag_dest_unset$widget->drag_get_data ($context, $target, $time_)
$widget->drag_highlight$widget->drag_source_add_image_targetsSince: gtk+ 2.6$widget->drag_source_add_text_targetsSince: gtk+ 2.6$widget->drag_source_add_uri_targetsSince: gtk+ 2.6targetlist or undef = $widget->drag_source_get_target_listSince: gtk+ 2.4$widget->drag_source_set ($start_button_mask, $actions, ...)
$widget->drag_source_set_icon ($colormap, $pixmap, $mask)
$widget->drag_source_set_icon_name ($icon_name)
Since: gtk+ 2.8 $widget->drag_source_set_icon_pixbuf ($pixbuf)
$widget->drag_source_set_icon_stock ($stock_id)
$widget->drag_source_set_target_list ($target_list)
Since: gtk+ 2.4 $widget->drag_source_unset$widget->drag_unhighlight$widget->drawable ($boolean)boolean = $widget->drawable$widget->ensure_style$widget->error_bellSince: gtk+ 2.12boolean = $widget->event ($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)
extensionmode = $widget->get_extension_events$widget->set_extension_events ($mode)
pspec or undef = $widget_or_class_name->find_style_property ($name)
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->flagswidgetflags = $widget->get_flags$widget->set_flags ($flags)
$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_grabboolean = $widget->has_rc_styleSince: gtk+ 2.20boolean = $widget->has_screenSince: gtk+ 2.2boolean = $widget->get_has_tooltipSince: gtk+ 2.12$widget->set_has_tooltip ($has_tooltip)
Since: gtk+ 2.12 boolean = $widget->get_has_windowSince: gtk+ 2.18$widget->set_has_window ($has_window)
Since: gtk+ 2.18 $widget->hide$widget->hide_allboolean = Gtk2::Widget::hide_on_delete ($widget, ...)
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)
Since: gtk+ 2.10 rectangle = $widget->intersect ($area)
Returns undef if $widget and $area do not intersect. boolean = $widget->is_ancestor ($ancestor)
boolean = $widget->is_compositedSince: gtk+ 2.10boolean = $widget->is_drawableSince: gtk+ 2.18boolean = $widget->is_focus$widget->is_sensitive ($boolean)boolean = $widget->is_sensitiveboolean = $widget->is_toplevelSince: gtk+ 2.18boolean = $widget->keynav_failed ($direction)
Since: gtk+ 2.12 list = $widget->list_mnemonic_labelsSince: gtk+ 2.4list = $widget_or_class_name->list_style_propertiesReturn 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->mappedboolean = $widget->get_mappedSince: gtk+ 2.20$widget->set_mapped ($mapped)
Since: gtk+ 2.20 boolean = $widget->mnemonic_activate ($group_cycling)
rcstyle = $widget->get_modifier_style$widget->modify_base ($state, $color)
$widget->modify_bg ($state, $color)
$widget->modify_cursor ($primary, $secondary)
Since: gtk+ 2.12 $widget->modify_fg ($state, $color)
$widget->modify_font ($font_desc)
$widget->modify_style ($style)
$widget->modify_text ($state, $color)
string = $widget->get_name$widget->set_name ($name)
boolean = $widget->get_no_show_allSince: gtk+ 2.4$widget->set_no_show_all ($no_show_all)
Since: gtk+ 2.4 $widget->no_window ($boolean)boolean = $widget->no_windowcontext = $widget->get_pango_contextwidget or undef = $widget->parentwidget or undef = $widget->get_parent$widget->parent_sensitive ($boolean)boolean = $widget->parent_sensitive$widget->set_parent ($parent)
window = $widget->get_parent_window$widget->set_parent_window ($parent_window)
(path, path_reversed) = $widget->path(x, y) = $widget->get_pointerGtk2::Widget->pop_colormap (cmap)$widget->pop_colormap (cmap)Gtk2::Widget->pop_composite_child$widget->pop_composite_child$widget->propagate_event ($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)
Gtk2::Widget->push_composite_child$widget->push_composite_child$widget->queue_draw$widget->queue_draw_area ($x, $y, $width, $height)
$widget->queue_resize$widget->queue_resize_no_redrawSince: gtk+ 2.4$widget->rc_style ($boolean)boolean = $widget->rc_style$widget->realize$widget->realized ($boolean)boolean = $widget->realizedboolean = $widget->get_realizedSince: gtk+ 2.20$widget->set_realized ($realized)
Since: gtk+ 2.20 $widget->receives_default ($boolean)boolean = $widget->receives_defaultboolean = $widget->get_receives_defaultSince: gtk+ 2.18$widget->set_receives_default ($receives_default)
Since: gtk+ 2.18 $widget->set_redraw_on_allocate ($redraw_on_allocate)
region = $widget->region_intersect ($region)
boolean = $widget->remove_accelerator ($accel_group, $accel_key, $accel_mods)
$widget->remove_mnemonic_label ($label)
Since: gtk+ 2.4 pixbuf = $widget->render_icon ($stock_id, $size, $detail=undef)
$widget->reparent ($new_parent)
requisition = $widget->requisitionReturn 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_requisitionSince: gtk+ 2.20$widget->reset_rc_styles$widget->reset_shapeswindow = $widget->get_root_windowSince: gtk+ 2.2statetype = $widget->saved_statescreen = $widget->get_screenSince: gtk+ 2.2boolean = $widget->set_scroll_adjustments ($hadjustment, $vadjustment)
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)
$widget->selection_add_targets ($selection, ...)
$widget->selection_clear_targets ($selection)
boolean = $widget->selection_convert ($selection, $target, $time_)
$widget->selection_remove_allboolean = $widget->send_focus_change ($event)
Since: gtk+ 2.22 $widget->sensitive ($boolean)boolean = $widget->sensitiveboolean = $widget->get_sensitiveSince: gtk+ 2.18$widget->set_sensitive ($sensitive)
settings = $widget->get_settings$widget->shape_combine_mask ($shape_mask, $offset_x, $offset_y)
$widget->show$widget->show_all$widget->show_now$widget->size_allocate ($allocation)
requisition = $widget->size_requestThis 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_requestGets 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)
pixmap or undef = $widget->get_snapshot ($clip_rect=undef)
Since: gtk+ 2.14 statetype = $widget->statestatetype = $widget->get_stateSince: gtk+ 2.18$widget->set_state ($state)
style = $widget->style$style->style_attachSince: gtk+ 2.20style = $widget->get_stylelist = $widget->style_get ($first_property_name, ...)
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. Since: gtk+ 2.2 $widget->set_style ($style)
$widget->thaw_child_notifystring = $widget->get_tooltip_markupSince: gtk+ 2.12$widget->set_tooltip_markup ($markup)
Since: gtk+ 2.12 string = $widget->get_tooltip_textSince: gtk+ 2.12$widget->set_tooltip_text ($text)
Since: gtk+ 2.12 window or undef = $widget->get_tooltip_windowSince: gtk+ 2.12$widget->set_tooltip_window ($custom_window)
Since: gtk+ 2.12 $widget->toplevel ($value)boolean = $widget->toplevelwidget = $widget->get_toplevel(dst_x, dst_y) = $src_widget->translate_coordinates ($dest_widget, $src_x, $src_y)
Returns an empty list if either widget is not realized or if they do not share a common ancestor. $widget->trigger_tooltip_querySince: gtk+ 2.12$widget->unmap$widget->unparent$widget->unrealize$widget->unset_flags ($flags)
$widget->visible ($boolean)boolean = $widget->visibleboolean = $widget->get_visibleSince: gtk+ 2.18$widget->set_visible ($visible)
Since: gtk+ 2.18 visual = $widget->get_visualwindow or undef = $widget->window ($new=undef)
window or undef = $widget->get_windowSince: gtk+ 2.14$widget->set_window ($window)
Since: gtk+ 2.18 PROPERTIES
STYLE PROPERTIES
SIGNALS
ENUMS AND FLAGSflags Gtk2::AccelFlags
flags Gtk2::DestDefaults
enum Gtk2::DirectionType
enum Gtk2::DragResult
flags Gtk2::Gdk::DragAction
enum Gtk2::Gdk::DragProtocol
flags Gtk2::Gdk::EventMask
enum Gtk2::Gdk::ExtensionMode
flags Gtk2::Gdk::ModifierType
enum Gtk2::IconSize
enum Gtk2::StateType
enum Gtk2::TextDirection
flags Gtk2::WidgetFlags
enum Gtk2::WidgetHelpType
SEE ALSOGtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::TargetEntryCOPYRIGHTCopyright (C) 2003-2011 by the gtk2-perl team.This software is licensed under the LGPL. See Gtk2 for a full notice.
Visit the GSP FreeBSD Man Page Interface. |