GtkWidget

Base class for all widgets.

Object Hierarchy

GObject
`-- GtkObject
       `-- GtkWidget

Direct Subclasses

Description

A widget is any class which inherits from GtkWidget. Widgets are classes which can listen for and react to user events. Widgets are usually associated with display and/or layout.

Methods

activate()
  Activates the widget.
add_accelerator()
  Adds an accelerator for the widget.
add_events()
  Let the widget receive more events.
add_mnemonic_label()
  Adds a widget to the list of mnemonic labels for this widget.
can_activate_accel()
  Returns whether or not the signal can be activated by its associated accelerator.
child_focus()
  Invokes the focus signal when a widgets child has the focus.
child_notify()
  Emits a child-notify signal for the given child property.
class_path()
  Returns the class path of the widget
create_pango_context()
  Creates a new PangoContext with the appropriate font map, font description, and base direction for drawing text for this widget.
create_pango_layout()
  Creates a new PangoLayout with the appropriate font map, font description, and base direction for drawing text for this widget.
drag_begin()
  Initiates a drag on the source side.
drag_check_threshold()
  Checks to see if a mouse drag has crossed the widgets drag threshold and should therefore trigger a drag and drop operation.
drag_dest_add_image_targets()
 
drag_dest_add_text_targets()
  Add the image targets supported by GtkSelection to the target list of the drag destination.
drag_dest_add_uri_targets()
  Add the URI targets supported by GtkSelection to the target list of the drag destination.
drag_dest_find_target()
  Looks for a match between the context targets and the destination target list.
drag_dest_get_target_list()
  Returns the list of targets this widget can accept from a drag and drop.
drag_dest_set()
  Sets the widget as a potential drop destination.
drag_dest_set_proxy()
  Sets this widget as a proxy for drops to another window.
drag_dest_set_target_list()
  Sets the list of targets that this widget can accept from a drag and drop.
drag_dest_unset()
  Unsets this widget as a potential drop destination.
drag_get_data()
  Gets the data associated with the drag.
drag_highlight()
  Draws a highlight around the widget.
drag_source_add_text_targets()
  Add the text targets supported by GtkSelection to the target list of the drag destination.
drag_source_get_target_list()
  Returns the list of targets this widget can provide for drag and drop.
drag_source_set()
  Sets widget to be the source of a drag operation.
drag_source_set_icon()
  Sets the icon that will be displayed when the user drags the widget.
drag_source_set_icon_pixbuf()
  Sets the icon that will be displayed when the user drags the widget.
drag_source_set_icon_stock()
  Sets a stock icon that will be displayed when the user drags the widget.
drag_source_set_target_list()
  Sets the target types that the widget offers for drag and drop.
drag_source_unset()
  Unsets the widget as a potential source for drag and drop.
drag_unhighlight()
  Removes the highlight around a widget.
draw()
  DEPRECATED. Invalidates, then updates a region of the widget.
ensure_style()
  Ensures that the widget has a style.
event()
  Emit an event signal on the widget.
freeze_child_notify()
  Stops emission of child-notify signals.
get_accessible()
 
get_allocation()
  Returns the current allocation.
get_ancestor()
  Returns the first ancestor of the given type.
get_child_requisition()
 
get_child_visible()
  Returns value set with set_child_visible().
get_clipboard()
 
get_colormap()
 
get_composite_name()
 
get_default_colormap()
 
get_default_direction()
 
get_default_style()
 
get_default_visual()
 
get_direction()
 
get_display()
  Returns the GdkDisplay for the toplevel of this widget.
get_events()
  Returns the event mask for the widget.
get_extension_events()
 
get_modifier_style()
 
get_name()
  Returns the custom widget name.
get_no_show_all()
 
get_pango_context()
 
get_parent()
  Returns the widget's parent widget.
get_parent_window()
  Returns the widget's parent GdkWindow.
get_pointer()
  Returns the mouse coordinates relative to the widget.
get_root_window()
  Returns the root GdkWindow.
get_screen()
  Returns the GdkScreen of the toplevel parent.
get_settings()
 
get_size_request()
 
get_style()
  Returns the GtkStyle object for the widget.
get_toplevel()
  Returns the toplevel ancestor widget of the current widget.
get_visual()
 
grab_add()
 
grab_default()
 
grab_focus()
 
grab_remove()
 
has_screen()
  Checks whether a GdkScreen is associated with the widget.
hide()
  Removes the widget from being displayed on the screen.
hide_all()
  Removes the widget and all of its children from being displayed on the screen.
hide_on_delete()
  Hides the widget when it receives the "delete-event" signal instead of deleting it.
intersect()
  Returns whether or not the widget and the area intersect.
is_ancestor()
  Returns whether or not the calling widget is an ancestor of the given widget.
is_focus()
  Returns whether the widget is the focus widget within its toplevel.
is_visible()
  Returns whether or not the widget is currently visible.
list_mnemonic_labels()
  Returns an array of widgets for which the current widget is a mnemonic target.
map()
  Maps the widget to the screen.
mnemonic_activate()
  Activates the mnemonic for the widget.
modify_base()
  Sets the base color for the widget when in state state.
modify_bg()
  Sets the background color for the widget when in state state.
modify_fg()
  Sets the foreground color for the widget when in state state.
modify_font()
  Sets the font for the widget.
modify_style()
  Modifies style values for the widget.
modify_text()
  Sets the text color for the widget when in state state.
path()
  Returns the widget path.
pop_colormap()
  Removes a colormap pushed with push_colormap() .
pop_composite_child()
  Pops a composite child pushed with push_composite_child() .
push_colormap()
  Pushes a colormap onto a global stack of colormaps.
push_composite_child()
  Makes all newly-created widgets as composite children until the corresponding pop_composite_child() call.
queue_clear()
  DEPRECATED. Alias for queue_draw() .
queue_clear_area()
  DEPRECATED. Alias for queue_draw_area() .
queue_draw()
  Queues the widget to be redrawn.
queue_draw_area()
  Queues an area of the widget to be redrawn by invalidating it.
queue_resize()
  Flags the widget to have its size renegotiated.
queue_resize_no_redraw()
  Flags the widget to have its size renegotiated without invalidating the widget.
rc_get_style()
  DEPRECATED. Use get_style() instead.
realize()
  Realizes the widget.
remove_accelerator()
 
remove_mnemonic_label()
 
render_icon()
  Creates a GdkPixbuf from a stock item.
reparent()
  Moves the widget from its current parent container to another container widget.
reset_rc_styles()
 
selection_add_target()
 
selection_clear()
 
selection_clear_targets()
 
selection_convert()
 
selection_owner_set()
 
selection_remove_all()
 
send_expose()
 
set_accel_path()
 
set_app_paintable()
 
set_child_visible()
 
set_colormap()
 
set_composite_name()
 
set_default_colormap()
 
set_default_direction()
 
set_direction()
 
set_double_buffered()
 
set_events()
 
set_extension_events()
 
set_name()
  Sets the name of the widget.
set_no_show_all()
 
set_parent()
  Sets the parent container for the widget.
set_parent_window()
 
set_redraw_on_allocate()
 
set_scroll_adjustments()
 
set_sensitive()
  Sets wether or not the widget will react to events.
set_size_request()
  Requests a new size for the widget.
set_state()
 
set_style()
  Sets the GtkStyle object for the widget.
set_uposition()
  DEPRECATED. Sets the widgets position relative to its parent.
set_usize()
  DEPRECATED. Sets a widgets size.
set_visible()
  Hides or shows the widget depending on the value of visible.
shape_combine_mask()
 
show()
  Displays the widget on the screen.
show_all()
  Displays the widget and all of its children on the screen.
show_now()
  Sets a widget visible and wait until it is shown.
size_allocate()
 
size_request()
 
thaw_child_notify()
 
translate_coordinates()
 
unmap()
 
unparent()
  Removes the widget from its parent container.
unrealize()
  Unrealizes the widget.
drag_source_add_image_targets()
 
drag_source_add_uri_targets()
 

Fields

allocation:
 
name:
 
parent:
 
saved_state:
 
state:
 
style:
 
window:
  The GdkWindow for the widget.

Signals

"accel-closures-changed"
 
"button-press-event"
  Mouse button has been pressed down.
"button-release-event"
  Mouse button has been released.
"can-activate-accel"
 
"child-notify"
 
"client-event"
 
"configure-event"
 
"delete-event"
 
"destroy-event"
 
"direction-changed"
 
"drag-begin"
  Dragging from the widget has been started.
"drag-data-delete"
  Drag move has been completed.
"drag-data-get"
  Drag data need to be supplied.
"drag-data-received"
  Drop data receive in the application.
"drag-drop"
  A drop occured.
"drag-end"
 
"drag-leave"
 
"drag-motion"
 
"enter-notify-event"
 
"event"
 
"event-after"
 
"expose-event"
 
"focus"
 
"focus-in-event"
 
"focus-out-event"
 
"grab-focus"
 
"grab-notify"
 
"hide"
 
"hierarchy-changed"
 
"key-press-event"
  A key has been pressed.
"key-release-event"
  A key has been released
"leave-notify-event"
 
"map"
 
"map-event"
 
"mnemonic-activate"
 
"motion-notify-event"
 
"no-expose-event"
 
"parent-set"
  Emitted when a widget's parent is changed.
"popup-menu"
 
"property-notify-event"
 
"proximity-in-event"
 
"proximity-out-event"
 
"realize"
 
"screen-changed"
 
"scroll-event"
 
"selection-clear-event"
 
"selection-get"
 
"selection-notify-event"
 
"selection-received"
 
"selection-request-event"
 
"show"
 
"show-help"
 
"size-allocate"
 
"size-request"
 
"state-changed"
 
"style-set"
 
"unmap"
 
"unmap-event"
 
"unrealize"
 
"visibility-notify-event"
 
"window-state-event"