Gtk::Widget Class Reference

Detailed Description
Abstract Widget (Base class for all widgets).As the base class of all widgets this contains all of the properties and methods common to all widgets. It is an abstract class that can not be instantiated.
Important part of widgets are the *_event signals and virtual methods that every widget have. Those are events coming directly from gdk and thus also from XLib. By overriding those virtual methods you can trap everything a widget can ever do. In order to capture events from a widget, the event mask must first be set with ().
Only widgets with a Gdk::Window on the server side are allowed to capture events. Widgets in the Gtk::Misc group for example lack a Gdk::Window.
Public Member Functions | |
| bool | activate () |
| For widgets that can be "activated" (buttons, menu items, etc. | |
| void | add_accelerator (const Glib::ustring& accel_signal, const Glib::RefPtr<AccelGroup>& accel_group, guint accel_key, Gdk::ModifierType accel_mods, AccelFlags accel_flags) |
| Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. | |
| void | add_events (Gdk::EventMask events) |
| Adds the events in the bitfield events to the event mask for widget. | |
| void | add_mnemonic_label (Widget& label) |
| Adds a widget to the list of mnemonic labels for this widget. | |
| void | add_modal_grab () |
| Block events to everything else than this widget and its children. | |
| bool | app_paintable () const |
| bool | can_default () const |
| bool | can_focus () const |
| bool | child_focus (DirectionType direction) |
| This function is used by custom widget implementations; if you're writing an app, you'd use grab_focus() to move the focus to a particular widget, and Gtk::Container::set_focus_chain() to change the focus tab order. | |
| void | child_notify (const Glib::ustring& child_property) |
| Emits a Gtk::Widget::child-notify signal for the <link linkend="child-properties">child property</link> child_property on widget. | |
| void | class_path (Glib::ustring& path, Glib::ustring& path_reversed) |
| Glib::RefPtr<Pango::Context> | create_pango_context () |
| Creates a new Pango::Context with the appropriate font map, font description, and base direction for drawing text for this widget. | |
| Glib::RefPtr<Pango::Layout> | create_pango_layout (const Glib::ustring& text) |
| Creates a new Pango::Layout with the appropriate font map, font description, and base direction for drawing text for this widget. | |
| bool | double_buffered () const |
| Glib::RefPtr<Gdk::DragContext> | drag_begin (const Glib::RefPtr<TargetList>& targets, Gdk::DragAction actions, int button, GdkEvent* event) |
| Initiates a drag on the source side. | |
| bool | drag_check_threshold (int start_x, int start_y, int current_x, int current_y) |
| Checks to see if a mouse drag starting at ( start_x, start_y) and ending at ( current_x, current_y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation. | |
| void | drag_dest_add_image_targets () |
| Add the image targets supported by Gtk::Selection to the target list of the drag destination. | |
| void | drag_dest_add_text_targets () |
| Add the text targets supported by Gtk::Selection to the target list of the drag destination. | |
| void | drag_dest_add_uri_targets () |
| Add the URI targets supported by Gtk::Selection to the target list of the drag destination. | |
| Glib::ustring | drag_dest_find_target (const Glib::RefPtr<Gdk::DragContext>& context) const |
| Glib::ustring | drag_dest_find_target (const Glib::RefPtr<Gdk::DragContext>& context, const Glib::RefPtr<TargetList>& target_list) const |
| Looks for a match between context->targets and the dest_target_list, returning the first matching target, otherwise returning Gdk::NONE. | |
| Glib::RefPtr<const TargetList> | drag_dest_get_target_list () const |
Return value: the Gtk::TargetList, or 0 if none. | |
| Glib::RefPtr<TargetList> | drag_dest_get_target_list () |
Return value: the Gtk::TargetList, or 0 if none. | |
| void | drag_dest_set (const ArrayHandle_TargetEntry& targets, DestDefaults flags=DEST_DEFAULT_ALL, Gdk::DragAction actions=Gdk::ACTION_COPY) |
| void | drag_dest_set (DestDefaults flags=DestDefaults(0), Gdk::DragAction actions=Gdk::DragAction(0)) |
| void | drag_dest_set_proxy (const Glib::RefPtr<Gdk::Window>& proxy_window, Gdk::DragProtocol protocol, bool use_coordinates) |
| void | drag_dest_set_target_list (const Glib::RefPtr<TargetList>& target_list) |
| Sets the target types that this widget can accept from drag-and-drop. | |
| void | drag_dest_unset () |
| void | drag_get_data (const Glib::RefPtr<Gdk::DragContext>& context, const Glib::ustring& target, guint32 time) |
| void | drag_get_data (const Glib::RefPtr<Gdk::DragContext>& context, Glib::ustring& target, guint32 time) |
| void | drag_highlight () |
| void | drag_set_as_icon (const Glib::RefPtr<Gdk::DragContext>& context, int hot_x, int hot_y) |
| void | drag_source_add_image_targets () |
| Add the writable image targets supported by Gtk::Selection to the target list of the drag source. | |
| void | drag_source_add_text_targets () |
| Add the text targets supported by Gtk::Selection to the target list of the drag source. | |
| void | drag_source_add_uri_targets () |
| Add the URI targets supported by Gtk::Selection to the target list of the drag source. | |
| void | drag_source_set (const ArrayHandle_TargetEntry& targets, Gdk::ModifierType start_button_mask=Gdk::MODIFIER_MASK, Gdk::DragAction actions=Gdk::ACTION_COPY) |
| void | drag_source_set_icon (const Glib::ustring& icon_name) |
| Sets the icon that will be used for drags from a particular source to a themed icon. | |
| void | drag_source_set_icon (const StockID& stock_id) |
| Sets the icon that will be used for drags from a particular source to a stock icon. | |
| void | drag_source_set_icon (const Glib::RefPtr<Gdk::Pixbuf>& pixbuf) |
| Sets the icon that will be used for drags from a particular widget from a Gdk::Pixbuf. | |
| void | drag_source_set_icon (const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask) |
| Sets the icon that will be used for drags from a particular widget from a pixmap/mask. | |
| void | drag_source_unset () |
| void | drag_unhighlight () |
| void | draw_insertion_cursor (Glib::RefPtr<Gdk::Drawable> drawable, const Gdk::Rectangle& area, const Gdk::Rectangle& location, bool is_primary, TextDirection direction, bool draw_arrow=true) |
| void | ensure_style () |
| Ensures that widget has a style ( widget->style). | |
| void | error_bell () |
| Notifies the user about an input-related error on this widget. | |
| bool | event (GdkEvent* event) |
| Rarely-used function. | |
| void | freeze_child_notify () |
| Stops emission of Gtk::Widget::child-notify signals on widget. | |
| Glib::RefPtr<Atk::Object> | get_accessible () |
| Returns: the Atk::Object associated with widget. | |
| Glib::RefPtr<const Action> | get_action () const |
| Returns: the action that a widget is a proxy for, or. | |
| Glib::RefPtr<Action> | get_action () |
| Returns: the action that a widget is a proxy for, or. | |
| Allocation | get_allocation () const |
| const Widget* | get_ancestor (GType widget_type) const |
| Gets the first ancestor of widget with type widget_type. | |
| Widget* | get_ancestor (GType widget_type) |
| Gets the first ancestor of widget with type widget_type. | |
| bool | get_child_visible () const |
| Gets the value set with set_child_visible(). | |
| Glib::RefPtr<const Clipboard> | get_clipboard (const Glib::ustring& selection) const |
| Return value: the appropriate clipboard object. | |
| Glib::RefPtr<Clipboard> | get_clipboard (const Glib::ustring& selection) |
| Return value: the appropriate clipboard object. | |
| Glib::RefPtr<Gdk::Colormap> | get_colormap () |
| Gets the colormap that will be used to render widget. | |
| Glib::ustring | get_composite_name () const |
| Obtains the composite name of a widget. | |
| TextDirection | get_direction () const |
| Gets the reading direction for a particular widget. | |
| TextDirection | get_direction () |
| Gets the reading direction for a particular widget. | |
| Glib::RefPtr<const Gdk::Display> | get_display () const |
| Get the Gdk::Display for the toplevel window associated with this widget. | |
| Glib::RefPtr<Gdk::Display> | get_display () |
| Get the Gdk::Display for the toplevel window associated with this widget. | |
| Gdk::EventMask | get_events () const |
| Return value: event mask for widget. | |
| Gdk::ExtensionMode | get_extension_events () const |
| Retrieves the extension events the widget will receive; see gdk_input_set_extension_events(). | |
| WidgetFlags | get_flags () const |
| bool | get_has_tooltip () const |
| Return value: current value of has-tooltip on widget. | |
| int | get_height () const |
| Glib::RefPtr<const RcStyle> | get_modifier_style () const |
| Return value: the modifier style for the widget. | |
| Glib::RefPtr<RcStyle> | get_modifier_style () |
| Return value: the modifier style for the widget. | |
| Glib::ustring | get_name () const |
| Retrieves the name of a widget. | |
| bool | get_no_show_all () const |
| Return value: the current value of the "no-show-all" property. | |
| Glib::RefPtr<Pango::Context> | get_pango_context () |
| Gets a Pango::Context with the appropriate font map, font description, and base direction for this widget. | |
| const Container* | get_parent () const |
Return value: the parent container of widget, or 0. | |
| Container* | get_parent () |
Return value: the parent container of widget, or 0. | |
| Glib::RefPtr<const Gdk::Window> | get_parent_window () const |
| Gets widget's parent window. | |
| Glib::RefPtr<Gdk::Window> | get_parent_window () |
| Gets widget's parent window. | |
| void | get_pointer (int& x, int& y) const |
| Obtains the location of the mouse pointer in widget coordinates. | |
| Requisition | get_requisition () const |
| Glib::RefPtr<const Gdk::Window> | get_root_window () const |
| Get the root window where this widget is located. | |
| Glib::RefPtr<Gdk::Window> | get_root_window () |
| Get the root window where this widget is located. | |
| Gtk::StateType | get_saved_state () const |
| Glib::RefPtr<const Gdk::Screen> | get_screen () const |
| Get the Gdk::Screen from the toplevel window associated with this widget. | |
| Glib::RefPtr<Gdk::Screen> | get_screen () |
| Get the Gdk::Screen from the toplevel window associated with this widget. | |
| Glib::RefPtr<Settings> | get_settings () |
| Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget. | |
| void | get_size_request (int& width, int& height) const |
| Gets the size request that was explicitly set for the widget using set_size_request(). | |
| Glib::RefPtr<Gdk::Pixmap> | get_snapshot () const |
| Create a Gdk::Pixmap of the contents of the widget and its children. | |
| Glib::RefPtr<Gdk::Pixmap> | get_snapshot (Gdk::Rectangle& clip_rect) const |
| Create a Gdk::Pixmap of the contents of the widget and its children. | |
| Gtk::StateType | get_state () const |
| Glib::RefPtr<const Style> | get_style () const |
| Simply an accessor function that returns widget->style. | |
| Glib::RefPtr<Style> | get_style () |
| Simply an accessor function that returns widget->style. | |
| template<class PropertyType> | |
| void | get_style_property (const Glib::ustring& the_property_name, PropertyType& value) const |
| Glib::ustring | get_tooltip_markup () const |
| Gets the contents of the tooltip for widget. | |
| Glib::ustring | get_tooltip_text () const |
| Gets the contents of the tooltip for widget. | |
| Window* | get_tooltip_window () |
| Return value: The Gtk::Window of the current tooltip. | |
| const Container* | get_toplevel () const |
| This function returns the topmost widget in the container hierarchy widget is a part of. | |
| Container* | get_toplevel () |
| This function returns the topmost widget in the container hierarchy widget is a part of. | |
| Glib::RefPtr<Gdk::Visual> | get_visual () |
| Gets the visual that will be used to render widget. | |
| int | get_width () const |
| Glib::RefPtr<const Gdk::Window> | get_window () const |
| Return value: widget's window. | |
| Glib::RefPtr<Gdk::Window> | get_window () |
| Return value: widget's window. | |
| const GtkWidget* | gobj () const |
| Provides access to the underlying C GtkObject. | |
| GtkWidget* | gobj () |
| Provides access to the underlying C GtkObject. | |
| void | grab_default () |
| Causes widget to become the default widget. | |
| void | grab_focus () |
| Causes widget to have the keyboard focus for the Gtk::Window it's inside. | |
| bool | has_default () const |
| bool | has_focus () const |
| bool | has_grab () const |
| bool | has_no_window () const |
| bool | has_screen () const |
| Checks whether there is a Gdk::Screen is associated with this widget. | |
| void | hide () |
| Reverses the effects of show(), causing the widget to be hidden (invisible to the user). | |
| void | hide_all () |
| Recursively hides a widget and any child widgets. | |
| void | input_shape_combine_mask (const Glib::RefPtr<const Gdk::Bitmap>& shape_mask, int offset_x, int offset_y) |
| Sets an input shape for this widget's GDK window. | |
| bool | intersect (const Gdk::Rectangle& area, Gdk::Rectangle& intersection) const |
Computes the intersection of a widget's area and area, storing the intersection in intersection, and returns true if there was an intersection. | |
| bool | intersect (const Gdk::Rectangle& area) const |
| bool | is_ancestor (Widget& ancestor) const |
| Determines whether widget is somewhere inside ancestor, possibly with intermediate containers. | |
| bool | is_composite_child () const |
| bool | is_composited () const |
| Whether widget can rely on having its alpha channel drawn correctly. | |
| bool | is_drawable () const |
| bool | is_focus () const |
| Determines if the widget is the focus widget within its toplevel. | |
| bool | is_mapped () const |
| bool | is_realized () const |
| bool | is_sensitive () const |
| bool | is_toplevel () const |
| bool | is_visible () const |
| bool | keynav_failed (DirectionType direction) |
| This function should be called whenever keyboard navigation within a single widget hits a boundary. | |
| Glib::ListHandle<const Widget*> | list_mnemonic_labels () const |
| Return value: the list of mnemonic labels; free this list. | |
| Glib::ListHandle<Widget*> | list_mnemonic_labels () |
| Return value: the list of mnemonic labels; free this list. | |
| void | map () |
| This function is only for use in widget implementations. | |
| bool | mnemonic_activate (bool group_cycling) |
| Emits the Gtk::Widget::mnemonic-activate signal. | |
| void | modify_base (StateType state, const Gdk::Color& color) |
| Sets the base color for a widget in a particular state. | |
| void | modify_bg (StateType state, const Gdk::Color& color) |
| Sets the background color for a widget in a particular state. | |
| void | modify_bg_pixmap (StateType state, const Glib::ustring& pixmap_name) |
| void | modify_cursor (const Gdk::Color& primary, const Gdk::Color& secondary) |
| Sets the cursor color to use in a widget, overriding the cursor_color and secondary_cursor_color style properties. | |
| void | modify_fg (StateType state, const Gdk::Color& color) |
| Sets the foreground color for a widget in a particular state. | |
| void | modify_font (const Pango::FontDescription& font_desc) |
| Sets the font to use for a widget. | |
| void | modify_style (const Glib::RefPtr<RcStyle>& style) |
| Modifies style values on the widget. | |
| void | modify_text (StateType state, const Gdk::Color& color) |
| Sets the text color for a widget in a particular state. | |
| bool | parent_sensitive () const |
| void | path (Glib::ustring& path, Glib::ustring& path_reversed) |
| Compute a widget's path of the form "GtkWindow.MyLabel". | |
| Glib::PropertyProxy_ReadOnly <bool> | property_app_paintable () const |
| Whether the application will paint directly on the widget. | |
| Glib::PropertyProxy<bool> | property_app_paintable () |
| Whether the application will paint directly on the widget. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_can_default () const |
| Whether the widget can be the default widget. | |
| Glib::PropertyProxy<bool> | property_can_default () |
| Whether the widget can be the default widget. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_can_focus () const |
| Whether the widget can accept the input focus. | |
| Glib::PropertyProxy<bool> | property_can_focus () |
| Whether the widget can accept the input focus. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_composite_child () const |
| Whether the widget is part of a composite widget. | |
| Glib::PropertyProxy_ReadOnly <Gdk::EventMask> | property_events () const |
| The event mask that decides what kind of GdkEvents this widget gets. | |
| Glib::PropertyProxy <Gdk::EventMask> | property_events () |
| The event mask that decides what kind of GdkEvents this widget gets. | |
| Glib::PropertyProxy_ReadOnly <Gdk::ExtensionMode> | property_extension_events () const |
| The mask that decides what kind of extension events this widget gets. | |
| Glib::PropertyProxy <Gdk::ExtensionMode> | property_extension_events () |
| The mask that decides what kind of extension events this widget gets. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_has_default () const |
| Whether the widget is the default widget. | |
| Glib::PropertyProxy<bool> | property_has_default () |
| Whether the widget is the default widget. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_has_focus () const |
| Whether the widget has the input focus. | |
| Glib::PropertyProxy<bool> | property_has_focus () |
| Whether the widget has the input focus. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_has_tooltip () const |
| Whether this widget has a tooltip. | |
| Glib::PropertyProxy<bool> | property_has_tooltip () |
| Whether this widget has a tooltip. | |
| Glib::PropertyProxy_ReadOnly<int> | property_height_request () const |
| Override for height request of the widget. | |
| Glib::PropertyProxy<int> | property_height_request () |
| Override for height request of the widget. | |
| Glib::PropertyProxy_ReadOnly <Glib::ustring> | property_name () const |
| The name of the widget. | |
| Glib::PropertyProxy <Glib::ustring> | property_name () |
| The name of the widget. | |
| Glib::PropertyProxy_ReadOnly <Container*> | property_parent () const |
| The parent widget of this widget. | |
| Glib::PropertyProxy<Container*> | property_parent () |
| The parent widget of this widget. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_receives_default () const |
| If TRUE. | |
| Glib::PropertyProxy<bool> | property_receives_default () |
| If TRUE. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_sensitive () const |
| Whether the widget responds to input. | |
| Glib::PropertyProxy<bool> | property_sensitive () |
| Whether the widget responds to input. | |
| Glib::PropertyProxy_ReadOnly <Glib::RefPtr<Style>> | property_style () const |
| The style of the widget. | |
| Glib::PropertyProxy <Glib::RefPtr<Style>> | property_style () |
| The style of the widget. | |
| Glib::PropertyProxy_ReadOnly <Glib::ustring> | property_tooltip_markup () const |
| The contents of the tooltip for this widget. | |
| Glib::PropertyProxy <Glib::ustring> | property_tooltip_markup () |
| The contents of the tooltip for this widget. | |
| Glib::PropertyProxy_ReadOnly <Glib::ustring> | property_tooltip_text () const |
| The contents of the tooltip for this widget. | |
| Glib::PropertyProxy <Glib::ustring> | property_tooltip_text () |
| The contents of the tooltip for this widget. | |
| Glib::PropertyProxy_ReadOnly <bool> | property_visible () const |
| Whether the widget is visible. | |
| Glib::PropertyProxy<bool> | property_visible () |
| Whether the widget is visible. | |
| Glib::PropertyProxy_ReadOnly<int> | property_width_request () const |
| Override for width request of the widget. | |
| Glib::PropertyProxy<int> | property_width_request () |
| Override for width request of the widget. | |
| Glib::PropertyProxy_ReadOnly <Glib::RefPtr<Gdk::Window>> | property_window () const |
| The widget's window if it is realized. | |
| void | queue_draw () |
| Equivalent to calling queue_draw_area() for the entire area of a widget. | |
| void | queue_draw_area (int x, int y, int width, int height) |
| Invalidates the rectangular area of widget defined by x, y, width and height by calling gdk_window_invalidate_rect() on the widget's window and all its child windows. | |
| void | queue_resize () |
| This function is only for use in widget implementations. | |
| void | queue_resize_no_redraw () |
| This function works like queue_resize(), except that the widget is not invalidated. | |
| bool | rc_style () const |
| bool | receives_default () const |
| Gdk::Region | region_intersect (const Gdk::Region& region) const |
| Computes the intersection of a widget's area and region, returning the intersection. | |
| bool | remove_accelerator (const Glib::RefPtr<AccelGroup>& accel_group, guint accel_key, Gdk::ModifierType accel_mods) |
| Removes an accelerator from widget, previously installed with add_accelerator(). | |
| void | remove_mnemonic_label (Widget& label) |
| Removes a widget from the list of mnemonic labels for this widget. | |
| void | remove_modal_grab () |
| Remove the modal grab of the widget in case it was previously grabbed. | |
| Glib::RefPtr<Gdk::Pixbuf> | render_icon (const StockID& stock_id, IconSize size, const Glib::ustring& detail=Glib::ustring()) |
| A convenience function that uses the theme engine and RC file settings for the widget to look up stock_id and render it to a pixbuf. | |
| void | reparent (Widget& new_parent) |
| Moves a widget from one Gtk::Container to another, handling reference count issues to avoid destroying the widget. | |
| void | reset_rc_styles () |
| void | reset_shapes () |
| Recursively resets the shape on this widget and its descendants. | |
| int | send_expose (GdkEvent* event) |
| Very rarely-used function. | |
| bool | sensitive () const |
| void | set_accel_path (const Glib::ustring& accel_path, const Glib::RefPtr<AccelGroup>& accel_group) |
| Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated. | |
| void | set_app_paintable (bool app_paintable=true) |
| Sets whether the application intends to draw on the widget in an Gtk::Widget::expose-event handler. | |
| void | set_child_visible (bool is_visible=true) |
| Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with show(). | |
| void | set_colormap (const Glib::RefPtr<const Gdk::Colormap>& colormap) |
| Sets the colormap for the widget to the given value. | |
| void | set_composite_name (const Glib::ustring& name) |
| Sets a widgets composite name. | |
| void | set_direction (TextDirection dir) |
| Sets the reading direction on a particular widget. | |
| void | set_double_buffered (bool double_buffered=true) |
| Widgets are double buffered by default; you can use this function to turn off the buffering. | |
| void | set_events (Gdk::EventMask events) |
| Sets the event mask (see Gdk::EventMask) for a widget. | |
| void | set_extension_events (Gdk::ExtensionMode mode) |
| Sets the extension events mask to mode. | |
| void | set_flags (WidgetFlags flags) |
| void | set_has_tooltip (bool has_tooltip=TRUE) |
| Sets the has-tooltip property on widget to has_tooltip. | |
| void | set_name (const Glib::ustring& name) |
| Widgets can be named, which allows you to refer to them from a gtkrc file. | |
| void | set_no_show_all (bool no_show_all=true) |
| Sets the Gtk::Widget:no-show-all property, which determines whether calls to show_all() and hide_all() will affect this widget. | |
| void | set_parent (Widget& parent) |
| This function is useful only when implementing subclasses of Gtk::Container. | |
| void | set_parent_window (const Glib::RefPtr<const Gdk::Window>& parent_window) |
| Sets a non default parent window for widget. | |
| void | set_redraw_on_allocate (bool redraw_on_allocate=true) |
| Sets whether the entire widget is queued for drawing when its size allocation changes. | |
| bool | set_scroll_adjustments (Adjustment& hadjustment, Adjustment& vadjustment) |
For widgets that support scrolling, sets the scroll adjustments and Return value: true if the widget supports scrolling. | |
| void | set_sensitive (bool sensitive=true) |
| Sets the sensitivity of a widget. | |
| void | set_size_request (int width=-1, int height=-1) |
| Sets the minimum size of a widget; that is, the widget's size request will be width by height. | |
| void | set_state (Gtk::StateType state) |
| This function is for use in widget implementations. | |
| void | set_style (const Glib::RefPtr<Style>& style) |
| Sets the Gtk::Style for a widget ( widget->style). | |
| void | set_tooltip_markup (const Glib::ustring& markup) |
| Sets markup as the contents of the tooltip, which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>. | |
| void | set_tooltip_text (const Glib::ustring& text) |
| Sets text as the contents of the tooltip. | |
| void | set_tooltip_window (Window& widget) |
| Replaces the default, usually yellow, window used for displaying tooltips with custom_window. | |
| void | shape_combine_mask (const Glib::RefPtr<const Gdk::Bitmap>& shape_mask, int offset_x, int offset_y) |
| Sets a shape for this widget's GDK window. | |
| void | show () |
| Flags a widget to be displayed. | |
| void | show_all () |
| Recursively shows a widget, and any child widgets (if the widget is a container). | |
| void | show_now () |
| Shows a widget. | |
| Glib::SignalProxy1< bool, GdkEventButton* > | signal_button_press_event () |
| Glib::SignalProxy1< bool, GdkEventButton* > | signal_button_release_event () |
| Glib::SignalProxy1< void, GParamSpec* > | signal_child_notify () |
| The child-notify signal is emitted for each child property that has changed on an object. | |
| Glib::SignalProxy1< bool, GdkEventClient* > | signal_client_event () |
| Glib::SignalProxy0<void> | signal_composited_changed () |
| Glib::SignalProxy1< bool, GdkEventConfigure* > | signal_configure_event () |
| Glib::SignalProxy1< bool, GdkEventExpose* > | signal_damage_event () |
| Glib::SignalProxy1< bool, GdkEventAny* > | signal_delete_event () |
| The delete_event signal is emitted if a user requests that a toplevel window is closed. | |
| Glib::SignalProxy1< void, TextDirection > | signal_direction_changed () |
| Glib::SignalProxy1< void, const Glib::RefPtr <Gdk::DragContext >&> | signal_drag_begin () |
| The drag_begin signal is emitted on the drag source when a drag is started. | |
| Glib::SignalProxy1< void, const Glib::RefPtr <Gdk::DragContext >&> | signal_drag_data_delete () |
| The drag_data_delete signal is emitted on the drag source when a drag with the action Gdk::ACTION_MOVE is successfully completed. | |
| Glib::SignalProxy4< void, const Glib::RefPtr <Gdk::DragContext> &, SelectionData&, guint, guint > | signal_drag_data_get () |
| The drag_data_get signal is emitted on the drag source when the drop site requests the data which is dragged. | |
| Glib::SignalProxy6< void, const Glib::RefPtr <Gdk::DragContext>&, int, int, const SelectionData &, guint, guint > | signal_drag_data_received () |
| The drag_data_received signal is emitted on the drop site when the dragged data has been received. | |
| Glib::SignalProxy4< bool, const Glib::RefPtr <Gdk::DragContext>&, int, int, guint > | signal_drag_drop () |
| The drag_drop signal is emitted on the drop site when the user drops the data onto the widget. | |
| Glib::SignalProxy1< void, const Glib::RefPtr <Gdk::DragContext >&> | signal_drag_end () |
| The drag_end signal is emitted on the drag source when a drag is finished. | |
| Glib::SignalProxy2< bool, const Glib::RefPtr <Gdk::DragContext> &, DragResult > | signal_drag_failed () |
| Glib::SignalProxy2< void, const Glib::RefPtr <Gdk::DragContext >&, guint> | signal_drag_leave () |
| The drag_leave signal is emitted on the drop site when the cursor leaves the widget. | |
| Glib::SignalProxy4< bool, const Glib::RefPtr <Gdk::DragContext>&, int, int, guint > | signal_drag_motion () |
| The drag_motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. | |
| Glib::SignalProxy1< bool, GdkEventCrossing* > | signal_enter_notify_event () |
| Glib::SignalProxy1< bool, GdkEvent* > | signal_event () |
| Glib::SignalProxy1< void, GdkEvent* > | signal_event_after () |
| Glib::SignalProxy1< bool, GdkEventExpose* > | signal_expose_event () |
| Glib::SignalProxy1< bool, DirectionType > | signal_focus () |
| Glib::SignalProxy1< bool, GdkEventFocus* > | signal_focus_in_event () |
| Glib::SignalProxy1< bool, GdkEventFocus* > | signal_focus_out_event () |
| Glib::SignalProxy0 <Glib::RefPtr<Atk::Object>> | signal_get_accessible () |
| Glib::SignalProxy1< bool, GdkEventGrabBroken* > | signal_grab_broken_event () |
| Glib::SignalProxy0<void> | signal_grab_focus () |
| Glib::SignalProxy1<void, bool> | signal_grab_notify () |
| Glib::SignalProxy0<void> | signal_hide () |
| Glib::SignalProxy1< void, Widget* > | signal_hierarchy_changed () |
| Glib::SignalProxy1< bool, GdkEventKey* > | signal_key_press_event () |
| Glib::SignalProxy1< bool, GdkEventKey* > | signal_key_release_event () |
| Glib::SignalProxy1< bool, GdkEventCrossing* > | signal_leave_notify_event () |
| Glib::SignalProxy0<void> | signal_map () |
| Glib::SignalProxy1< bool, GdkEventAny* > | signal_map_event () |
| Glib::SignalProxy1<bool, bool> | signal_mnemonic_activate () |
| Glib::SignalProxy1< bool, GdkEventMotion* > | signal_motion_notify_event () |
| Glib::SignalProxy1< bool, GdkEventAny* > | signal_no_expose_event () |
| Glib::SignalProxy1< void, Widget* > | signal_parent_changed () |
| Glib::SignalProxy0<bool> | signal_popup_menu () |
| Glib::SignalProxy1< bool, GdkEventProperty* > | signal_property_notify_event () |
| Glib::SignalProxy1< bool, GdkEventProximity* > | signal_proximity_in_event () |
| Glib::SignalProxy1< bool, GdkEventProximity* > | signal_proximity_out_event () |
| Glib::SignalProxy4< bool, int, int, bool, const Glib::RefPtr <Tooltip >&> | signal_query_tooltip () |
| Glib::SignalProxy0<void> | signal_realize () |
| Glib::SignalProxy1< void, const Glib::RefPtr <Gdk::Screen >&> | signal_screen_changed () |
| Glib::SignalProxy1< bool, GdkEventScroll* > | signal_scroll_event () |
| Glib::SignalProxy1< bool, GdkEventSelection* > | signal_selection_clear_event () |
| Glib::SignalProxy3< void, SelectionData&, guint, guint > | signal_selection_get () |
| Glib::SignalProxy1< bool, GdkEventSelection* > | signal_selection_notify_event () |
| Glib::SignalProxy2< void, const SelectionData&, guint > | signal_selection_received () |
| Glib::SignalProxy1< bool, GdkEventSelection* > | signal_selection_request_event () |
| Glib::SignalProxy0<void> | signal_show () |
| Glib::SignalProxy1< void, Allocation& > | signal_size_allocate () |
| Glib::SignalProxy1< void, Requisition* > | signal_size_request () |
| Glib::SignalProxy1< void, Gtk::StateType > | signal_state_changed () |
| Glib::SignalProxy1< void, const Glib::RefPtr<Gtk::Style >&> | signal_style_changed () |
| The style-set signal is emitted when a new style has been set on a widget. | |
| Glib::SignalProxy0<void> | signal_unmap () |
| Glib::SignalProxy1< bool, GdkEventAny* > | signal_unmap_event () |
| Glib::SignalProxy0<void> | signal_unrealize () |
| Glib::SignalProxy1< bool, GdkEventVisibility* > | signal_visibility_notify_event () |
| Glib::SignalProxy1< bool, GdkEventWindowState* > | signal_window_state_event () |
| void | size_allocate (const Allocation& allocation) |
| This function is only used by Gtk::Container subclasses, to assign a size and position to their child widgets. | |
| void | size_request (const Requisition& requisition) |
| This function is typically used when implementing a Gtk::Container subclass. | |
| Requisition | size_request () const |
| This function is typically used when implementing a Gtk::Container subclass. | |
| void | thaw_child_notify () |
| Reverts the effect of a previous call to freeze_child_notify(). | |
| bool | translate_coordinates (Widget& dest_widget, int src_x, int src_y, int& dest_x, int& dest_y) |
| Translate coordinates relative to src_widget's allocation to coordinates relative to dest_widget's allocations. | |
| void | trigger_tooltip_query () |
| Triggers a tooltip query on the display where the toplevel of widget is located. | |
| void | unmap () |
| This function is only for use in widget implementations. | |
| void | unparent () |
| This function is only for use in widget implementations. | |
| void | unset_base (StateType state) |
| Undo the effect of previous calls to modify_base() for a particular state. | |
| void | unset_bg (StateType state) |
| Undo the effect of previous calls to modify_bg() for a particular state. | |
| void | unset_composite_name () |
| void | unset_cursor () |
| See modify_cursor(). | |
| void | unset_fg (StateType state) |
| Undo the effect of previous calls to modify_fg() for a particular state. | |
| void | unset_flags (WidgetFlags flags) |
| void | unset_font () |
| Undo the effect of previous calls to modify_font() for a particular state. | |
| void | unset_input_shape_combine_mask () |
| void | unset_name () |
| void | unset_shape_combine_mask () |
| void | unset_style () |
| void | unset_text (StateType state) |
| Undo the effect of previous calls to modify_text() for a particular state. | |
| virtual | ~Widget () |
Static Public Member Functions | |
| static Widget* | drag_get_source_widget (const Glib::RefPtr<Gdk::DragContext>& context) |
| static Widget* | get_current_modal_grab () |
| Retrieve the widget which is currently grabbing all events. | |
| static Glib::RefPtr <Gdk::Colormap> | get_default_colormap () |
| Obtains the default colormap used to create widgets. | |
| static TextDirection | get_default_direction () |
| Obtains the current default reading direction. | |
| static Glib::RefPtr<Style> | get_default_style () |
| Returns: the default style. | |
| static Glib::RefPtr<Gdk::Visual> | get_default_visual () |
| Obtains the visual of the default colormap. | |
| static void | pop_colormap () |
| Removes a colormap pushed with push_colormap(). | |
| static void | pop_composite_child () |
| Cancels the effect of a previous call to push_composite_child(). | |
| static void | push_colormap (const Glib::RefPtr<const Gdk::Colormap>& cmap) |
| Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets. | |
| static void | push_composite_child () |
| Makes all newly-created widgets as composite children until the corresponding pop_composite_child() call. | |
| static void | set_default_colormap (const Glib::RefPtr<const Gdk::Colormap>& colormap) |
| Sets the default colormap to use when creating widgets. | |
| static void | set_default_direction (TextDirection dir) |
| Sets the default reading direction for widgets where the direction has not been explicitly set by set_direction(). | |
Protected Member Functions | |
| virtual void | dispatch_child_properties_changed_vfunc (guint p1, GParamSpec** p2) |
| virtual Glib::RefPtr<Atk::Object> | get_accessible_vfunc () |
| void | get_child_requisition (Requisition& requisition) const |
| This function is only for use in widget implementations. | |
| void | get_style_property_value (const Glib::ustring& the_property_name, Glib::ValueBase& value) const |
| Gets the value of a style property of widget. | |
| virtual void | hide_all_vfunc () |
| virtual bool | on_button_press_event (GdkEventButton* event) |
| virtual bool | on_button_release_event (GdkEventButton* event) |
| virtual void | on_child_notify (GParamSpec* pspec) |
| virtual bool | on_client_event (GdkEventClient* event) |
| virtual bool | on_configure_event (GdkEventConfigure* event) |
| virtual bool | on_delete_event (GdkEventAny* event) |
| virtual void | on_direction_changed (TextDirection direction) |
| virtual void | on_drag_begin (const Glib::RefPtr<Gdk::DragContext>& context) |
| virtual void | on_drag_data_delete (const Glib::RefPtr<Gdk::DragContext>& context) |
| virtual void | on_drag_data_get (const Glib::RefPtr<Gdk::DragContext>& context, SelectionData& selection_data, guint info, guint time) |
| virtual void | on_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const SelectionData& selection_data, guint info, guint time) |
| virtual bool | on_drag_drop (const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) |
| virtual void | on_drag_end (const Glib::RefPtr<Gdk::DragContext>& context) |
| virtual void | on_drag_leave (const Glib::RefPtr<Gdk::DragContext>& context, guint time) |
| virtual bool | on_drag_motion (const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) |
| virtual bool | on_enter_notify_event (GdkEventCrossing* event) |
| virtual bool | on_event (GdkEvent* event) |
| virtual bool | on_expose_event (GdkEventExpose* event) |
| virtual bool | on_focus (DirectionType direction) |
| virtual bool | on_focus_in_event (GdkEventFocus* event) |
| virtual bool | on_focus_out_event (GdkEventFocus* event) |
| virtual Glib::RefPtr<Atk::Object> | on_get_accessible () |
| virtual void | on_grab_focus () |
| virtual void | on_grab_notify (bool was_grabbed) |
| virtual void | on_hide () |
| virtual void | on_hierarchy_changed (Widget* previous_toplevel) |
| virtual bool | on_key_press_event (GdkEventKey* event) |
| virtual bool | on_key_release_event (GdkEventKey* event) |
| virtual bool | on_leave_notify_event (GdkEventCrossing* event) |
| virtual void | on_map () |
| virtual bool | on_map_event (GdkEventAny* event) |
| virtual bool | on_mnemonic_activate (bool group_cycling) |
| virtual bool | on_motion_notify_event (GdkEventMotion* event) |
| virtual bool | on_no_expose_event (GdkEventAny* event) |
| virtual void | on_parent_changed (Widget* previous_parent) |
| virtual bool | on_property_notify_event (GdkEventProperty* event) |
| virtual bool | on_proximity_in_event (GdkEventProximity* event) |
| virtual bool | on_proximity_out_event (GdkEventProximity* event) |
| virtual void | on_realize () |
| virtual void | on_screen_changed (const Glib::RefPtr<Gdk::Screen>& previous_screen) |
| virtual bool | on_scroll_event (GdkEventScroll* event) |
| virtual bool | on_selection_clear_event (GdkEventSelection* event) |
| virtual void | on_selection_get (SelectionData& selection_data, guint info, guint time) |
| virtual bool | on_selection_notify_event (GdkEventSelection* event) |
| virtual void | on_selection_received (const SelectionData& selection_data, guint time) |
| virtual bool | on_selection_request_event (GdkEventSelection* event) |
| virtual void | on_show () |
| virtual void | on_size_allocate (Allocation& allocation) |
| virtual void | on_size_request (Requisition* requisition) |
| virtual void | on_state_changed (Gtk::StateType previous_state) |
| virtual void | on_style_changed (const Glib::RefPtr<Gtk::Style>& previous_style) |
| virtual void | on_unmap () |
| virtual bool | on_unmap_event (GdkEventAny* event) |
| virtual void | on_unrealize () |
| virtual bool | on_visibility_notify_event (GdkEventVisibility* event) |
| virtual bool | on_window_state_event (GdkEventWindowState* event) |
| void | realize () |
| Creates the GDK (windowing system) resources associated with a widget. | |
| void | realize_if_needed () |
| void | set_allocation (const Allocation& value) |
| void | set_window (const Glib::RefPtr<Gdk::Window>& value) |
| virtual void | show_all_vfunc () |
| void | unrealize () |
| This function is only useful in widget implementations. | |
| Widget () | |
Friends | |
| class | Main |
Related Functions | |
| (Note that these are not member functions.) | |
| Gtk::Widget* | wrap (GtkWidget* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Constructor & Destructor Documentation
| virtual Gtk::Widget::~Widget | ( | ) | [virtual] |
| Gtk::Widget::Widget | ( | ) | [protected] |
Member Function Documentation
| bool Gtk::Widget::activate | ( | ) |
For widgets that can be "activated" (buttons, menu items, etc.
) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If widget isn't activatable, the function returns false.
- Returns:
trueif the widget was activatable.
Reimplemented in Gtk::MenuItem.
| void Gtk::Widget::add_accelerator | ( | const Glib::ustring & | accel_signal, | |
| const Glib::RefPtr<AccelGroup>& | accel_group, | |||
| guint | accel_key, | |||
| Gdk::ModifierType | accel_mods, | |||
| AccelFlags | accel_flags | |||
| ) |
Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated.
The accel_group needs to be added to the widget's toplevel via Gtk::Window::add_accel_group(), and the signal must be of type RUN_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and set_accel_path() or Gtk::MenuItem::set_accel_path() instead.
- Parameters:
-
accel_signal Widget signal to emit on accelerator activation. accel_group Accel group for this widget, added to its toplevel. accel_key GDK keyval of the accelerator. accel_mods Modifier key combination of the accelerator. accel_flags Flag accelerators, e.g. Gtk::ACCEL_VISIBLE.
| void Gtk::Widget::add_events | ( | Gdk::EventMask | events | ) |
Adds the events in the bitfield events to the event mask for widget.
See set_events() for details.
- Parameters:
-
events An event mask, see Gdk::EventMask.
| void Gtk::Widget::add_mnemonic_label | ( | Widget& | label | ) |
Adds a widget to the list of mnemonic labels for this widget.
(See list_mnemonic_labels()). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well.
- Parameters:
-
label A Gtk::Widget that acts as a mnemonic label for widget.
| void Gtk::Widget::add_modal_grab | ( | ) |
Block events to everything else than this widget and its children.
This way you can get modal behaviour (usually not recommended). One practical example could be when implementing a key-binding widget that needs exclusive access to the key combination that the user presses next.
Calls to add_modal_grab should be paired with calls to remove_modal_grab.
| bool Gtk::Widget::app_paintable | ( | ) | const |
| bool Gtk::Widget::can_default | ( | ) | const |
| bool Gtk::Widget::can_focus | ( | ) | const |
| bool Gtk::Widget::child_focus | ( | DirectionType | direction | ) |
This function is used by custom widget implementations; if you're writing an app, you'd use grab_focus() to move the focus to a particular widget, and Gtk::Container::set_focus_chain() to change the focus tab order.
So you may want to investigate those functions instead.
child_focus() is called by containers as the user moves around the window using keyboard shortcuts. direction indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). child_focus() emits the Gtk::Widget::focus" signal; widgets override the default handler for this signal in order to implement appropriate focus behavior.
The default focus handler for a widget should return true if moving in direction left the focus on a focusable location inside that widget, and false if moving in direction moved the focus outside the widget. If returning true, widgets normally call grab_focus() to place the focus accordingly; if returning false, they don't modify the current focus location.
This function replaces gtk_container_focus() from GTK+ 1.2. It was necessary to check that the child was visible, sensitive, and focusable before calling gtk_container_focus(). child_focus() returns false if the widget is not currently in a focusable state, so there's no need for those checks.
- Parameters:
-
direction Direction of focus movement.
- Returns:
trueif focus ended up inside widget.
| void Gtk::Widget::child_notify | ( | const Glib::ustring & | child_property | ) |
Emits a Gtk::Widget::child-notify signal for the <link linkend="child-properties">child property</link> child_property on widget.
This is the analogue of Glib::object_notify() for child properties.
- Parameters:
-
child_property The name of a child property installed on the class of widget's parent.
| void Gtk::Widget::class_path | ( | Glib::ustring & | path, | |
| Glib::ustring & | path_reversed | |||
| ) |
| Glib::RefPtr<Pango::Context> Gtk::Widget::create_pango_context | ( | ) |
Creates a new Pango::Context with the appropriate font map, font description, and base direction for drawing text for this widget.
See also get_pango_context().
- Returns:
- The new Pango::Context.
| Glib::RefPtr<Pango::Layout> Gtk::Widget::create_pango_layout | ( | const Glib::ustring & | text | ) |
Creates a new Pango::Layout with the appropriate font map, font description, and base direction for drawing text for this widget.
If you keep a Pango::Layout created in this way around, in order to notify the layout of changes to the base direction or font of this widget, you must call pango_layout_context_changed() in response to the Gtk::Widget::style-set and Gtk::Widget::direction-changed signals for the widget.
- Parameters:
-
text Text to set on the layout (can be 0).
- Returns:
- The new Pango::Layout.
| virtual void Gtk::Widget::dispatch_child_properties_changed_vfunc | ( | guint | p1, | |
| GParamSpec ** | p2 | |||
| ) | [protected, virtual] |
| bool Gtk::Widget::double_buffered | ( | ) | const |
| Glib::RefPtr<Gdk::DragContext> Gtk::Widget::drag_begin | ( | const Glib::RefPtr<TargetList>& | targets, | |
| Gdk::DragAction | actions, | |||
| int | button, | |||
| GdkEvent * | event | |||
| ) |
Initiates a drag on the source side.
The function only needs to be used when the application is starting drags itself, and is not needed when gtk_drag_source_set() is used.
- Parameters:
-
targets The targets (data formats) in which the source can provide the data. actions A bitmask of the allowed drag actions for this drag. button The button the user clicked to start the drag. event The event that triggered the start of the drag.
- Returns:
- The context for this drag.
| bool Gtk::Widget::drag_check_threshold | ( | int | start_x, | |
| int | start_y, | |||
| int | current_x, | |||
| int | current_y | |||
| ) |
Checks to see if a mouse drag starting at ( start_x, start_y) and ending at ( current_x, current_y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation.
- Parameters:
-
start_x X coordinate of start of drag. start_y Y coordinate of start of drag. current_x Current X coordinate. current_y Current Y coordinate.
- Returns:
trueif the drag threshold has been passed.
| void Gtk::Widget::drag_dest_add_image_targets | ( | ) |
Add the image targets supported by Gtk::Selection to the target list of the drag destination.
The targets are added with info = 0. If you need another value, use gtk_target_list_add_image_targets() and gtk_drag_dest_set_target_list().
- Parameters:
-
widget A Gtk::Widget that's a drag destination.
| void Gtk::Widget::drag_dest_add_text_targets | ( | ) |
Add the text targets supported by Gtk::Selection to the target list of the drag destination.
The targets are added with info = 0. If you need another value, use gtk_target_list_add_text_targets() and gtk_drag_dest_set_target_list().
- Parameters:
-
widget A Gtk::Widget that's a drag destination.
| void Gtk::Widget::drag_dest_add_uri_targets | ( | ) |
Add the URI targets supported by Gtk::Selection to the target list of the drag destination.
The targets are added with info = 0. If you need another value, use gtk_target_list_add_uri_targets() and gtk_drag_dest_set_target_list().
- Parameters:
-
widget A Gtk::Widget that's a drag destination.
| Glib::ustring Gtk::Widget::drag_dest_find_target | ( | const Glib::RefPtr<Gdk::DragContext>& | context | ) | const |
| Glib::ustring Gtk::Widget::drag_dest_find_target | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| const Glib::RefPtr<TargetList>& | target_list | |||
| ) | const |
Looks for a match between context->targets and the dest_target_list, returning the first matching target, otherwise returning Gdk::NONE.
dest_target_list should usually be the return value from gtk_drag_dest_get_target_list(), but some widgets may have different valid targets for different parts of the widget; in that case, they will have to implement a drag_motion handler that passes the correct target list to this function.
- Parameters:
-
context Drag context. target_list List of droppable targets.
- Returns:
- First target that the source offers and the dest can accept, or Gdk::NONE.
| Glib::RefPtr<const TargetList> Gtk::Widget::drag_dest_get_target_list | ( | ) | const |
| Glib::RefPtr<TargetList> Gtk::Widget::drag_dest_get_target_list | ( | ) |
| void Gtk::Widget::drag_dest_set | ( | const ArrayHandle_TargetEntry & | targets, | |
| DestDefaults | flags = DEST_DEFAULT_ALL, |
|||
| Gdk::DragAction | actions = Gdk::ACTION_COPY | |||
| ) |
| void Gtk::Widget::drag_dest_set | ( | DestDefaults | flags = DestDefaults(0), |
|
| Gdk::DragAction | actions = Gdk::DragAction(0) | |||
| ) |
| void Gtk::Widget::drag_dest_set_proxy | ( | const Glib::RefPtr<Gdk::Window>& | proxy_window, | |
| Gdk::DragProtocol | protocol, | |||
| bool | use_coordinates | |||
| ) |
| void Gtk::Widget::drag_dest_set_target_list | ( | const Glib::RefPtr<TargetList>& | target_list | ) |
Sets the target types that this widget can accept from drag-and-drop.
The widget must first be made into a drag destination with gtk_drag_dest_set().
- Parameters:
-
target_list List of droppable targets, or 0for none.
| void Gtk::Widget::drag_dest_unset | ( | ) |
| void Gtk::Widget::drag_get_data | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| const Glib::ustring & | target, | |||
| guint32 | time | |||
| ) |
| void Gtk::Widget::drag_get_data | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| Glib::ustring & | target, | |||
| guint32 | time | |||
| ) |
| static Widget* Gtk::Widget::drag_get_source_widget | ( | const Glib::RefPtr<Gdk::DragContext>& | context | ) | [static] |
| void Gtk::Widget::drag_highlight | ( | ) |
| void Gtk::Widget::drag_set_as_icon | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| int | hot_x, | |||
| int | hot_y | |||
| ) |
| void Gtk::Widget::drag_source_add_image_targets | ( | ) |
Add the writable image targets supported by Gtk::Selection to the target list of the drag source.
The targets are added with info = 0. If you need another value, use gtk_target_list_add_image_targets() and gtk_drag_source_set_target_list().
- Parameters:
-
widget A Gtk::Widget that's is a drag source.
| void Gtk::Widget::drag_source_add_text_targets | ( | ) |
Add the text targets supported by Gtk::Selection to the target list of the drag source.
The targets are added with info = 0. If you need another value, use gtk_target_list_add_text_targets() and gtk_drag_source_set_target_list().
- Parameters:
-
widget A Gtk::Widget that's is a drag source.
| void Gtk::Widget::drag_source_add_uri_targets | ( | ) |
Add the URI targets supported by Gtk::Selection to the target list of the drag source.
The targets are added with info = 0. If you need another value, use gtk_target_list_add_uri_targets() and gtk_drag_source_set_target_list().
- Parameters:
-
widget A Gtk::Widget that's is a drag source.
| void Gtk::Widget::drag_source_set | ( | const ArrayHandle_TargetEntry & | targets, | |
| Gdk::ModifierType | start_button_mask = Gdk::MODIFIER_MASK, |
|||
| Gdk::DragAction | actions = Gdk::ACTION_COPY | |||
| ) |
| void Gtk::Widget::drag_source_set_icon | ( | const Glib::ustring & | icon_name | ) |
Sets the icon that will be used for drags from a particular source to a themed icon.
See the docs for Gtk::IconTheme for more details.
- Parameters:
-
widget A Gtk::Widget. icon_name Name of icon to use.
| void Gtk::Widget::drag_source_set_icon | ( | const StockID& | stock_id | ) |
Sets the icon that will be used for drags from a particular source to a stock icon.
- Parameters:
-
stock_id The ID of the stock icon to use.
| void Gtk::Widget::drag_source_set_icon | ( | const Glib::RefPtr<Gdk::Pixbuf>& | pixbuf | ) |
Sets the icon that will be used for drags from a particular widget from a Gdk::Pixbuf.
GTK+ retains a reference for pixbuf and will release it when it is no longer needed.
- Parameters:
-
pixbuf The Gdk::Pixbuf for the drag icon.
| void Gtk::Widget::drag_source_set_icon | ( | const Glib::RefPtr<Gdk::Colormap>& | colormap, | |
| const Glib::RefPtr<Gdk::Pixmap>& | pixmap, | |||
| const Glib::RefPtr<Gdk::Bitmap>& | mask | |||
| ) |
Sets the icon that will be used for drags from a particular widget from a pixmap/mask.
GTK+ retains references for the arguments, and will release them when they are no longer needed. Use gtk_drag_source_set_icon_pixbuf() instead.
- Parameters:
-
colormap The colormap of the icon. pixmap The image data for the icon. mask The transparency mask for an image.
| void Gtk::Widget::drag_source_unset | ( | ) |
| void Gtk::Widget::drag_unhighlight | ( | ) |
| void Gtk::Widget::draw_insertion_cursor | ( | Glib::RefPtr<Gdk::Drawable> | drawable, | |
| const Gdk::Rectangle& | area, | |||
| const Gdk::Rectangle& | location, | |||
| bool | is_primary, | |||
| TextDirection | direction, | |||
| bool | draw_arrow = true | |||
| ) |
| void Gtk::Widget::ensure_style | ( | ) |
Ensures that widget has a style ( widget->style).
Not a very useful function; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.
| void Gtk::Widget::error_bell | ( | ) |
Notifies the user about an input-related error on this widget.
If the Gtk::Settings gtk-error-bell proeprty is true, it calls Gdk::Window::beep(), otherwise it does nothing.
Note that the effect of Gdk::Window::beep() can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used.
| bool Gtk::Widget::event | ( | GdkEvent * | event | ) |
Rarely-used function.
This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don't use this function; instead, use gtk_main_do_event() so the event will behave as if it were in the event queue. Don't synthesize expose events; instead, use gdk_window_invalidate_rect() to invalidate a region of the window.
- Parameters:
-
event A Gdk::Event.
- Returns:
- Return from the event signal emission (
trueif the event was handled).
| void Gtk::Widget::freeze_child_notify | ( | ) |
Stops emission of Gtk::Widget::child-notify signals on widget.
The signals are queued until thaw_child_notify() is called on widget.
This is the analogue of Glib::object_freeze_notify() for child properties.
| Glib::RefPtr<Atk::Object> Gtk::Widget::get_accessible | ( | ) |
| virtual Glib::RefPtr<Atk::Object> Gtk::Widget::get_accessible_vfunc | ( | ) | [protected, virtual] |
| Glib::RefPtr<const Action> Gtk::Widget::get_action | ( | ) | const |
Returns: the action that a widget is a proxy for, or.
- Returns:
- The action that a widget is a proxy for, or
0, if it is not attached to an action.
| Glib::RefPtr<Action> Gtk::Widget::get_action | ( | ) |
Returns: the action that a widget is a proxy for, or.
- Returns:
- The action that a widget is a proxy for, or
0, if it is not attached to an action.
| Allocation Gtk::Widget::get_allocation | ( | ) | const |
| const Widget* Gtk::Widget::get_ancestor | ( | GType | widget_type | ) | const |
Gets the first ancestor of widget with type widget_type.
For example, <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</literal> gets the first Gtk::Box that's an ancestor of widget. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel Gtk::Window in the docs for get_toplevel().
Note that unlike is_ancestor(), get_ancestor() considers widget to be an ancestor of itself.
- Parameters:
-
widget_type Ancestor type.
- Returns:
- The ancestor widget, or
0if not found.
| Widget* Gtk::Widget::get_ancestor | ( | GType | widget_type | ) |
Gets the first ancestor of widget with type widget_type.
For example, <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</literal> gets the first Gtk::Box that's an ancestor of widget. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel Gtk::Window in the docs for get_toplevel().
Note that unlike is_ancestor(), get_ancestor() considers widget to be an ancestor of itself.
- Parameters:
-
widget_type Ancestor type.
- Returns:
- The ancestor widget, or
0if not found.
| void Gtk::Widget::get_child_requisition | ( | Requisition& | requisition | ) | const [protected] |
This 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_size_request()), 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" method on 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, that is, size_request() has been called since the last time a resize was queued. In general, only container implementations have this information; applications should use size_request().
- Parameters:
-
requisition A Gtk::Requisition to be filled in.
| bool Gtk::Widget::get_child_visible | ( | ) | const |
Gets the value set with set_child_visible().
If you feel a need to use this function, your code probably needs reorganization.
This function is only useful for container implementations and never should be called by an application.
- Returns:
trueif the widget is mapped with the parent.
| Glib::RefPtr<const Clipboard> Gtk::Widget::get_clipboard | ( | const Glib::ustring & | selection | ) | const |
Return value: the appropriate clipboard object.
If no
- Parameters:
-
selection A Gdk::Atom which identifies the clipboard to use. Gdk::SELECTION_CLIPBOARD gives the default clipboard. Another common value is Gdk::SELECTION_PRIMARY, which gives the primary X selection.
- Returns:
- The appropriate clipboard object. If no clipboard already exists, a new one will be created. Once a clipboard object has been created, it is persistent for all time.
| Glib::RefPtr<Clipboard> Gtk::Widget::get_clipboard | ( | const Glib::ustring & | selection | ) |
Return value: the appropriate clipboard object.
If no
- Parameters:
-
selection A Gdk::Atom which identifies the clipboard to use. Gdk::SELECTION_CLIPBOARD gives the default clipboard. Another common value is Gdk::SELECTION_PRIMARY, which gives the primary X selection.
- Returns:
- The appropriate clipboard object. If no clipboard already exists, a new one will be created. Once a clipboard object has been created, it is persistent for all time.
| Glib::RefPtr<Gdk::Colormap> Gtk::Widget::get_colormap | ( | ) |
Gets the colormap that will be used to render widget.
No reference will be added to the returned colormap; it should not be unreferenced.
- Returns:
- The colormap used by widget.
| Glib::ustring Gtk::Widget::get_composite_name | ( | ) | const |
Obtains the composite name of a widget.
- Returns:
- The composite name of widget, or an emoty string if widget is not a composite child.
| static Widget* Gtk::Widget::get_current_modal_grab | ( | ) | [static] |
Retrieve the widget which is currently grabbing all events.
| static Glib::RefPtr<Gdk::Colormap> Gtk::Widget::get_default_colormap | ( | ) | [static] |
Obtains the default colormap used to create widgets.
- Returns:
- Default widget colormap.
| static TextDirection Gtk::Widget::get_default_direction | ( | ) | [static] |
Obtains the current default reading direction.
- Returns:
- The current default direction.
| static Glib::RefPtr<Style> Gtk::Widget::get_default_style | ( | ) | [static] |
Returns: the default style.
This Gtk::Style object is owned
- Returns:
- The default style. This Gtk::Style object is owned by GTK+ and should not be modified or freed.
| static Glib::RefPtr<Gdk::Visual> Gtk::Widget::get_default_visual | ( | ) | [static] |
Obtains the visual of the default colormap.
Not really useful; used to be useful before gdk_colormap_get_visual() existed.
- Returns:
- Visual of the default colormap.
| TextDirection Gtk::Widget::get_direction | ( | ) | const |
Gets the reading direction for a particular widget.
See set_direction().
- Returns:
- The reading direction for the widget.
| TextDirection Gtk::Widget::get_direction | ( | ) |
Gets the reading direction for a particular widget.
See set_direction().
- Deprecated:
- Use the const version of this method.
- Returns:
- The reading direction for the widget.
| Glib::RefPtr<const Gdk::Display> Gtk::Widget::get_display | ( | ) | const |
Get the Gdk::Display for the toplevel window associated with this widget.
This function can only be called after the widget has been added to a widget hierarchy with a Gtk::Window at the top.
In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
- Returns:
- The Gdk::Display for the toplevel for this widget.
| Glib::RefPtr<Gdk::Display> Gtk::Widget::get_display | ( | ) |
Get the Gdk::Display for the toplevel window associated with this widget.
This function can only be called after the widget has been added to a widget hierarchy with a Gtk::Window at the top.
In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
- Returns:
- The Gdk::Display for the toplevel for this widget.
| Gdk::EventMask Gtk::Widget::get_events | ( | ) | const |
Return value: event mask for widget.
- Returns:
- Event mask for widget.
| Gdk::ExtensionMode Gtk::Widget::get_extension_events | ( | ) | const |
Retrieves the extension events the widget will receive; see gdk_input_set_extension_events().
- Returns:
- Extension events for widget.
| WidgetFlags Gtk::Widget::get_flags | ( | ) | const |
| bool Gtk::Widget::get_has_tooltip | ( | ) | const |
Return value: current value of has-tooltip on widget.
- Returns:
- Current value of has-tooltip on widget.
| int Gtk::Widget::get_height | ( | ) | const |
| Glib::RefPtr<const RcStyle> Gtk::Widget::get_modifier_style | ( | ) | const |
Return value: the modifier style for the widget.
This rc style is
- Returns:
- The modifier style for the widget. This rc style is owned by the widget. If you want to keep a pointer to value this around, you must add a refcount using Glib::object_ref().
| Glib::RefPtr<RcStyle> Gtk::Widget::get_modifier_style | ( | ) |
Return value: the modifier style for the widget.
This rc style is
- Returns:
- The modifier style for the widget. This rc style is owned by the widget. If you want to keep a pointer to value this around, you must add a refcount using Glib::object_ref().
| Glib::ustring Gtk::Widget::get_name | ( | ) | const |
Retrieves the name of a widget.
See set_name() for the significance of widget names.
- Returns:
- Name of the widget. This string is owned by GTK+ and should not be modified or freed.
Reimplemented in Gtk::AboutDialog.
| bool Gtk::Widget::get_no_show_all | ( | ) | const |
Return value: the current value of the "no-show-all" property.
- Returns:
- The current value of the "no-show-all" property.
| Glib::RefPtr<Pango::Context> Gtk::Widget::get_pango_context | ( | ) |
Gets a Pango::Context with the appropriate font map, font description, and base direction for this widget.
Unlike the context returned by create_pango_context(), this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget's attributes.
If you create and keep a Pango::Layout using this context, you must deal with changes to the context by calling pango_layout_context_changed() on the layout in response to the Gtk::Widget::style-set and Gtk::Widget::direction-changed signals for the widget.
- Returns:
- The Pango::Context for the widget.
| const Container* Gtk::Widget::get_parent | ( | ) | const |
Return value: the parent container of widget, or 0.
- Returns:
- The parent container of widget, or
0.
| Container* Gtk::Widget::get_parent | ( | ) |
Return value: the parent container of widget, or 0.
- Returns:
- The parent container of widget, or
0.
| Glib::RefPtr<const Gdk::Window> Gtk::Widget::get_parent_window | ( | ) | const |
Gets widget's parent window.
- Returns:
- The parent window of widget.
| Glib::RefPtr<Gdk::Window> Gtk::Widget::get_parent_window | ( | ) |
Gets widget's parent window.
- Returns:
- The parent window of widget.
| void Gtk::Widget::get_pointer | ( | int & | x, | |
| int & | y | |||
| ) | const |
Obtains the location of the mouse pointer in widget coordinates.
Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that are not Gtk::NO_WINDOW widgets, and are relative to widget->allocation.x, widget->allocation.y for widgets that are Gtk::NO_WINDOW widgets.
- Parameters:
-
x Return location for the X coordinate, or 0.y Return location for the Y coordinate, or 0.
| Requisition Gtk::Widget::get_requisition | ( | ) | const |
| Glib::RefPtr<const Gdk::Window> Gtk::Widget::get_root_window | ( | ) | const |
Get the root window where this widget is located.
This function can only be called after the widget has been added to a widget hierarchy with Gtk::Window at the top.
The root window is useful for such purposes as creating a popup Gdk::Window associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
- Returns:
- The Gdk::Window root window for the toplevel for this widget.
| Glib::RefPtr<Gdk::Window> Gtk::Widget::get_root_window | ( | ) |
Get the root window where this widget is located.
This function can only be called after the widget has been added to a widget hierarchy with Gtk::Window at the top.
The root window is useful for such purposes as creating a popup Gdk::Window associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
- Returns:
- The Gdk::Window root window for the toplevel for this widget.
| Gtk::StateType Gtk::Widget::get_saved_state | ( | ) | const |
| Glib::RefPtr<const Gdk::Screen> Gtk::Widget::get_screen | ( | ) | const |
Get the Gdk::Screen from the toplevel window associated with this widget.
This function can only be called after the widget has been added to a widget hierarchy with a Gtk::Window at the top.
In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
- Returns:
- The Gdk::Screen for the toplevel for this widget.
Reimplemented in Gtk::Invisible, and Gtk::Window.
| Glib::RefPtr<Gdk::Screen> Gtk::Widget::get_screen | ( | ) |
Get the Gdk::Screen from the toplevel window associated with this widget.
This function can only be called after the widget has been added to a widget hierarchy with a Gtk::Window at the top.
In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
- Returns:
- The Gdk::Screen for the toplevel for this widget.
Reimplemented in Gtk::Invisible, and Gtk::Window.
| Glib::RefPtr<Settings> Gtk::Widget::get_settings | ( | ) |
Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget.
Note that this function can only be called when the Gtk::Widget is attached to a toplevel, since the settings object is specific to a particular Gdk::Screen.
- Returns:
- The relevant Gtk::Settings object.
Reimplemented in Gtk::PrintUnixDialog.
| void Gtk::Widget::get_size_request | ( | int & | width, | |
| int & | height | |||
| ) | const |
Gets the size request that was explicitly set for the widget using set_size_request().
A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used intead. See set_size_request(). To get the size a widget will actually use, call size_request() instead of this function.
- Parameters:
-
width Return location for width, or 0.height Return location for height, or 0.
| Glib::RefPtr<Gdk::Pixmap> Gtk::Widget::get_snapshot | ( | ) | const |
Create a Gdk::Pixmap of the contents of the widget and its children.
Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on the widget being snapshot and likely differs from those of a target widget displaying the pixmap. The function Gdk::Pixbuf::get_from_drawable() can be used to convert the pixmap to a visual independant representation.
The snapshot area used by this function is the widget's allocation plus any extra space occupied by additional windows belonging to this widget (such as the arrows of a spin button). Thus, the resulting snapshot pixmap is possibly larger than the allocation.
The returned pixmap can be empty.
- Returns:
- A Gdk::Pixmap snapshot of the widget
| Glib::RefPtr<Gdk::Pixmap> Gtk::Widget::get_snapshot | ( | Gdk::Rectangle& | clip_rect | ) | const |
Create a Gdk::Pixmap of the contents of the widget and its children.
Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on the widget being snapshot and likely differs from those of a target widget displaying the pixmap. The function gdk_pixbuf_get_from_drawable() can be used to convert the pixmap to a visual independant representation.
The snapshot area used by this function is the widget's allocation plus any extra space occupied by additional windows belonging to this widget (such as the arrows of a spin button). Thus, the resulting snapshot pixmap is possibly larger than the allocation.
The resulting pixmap is shrunken to match the specified clip_rect. The (x,y) coordinates of clip_rect are interpreted widget relative. If width or height of clip_rect are 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective amount. For instance a clip_rect <literal>{ +5, +5, -10, -10 }</literal> will chop off 5 pixels at each side of the snapshot pixmap. If non-0, clip_rect will contain the exact widget-relative snapshot coordinates upon return. A clip_rect of <literal>{ -1, -1, 0, 0 }</literal> can be used to preserve the auto-grown snapshot area and use clip_rect as a pure output parameter.
The returned pixmap can be an empty RefPtr, if the resulting clip_area was empty.
- Parameters:
-
clip_rect A Gdk::Rectangle.
- Returns:
- Gdk::Pixmap snapshot of the widget
| Gtk::StateType Gtk::Widget::get_state | ( | ) | const |
| Glib::RefPtr<const Style> Gtk::Widget::get_style | ( | ) | const |
| Glib::RefPtr<Style> Gtk::Widget::get_style | ( | ) |
| void Gtk::Widget::get_style_property | ( | const Glib::ustring & | the_property_name, | |
| PropertyType & | value | |||
| ) | const [inline] |
| void Gtk::Widget::get_style_property_value | ( | const Glib::ustring & | the_property_name, | |
| Glib::ValueBase & | value | |||
| ) | const [protected] |
Gets the value of a style property of widget.
- Parameters:
-
the_property_name The name of a style property. value Location to return the property value.
| Glib::ustring Gtk::Widget::get_tooltip_markup | ( | ) | const |
| Glib::ustring Gtk::Widget::get_tooltip_text | ( | ) | const |
| Window* Gtk::Widget::get_tooltip_window | ( | ) |
Return value: The Gtk::Window of the current tooltip.
- Returns:
- The Gtk::Window of the current tooltip.
| const Container* Gtk::Widget::get_toplevel | ( | ) | const |
This function returns the topmost widget in the container hierarchy widget is a part of.
If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced.
Note the difference in behavior vs. get_ancestor(); <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</literal> would return 0 if widget wasn't inside a toplevel window, and if the window was inside a Gtk::Window-derived widget which was in turn inside the toplevel Gtk::Window. While the second case may seem unlikely, it actually happens when a Gtk::Plug is embedded inside a Gtk::Socket within the same application.
To reliably find the toplevel Gtk::Window, use get_toplevel() and check if the T::OPLEVEL flags is set on the result. |[ GtkWidget* toplevel = gtk_widget_get_toplevel (widget); if (GTK_WIDGET_TOPLEVEL (toplevel)) { // Perform action on toplevel. } ]|
- Returns:
- The topmost ancestor of widget, or widget itself if there's no ancestor.
| Container* Gtk::Widget::get_toplevel | ( | ) |
This function returns the topmost widget in the container hierarchy widget is a part of.
If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced.
Note the difference in behavior vs. get_ancestor(); <literal>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</literal> would return 0 if widget wasn't inside a toplevel window, and if the window was inside a Gtk::Window-derived widget which was in turn inside the toplevel Gtk::Window. While the second case may seem unlikely, it actually happens when a Gtk::Plug is embedded inside a Gtk::Socket within the same application.
To reliably find the toplevel Gtk::Window, use get_toplevel() and check if the T::OPLEVEL flags is set on the result. |[ GtkWidget* toplevel = gtk_widget_get_toplevel (widget); if (GTK_WIDGET_TOPLEVEL (toplevel)) { // Perform action on toplevel. } ]|
- Returns:
- The topmost ancestor of widget, or widget itself if there's no ancestor.
| Glib::RefPtr<Gdk::Visual> Gtk::Widget::get_visual | ( | ) |
Gets the visual that will be used to render widget.
- Returns:
- The visual for widget.
| int Gtk::Widget::get_width | ( | ) | const |
| Glib::RefPtr<const Gdk::Window> Gtk::Widget::get_window | ( | ) | const |
| Glib::RefPtr<Gdk::Window> Gtk::Widget::get_window | ( | ) |
| const GtkWidget* Gtk::Widget::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Atk::Implementor.
Reimplemented in Gtk::AboutDialog, Gtk::AccelLabel, Gtk::Alignment, Gtk::Arrow, Gtk::AspectFrame, Gtk::Assistant, Gtk::Bin, Gtk::Box, Gtk::VBox, Gtk::HBox, Gtk::Button, Gtk::ButtonBox, Gtk::VButtonBox, Gtk::HButtonBox, Gtk::Calendar, Gtk::CellView, Gtk::CheckButton, Gtk::CheckMenuItem, Gtk::ColorButton, Gtk::ColorSelection, Gtk::ColorSelectionDialog, Gtk::ComboDropDownItem, Gtk::ComboDropDown, Gtk::Combo, Gtk::ComboBox, Gtk::ComboBoxEntry, Gtk::Container, Gtk::Curve, Gtk::GammaCurve, Gtk::Dialog, Gtk::DrawingArea, Gtk::Entry, Gtk::EventBox, Gtk::Expander, Gtk::FileChooserButton, Gtk::FileChooserDialog, Gtk::FileChooserWidget, Gtk::FileSelection, Gtk::Fixed, Gtk::FontButton, Gtk::FontSelection, Gtk::FontSelectionDialog, Gtk::Frame, Gtk::HandleBox, Gtk::IconView, Gtk::Image, Gtk::ImageMenuItem, Gtk::InputDialog, Gtk::Invisible, Gtk::Item, Gtk::Label, Gtk::Layout, Gtk::LinkButton, Gtk::Menu, Gtk::MenuBar, Gtk::MenuItem, Gtk::MenuShell, Gtk::MenuToolButton, Gtk::MessageDialog, Gtk::Misc, Gtk::Notebook, Gtk::OptionMenu, Gtk::PageSetupUnixDialog, Gtk::Paned, Gtk::HPaned, Gtk::VPaned, Gtk::Plug, Gtk::PrintUnixDialog, Gtk::ProgressBar, Gtk::RadioButton, Gtk::RadioMenuItem, Gtk::RadioToolButton, Gtk::Range, Gtk::RecentChooserDialog, Gtk::RecentChooserMenu, Gtk::RecentChooserWidget, Gtk::Ruler, Gtk::VRuler, Gtk::HRuler, Gtk::Scale, Gtk::VScale, Gtk::HScale, Gtk::ScaleButton, Gtk::Scrollbar, Gtk::VScrollbar, Gtk::HScrollbar, Gtk::ScrolledWindow, Gtk::Separator, Gtk::VSeparator, Gtk::HSeparator, Gtk::SeparatorMenuItem, Gtk::SeparatorToolItem, Gtk::Socket, Gtk::SpinButton, Gtk::Statusbar, Gtk::Table, Gtk::TearoffMenuItem, Gtk::TextView, Gtk::ToggleButton, Gtk::ToggleToolButton, Gtk::Toolbar, Gtk::ToolButton, Gtk::ToolItem, Gtk::TreeView, Gtk::Viewport, Gtk::VolumeButton, and Gtk::Window.
References Glib::ValueBase::gobject_.
| GtkWidget* Gtk::Widget::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Atk::Implementor.
Reimplemented in Gtk::AboutDialog, Gtk::AccelLabel, Gtk::Alignment, Gtk::Arrow, Gtk::AspectFrame, Gtk::Assistant, Gtk::Bin, Gtk::Box, Gtk::VBox, Gtk::HBox, Gtk::Button, Gtk::ButtonBox, Gtk::VButtonBox, Gtk::HButtonBox, Gtk::Calendar, Gtk::CellView, Gtk::CheckButton, Gtk::CheckMenuItem, Gtk::ColorButton, Gtk::ColorSelection, Gtk::ColorSelectionDialog, Gtk::ComboDropDownItem, Gtk::ComboDropDown, Gtk::Combo, Gtk::ComboBox, Gtk::ComboBoxEntry, Gtk::Container, Gtk::Curve, Gtk::GammaCurve, Gtk::Dialog, Gtk::DrawingArea, Gtk::Entry, Gtk::EventBox, Gtk::Expander, Gtk::FileChooserButton, Gtk::FileChooserDialog, Gtk::FileChooserWidget, Gtk::FileSelection, Gtk::Fixed, Gtk::FontButton, Gtk::FontSelection, Gtk::FontSelectionDialog, Gtk::Frame, Gtk::HandleBox, Gtk::IconView, Gtk::Image, Gtk::ImageMenuItem, Gtk::InputDialog, Gtk::Invisible, Gtk::Item, Gtk::Label, Gtk::Layout, Gtk::LinkButton, Gtk::Menu, Gtk::MenuBar, Gtk::MenuItem, Gtk::MenuShell, Gtk::MenuToolButton, Gtk::MessageDialog, Gtk::Misc, Gtk::Notebook, Gtk::OptionMenu, Gtk::PageSetupUnixDialog, Gtk::Paned, Gtk::HPaned, Gtk::VPaned, Gtk::Plug, Gtk::PrintUnixDialog, Gtk::ProgressBar, Gtk::RadioButton, Gtk::RadioMenuItem, Gtk::RadioToolButton, Gtk::Range, Gtk::RecentChooserDialog, Gtk::RecentChooserMenu, Gtk::RecentChooserWidget, Gtk::Ruler, Gtk::VRuler, Gtk::HRuler, Gtk::Scale, Gtk::VScale, Gtk::HScale, Gtk::ScaleButton, Gtk::Scrollbar, Gtk::VScrollbar, Gtk::HScrollbar, Gtk::ScrolledWindow, Gtk::Separator, Gtk::VSeparator, Gtk::HSeparator, Gtk::SeparatorMenuItem, Gtk::SeparatorToolItem, Gtk::Socket, Gtk::SpinButton, Gtk::Statusbar, Gtk::Table, Gtk::TearoffMenuItem, Gtk::TextView, Gtk::ToggleButton, Gtk::ToggleToolButton, Gtk::Toolbar, Gtk::ToolButton, Gtk::ToolItem, Gtk::TreeView, Gtk::Viewport, Gtk::VolumeButton, and Gtk::Window.
References Glib::ValueBase::gobject_.
| void Gtk::Widget::grab_default | ( | ) |
Causes widget to become the default widget.
widget must have the Gtk::CAN_DEFAULT flag set; typically you have to set this flag yourself by calling <literal>GTK_WIDGET_SET_FLAGS ( widget, GTK_CAN_DEFAULT)</literal>. The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, activate() should affect them.
| void Gtk::Widget::grab_focus | ( | ) |
Causes widget to have the keyboard focus for the Gtk::Window it's inside.
widget must be a focusable widget, such as a Gtk::Entry; something like Gtk::Frame won't work. (More precisely, it must have the Gtk::CAN_FOCUS flag set.)
| bool Gtk::Widget::has_default | ( | ) | const |
| bool Gtk::Widget::has_focus | ( | ) | const |
| bool Gtk::Widget::has_grab | ( | ) | const |
| bool Gtk::Widget::has_no_window | ( | ) | const |
| bool Gtk::Widget::has_screen | ( | ) | const |
Checks whether there is a Gdk::Screen is associated with this widget.
All toplevel widgets have an associated screen, and all widgets added into a hierarchy with a toplevel window at the top.
- Returns:
trueif there is a Gdk::Screen associcated with the widget.
| void Gtk::Widget::hide | ( | ) |
Reverses the effects of show(), causing the widget to be hidden (invisible to the user).
| void Gtk::Widget::hide_all | ( | ) |
Recursively hides a widget and any child widgets.
| virtual void Gtk::Widget::hide_all_vfunc | ( | ) | [protected, virtual] |
| void Gtk::Widget::input_shape_combine_mask | ( | const Glib::RefPtr<const Gdk::Bitmap>& | shape_mask, | |
| int | offset_x, | |||
| int | offset_y | |||
| ) |
Sets an input shape for this widget's GDK window.
This allows for windows which react to mouse click in a nonrectangular region, see gdk_window_input_shape_combine_mask() for more information.
- Parameters:
-
shape_mask Shape to be added, or 0to remove an existing shape.offset_x X position of shape mask with respect to window. offset_y Y position of shape mask with respect to window.
| bool Gtk::Widget::intersect | ( | const Gdk::Rectangle& | area, | |
| Gdk::Rectangle& | intersection | |||
| ) | const |
Computes the intersection of a widget's area and area, storing the intersection in intersection, and returns true if there was an intersection.
intersection may be 0 if you're only interested in whether there was an intersection.
- Parameters:
-
area A rectangle. intersection Rectangle to store intersection of widget and area.
- Returns:
trueif there was an intersection.
| bool Gtk::Widget::intersect | ( | const Gdk::Rectangle& | area | ) | const |
| bool Gtk::Widget::is_ancestor | ( | Widget& | ancestor | ) | const |
Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.
- Parameters:
-
ancestor Another Gtk::Widget.
- Returns:
trueif ancestor contains widget as a child, grandchild, great grandchild, etc.
| bool Gtk::Widget::is_composite_child | ( | ) | const |
| bool Gtk::Widget::is_composited | ( | ) | const |
Whether widget can rely on having its alpha channel drawn correctly.
On X11 this function returns whether a compositing manager is running for widget's screen.
Please note that the semantics of this call will change in the future if used on a widget that has a composited window in its hierarchy (as set by gdk_window_set_composited()).
- Returns:
trueif the widget can rely on its alpha channel being drawn correctly.
| bool Gtk::Widget::is_drawable | ( | ) | const |
| bool Gtk::Widget::is_focus | ( | ) | const |
Determines if the widget is the focus widget within its toplevel.
(This does not mean that the HAS_FOCUS flag is necessarily set; HAS_FOCUS will only be set if the toplevel widget additionally has the global input focus.)
- Returns:
trueif the widget is the focus widget.
| bool Gtk::Widget::is_mapped | ( | ) | const |
| bool Gtk::Widget::is_realized | ( | ) | const |
| bool Gtk::Widget::is_sensitive | ( | ) | const |
| bool Gtk::Widget::is_toplevel | ( | ) | const |
Reimplemented in Gtk::Window.
| bool Gtk::Widget::is_visible | ( | ) | const |
| bool Gtk::Widget::keynav_failed | ( | DirectionType | direction | ) |
This function should be called whenever keyboard navigation within a single widget hits a boundary.
The function emits the Gtk::Widget::keynav-failed signal on the widget and its return value should be interpreted in a way similar to the return value of child_focus():
When true is returned, stay in the widget, the failed keyboard navigation is Ok and/or there is nowhere we can/should move the focus to.
When false is returned, the caller should continue with keyboard navigation outside the widget, e.g. by calling child_focus() on the widget's toplevel.
The default keynav-failed handler returns true for Gtk::DIR_TAB_FORWARD and Gtk::DIR_TAB_BACKWARD. For the other values of Gtk::DirectionType, it looks at the Gtk::Settings:gtk-keynav-cursor-only setting and returns false if the setting is true. This way the entire user interface becomes cursor-navigatable on input devices such as mobile phones which only have cursor keys but no tab key.
Whenever the default handler returns true, it also calls error_bell() to notify the user of the failed keyboard navigation.
A use case for providing an own implementation of keynav-failed (either by connecting to it or by overriding it) would be a row of Gtk::Entry widgets where the user should be able to navigate the entire row with the cursor keys, as e.g. known from user interfaces that require entering license keys.
- Parameters:
-
direction Direction of focus movement.
- Returns:
trueif stopping keyboard navigation is fine,falseif the emitting widget should try to handle the keyboard navigation attempt in its parent container(s).
| Glib::ListHandle<const Widget*> Gtk::Widget::list_mnemonic_labels | ( | ) | const |
Return value: the list of mnemonic labels; free this list.
- Returns:
- The list of mnemonic labels; free this list with Glib::list_free() when you are done with it.
| Glib::ListHandle<Widget*> Gtk::Widget::list_mnemonic_labels | ( | ) |
Return value: the list of mnemonic labels; free this list.
- Returns:
- The list of mnemonic labels; free this list with Glib::list_free() when you are done with it.
| void Gtk::Widget::map | ( | ) |
This function is only for use in widget implementations.
Causes a widget to be mapped if it isn't already.
| bool Gtk::Widget::mnemonic_activate | ( | bool | group_cycling | ) |
Emits the Gtk::Widget::mnemonic-activate signal.
The default handler for this signal activates the widget if group_cycling is false, and just grabs the focus if group_cycling is true.
- Parameters:
-
group_cycling trueif there are other widgets with the same mnemonic.
- Returns:
trueif the signal has been handled.
| void Gtk::Widget::modify_base | ( | StateType | state, | |
| const Gdk::Color& | color | |||
| ) |
Sets the base color for a widget in a particular state.
All other style values are left untouched. The base color is the background color used along with the text color (see modify_text() ) for widgets such as Gtk::Entry and Gtk::TextView. See also modify_style() and unset_base().
- Parameters:
-
state The state for which to set the text color. color The color to assign (does not need to be allocated). Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see modify_text()) for widgets such as Gtk::Entry and Gtk::TextView. See also modify_style(). state The state for which to set the base color. color The color to assign (does not need to be allocated).
| void Gtk::Widget::modify_bg | ( | StateType | state, | |
| const Gdk::Color& | color | |||
| ) |
Sets the background color for a widget in a particular state.
All other style values are left untouched. See also modify_style() and unset_bg().
- Parameters:
-
state The state for which to set the background color. color The color to assign (does not need to be allocated). Sets the background color for a widget in a particular state. All other style values are left untouched. See also modify_style(). state The state for which to set the background color. color The color to assign (does not need to be allocated).
| void Gtk::Widget::modify_bg_pixmap | ( | StateType | state, | |
| const Glib::ustring & | pixmap_name | |||
| ) |
| void Gtk::Widget::modify_cursor | ( | const Gdk::Color& | primary, | |
| const Gdk::Color& | secondary | |||
| ) |
Sets the cursor color to use in a widget, overriding the cursor_color and secondary_cursor_color style properties.
All other style values are left untouched. See also modify_style(). See also unset_cursor().
- Parameters:
-
primary the color to use for primary cursor (does not need to be allocated). secondary the color to use for secondary cursor (does not need to be allocated).
- Parameters:
-
primary The color to use for primary cursor (does not need to be allocated), or 0to undo the effect of previous calls to of modify_cursor().secondary The color to use for secondary cursor (does not need to be allocated), or 0to undo the effect of previous calls to of modify_cursor().
| void Gtk::Widget::modify_fg | ( | StateType | state, | |
| const Gdk::Color& | color | |||
| ) |
Sets the foreground color for a widget in a particular state.
All other style values are left untouched. See also modify_style() and unset_fg().
- Parameters:
-
state The state for which to set the foreground color. color The color to assign (does not need to be allocated). Sets the foreground color for a widget in a particular state. All other style values are left untouched. See also modify_style(). state The state for which to set the foreground color. color The color to assign (does not need to be allocated).
| void Gtk::Widget::modify_font | ( | const Pango::FontDescription & | font_desc | ) |
Sets the font to use for a widget.
All other style values are left untouched. See also modify_style() and unset_font(). Sets the font to use for a widget. All other style values are left untouched. See also modify_style().
- Parameters:
-
font_desc The font description to use.
| void Gtk::Widget::modify_style | ( | const Glib::RefPtr<RcStyle>& | style | ) |
Modifies style values on the widget.
Modifications made using this technique take precedence over style values set via an RC file, however, they will be overriden if a style is explicitely set on the widget using set_style(). The Gtk::RcStyle structure is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged.
Note that modifications made with this function are not cumulative with previous calls to modify_style() or with such functions as modify_fg(). If you wish to retain previous values, you must first call get_modifier_style(), make your modifications to the returned style, then call modify_style() with that style. On the other hand, if you first call modify_style(), subsequent calls to such functions modify_fg() will have a cumulative effect with the initial modifications.
- Parameters:
-
style The Gtk::RcStyle holding the style modifications.
| void Gtk::Widget::modify_text | ( | StateType | state, | |
| const Gdk::Color& | color | |||
| ) |
Sets the text color for a widget in a particular state.
All other style values are left untouched. The text color is the foreground color used along with the base color (see modify_base() ) for widgets such as Gtk::Entry and Gtk::TextView. See also modify_style() and unset_text().
- Parameters:
-
state The state for which to set the text color. color The color to assign (does not need to be allocated). Sets the text color for a widget in a particular state. All other style values are left untouched. The text color is the foreground color used along with the base color (see modify_base()) for widgets such as Gtk::Entry and Gtk::TextView. See also modify_style(). state The state for which to set the text color. color The color to assign (does not need to be allocated).
| virtual bool Gtk::Widget::on_button_press_event | ( | GdkEventButton * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_button_release_event | ( | GdkEventButton * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_child_notify | ( | GParamSpec * | pspec | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_client_event | ( | GdkEventClient * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_configure_event | ( | GdkEventConfigure * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_delete_event | ( | GdkEventAny * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_direction_changed | ( | TextDirection | direction | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_drag_begin | ( | const Glib::RefPtr<Gdk::DragContext>& | context | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_drag_data_delete | ( | const Glib::RefPtr<Gdk::DragContext>& | context | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_drag_data_get | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| SelectionData& | selection_data, | |||
| guint | info, | |||
| guint | time | |||
| ) | [protected, virtual] |
| virtual void Gtk::Widget::on_drag_data_received | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| int | x, | |||
| int | y, | |||
| const SelectionData& | selection_data, | |||
| guint | info, | |||
| guint | time | |||
| ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_drag_drop | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| int | x, | |||
| int | y, | |||
| guint | time | |||
| ) | [protected, virtual] |
| virtual void Gtk::Widget::on_drag_end | ( | const Glib::RefPtr<Gdk::DragContext>& | context | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_drag_leave | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| guint | time | |||
| ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_drag_motion | ( | const Glib::RefPtr<Gdk::DragContext>& | context, | |
| int | x, | |||
| int | y, | |||
| guint | time | |||
| ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_enter_notify_event | ( | GdkEventCrossing * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_event | ( | GdkEvent * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_expose_event | ( | GdkEventExpose * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_focus | ( | DirectionType | direction | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_focus_in_event | ( | GdkEventFocus * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_focus_out_event | ( | GdkEventFocus * | event | ) | [protected, virtual] |
| virtual Glib::RefPtr<Atk::Object> Gtk::Widget::on_get_accessible | ( | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_grab_focus | ( | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_grab_notify | ( | bool | was_grabbed | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_hide | ( | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_hierarchy_changed | ( | Widget* | previous_toplevel | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_key_press_event | ( | GdkEventKey * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_key_release_event | ( | GdkEventKey * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_leave_notify_event | ( | GdkEventCrossing * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_map | ( | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_map_event | ( | GdkEventAny * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_mnemonic_activate | ( | bool | group_cycling | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_motion_notify_event | ( | GdkEventMotion * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_no_expose_event | ( | GdkEventAny * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_parent_changed | ( | Widget* | previous_parent | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_property_notify_event | ( | GdkEventProperty * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_proximity_in_event | ( | GdkEventProximity * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_proximity_out_event | ( | GdkEventProximity * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_realize | ( | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_screen_changed | ( | const Glib::RefPtr<Gdk::Screen>& | previous_screen | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_scroll_event | ( | GdkEventScroll * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_selection_clear_event | ( | GdkEventSelection * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_selection_get | ( | SelectionData& | selection_data, | |
| guint | info, | |||
| guint | time | |||
| ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_selection_notify_event | ( | GdkEventSelection * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_selection_received | ( | const SelectionData& | selection_data, | |
| guint | time | |||
| ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_selection_request_event | ( | GdkEventSelection * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_show | ( | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_size_allocate | ( | Allocation& | allocation | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_size_request | ( | Requisition* | requisition | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_state_changed | ( | Gtk::StateType | previous_state | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_style_changed | ( | const Glib::RefPtr<Gtk::Style>& | previous_style | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_unmap | ( | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_unmap_event | ( | GdkEventAny * | event | ) | [protected, virtual] |
| virtual void Gtk::Widget::on_unrealize | ( | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_visibility_notify_event | ( | GdkEventVisibility * | event | ) | [protected, virtual] |
| virtual bool Gtk::Widget::on_window_state_event | ( | GdkEventWindowState * | event | ) | [protected, virtual] |
| bool Gtk::Widget::parent_sensitive | ( | ) | const |
| void Gtk::Widget::path | ( | Glib::ustring & | path, | |
| Glib::ustring & | path_reversed | |||
| ) |
Compute a widget's path of the form "GtkWindow.MyLabel".
| static void Gtk::Widget::pop_colormap | ( | ) | [static] |
Removes a colormap pushed with push_colormap().
| static void Gtk::Widget::pop_composite_child | ( | ) | [static] |
Cancels the effect of a previous call to push_composite_child().
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_app_paintable | ( | ) | const |
Whether the application will paint directly on the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_app_paintable | ( | ) |
Whether the application will paint directly on the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_can_default | ( | ) | const |
Whether the widget can be the default widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_can_default | ( | ) |
Whether the widget can be the default widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_can_focus | ( | ) | const |
Whether the widget can accept the input focus.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_can_focus | ( | ) |
Whether the widget can accept the input focus.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_composite_child | ( | ) | const |
Whether the widget is part of a composite widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<Gdk::EventMask> Gtk::Widget::property_events | ( | ) | const |
The event mask that decides what kind of GdkEvents this widget gets.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<Gdk::EventMask> Gtk::Widget::property_events | ( | ) |
The event mask that decides what kind of GdkEvents this widget gets.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<Gdk::ExtensionMode> Gtk::Widget::property_extension_events | ( | ) | const |
The mask that decides what kind of extension events this widget gets.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<Gdk::ExtensionMode> Gtk::Widget::property_extension_events | ( | ) |
The mask that decides what kind of extension events this widget gets.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_has_default | ( | ) | const |
Whether the widget is the default widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_has_default | ( | ) |
Whether the widget is the default widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_has_focus | ( | ) | const |
Whether the widget has the input focus.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_has_focus | ( | ) |
Whether the widget has the input focus.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_has_tooltip | ( | ) | const |
Whether this widget has a tooltip.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_has_tooltip | ( | ) |
Whether this widget has a tooltip.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<int> Gtk::Widget::property_height_request | ( | ) | const |
Override for height request of the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<int> Gtk::Widget::property_height_request | ( | ) |
Override for height request of the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::Widget::property_name | ( | ) | const |
The name of the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Reimplemented in Gtk::AboutDialog.
| Glib::PropertyProxy<Glib::ustring> Gtk::Widget::property_name | ( | ) |
The name of the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Reimplemented in Gtk::AboutDialog.
| Glib::PropertyProxy_ReadOnly<Container*> Gtk::Widget::property_parent | ( | ) | const |
The parent widget of this widget.
Must be a Container widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<Container*> Gtk::Widget::property_parent | ( | ) |
The parent widget of this widget.
Must be a Container widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_receives_default | ( | ) | const |
If TRUE.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_receives_default | ( | ) |
If TRUE.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<bool> Gtk::Widget::property_sensitive | ( | ) | const |
Whether the widget responds to input.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<bool> Gtk::Widget::property_sensitive | ( | ) |
Whether the widget responds to input.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Style>> Gtk::Widget::property_style | ( | ) | const |
The style of the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy<Glib::RefPtr<Style>> Gtk::Widget::property_style | ( | ) |
The style of the widget.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
