GtkWidget
Base class for all widgets.
Object Hierarchy
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" Â