man Gtk2::Widget () - Gtk2::Widget

NAME

Gtk2::Widget

HIERARCHY

  Glib::Object
  +----Glib::Object::_Unregistered::GInitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget

INTERFACES

  Gtk2::Atk::ImplementorIface

METHODS

$widget->add_events ($events)

$widget->add_mnemonic_label ($label)

Returns $widget's current allocated size as a read-only rectangle; the allocated size is not necessarily the same as the requested size.

$widget->app_paintable ($boolean)

$widget->set_app_paintable ($app_paintable)

$widget->can_default ($boolean)

$widget->can_focus ($boolean)

$widget->child_notify ($child_property)

$widget->set_child_visible ($is_visible)

$widget->set_colormap ($colormap)

$widget->composite_child ($boolean)

$widget->set_composite_name ($name)

colormap = Gtk2::Widget->get_default_colormap

Gtk2::Widget->set_default_colormap ($colormap)

$widget->set_default_colormap ($colormap)

textdirection = Gtk2::Widget->get_default_direction

Gtk2::Widget->set_default_direction ($dir)

style = Gtk2::Widget->get_default_style

visual = Gtk2::Widget->get_default_visual

$widget->destroy

$widget->set_direction ($dir)

$widget->double_buffered ($boolean)

$widget->set_double_buffered ($double_buffered)

$widget->drag_dest_add_image_targets

$widget->drag_dest_add_text_targets

$widget->drag_dest_add_uri_targets

* ... (list) of Gtk2::TargetEntry's

$widget->drag_dest_set_target_list ($target_list)

$widget->drag_dest_unset

$widget->drag_highlight

$widget->drag_source_add_image_targets

$widget->drag_source_add_text_targets

$widget->drag_source_add_uri_targets

* ... (list) of Gtk2::TargetEntry's

$widget->drag_source_set_icon_name ($icon_name)

$widget->drag_source_set_icon_pixbuf ($pixbuf)

$widget->drag_source_set_icon_stock ($stock_id)

$widget->drag_source_set_target_list ($target_list)

$widget->drag_source_unset

$widget->drag_unhighlight

$widget->drawable ($boolean)

$widget->ensure_style

This rarely-used function emits an event signal on $widget. Don't use this to synthesize events; use CWGtk2->main_do_event instead. Don't synthesize expose events; use CW$gdkwindow->invalidate_rect instead. Basically, the main use for this in gtk2-perl will be to pass motion notify events to rulers from other widgets.

$widget->set_events ($events)

$widget->set_extension_events ($mode)

$widget->set_flags ($flags)

$widget->freeze_child_notify

$widget->grab_default

$widget->grab_focus

$widget->has_default ($boolean)

$widget->has_focus ($boolean)

$widget->has_grab ($boolean)

$widget->hide

$widget->hide_all

Returns undef if $widget and $area do not intersect.

$widget->is_sensitive ($boolean)

$widget->map

$widget->mapped ($boolean)

$widget->modify_font ($font_desc)

$widget->modify_style ($style)

$widget->set_name ($name)

$widget->set_no_show_all ($no_show_all)

$widget->no_window ($boolean)

$widget->parent_sensitive ($boolean)

$widget->set_parent ($parent)

$widget->set_parent_window ($parent_window)

Gtk2::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_resize

$widget->queue_resize_no_redraw

$widget->rc_style ($boolean)

$widget->realize

$widget->realized ($boolean)

$widget->receives_default ($boolean)

$widget->set_redraw_on_allocate ($redraw_on_allocate)

$widget->remove_mnemonic_label ($label)

$widget->reparent ($new_parent)

$widget->reset_rc_styles

$widget->reset_shapes

$widget->selection_add_targets ($selection, ...)

* ... (list) of Gtk2::TargetEntry's

$widget->selection_clear_targets ($selection)

$widget->selection_remove_all

$widget->sensitive ($boolean)

$widget->set_sensitive ($sensitive)

$widget->show

$widget->show_all

$widget->show_now

$widget->size_allocate ($allocation)

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 ()

$widget->set_state ($state)

* ... (list) 0 or more additional property names
Returns the values of the requested style properties.
* ... (list) 0 or more additional property names
An alias for style_get.

$widget->set_style ($style)

$widget->thaw_child_notify

$widget->toplevel ($value)

Returns an empty list if either widget is not realized or if they do not share a common ancestor.

$widget->unmap

$widget->unparent

$widget->unrealize

$widget->unset_flags ($flags)

$widget->visible ($boolean)

PROPERTIES

'app-paintable' (boolean : readable / writable / private)
Whether the application will paint directly on the widget
'can-default' (boolean : readable / writable / private)
Whether the widget can be the default widget
'can-focus' (boolean : readable / writable / private)
Whether the widget can accept the input focus
'composite-child' (boolean : readable / private)
Whether the widget is part of a composite widget
'events' (Gtk2::Gdk::EventMask : readable / writable / private)
The event mask that decides what kind of GdkEvents this widget gets
'extension-events' (Gtk2::Gdk::ExtensionMode : readable / writable / private)
The mask that decides what kind of extension events this widget gets
'has-default' (boolean : readable / writable / private)
Whether the widget is the default widget
'has-focus' (boolean : readable / writable / private)
Whether the widget has the input focus
'height-request' (integer : readable / writable / private)
Override for height request of the widget, or -1 if natural request should be used
'is-focus' (boolean : readable / writable / private)
Whether the widget is the focus widget within the toplevel
'name' (string : readable / writable / private)
The name of the widget
'no-show-all' (boolean : readable / writable / private)
Whether gtk_widget_show_all() should not affect this widget
'parent' (Gtk2::Container : readable / writable / private)
The parent widget of this widget. Must be a Container widget
'receives-default' (boolean : readable / writable / private)
If TRUE, the widget will receive the default action when it is focused
'sensitive' (boolean : readable / writable / private)
Whether the widget responds to input
'style' (Gtk2::Style : readable / writable / private)
The style of the widget, which contains information about how it will look (colors etc)
'visible' (boolean : readable / writable / private)
Whether the widget is visible
'width-request' (integer : readable / writable / private)
Override for width request of the widget, or -1 if natural request should be used

SIGNALS

show (Gtk2::Widget)
hide (Gtk2::Widget)
map (Gtk2::Widget)
unmap (Gtk2::Widget)
realize (Gtk2::Widget)
unrealize (Gtk2::Widget)
size-request (Gtk2::Widget, Gtk2::Requisition)
size-allocate (Gtk2::Widget, Gtk2::Gdk::Rectangle)
state-changed (Gtk2::Widget, Gtk2::StateType)
parent-set (Gtk2::Widget, Gtk2::Widget)
hierarchy-changed (Gtk2::Widget, Gtk2::Widget)
style-set (Gtk2::Widget, Gtk2::Style)
direction-changed (Gtk2::Widget, Gtk2::TextDirection)
grab-notify (Gtk2::Widget, boolean)
child-notify (Gtk2::Widget, Glib::ParamSpec)
boolean = mnemonic-activate (Gtk2::Widget, boolean)
grab-focus (Gtk2::Widget)
boolean = focus (Gtk2::Widget, Gtk2::DirectionType)
boolean = event (Gtk2::Widget, Gtk2::Gdk::Event)
event-after (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = button-press-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = button-release-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = scroll-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = motion-notify-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = delete-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = destroy-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = expose-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = key-press-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = key-release-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = enter-notify-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = leave-notify-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = configure-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = focus-in-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = focus-out-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = map-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = unmap-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = property-notify-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = selection-clear-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = selection-request-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = selection-notify-event (Gtk2::Widget, Gtk2::Gdk::Event)
selection-received (Gtk2::Widget, Gtk2::SelectionData, Glib::UInt)
selection-get (Gtk2::Widget, Gtk2::SelectionData, Glib::UInt, Glib::UInt)
boolean = proximity-in-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = proximity-out-event (Gtk2::Widget, Gtk2::Gdk::Event)
drag-leave (Gtk2::Widget, Gtk2::Gdk::DragContext, Glib::UInt)
drag-begin (Gtk2::Widget, Gtk2::Gdk::DragContext)
drag-end (Gtk2::Widget, Gtk2::Gdk::DragContext)
drag-data-delete (Gtk2::Widget, Gtk2::Gdk::DragContext)
boolean = drag-motion (Gtk2::Widget, Gtk2::Gdk::DragContext, integer, integer, Glib::UInt)
boolean = drag-drop (Gtk2::Widget, Gtk2::Gdk::DragContext, integer, integer, Glib::UInt)
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 = visibility-notify-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = client-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = no-expose-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = window-state-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = grab-broken-event (Gtk2::Widget, Gtk2::Gdk::Event)
boolean = popup-menu (Gtk2::Widget)
boolean = show-help (Gtk2::Widget, Gtk2::WidgetHelpType)
accel-closures-changed (Gtk2::Widget)
screen-changed (Gtk2::Widget, Gtk2::Gdk::Screen)
boolean = can-activate-accel (Gtk2::Widget, Glib::UInt)

ENUMS AND FLAGS

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'

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

* '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

* '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'
* '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

* '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

Gtk2, Glib::Object, Glib::Object::_Unregistered::GInitiallyUnowned, Gtk2::Object, Gtk2::TargetEntry

COPYRIGHT

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

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