Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::Widget Class Reference

A GtkWidget C++ wrapper class. More...

`#include <inti/gtk/widget.h>`

Inheritance diagram for Inti::Gtk::Widget:

List of all members.

## Public Member Functions

Constructors

- virtual ~Widget ()
    Destructor.

Accessors

- GtkWidget * gtk_widget () const
    Get a pointer to the GtkWidget structure.
- GtkWidgetClass * gtk_widget_class () const
    Get a pointer to the GtkWidgetClass structure.
- operator GtkWidget * () const
    Conversion operator; safely converts a Widget to a GtkWidget pointer.
- bool is_toplevel () const
    Returns true if the widget is a toplevel widget.
- bool has_no_window () const
    Returns true if the widget doesn't have it's own Gdk::Window.
- bool is_realized () const
    Returns true if the widget is realized.
- bool is_mapped () const
    Returns true if the widget is mapped.
- bool is_visible () const
    Returns true if the widget is visible.
- bool is_drawable () const
    Returns true if the widget is mapped and visible.
- bool sensitive () const
    Returns true if the Gtk::SENSITIVE flag has be set on the widget.
- bool parent_sensitive () const
    Returns true if the Gtk::PARENT_SENSITIVE flag has be set on the widget.
- bool is_sensitive () const
    Returns true if the widget is effectively sensitive.
- bool can_focus () const
    Returns true if the widget is able to handle focus grabs.
- bool has_focus () const
    Returns true if the widget has grabbed the focus and no other widget has done so more recently.
- bool can_default () const
    Returns true if the widget is allowed to receive the default action via grab_default().
- bool has_default () const
    Returns true if the widget currently is receiving the default action.
- bool has_grab () const
    Returns true if the widget is in the grab_widgets stack, and will be the preferred one for receiving events other than ones of cosmetic value.
- bool has_rc_style () const
    Returns true if the widgets style has been looked up through the rc mechanism.
- bool is_composite_child () const
    Returns true if the widget is a composite child of its parent.
- bool is_app_paintable () const
    Returns true if the Gtk::APP_PAINTABLE flag has been set on the widget.
- bool receives_default () const
    Returns true if the widget when focused will receive the default action even if there is a different widget set as default.
- bool is_double_buffered () const
    Returns true if the Gtk::DOUBLE_BUFFERED flag has been set on the widget.
- StateType get_state () const
    Returns the current state of the widget.
- const Allocation & get_allocation () const
    Returns the size allocated to the widget.
- Requisition get_child_requisition () const
    Obtains the child widget requisition (see get_child_requisition(Requisition&) const).
- void get_child_requisition (Requisition &requisition) const
    Obtains the child widget requisition, unless someone has forced a particular geometry on the widget, in which case it returns that geometry instead of the widget's requisition.
- Gdk::Window * get_window () const
    Returns the widget's window or its parent window if it doesn't have a window (which will be indicated by the Gtk::NO_WINDOW flag being set).
- bool is_focus () const
    Determines if the widget is the focus widget within its toplevel.
- String get_name () const
    Retrieves the name of the widget (see set_name() for the significance of widget names).
- bool get_child_visible () const
    Returns the value set with set_child_visible().
- Widget * get_parent () const
    Returns the parent container of widget, or null.
- Gdk::Window * get_parent_window () const
    Returns the widget's parent window.
- void get_size_request (int *width, int *height) const
    Gets the size request that was explicitly set for the widget using set_size_request().
- Gdk::ExtensionMode get_extension_events () const
    Retrieves the extension events the widget will receive (see Gdk::Input::set_extension_events()).
- Widget * get_toplevel () const
    This method returns the topmost widget in the container hierarchy the widget is a part of.
- Widget * get_ancestor (GType widget_type) const
    Gets the first ancestor of widget with type widget_type.
- Gdk::Colormap * get_colormap () const
    Returns the colormap that will be used to render the widget.
- const Gdk::Visual * get_visual () const
    Returns the visual that will be used to render widget.
- Gdk::Screen * get_screen () const
    Get the Gdk::Screen from the toplevel window associated with this widget.
- bool has_screen () const
    Checks whether there is a Gdk::Screen is associated with this widget.
- Gdk::Display * get_display () const
    Get the Gdk::Display for the toplevel window associated with this widget.
- Gdk::Window * get_root_window () const
    The root window is useful for such purposes as creating a popup Gdk::Window associated with the window.
- Settings * get_settings () const
    Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget.
- Clipboard * get_clipboard (Gdk::Atom selection=GDK_SELECTION_CLIPBOARD) const
    Returns the clipboard object for the given selection to be used with widget.
- Atk::Object * get_accessible () const
    Returns an accessible object for this widget.
- Gdk::EventMaskField get_events () const
    Gets the event mask for the widget (a bitfield containing flags from the Gdk::EventMask enumeration).
- void get_pointer (int *x, int *y) const
    Obtains the location of the mouse pointer in widget coordinates.
- Gdk::Point get_pointer () const
    Obtains the location of the mouse pointer in widget coordinates.
- bool is_ancestor (Widget *ancestor) const
    Determines whether the widget is somewhere inside ancestor, possibly within an intermediate container.
- Style * get_style () const
    Returns the widget Style (see set_style().
- Style * rc_get_style () const
    Finds all matching RC styles for a given widget, composites them together, and then creates a Style representing the composite appearance.
- RcStyle * get_modifier_style () const
    Returns the current modifier style for the widget (as set by modify_style()).
- String get_composite_name () const
    Returns the composite name of the widget or a null String if the widget is not a composite child.
- Pango::Context * get_pango_context () const
    Returns a Pango::Context with the appropriate colormap, font description and base direction for the widget.
- TextDirection get_direction () const
    Returns the reading direction for the widget (see set_direction()).
- void style_get_property (const char *property_name, G::Value &value)
    Gets the value of a style property of the widget.
- void style_get (const char *first_property_name,...) const
    Gets the values of multiple style properties of the widget.
- void path (String &path, String &path_reversed) const
    Obtains the full path to the widget.
- void class_path (String &path, String &path_reversed) const
    Same as path(), but always uses the name of a widget's type, never uses a custom name set with set_name().

Methods

- void set_flags (WidgetFlagsField flags)
    Turns on certain widget flags.
- void unset_flags (WidgetFlagsField flags)
    Turns off certain widget flags.
- void unparent ()
    Used in widget implementations; should be called by implementations of the remove method on Gtk::Container, to dissociate a child from the container.
- void show ()
    Flags a widget to be displayed.
- void hide ()
    Reverses the effects of show(), causing the widget to be hidden (invisible to the user).
- void show_now ()
    Shows a widget.
- void show_all ()
    Recursively shows a widget, and any child widgets (if the widget is a container).
- void hide_all ()
    Recursively hides a widget and any child widgets.
- void map ()
    Used in widget implementations; causes the widget to be mapped if it isn't already (visible on the screen).
- void unmap ()
    Used in widget implementations; causes the widget to be unmapped if it's currently mapped (no longer visible on the screen).
- void realize ()
    Creates the GDK (windowing system) resources associated with a widget.
- void unrealize ()
    Used in widget implementations; causes a widget to be unrealized (frees all GDK resources associated with the widget, such as gtk_widget()->window).
- 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 the 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_draw_area (const Gdk::Rectangle &rectangle)
    Invalidates the rectangular area of the widget defined by rectangle by calling Gdk::Window::invalidate_rect() on the widget's window and all its child windows.
- void queue_resize ()
    This method is only for use in widget implementations.
- void size_request (Requisition *requisition)
    Typically used when implementing a Container subclass; obtains the preferred size of the widget.
- void size_allocate (const Allocation &allocation)
    This method is only used by Container subclasses to assign a size and position to their child widgets.
- void add_accelerator (const String &accel_signal, AccelGroup &accel_group, const AccelKey &accel_key)
    Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated.
- bool remove_accelerator (AccelGroup &accel_group, const AccelKey &accel_key)
    Removes an accelerator from the widget previously installed with add_accelerator().
- void set_accel_path (const char *accel_path, 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, the widget will be activated.
- bool list_accel_closures (std::vector< GClosure * > &closures)
    Lists the closures used by the widget for accelerator group connections with Gtk::AccelGroup::connect().
- int send_expose (const Gdk::EventExpose &event)
    This rarely-used method is used to emit an expose_event signal on the widget.
- bool mnemonic_activate (bool group_cycling)
    Actviates the widget if it's suitable for mnemonic actviaton.
- bool event (const Gdk::Event &event)
    This rarely-used method is used to emit the event signals on a widget (those signals should never be emitted without using this method to do so).
- bool activate ()
    For widgets that can be activated (buttons, menu items, etc) this method activates them.
- bool set_scroll_adjustments (Adjustment *hadjustment, Adjustment *vadjustment)
    Sets the widget's scroll adjustments.
- void reparent (Widget &new_parent)
    Moves a widget from one Container to another, handling reference count issues to avoid destroying the widget.
- bool intersect (const Gdk::Rectangle &area, Gdk::Rectangle *intersection)
    Computes the intersection of a widget's area and area, storing the intersection in intersection, and returns true if there was an intersection.
- Gdk::Rectangle intersect (const Gdk::Rectangle &area)
    Computes the intersection of a widget's area and area, and returns the intersection as a rectanlge.
- Pointer< Gdk::Region > intersect (Gdk::Region &region)
    Computes the intersection of a widget's area and region, and returns the intersection as a new Gdk::Region.
- void freeze_child_notify ()
    Stops the emission of child_notify signals on the widget.
- void child_notify (const char *child_property)
    Emits a child_notify signal for the child property child_property on the widget.
- void thaw_child_notify ()
    Reverts the effect of a prevoious call to freeze_child_notify().
- void grab_focus ()
    Causes the widget to have the keyboard focus for the Window it's inside.
- void grab_default ()
    Causes the widget to become the default widget.
- void set_name (const String &name)
    Widgets can be named, which allows you to refer to them in a gtkrc file.
- void set_state (StateType state)
    Used in widget implementations; sets the state of the widget (insensitive, prelighted, etc).
- void set_sensitive (bool sensitive)
    Sets the sensitivity of the widget.
- void set_app_paintable (bool app_paintable)
    Sets the Gtk::APP_PAINTABLE flags on the widget.
- void set_double_buffered (bool double_buffered)
    Widgets are double buffered by default; you can use this function to turn off the buffering.
- void set_redraw_on_allocate (bool redraw_on_allocate)
    When a widgets size allocation changes, sets whether the entire widget is queued for drawing or not.
- void set_parent (Widget &parent)
    Sets the container as the parent of widget, and takes care of some details such as updating the state and style of the child to reflect its new location.
- void set_parent_window (Gdk::Window *parent_window)
    Sets a non default parent window for widget.
- void set_child_visible (bool is_visible)
    Sets whether the widget should be mapped along with its parent when its parent is mapped and the widget has been shown with show().
- bool child_focus (DirectionType direction)
    Moves the focus to the child widget.
- void set_size_request (int width, int height)
    Sets the minimum size of a widget; that is, the widget's size request will be width by height.
- void set_events (Gdk::EventMaskField events)
    Sets the event mask (see Gdk::EventMask) for a widget.
- void add_events (Gdk::EventMaskField events)
    Adds the events in the bitfield events to the event mask for the widget (see set_events()).
- void set_extension_events (Gdk::ExtensionMode mode)
    Sets the extension events mask to mode (see Gdk::ExtensionMode and Gdk::Input::set_extension_events()).
- void set_colormap (Gdk::Colormap &colormap)
    Sets the colormap for the widget to colormap.
- bool translate_coordinates (Widget &src_widget, int src_x, int src_y, int *dest_x, int *dest_y) const
    Translate coordinates relative to src_widget's allocation to coordinates relative to this widget's allocation.
- void set_style (Style &style)
    Sets the Style for the widget.
- void ensure_style ()
    Ensures that the widget has a style.
- void modify_style (RcStyle &style)
    Modifies style values on the widget.
- void modify_fg (StateType state, const Gdk::Color *color)
    Sets the foreground color for the widget in a particular state.
- void modify_bg (StateType state, const Gdk::Color *color)
    Sets the background color for the widget in a particular state.
- void modify_text (StateType state, const Gdk::Color *color)
    Sets the text color for the widget in a particular state.
- void modify_base (StateType state, const Gdk::Color *color)
    Sets the base color for the widget in a particular state.
- void modify_font (const Pango::FontDescription *font_desc)
    Sets the font to use for the widget.
- Pointer< Pango::Context > create_pango_context ()
    Creates a new Pango::Context with the appropriate colormap, font description, and base direction for drawing text for this widget (see also get_pango_context()).
- Pointer< Pango::Layout > create_pango_layout (const String &text)
    Creates a new Pango::Layout with the appropriate colormap, font description, and base direction for drawing text for this widget.
- Pointer< Gdk::Pixbuf > render_icon (const char *stock_id, IconSize size, const char *detail=0)
    A convenience method that uses the theme engine and RC file settings for the widget to look up stock_id and render it to a pixbuf.
- void set_composite_name (const String &name)
    Sets a widgets composite name.
- void reset_rc_styles ()
    Reset the styles of the widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings.
- void set_direction (TextDirection dir)
    Sets the reading direction on a particular widget.
- void shape_combine_mask (const Gdk::Bitmap &shape_mask, int offset_x, int offset_y)
    Sets a shape for this widget's GDK window.
- void shape_combine_mask ()
    Removes an exisitng shape from this widget's GDK window.

Keyboard and Pointer Grab Methods

- Gdk::GrabStatus keyboard_grab (bool owner_events=false, unsigned int time=GDK_CURRENT_TIME)
    Grabs the keyboard so that all events are passed to this widget until the keyboard is ungrabbed with Gdk::keyboard_ungrab().
- Gdk::GrabStatus pointer_grab (Gdk::EventMaskField event_mask, Widget *confine_to=0, Gdk::Cursor *cursor=0, bool owner_events=false, unsigned int time=GDK_CURRENT_TIME)
    Grabs the pointer (usually a mouse) so that all events are passed to this widget until the pointer is ungrabbed with Gdk::pointer_ungrab(), or the grab widget becomes unviewable.

Selection Methods (from gtkselection.h)

- bool selection_owner_get (Gdk::Atom selection)
    Returns whether the widget owns selection.
- bool selection_owner_set (Gdk::Atom selection, unsigned int time, const Gdk::Display *display=0)
    Claim ownership of a given selection for a particular widget.
- void selection_add_target (Gdk::Atom selection, Gdk::Atom target, unsigned int info)
    Adds the specified target to the list of supported targets for the widget and selection.
- void selection_add_target (Gdk::Atom selection, const TargetEntry &entry)
    Adds the specified target to the list of supported targets for the widget and selection.
- void selection_add_targets (Gdk::Atom selection, const std::vector< TargetEntry > &targets)
    Adds the targets specified in targets to the list of supported targets for the widget and selection.
- void selection_clear_targets (Gdk::Atom selection)
    Remove all targets registered for the given selection for the widget.
- bool selection_convert (Gdk::Atom selection, Gdk::Atom target, unsigned int time=GDK_CURRENT_TIME)
    Requests the contents of a selection.
- void selection_remove_all ()
    Removes all handlers and unsets ownership of all selections for the widget.

Target Drag-and-Drop Methods (from gtkdnd.h)

- void drag_get_data (DragContext &context, Gdk::Atom target, unsigned int time=GDK_CURRENT_TIME)
    Gets the data associated with a drag.
- void drag_highlight ()
    Draws a highlight around the widget.
- void drag_unhighlight ()
    Removes a highlight set by drag_highlight() from the widget.
- void drag_dest_set (DestDefaultsField flags, const TargetEntry &target, Gdk::DragActionField actions)
    Sets the widget as a potential drop destination.
- void drag_dest_set (DestDefaultsField flags, const std::vector< TargetEntry > &targets, Gdk::DragActionField actions)
    Sets the widget as a potential drop destination.
- void drag_dest_set_proxy (Gdk::Window *proxy_window, Gdk::DragProtocol protocol, bool use_coordinates)
    Sets the widget as a proxy for drops to another window.
- void drag_dest_unset ()
    Clears information about a drop destination set with drag_dest_set().
- Gdk::Atom drag_dest_find_target (const DragContext &context, const TargetList *target_list=0)
    Looks for a match between context.targets() and the target_list, returning the first matching target, otherwise returning GDK_NONE.
- Pointer< TargetList > drag_dest_get_target_list () const
    Returns the list of targets this widget can accept from drag-and-drop.
- void drag_dest_set_target_list (TargetList *target_list)
    Sets the target types that this widget can accept from drag-and-drop.

Source Drag-and-Drop Methods (from gtkdnd.h)

- DragContext * drag_source_begin (const TargetList &targets, Gdk::DragActionField actions, int button, const Gdk::Event &event)
    Initiates a drag on the source side.
- void drag_source_set (Gdk::ModifierTypeField start_button_mask, const TargetEntry &target, Gdk::DragActionField actions)
    Sets up the widget so that GTK+ will start a drag operation when the user clicks and drags on the widget.
- void drag_source_set (Gdk::ModifierTypeField start_button_mask, const std::vector< TargetEntry > &targets, Gdk::DragActionField actions)
    Sets up the widget so that GTK+ will start a drag operation when the user clicks and drags on the widget.
- void drag_source_unset ()
    Undoes the effects of drag_source_set().
- void drag_source_set_icon (Gdk::Colormap *colormap, Gdk::Pixmap *pixmap, Gdk::Bitmap *mask)
    Sets the icon that will be used for drags from the widget from a pixmap and mask.
- void drag_source_set_icon_pixbuf (Gdk::Pixbuf &pixbuf)
    Sets the icon that will be used for drags from the widget from a Gdk::Pixbuf.
- void drag_source_set_icon_stock (const char *stock_id)
    Sets the icon that will be used for drags from the widget to a stock icon.
- 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 threshhold, and thus should trigger the beginning of a drag-and-drop operation.

Property Proxies

- const NamePropertyProxy prop_name ()
    The name of the widget (String : Read / Write).
- const ParentPropertyProxy prop_parent ()
    The parent widget of this widget. Must be a Container widget (Container* : Read / Write).
- const WidthRequestPropertyProxy prop_width_request ()
    Override for width request of the widget, or -1 if the natural request should be used (int : Read / Write).
- const HeightRequestPropertyProxy prop_height_request ()
    Override for height request of the widget, or -1 if the natural request should be used (int : Read / Write).
- const VisiblePropertyProxy prop_visible ()
    Whether the widget is visible (bool : Read / Write).
- const SensitivePropertyProxy prop_sensitive ()
    Whether the widget responds to input (bool : Read / Write).
- const AppPaintablePropertyProxy prop_app_paintable ()
    Whether the application will paint directly on the widget (bool : Read / Write).
- const CanFocusPropertyProxy prop_can_focus ()
    Whether the widget can accept the input focus (bool : Read / Write).
- const HasFocusPropertyProxy prop_has_focus ()
    Whether the widget has the input focus (bool : Read / Write).
- const IsFocusPropertyProxy prop_is_focus ()
    Whether the widget is the focus widget within the toplevel (bool : Read / Write).
- const CanDefaultPropertyProxy prop_can_default ()
    Whether the widget can be the default widget (bool : Read / Write).
- const HasDefaultPropertyProxy prop_has_default ()
    Whether the widget is the default widget (bool : Read / Write).
- const ReceivesDefaultPropertyProxy prop_receives_default ()
    If true, the widget will receive the default action when it is focused (bool : Read / Write).
- const CompositeChildPropertyProxy prop_composite_child ()
    Whether the widget is part of a composite widget (bool : Read).
- const StylePropertyProxy prop_style ()
    The style of the widget, which contains information about how it will look (Style* : Read / Write).
- const EventsPropertyProxy prop_events ()
    The event mask that decides what kind of GdkEvents this widget gets (Gdk::EventMask : Read / Write).
- const ExtensionEventsPropertyProxy prop_extension_events ()
    The mask that decides what kind of extension events this widget gets (Gdk::ExtensionMode : Read / Write).

Basic Signal Proxies

- const ShowSignalProxy sig_show ()
    Connect to the show_signal; emitted when a widget becomes visible.
- const HideSignalProxy sig_hide ()
    Connect to the hide_signal; emitted when a widget is hidden (invisible to the user).
- const MapSignalProxy sig_map ()
    Connect to the map_signal; emitted when a widget becomes mapped.
- const UnmapSignalProxy sig_unmap ()
    Connect to the unmap_signal; emitted when a widget becomes unmapped.
- const RealizeSignalProxy sig_realize ()
    Connect to the realize_signal; emitted when a widget is realized.
- const UnrealizeSignalProxy sig_unrealize ()
    Connect to the unrealize_signal; emitted when a widget is unrealized.
- const SizeRequestSignalProxy sig_size_request ()
    Connect to the size_request_signal; emitted to obtain the preferred size of a widget.
- const SizeAllocateSignalProxy sig_size_allocate ()
    Connect to the size_allocate_signal; emitted when a child widget is allocated a size and position.
- const StateChangedSignalProxy sig_state_changed ()
    Connect to the state_changed_signal; emitted when the widget state changes.
- const ParentSetSignalProxy sig_parent_set ()
    Connect to the parent_set_signal; emitted when the parent container of the widget is set.
- const HierarchyChangedSignalProxy sig_hierarchy_changed ()
    Connect to the hierarchy_changed_signal; emitted when there is a change in the hierarchy to which the widget belongs.
- const StyleSetSignalProxy sig_style_set ()
    Connect to the style_set_signal; emitted when the widget style is changed.
- const DirectionChangedSignalProxy sig_direction_changed ()
    Connect to the direction_changed_signal; emitted when the reading direction on the widget is changed.
- const GrabNotifySignalProxy sig_grab_notify ()
    Connect to the grab_notify_signal; emitted to notify the widget whether it is the current grabbed widget in an application.
- const ChildNotifySignalProxy sig_child_notify ()
    Connect to the child_notify_signal; emitted when a child widget property is changed.
- const MnemonicActivateSignalProxy sig_mnemonic_activate ()
    Connect to the mnemonic_activate_signal; emitted to activate the widget when the mnemonic key it's associated with is pressed.
- const GrabFocusSignalProxy sig_grab_focus ()
    Connect to the grab_focus_signal; emitted when the widget receives the keyboard focus for the Window it's inside.
- const FocusSignalProxy sig_focus ()
    Connect to the focus_signal; emitted when on a child widget when it receives the focus (see child_focus()).
- const ScreenChangedSignalProxy sig_screen_changed ()
    Connect to the screen_changed_signal; emitted when the Gdk::Screen on which the widget is displayed is changed.

Selection Signal Proxies

- const SelectionGetSignalProxy sig_selection_get ()
    Connect to the selection_get_signal; emitted when the selection data is requested, if this widget is the selection owner.
- const SelectionReceivedSignalProxy sig_selection_received ()
    Connect to the selection_received_signal; emitted to notify the widget that the requested selection data has been converted and provided by the selection owner.

Source-side Drag Signal Proxies

- const DragBeginSignalProxy sig_drag_begin ()
    Connect to the drag_begin_signal; emitted to notify the widget that a drag-and-drop event has started.
- const DragEndSignalProxy sig_drag_end ()
    Connect to the drag_end_signal; emitted to notify the widget that a drag-and-drop event has ended.
- const DragDataGetSignalProxy sig_drag_data_get ()
    Connect to the drag_data_get_signal; emitted after a valid drop to request the data of the first target supported by the destination widget.
- const DragDataDeleteSignalProxy sig_drag_data_delete ()
    Connect to the drag_data_delete_signal; emitted after a successful drop to indicate that the data can be deleted.

Target-side Drag Signal Proxies

- const DragLeaveSignalProxy sig_drag_leave ()
    Connect to the drag_leave_signal; emitted whenever a drag-and-drop action leaves the widget.
- const DragMotionSignalProxy sig_drag_motion ()
    Connect to the drag_motion_signal; emitted when the mouse passes over the widget to verifiy whether it can accept a drop.
- const DragDropSignalProxy sig_drag_drop ()
    Connect to the drag_drop_signal; emitted to notify the widget that a drop has occurred.
- const DragDataReceivedSignalProxy sig_drag_data_received ()
    Connect to the drag_data_received_signal; emitted to notify the widget when the data from a drop is received.

GDK Event Signal Proxies

- const EventSignalProxy sig_event ()
    Connect to the event_signal; emitted when any GDK event occurs.
- const ButtonPressEventSignalProxy sig_button_press_event ()
    Connect to the button_press_event_signal; emitted when a mouse button has been pressed.
- const ButtonReleaseEventSignalProxy sig_button_release_event ()
    Connect to the button_release_event_signal; emitted when a mouse button has been released.
- const ScrollEventSignalProxy sig_scroll_event ()
    Connect to the scroll_event_signal; emitted when a mouse wheel is scrolled either up or down.
- const MotionNotifyEventSignalProxy sig_motion_notify_event ()
    Connect to the motion_notify_event_signal; emitted when the mouse is moved.
- const DestroyEventSignalProxy sig_destroy_event ()
    Connect to the destroy_event_signal; emitted when the widget has been destroyed.
- const ExposeEventSignalProxy sig_expose_event ()
    Connect to the expose_event_signal; emitted when all or part of the widget has become visible and needs to be redrawn.
- const KeyPressEventSignalProxy sig_key_press_event ()
    Connect to the key_press_event_signal; emitted when a key is pressed.
- const KeyReleaseEventSignalProxy sig_key_release_event ()
    Connect to the key_release_event_signal; emitted when a key is released.
- const EnterNotifyEventSignalProxy sig_enter_notify_event ()
    Connect to the enter_notify_event_signal; emitted when the widget is entered.
- const LeaveNotifyEventSignalProxy sig_leave_notify_event ()
    Connect to the leave_notify_event_signal; emitted when then widget is exited.
- const ConfigureEventSignalProxy sig_configure_event ()
    Connect to the configure_event_signal; emitted when the size, position or stacking order of the widget is changed.
- const FocusInEventSignalProxy sig_focus_in_event ()
    Connect to the focus_in_event_signal; emitted when the widget gains the keyboard focus (the focus widget gets keyboard events).
- const FocusOutEventSignalProxy sig_focus_out_event ()
    Connect to the focus_out_event_signal; emitted when the widget looses the keyboard focus.
- const MapEventSignalProxy sig_map_event ()
    Connect to the map_event_signal; emitted when the widget has been mapped (visible on the screen).
- const UnmapEventSignalProxy sig_unmap_event ()
    Connect to the unmap_event_signal; emitted when the widget has been mapped (no longer visible on the screen).
- const PropertyNotifyEventSignalProxy sig_property_notify_event ()
    Connect to the property_notify_event_signal; emitted when a property on the widget has been changed or deleted.
- const SelectionClearEventSignalProxy sig_selection_clear_event ()
    Connect to the selection_clear_event_signal; emitted when an application has lost ownership of a selection.
- const SelectionRequestEventSignalProxy sig_selection_request_event ()
    Connect to the selection_request_event_signal; emitted when another application has requested a selection.
- const SelectionNotifyEventSignalProxy sig_selection_notify_event ()
    Connect to the selection_notify_event_signal; emitted when a selection has been received.
- const ProximityInEventSignalProxy sig_proximity_in_event ()
    Connect to the proximity_in_event_signal; emitted when an input device has moved into contact with a sensing surface (such as a touchscreen or graphics tablet).
- const ProximityOutEventSignalProxy sig_proximity_out_event ()
    Connect to the proximity_out_event_signal; emitted when an input device has moved out of contact with a sensing surface.
- const VisibilityNotifyEventSignalProxy sig_visibility_notify_event ()
    Connect to the visibility_notify_event_signal; emitted when the widget's visibility status has changed (either fully obscured, partially obscured or unobscured).
- const ClientEventSignalProxy sig_client_event ()
    Connect to the client_event_signal; emitted when a message has been received from another application.
- const NoExposeEventSignalProxy sig_no_expose_event ()
    Connect to the no_expose_event_signal; emitted when all or part of the widget has become visible, but no expose event was generated.
- const WindowStateEventSignalProxy sig_window_state_event ()
    Connect to the window_state_event_signal; emitted when the state of a toplevel window changes (either not shown, minimized, maximized, sticky or fullscreen).

## Static Public Member Functions

- const Style * get_default_style ()
    Returns the default style used by all widgets initially.
- Gdk::Colormap * get_default_colormap ()
    Returns the default colormap used to create widgets.
- const Gdk::Visual * get_default_visual ()
    Returns the visual of the default colormap.
- TextDirection get_default_direction ()
    Returns the current default reading direction (see set_default_direction()).
- void push_colormap (Gdk::Colormap &cmap)
    Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets.
- void push_composite_child ()
    A composite child is a child that's an implementation detail of the container it's inside and should not be visible to people using the container.
- void pop_composite_child ()
    Cancels the effect of a previous call to push_composite_child().
- void pop_colormap ()
    Removes a colormap pushed with push_colormap().
- void set_default_colormap (Gdk::Colormap *colormap)
    Sets the default colormap to use when creating widgets.
- void set_default_direction (TextDirection dir)
    Sets the default reading direction for widgets where the direction has not been explicitly set by set_direction().
- bool selection_owner_unset (Gdk::Atom selection, unsigned int time, const Gdk::Display *display=0)
    Releases ownership of a given selection.

## Protected Member Functions

Constructors

- Widget ()
    Construct a new widget.
- Widget (GtkWidget *widget, bool reference=false)
    Construct a new Widget from an existing GtkWidget.

Methods

- virtual void initialize ()
    Called implicitly immediately after the widget is realized but before it is mapped (becomes visible on the screen).
- void set_allocation (const Allocation &allocation)
    Sets the position and size allocated to a child widget.
- void set_window (const Gdk::Window &window)
    Sets the Gdk::Window for the widget.

Basic Signal Handlers

- virtual void on_show ()
    Called when a widget becomes visible.
- virtual void on_hide ()
    Called when a widget is hidden (invisible to the user).
- virtual void on_map ()
    Called when a widget becomes mapped.
- virtual void on_unmap ()
    Called when a widget becomes unmapped.
- virtual void on_realize ()
    Called when a widget is realized.
- virtual void on_unrealize ()
    Called when a widget is unrealized.
- virtual void on_size_request (Requisition *requisition)
    Called to obtain the preferred size of a widget.
- virtual void on_size_allocate (const Allocation &allocation)
    Called when a child widget is allocated a size and position.
- virtual void on_state_changed (StateType previous_state)
    Called when the widget state changes.
- virtual void on_parent_set (Widget *previous_parent)
    Called when the parent container of the widget is set.
- virtual void on_hierarchy_changed (Widget *previous_toplevel)
    Called when there is a change in the hierarchy to which the widget belongs.
- virtual void on_style_set (Style *previous_style)
    Called when the widget style is changed.
- virtual void on_direction_changed (TextDirection previous_direction)
    Called when the reading direction on the widget is changed.
- virtual void on_grab_notify (bool was_grabbed)
    Called to notify the widget whether it is the current grabbed widget in an application.
- virtual void on_child_notify (GParamSpec *pspec)
    Called when a child widget property is changed.
- virtual bool on_mnemonic_activate (bool group_cycling)
    Called to activate the widget when the mnemonic key it's associated with is pressed.
- virtual void on_grab_focus ()
    Called when the widget receives the keyboard focus for the Window it's inside.
- virtual bool on_focus (DirectionType direction)
    Called when a child widget receives the focus (see child_focus()).
- virtual void on_screen_changed (Gdk::Screen *previous_screen)
    Called when the screen the widget is displayed on is changed.

Selection Signal Handlers

- virtual void on_selection_get (SelectionData &selection_data, unsigned int info, unsigned int time)
    Called when the selection data is requested, if this widget is the selection owner.
- virtual void on_selection_received (const SelectionData &selection_data, unsigned int time)
    Called to notify the widget that the requested selection data has been converted and provided by the selection owner.

Source-side Drag Signal Handlers

- virtual void on_drag_begin (DragContext &context)
    Called to notify the widget that a drag-and-drop event has started.
- virtual void on_drag_end (DragContext &context)
    Called to notify the widget that a drag-and-drop event has ended.
- virtual void on_drag_data_get (DragContext &context, SelectionData &data, unsigned int info, unsigned int time)
    Called after a valid drop to request the data of the first target supported by the destination widget.
- virtual void on_drag_data_delete (DragContext &context)
    Called after a successful drop to indicate that the data can be deleted.

Target-side Drag Signal Handlers

- virtual void on_drag_leave (DragContext &context, unsigned int time)
    Called whenever a drag-and-drop action leaves the widget.
- virtual bool on_drag_motion (DragContext &context, int x, int y, unsigned int time)
    Called when the mouse passes over the widget to verifiy whether it can accept a drop.
- virtual bool on_drag_drop (DragContext &context, int x, int y, unsigned int time)
    Called to notify the widget that a drop has occurred.
- virtual void on_drag_data_received (DragContext &context, int x, int y, const SelectionData &data, unsigned int info, unsigned int time)
    Called to notify the widget when the data from a drop is received.

GDK Event Signal Handlers

- virtual bool on_event (const Gdk::Event &event)
    Called when any GDK event occurs.
- virtual bool on_button_press_event (const Gdk::EventButton &event)
    Called when a mouse button has been pressed.
- virtual bool on_button_release_event (const Gdk::EventButton &event)
    Called when a mouse button has been released.
- virtual bool on_scroll_event (const Gdk::EventScroll &event)
    Called when a mouse wheel is scrolled either up or down.
- virtual bool on_motion_notify_event (const Gdk::EventMotion &event)
    Called when the mouse is moved.
- virtual bool on_destroy_event (const Gdk::EventAny &event)
    Called when the widget has been destroyed.
- virtual bool on_expose_event (const Gdk::EventExpose &event)
    Called when all or part of the widget has become visible and needs to be redrawn.
- virtual bool on_key_press_event (const Gdk::EventKey &event)
    Called when a key is pressed.
- virtual bool on_key_release_event (const Gdk::EventKey &event)
    Called when a key is released.
- virtual bool on_enter_notify_event (const Gdk::EventCrossing &event)
    Called when a widget is entered.
- virtual bool on_leave_notify_event (const Gdk::EventCrossing &event)
    Called when a widget is exited.
- virtual bool on_configure_event (const Gdk::EventConfigure &event)
    Called when the size, position or stacking order of the widget is changed.
- virtual bool on_focus_in_event (const Gdk::EventFocus &event)
    Called when the widget gains the keybaord focus (the focus widget gets keyboard events).
- virtual bool on_focus_out_event (const Gdk::EventFocus &event)
    Called when the widget looses the keyboard focus.
- virtual bool on_map_event (const Gdk::EventAny &event)
    Called when the widget has been mapped (visible on the screen).
- virtual bool on_unmap_event (const Gdk::EventAny &event)
    Called when the widget has been unmapped (no longer visible on the screen).
- virtual bool on_property_notify_event (const Gdk::EventProperty &event)
    Called when a property on the widget has been changed or deleted.
- virtual bool on_selection_clear_event (const Gdk::EventSelection &event)
    Called when an application has lost ownership of a selection.
- virtual bool on_selection_request_event (const Gdk::EventSelection &event)
    Called when another application has requested a selection.
- virtual bool on_selection_notify_event (const Gdk::EventSelection &event)
    Called when a selection has been received.
- virtual bool on_proximity_in_event (const Gdk::EventProximity &event)
    Called when an input device has moved into contact with a sensing surface (such as a touchscreen or graphics tablet).
- virtual bool on_proximity_out_event (const Gdk::EventProximity &event)
    Called when an input device has moved out of contact with a sensing surface.
- virtual bool on_visibility_notify_event (const Gdk::EventVisibility &event)
    Called when the widget's visibility status has changed (either fully obscured, partially obscured or unobscured.
- virtual bool on_client_event (const Gdk::EventClient &event)
    Called when a message has been received from another application.
- virtual bool on_no_expose_event (const Gdk::EventAny &event)
    Called when all or part of the widget has become visible, but no expose event was generated.
- virtual bool on_window_state_event (const Gdk::EventWindowState &event)
    Called when the state of a toplevel window changes (either not shown, minimized, maximized, sticky or fullscreen).

## Detailed Description

A GtkWidget C++ wrapper class.

Widget is the base class for widgets that make up the graphical user interface, such as windows, menus, buttons, scrollbars, editors, drawing areas, and so on.

After implementing a widget in your application you frequently need to set some widget-specific attributes, such as the widget's size, position, and so on. When the user interacts with a widget, such as pulling down a menu and making a selection, clicking a button, or moving a scrollbar, your application needs to respond by calling a callback slot that you supply. Callback slots are objects that call the class or static method that you want attached to a user action.

A parent-child relationship must be established between widgets in your application, such as by packing a button into a box or adding a menu item to a menu. These releationships provide management capabitilies and help determine the layout of the user interface. After widgets are created, parent-child relationships established, and callback slots attached you need to display the widgets. This is accomplished by calling show() on a widget, or show_all() on the parent widget to to show all the child widgets at once.

Any user action in you interface causes the corresponding widget to emit a signal, to which your callback slot has been attached. You can respond to these signals in two ways. The first way is to derive a new class from the widget, such as Gtk::Button, and override one or more of its inherited virutal signal handlers, such as on_clicked() for the button's "clicked" signal. Continuing with Gtk::Button, the second way is to create an instance of Gtk::Button and attach to it your clicked callback slot, by calling sig_clicked().connect(slot());

Widget implements this Atk::Implementor interface. Calling get_accessible() is the same as calling ref_accessible() inherited from Atk::Implementor, except ref_accessible() returns a smart pointer.

## Constructor & Destructor Documentation

Inti::Gtk::Widget::Widget | ( | GtkWidget * | widget,
|  | bool | reference = false
| ) | `[explicit, protected]`

Construct a new Widget from an existing GtkWidget.

Parameters:

  widget | A pointer to a GtkWidget.
  reference | Set false if the initial reference count is floating, set true if it's not.

The widget can be a newly created GtkWidget or an existing GtkWidget (see G::Object::Object).

## Member Function Documentation

bool Inti::Gtk::Widget::activate | ( |  | ) |

For widgets that can be activated (buttons, menu items, etc) this method activates them.

Returns:
  true if the widget was activatable.

Activation is what happens when you press Enter on a widget during key navigation; clicking a button, selecting a menu item, etc. If the widget isn't activatable, this method returns false.

Reimplemented in Inti::Gtk::MenuItem.

void Inti::Gtk::Widget::add_accelerator | ( | const String & | accel_signal,
|  | AccelGroup & | accel_group,
|  | const AccelKey & | accel_key
| ) |

Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated.

Parameters:

  accel_signal | The widget signal to emit on accelerator activation.
  accel_group | The accelerator group for this widget, added to its toplevel.
  accel_key | An AccelKey that holds the accelerator key, modifier and flag values.

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 G_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::AccelMap::add_entry() and set_accel_path() or Gtk::MenuItem::set_accel_path() instead.

void Inti::Gtk::Widget::add_events | ( | Gdk::EventMaskField | events | ) |

Adds the events in the bitfield events to the event mask for the widget (see set_events()).

Parameters:

  events | An event mask, see Gdk::EventMask.

bool Inti::Gtk::Widget::child_focus | ( | DirectionType | direction | ) |

Moves the focus to the child widget.

Parameters:

  direction | The direction of focus movement.

Returns:
  true if the focus ended up inside the widget.

This method is used by custom widget implementations; if you're writing an application, 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 methods 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() invokes the "focus" signal on the Widget; widgets override the default handler for this signal in order to implement appropriate focus behavior. The "focus" default 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.

void Inti::Gtk::Widget::child_notify | ( | const char * | child_property | ) |

Emits a child_notify signal for the child property child_property on the widget.

Parameters:

  child_property | The name of a child property installed on the class of widget's parent.

void Inti::Gtk::Widget::class_path | ( | String & | path,
|  | String & | path_reversed
| ) | const

Same as path(), but always uses the name of a widget's type, never uses a custom name set with set_name().

Parameters:

  path | The location to store the path string, or null.
  path_reversed | The location to store path string, or null.

Pointer<Pango::Context> Inti::Gtk::Widget::create_pango_context | ( |  | ) |

Creates a new Pango::Context with the appropriate colormap, font description, and base direction for drawing text for this widget (see also get_pango_context()).

Returns:
  A smart pointer to the new Pango::Context.

Pointer<Pango::Layout> Inti::Gtk::Widget::create_pango_layout | ( | const String & | text | ) |

Creates a new Pango::Layout with the appropriate colormap, font description, and base direction for drawing text for this widget.

Parameters:

  text | The text to set on the layout (can be a null String).

Returns:
  A smart pointer to the new Pango::Layout.

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 for this widget, you must call Pango::Layout::context_changed() in response to the style_set and direction_set signals for the widget.

bool Inti::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 threshhold, and thus should trigger the beginning of a drag-and-drop operation.

Parameters:

  start_x | The X coordinate of start of drag.
  start_y | The Y coordinate of start of drag.
  current_x | The current X coordinate.
  current_y | The current Y coordinate.

Returns:
  true if the drag threshold has been passed.

Gdk::Atom Inti::Gtk::Widget::drag_dest_find_target | ( | const DragContext & | context,
|  | const TargetList * | target_list = 0
| ) |

Looks for a match between context.targets() and the target_list, returning the first matching target, otherwise returning GDK_NONE.

Parameters:

  context | A drag context.
  target_list | A TargetList of droppable targets, or null to use drag_dest_get_target_list().

Returns:
  The first target that the source offers and the dest can accept, or GDK_NONE.

The target_list should usually be the return value from 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.

Pointer<TargetList> Inti::Gtk::Widget::drag_dest_get_target_list | ( |  | ) | const

Returns the list of targets this widget can accept from drag-and-drop.

Returns:
  A smart pointer to the TargetList, or null if none.

void Inti::Gtk::Widget::drag_dest_set | ( | DestDefaultsField | flags,
|  | const std::vector< TargetEntry > & | targets,
|  | Gdk::DragActionField | actions
| ) |

Sets the widget as a potential drop destination.

Parameters:

  flags | The flags that specify what actions GTK+ should take on behalf of a widget for drops onto that widget.
  targets | A vector of TargetEntry indicating the drop types that this widget will accept.
  actions | A bitmask of possible actions for a drop onto this widget.

The targets and actions fields only are used if DEST_DEFAULT_MOTION or DEST_DEFAULT_DROP are given.

void Inti::Gtk::Widget::drag_dest_set | ( | DestDefaultsField | flags,
|  | const TargetEntry & | target,
|  | Gdk::DragActionField | actions
| ) |

Sets the widget as a potential drop destination.

Parameters:

  flags | The flags that specify what actions GTK+ should take on behalf of a widget for drops onto that widget.
  target | A TargetEntry indicating the drop type that this widget will accept.
  actions | A bitmask of possible actions for a drop onto this widget.

The targets and actions fields only are used if DEST_DEFAULT_MOTION or DEST_DEFAULT_DROP are given.

void Inti::Gtk::Widget::drag_dest_set_proxy | ( | Gdk::Window * | proxy_window,
|  | Gdk::DragProtocol | protocol,
|  | bool | use_coordinates
| ) |

Sets the widget as a proxy for drops to another window.

Parameters:

  proxy_window | The window to which to forward drag events
  protocol | The drag protocol which the proxy_window accepts (You can use gdk_drag_get_protocol() to determine this).
  use_coordinates | If true, send the same coordinates to the destination, because it is an embedded subwindow.

void Inti::Gtk::Widget::drag_dest_set_target_list | ( | TargetList * | target_list | ) |

Sets the target types that this widget can accept from drag-and-drop.

Parameters:

  target_list | A list of droppable targets, or null for none.

The widget must first be made into a drag destination with drag_dest_set().

void Inti::Gtk::Widget::drag_dest_unset | ( |  | ) |

| Clears information about a drop destination set with drag_dest_set(). The widget will no longer receive notification of drags.

void Inti::Gtk::Widget::drag_get_data | ( | DragContext & | context,
|  | Gdk::Atom | target,
|  | unsigned int | time = GDK_CURRENT_TIME
| ) |

Gets the data associated with a drag.

Parameters:

  context | The drag context.
  target | The target (form of the data) to retrieve.
  time | A timestamp for retrieving the data.

When the data is received or the retrieval fails, GTK+ will emit a drag_data_received signal. Failure of the retrieval is indicated by Gtk::SelectionData::is_valid() returning false. However, when drag_get_data() is called implicitely because the Gtk::DRAG_DEFAULT_DROP was set, then the widget will not receive notification of failed drops and Gtk::SelectionData::is_valid() will be undefined. time will generally be the time received in a drag_data_motion or drag_data_drop signal.

void Inti::Gtk::Widget::drag_highlight | ( |  | ) |

| Draws a highlight around the widget. This will attach handlers to expose_event and draw, so the highlight will continue to be displayed until drag_unhighlight() is called.

DragContext* Inti::Gtk::Widget::drag_source_begin | ( | const TargetList & | targets,
|  | Gdk::DragActionField | actions,
|  | int | button,
|  | const Gdk::Event & | event
| ) |

Initiates a drag on the source side.

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.

The method only needs to be used when the application is starting drags itself, and is not needed when drag_source_set() is used.

void Inti::Gtk::Widget::drag_source_set | ( | Gdk::ModifierTypeField | start_button_mask,
|  | const std::vector< TargetEntry > & | targets,
|  | Gdk::DragActionField | actions
| ) |

Sets up the widget so that GTK+ will start a drag operation when the user clicks and drags on the widget.

Parameters:

  start_button_mask | The bitmask of buttons that can start the drag.
  targets | A vector of TargetEntry for the targets the drag will support.
  actions | The bitmask of possible actions for a drag from this widget.

void Inti::Gtk::Widget::drag_source_set | ( | Gdk::ModifierTypeField | start_button_mask,
|  | const TargetEntry & | target,
|  | Gdk::DragActionField | actions
| ) |

Sets up the widget so that GTK+ will start a drag operation when the user clicks and drags on the widget.

Parameters:

  start_button_mask | The bitmask of buttons that can start the drag.
  target | The TargetEntry for the target the drag will support.
  actions | The bitmask of possible actions for a drag from this widget.

void Inti::Gtk::Widget::drag_source_set_icon | ( | Gdk::Colormap * | colormap,
|  | Gdk::Pixmap * | pixmap,
|  | Gdk::Bitmap * | mask
| ) |

Sets the icon that will be used for drags from the widget from a pixmap and mask.

Parameters:

  colormap | The colormap of the icon.
  pixmap | The image data for the icon.
  mask | The transparency mask for an image.

GTK+ retains references for the arguments, and will release them when they are no longer needed. Use drag_source_set_icon_pixbuf() instead.

void Inti::Gtk::Widget::drag_source_set_icon_pixbuf | ( | Gdk::Pixbuf & | pixbuf | ) |

Sets the icon that will be used for drags from the widget from a Gdk::Pixbuf.

Parameters:

  pixbuf | The Gdk::Pixbuf for the drag icon.

GTK+ retains references for pixbuf, and will release it when it is no longer needed.

void Inti::Gtk::Widget::drag_source_set_icon_stock | ( | const char * | stock_id | ) |

Sets the icon that will be used for drags from the widget to a stock icon.

Parameters:

  stock_id | The ID of the stock icon to use.

void Inti::Gtk::Widget::ensure_style | ( |  | ) |

| Ensures that the widget has a style. Not a very useful method; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.

bool Inti::Gtk::Widget::event | ( | const Gdk::Event & | event | ) |

This rarely-used method is used to emit the event signals on a widget (those signals should never be emitted without using this method to do so).

Parameters:

  event | A Gdk::Event.

Returns:
  The return from the event signal emission (true if the event was handled).

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.

void Inti::Gtk::Widget::freeze_child_notify | ( |  | ) |

| Stops the emission of child_notify signals on the widget. The signals are queued until thaw_child_notify() is called on the widget.

Widget* Inti::Gtk::Widget::get_ancestor | ( | GType | widget_type | ) | const

Gets the first ancestor of widget with type widget_type.

Parameters:

  widget_type | The ancestor type.

Returns:
  The ancestor widget, or null if not found.

For example, get_ancestor(GTK_TYPE_BOX) gets the first Box that's an ancestor of the 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().

void Inti::Gtk::Widget::get_child_requisition | ( | Requisition & | requisition | ) | const

Obtains the child widget requisition, unless someone has forced a particular geometry on the widget, in which case it returns that geometry instead of the widget's requisition.

Parameters:

  requisition | The Requisition to be filled in.

This method is only for use in widget implementations. It differs from size_request() in that it retrieves the last size request value from gtk_widget()->requisition, while size_request() actually calls the "size_request" method on the widget to compute the size request and fill in gtk_widget()->requisition, and only then returns gtk_widget()->requisition. Because this method does not call the "size_request" method, it can only be used when you know that gtk_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().

Requisition Inti::Gtk::Widget::get_child_requisition | ( |  | ) | const

Obtains the child widget requisition (see get_child_requisition(Requisition&) const).

Returns:
  A Requisition that holds the child widget's width and height.

bool Inti::Gtk::Widget::get_child_visible | ( |  | ) | const

Returns the value set with set_child_visible().

Returns:
  true if the widget is mapped with the parent.

If you feel a need to use this method, your code probably needs reorganization. This method is only useful for container implementations and never should be called by an application.

Clipboard* Inti::Gtk::Widget::get_clipboard | ( | Gdk::Atom | selection = GDK_SELECTION_CLIPBOARD | ) | const

Returns the clipboard object for the given selection to be used with widget.

Parameters:

  selection | A Gdk::Atom which identifies the clipboard to use.

Returns:
  The appropriate clipboard object.

The widget must have a Gdk::Display associated with it, and so must be attached to a toplevel window. GDK_SELECTION_CLIPBOARD gives the default clipboard. Another common value is GDK_SELECTION_PRIMARY, which gives the primary X selection. If no clipboard already exists, a new one will be created. Once a clipboard object has been created, it is persistent for all time. All clipboard objects are owned by GTK+ and will be freed when GTK+ is removed from memory.

Gdk::Colormap* Inti::Gtk::Widget::get_colormap | ( |  | ) | const

| Returns the colormap that will be used to render the widget. No reference will be added to the returned colormap; it should not be unreferenced.

const Style* Inti::Gtk::Widget::get_default_style | ( |  | ) | `[static]`

Returns the default style used by all widgets initially.

Returns:
  The default style. This Style object is owned by GTK+ and should not be modified or unreferenced.

const Gdk::Visual* Inti::Gtk::Widget::get_default_visual | ( |  | ) | `[static]`

| Returns the visual of the default colormap. Not really useful; used to be useful before Gdk::Colormap::get_visual() existed.

Gdk::Display* Inti::Gtk::Widget::get_display | ( |  | ) | const

Get the Gdk::Display for the toplevel window associated with this widget.

Returns:
  The Gdk::Display for the toplevel for this widget.

This method 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.

Gdk::EventMaskField Inti::Gtk::Widget::get_events | ( |  | ) | const

Gets the event mask for the widget (a bitfield containing flags from the Gdk::EventMask enumeration).

Returns:
  The event mask for the widget.

These are the events that the widget will receive.

RcStyle* Inti::Gtk::Widget::get_modifier_style | ( |  | ) | const

Returns the current modifier style for the widget (as set by modify_style()).

If no style has previously set, a new RcStyle will be created with all values unset, and set as the modifier style for the widget. If you make changes to this rc style, you must call modify_style(), passing in the returned rc style, to make sure that your changes take effect.

Caution: passing the style back to modify_style() will normally end up destroying it, because modify_style() copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive.

String Inti::Gtk::Widget::get_name | ( |  | ) | const

Retrieves the name of the widget (see set_name() for the significance of widget names).

Returns:
  The name of the widget.

Pango::Context* Inti::Gtk::Widget::get_pango_context | ( |  | ) | const

Returns a Pango::Context with the appropriate colormap, font description and base direction for the widget.

Unlike the context returned by create_pango_context(), this context is owned by the widget (it can be used as long as widget exists), 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 style_set and direction_set signals for the widget.

Gdk::Point Inti::Gtk::Widget::get_pointer | ( |  | ) | const

Obtains the location of the mouse pointer in widget coordinates.

Returns:
  The widget coordinates stored in a Gdk::Point.

Widget coordinates are a bit odd; for historical reasons, they are defined as Gdk::Window coordinates for widgets that are not Gtk::NO_WINDOW widgets, and are relative to get_allocation().x and get_allocation().y for widgets that are Gtk::NO_WINDOW widgets.

void Inti::Gtk::Widget::get_pointer | ( | int * | x,
|  | int * | y
| ) | const

Obtains the location of the mouse pointer in widget coordinates.

Parameters:

  x | The return location for the X coordinate, or null.
  y | The return location for the Y coordinate, or null.

Widget coordinates are a bit odd; for historical reasons, they are defined as Gdk::Window coordinates for widgets that are not Gtk::NO_WINDOW widgets, and are relative to get_allocation().x and get_allocation().y for widgets that are Gtk::NO_WINDOW widgets.

Gdk::Window* Inti::Gtk::Widget::get_root_window | ( |  | ) | const

The root window is useful for such purposes as creating a popup Gdk::Window associated with the window.

Returns:
  The Gdk::Window root window for the toplevel for this widget.

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.

Gdk::Screen* Inti::Gtk::Widget::get_screen | ( |  | ) | const

Get the Gdk::Screen from the toplevel window associated with this widget.

Returns:
  The Gdk::Screen for the toplevel for 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.

Reimplemented in Inti::Gtk::Invisible, and Inti::Gtk::Window.

Settings* Inti::Gtk::Widget::get_settings | ( |  | ) | const

Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget.

Returns:
  The relevant Settings object.

Note that this method can only be called when the Widget is attached to a toplevel, since the settings object is specific to a particular Gdk::Screen.

void Inti::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().

Parameters:

  width | The return location for the width, or null.
  height | The return location for the height, or null.

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 method.

Widget* Inti::Gtk::Widget::get_toplevel | ( |  | ) | const

This method returns the topmost widget in the container hierarchy the widget is a part of.

Returns:
  The topmost ancestor of widget, or widget itself if there's no ancestor.

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(); get_ancestor(Gtk::TYPE_WINDOW) would return null 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 Plug is embedded inside a Socket within the same application.

To reliably find the toplevel Gtk::Window, use get_toplevel() and check is_top_level() on the result.

                 Gtk::Widget *toplevel = widget->get_toplevel();
                 if (is_toplevel())
                 {
                    // Perform action on toplevel.
                 }

void Inti::Gtk::Widget::grab_default | ( |  | ) |

| Causes the widget to become the default widget. The widget must have the Gtk::CAN_DEFAULT flag set; typically you have to set this flag yourself by calling set_flags(Gtk::CAN_DEFAULT). 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 Inti::Gtk::Widget::grab_focus | ( |  | ) |

| Causes the widget to have the keyboard focus for the Window it's inside. The widget must be a focusable widget, such as an Entry; something like Frame won't work. More precisely, it must have the Gtk::CAN_FOCUS flag set.

bool Inti::Gtk::Widget::has_screen | ( |  | ) | const

Checks whether there is a Gdk::Screen is associated with this widget.

Returns:
  true if there is a Gdk::Screen associcated with the widget.

All toplevel widgets have an associated screen, as do all widgets added into a heirarchy with a toplevel window at the top.

virtual void Inti::Gtk::Widget::initialize | ( |  | ) | `[protected, virtual]`

| Called implicitly immediately after the widget is realized but before it is mapped (becomes visible on the screen). This is useful for initializing data common to several constructors or for implementing code that requires the widget to have been realized first.

Pointer<Gdk::Region> Inti::Gtk::Widget::intersect | ( | Gdk::Region & | region | ) |

Computes the intersection of a widget's area and region, and returns the intersection as a new Gdk::Region.

Parameters:

  region | a Gdk::Region.

Returns:
  A smart pointer to a new Gdk::Region holding the intersection of the widget and region.

region must be in the same coordinate system as the widget's allocation. That is, relative to the widget's GDK window for NO_WINDOW widgets; relative to the parent window of widget's GDK window for widgets with their own window. The coordinates returned are relative to the widget's GDK window for NO_WINDOW widgets, and relative to the parent window of widget's GDK window for widgets with their own window. The returned region may be empty, use Gdk::Region::empty() to check.

Gdk::Rectangle Inti::Gtk::Widget::intersect | ( | const Gdk::Rectangle & | area | ) |

Computes the intersection of a widget's area and area, and returns the intersection as a rectanlge.

that stores .

Parameters:

  area | A rectangle.

Returns:
  A rectangle storing the intersection if there was an intersection.

The returned rectangle will be empty if there was no intersection.

bool Inti::Gtk::Widget::intersect | ( | const Gdk::Rectangle & | area,
|  | Gdk::Rectangle * | intersection
| ) |

Computes the intersection of a widget's area and area, storing the intersection in intersection, and returns true if there was an intersection.

Parameters:

  area | A rectangle.
  intersection | The rectangle to store intersection of the widget and area.

Returns:
  true if there was an intersection.

The intersection may be null if you're only interested in whether there was an intersection.

bool Inti::Gtk::Widget::is_ancestor | ( | Widget * | ancestor | ) | const

Determines whether the widget is somewhere inside ancestor, possibly within an intermediate container.

Parameters:

  ancestor | Another Widget.

Returns:
  true if ancestor contains the widget as a child, grandchild, great grandchild, etc.

bool Inti::Gtk::Widget::is_focus | ( |  | ) | const

Determines if the widget is the focus widget within its toplevel.

Returns:
  true if the widget is the focus widget.

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.

Gdk::GrabStatus Inti::Gtk::Widget::keyboard_grab | ( | bool | owner_events = false,
|  | unsigned int | time = GDK_CURRENT_TIME
| ) |

Grabs the keyboard so that all events are passed to this widget until the keyboard is ungrabbed with Gdk::keyboard_ungrab().

Parameters:

  owner_events | If false then all keyboard events are reported with respect the widget. If true then keyboard events for this application are reported as normal, but keyboard events outside this application are reported with respect to the widget. Both key press and key release events are always reported, independant of the event mask set by the application.
  time | A timestamp from a Gdk::Event, or GDK_CURRENT_TIME if no timestamp is available.

Returns:
  Gdk::GRAB_SUCCESS if the grab was successful.

This overrides any previous keyboard grab by this client. The widget's Gdk::Window will own the grab (the grab window).

bool Inti::Gtk::Widget::list_accel_closures | ( | std::vector< GClosure * > & | closures | ) |

Lists the closures used by the widget for accelerator group connections with Gtk::AccelGroup::connect().

/* T

Parameters:

  closures | A reference to a vector of GClosure* to hold the list of closures.

Returns:
  true if the vector is not empty.

The closures can be used to monitor accelerator changes on the widget, by connecting to the accel_changed signal of the AccelGroup of a closure, which can be found out with Gtk::AccelGroup::from_accel_closure().

bool Inti::Gtk::Widget::mnemonic_activate | ( | bool | group_cycling | ) |

Actviates the widget if it's suitable for mnemonic actviaton.

Parameters:

  group_cycling |

Returns:
  true if the widget was activated.

void Inti::Gtk::Widget::modify_base | ( | StateType | state,
|  | const Gdk::Color * | color
| ) |

Sets the base color for the widget in a particular state.

Parameters:

  state | The state for which to set the base color.
  color | The color to assign (does not need to be allocated), or null to undo the effect of previous calls to of modify_base().

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 Entry and TextView. See also modify_style().

void Inti::Gtk::Widget::modify_bg | ( | StateType | state,
|  | const Gdk::Color * | color
| ) |

Sets the background color for the widget in a particular state.

Parameters:

  state | The state for which to set the background color.
  color | The color to assign (does not need to be allocated), or null to undo the effect of previous calls to modify_bg().

All other style values are left untouched (see also modify_style()).

void Inti::Gtk::Widget::modify_fg | ( | StateType | state,
|  | const Gdk::Color * | color
| ) |

Sets the foreground color for the widget in a particular state.

Parameters:

  state | The state for which to set the foreground color.
  color | The color to assign (does not need to be allocated), or null to undo the effect of previous calls to modify_fg().

All other style values are left untouched (se also modify_style()).

void Inti::Gtk::Widget::modify_font | ( | const Pango::FontDescription * | font_desc | ) |

Sets the font to use for the widget.

Parameters:

  font_desc | The font description to use, or null to undo the effect of previous calls to modify_font().

All other style values are left untouched. See also modify_style().

void Inti::Gtk::Widget::modify_style | ( | RcStyle & | style | ) |

Modifies style values on the widget.

Parameters:

  style | The RcStyle holding the style modifications.

Modifications made using this method 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 RcStyle structure is designed so each field can either be set or unset, so it is possible, using this method, to modify some style values and leave the others unchanged.

Note that modifications made with this method 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 methods as modify_fg() will have a cumulative effect with the initial modifications.

void Inti::Gtk::Widget::modify_text | ( | StateType | state,
|  | const Gdk::Color * | color
| ) |

Sets the text color for the widget in a particular state.

Parameters:

  state | The state for which to set the text color.
  color | The color to assign (does not need to be allocated), or null to undo the effect of previous calls to modify_text().

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 Entry and TextView. See also modify_style().

virtual bool Inti::Gtk::Widget::on_button_press_event | ( | const Gdk::EventButton & | event | ) | `[protected, virtual]`

Called when a mouse button has been pressed.

Parameters:

  event | The Gdk::EventButton.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_button_release_event | ( | const Gdk::EventButton & | event | ) | `[protected, virtual]`

Called when a mouse button has been released.

Parameters:

  event | The Gdk::EventButton.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_child_notify | ( | GParamSpec * | pspec | ) | `[protected, virtual]`

Called when a child widget property is changed.

Parameters:

  pspec | A GParamSpec object that holds the meta data specifying the new property.

virtual bool Inti::Gtk::Widget::on_client_event | ( | const Gdk::EventClient & | event | ) | `[protected, virtual]`

Called when a message has been received from another application.

Parameters:

  event | The Gdk::EventClient.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_configure_event | ( | const Gdk::EventConfigure & | event | ) | `[protected, virtual]`

Called when the size, position or stacking order of the widget is changed.

Parameters:

  event | The Gdk::EventConfigure.

Returns:
  true to stop invoking other handlers, false to propagate the event.

Note that these events are discarded for Gdk::WINDOW_CHILD windows.

virtual bool Inti::Gtk::Widget::on_destroy_event | ( | const Gdk::EventAny & | event | ) | `[protected, virtual]`

Called when the widget has been destroyed.

Parameters:

  event | The Gdk::EventAny.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_direction_changed | ( | TextDirection | previous_direction | ) | `[protected, virtual]`

Called when the reading direction on the widget is changed.

Parameters:

  previous_direction | The previous direction.

virtual void Inti::Gtk::Widget::on_drag_begin | ( | DragContext & | context | ) | `[protected, virtual]`

Called to notify the widget that a drag-and-drop event has started.

Parameters:

  context | A reference to a Gtk::DragContext (only used by GTK+).

It's quite useful to know when a drag-and-drop event has started. This makes it possible to create a snapshot of the data that will be provided for each target and to make sure that each event contains the latest version of the data.

virtual void Inti::Gtk::Widget::on_drag_data_delete | ( | DragContext & | context | ) | `[protected, virtual]`

Called after a successful drop to indicate that the data can be deleted.

Parameters:

  context | A reference to a Gtk::DragContext (only used by GTK+).

The drag_data_delete signal is used internally by GTK+ to implement drag-and-drop support in text widgets, such as entry, TextBuffer and TextView. It wont be of much use to you unless you're implementing manual drag-and-drop.

virtual void Inti::Gtk::Widget::on_drag_data_get | ( | DragContext & | context,
|  | SelectionData & | data,
|  | unsigned int | info,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called after a valid drop to request the data of the first target supported by the destination widget.

Parameters:

  context | A reference to a Gtk::DragContext (only used by GTK+).
  data | The SelectionData that needs to be filled in to provide the requested data.
  info | The info integer that was set when the target was registered (see TargertEntry).
  time | The time of the conversion request.

To provide the data for the requested target data needs to be filled in. Calling Gtk::SelectionData::get_target() enables you to know for which target the data needs to be formatted. The formatted data can then be set by calling Gtk::SelectionData:set() or Gtk::SelectionData::set_text(). The destination widget will receive the data when this handler returns.

virtual void Inti::Gtk::Widget::on_drag_data_received | ( | DragContext & | context,
|  | int | x,
|  | int | y,
|  | const SelectionData & | data,
|  | unsigned int | info,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called to notify the widget when the data from a drop is received.

Parameters:

  context | A reference to a Gtk::DragContext.
  x | The X position of the mouse pointer relative to the widget.
  y | The Y position of the mouse pointer relative to the widget.
  data | The SelectionData that contains all the information about the data received.
  info | The info integer that was set when the target was registered (see TargertEntry).
  time | The time of the conversion request.

virtual bool Inti::Gtk::Widget::on_drag_drop | ( | DragContext & | context,
|  | int | x,
|  | int | y,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called to notify the widget that a drop has occurred.

Parameters:

  context | A reference to the Gtk::DragContext for the current drag-and-drop event.
  x | The X position of the mouse pointer relative to the widget.
  y | The Y position of the mouse pointer relative to the widget.
  time | The time when the event occurred.

Returns:
  true if the widget is a valid drag-and-drop destination.

Gdk::DragContext::targets() can be called to decide which target's data has to be obtained. When this is known, the drag_get_data() method has to be called to actually request the data. The data will be provided through a drag_data_received signal.

virtual void Inti::Gtk::Widget::on_drag_end | ( | DragContext & | context | ) | `[protected, virtual]`

Called to notify the widget that a drag-and-drop event has ended.

Parameters:

  context | A reference to a Gtk::DragContext (only used by GTK+).

It's useful to be notified when a drag-and-drop event ends. This allows you to free memory that was allocated when the event was started.

virtual void Inti::Gtk::Widget::on_drag_leave | ( | DragContext & | context,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called whenever a drag-and-drop action leaves the widget.

Parameters:

  context | A reference to the Gtk::DragContext for the current drag-and-drop event.
  time | The time when the event occurred.

This handler might be useful to undo any action you took when the widget was first entered (i.e. on the first drag_motion signal).

virtual bool Inti::Gtk::Widget::on_drag_motion | ( | DragContext & | context,
|  | int | x,
|  | int | y,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called when the mouse passes over the widget to verifiy whether it can accept a drop.

Parameters:

  context | A reference to the Gtk::DragContext for the current drag-and-drop event.
  x | The X position of the mouse pointer relative to the widget.
  y | The Y position of the mouse pointer relative to the widget.
  time | The time when the event occurred.

Returns:
  true if the widget is a valid drag-and-drop destination.

If false is returned the widget is not a drag-and-drop destination and the parent should be checked instead. When true is returned, the widget will be seen as a drag-and-drop destination and you'll have to verify if it can accept a drop.

Gdk::DragContext::targets() retrieves a list of atoms of all the targets supported by the source widget. You need this list to verify if one of the targets corresponds to the targets that can be accepted by the destination widget. Gdk::DragContext::actions() returns the actions supported by the source widget. Gdk::DragContext::suggested_action() returns the action suggested by automatically by GTK+. You're free to choose any of the default actions but this action is usually the best choice.

The source widget needs to be notified if the destination widget will accept a drop according to the provided targets and actions. This is done by calling Gdk::DragContext::status(). This method must always be called if this handler returns true. If it's not called the source widget will not issue another drag_motion signal.

virtual bool Inti::Gtk::Widget::on_enter_notify_event | ( | const Gdk::EventCrossing & | event | ) | `[protected, virtual]`

Called when a widget is entered.

Parameters:

  event | The Gdk::EventCrossing.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_event | ( | const Gdk::Event & | event | ) | `[protected, virtual]`

Called when any GDK event occurs.

Parameters:

  event | The Gdk::Event.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_expose_event | ( | const Gdk::EventExpose & | event | ) | `[protected, virtual]`

Called when all or part of the widget has become visible and needs to be redrawn.

Parameters:

  event | The Gdk::EventExpose.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_focus | ( | DirectionType | direction | ) | `[protected, virtual]`

Called when a child widget receives the focus (see child_focus()).

Parameters:

  direction | The direction of focus movement.

Returns:
  true if the focus ended up inside the child widget.

virtual bool Inti::Gtk::Widget::on_focus_in_event | ( | const Gdk::EventFocus & | event | ) | `[protected, virtual]`

Called when the widget gains the keybaord focus (the focus widget gets keyboard events).

Parameters:

  event | The Gdk::EventFocus.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_focus_out_event | ( | const Gdk::EventFocus & | event | ) | `[protected, virtual]`

Called when the widget looses the keyboard focus.

Parameters:

  event | The Gdk::EventFocus.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_grab_notify | ( | bool | was_grabbed | ) | `[protected, virtual]`

Called to notify the widget whether it is the current grabbed widget in an application.

Parameters:

  was_grabbed | true if the widget is the current grabbed widget, false if it was but is no longer the current grabbed widget.

The grabbed widget within an application is the widget that recieves all mouse and keyboard events, while interaction with other widgets is blocked.

virtual void Inti::Gtk::Widget::on_hierarchy_changed | ( | Widget * | previous_toplevel | ) | `[protected, virtual]`

Called when there is a change in the hierarchy to which the widget belongs.

Parameters:

  previous_toplevel | The previous toplevel widget.

More precisely, a widget is anchored when its toplevel ancestor is a Gtk::Window. This handler is called when a widget changes from un-anchored to anchored or vice-versa.

virtual bool Inti::Gtk::Widget::on_key_press_event | ( | const Gdk::EventKey & | event | ) | `[protected, virtual]`

Called when a key is pressed.

Parameters:

  event | The Gdk::EventKey.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_key_release_event | ( | const Gdk::EventKey & | event | ) | `[protected, virtual]`

Called when a key is released.

Parameters:

  event | The Gdk::EventKey.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_leave_notify_event | ( | const Gdk::EventCrossing & | event | ) | `[protected, virtual]`

Called when a widget is exited.

Parameters:

  event | The Gdk::EventCrossing.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_map_event | ( | const Gdk::EventAny & | event | ) | `[protected, virtual]`

Called when the widget has been mapped (visible on the screen).

Parameters:

  event | The Gdk::EventAny.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_mnemonic_activate | ( | bool | group_cycling | ) | `[protected, virtual]`

Called to activate the widget when the mnemonic key it's associated with is pressed.

Parameters:

  group_cycling |

virtual bool Inti::Gtk::Widget::on_motion_notify_event | ( | const Gdk::EventMotion & | event | ) | `[protected, virtual]`

Called when the mouse is moved.

Parameters:

  event | The Gdk::EventMotion.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_no_expose_event | ( | const Gdk::EventAny & | event | ) | `[protected, virtual]`

Called when all or part of the widget has become visible, but no expose event was generated.

Parameters:

  event | The Gdk::EventAny.

Returns:
  true to stop invoking other handlers, false to propagate the event.

Indicates that the source region was completely available when parts of a drawable were copied. This is not very useful.

virtual void Inti::Gtk::Widget::on_parent_set | ( | Widget * | previous_parent | ) | `[protected, virtual]`

Called when the parent container of the widget is set.

Parameters:

  previous_parent | The previous parent of the widget, or null.

virtual bool Inti::Gtk::Widget::on_property_notify_event | ( | const Gdk::EventProperty & | event | ) | `[protected, virtual]`

Called when a property on the widget has been changed or deleted.

Parameters:

  event | The Gdk::EventProperty.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_proximity_in_event | ( | const Gdk::EventProximity & | event | ) | `[protected, virtual]`

Called when an input device has moved into contact with a sensing surface (such as a touchscreen or graphics tablet).

Parameters:

  event | The Gdk::EventProximity.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_proximity_out_event | ( | const Gdk::EventProximity & | event | ) | `[protected, virtual]`

Called when an input device has moved out of contact with a sensing surface.

Parameters:

  event | The Gdk::EventProximity.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_screen_changed | ( | Gdk::Screen * | previous_screen | ) | `[protected, virtual]`

Called when the screen the widget is displayed on is changed.

Parameters:

  previous_screen | The previous Gdk:Screen.

virtual bool Inti::Gtk::Widget::on_scroll_event | ( | const Gdk::EventScroll & | event | ) | `[protected, virtual]`

Called when a mouse wheel is scrolled either up or down.

Parameters:

  event | The Gdk::EventScroll.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_selection_clear_event | ( | const Gdk::EventSelection & | event | ) | `[protected, virtual]`

Called when an application has lost ownership of a selection.

Parameters:

  event | The Gdk::EventSelection.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_selection_get | ( | SelectionData & | selection_data,
|  | unsigned int | info,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called when the selection data is requested, if this widget is the selection owner.

Parameters:

  selection_data | The SelectionData object to be filled in.
  info | The info integer that was set when the target was registered (see TargetEntry).
  time | The time of the conversion request as set by the requestor with selectionn_convert().

This handler is called in response to a call to selection_convert() by the selection requestor. The selection_data object needs to be filled in. Calling Gtk::SelectionData::get_target() and Gtk::SelectionData::get_selection() enables you to know for which target of which selection the data needs to be formatted. The formatted data can then be set by calling Gtk::SelectionData:set() or Gtk::SelectionData::set_text(). The selection requestor will receive the data when this handler returns.

virtual bool Inti::Gtk::Widget::on_selection_notify_event | ( | const Gdk::EventSelection & | event | ) | `[protected, virtual]`

Called when a selection has been received.

Parameters:

  event | The Gdk::EventSelection.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_selection_received | ( | const SelectionData & | selection_data,
|  | unsigned int | time
| ) | `[protected, virtual]`

Called to notify the widget that the requested selection data has been converted and provided by the selection owner.

Parameters:

  selection_data | The requested selection data.
  time | The time of the conversion request.

virtual bool Inti::Gtk::Widget::on_selection_request_event | ( | const Gdk::EventSelection & | event | ) | `[protected, virtual]`

Called when another application has requested a selection.

Parameters:

  event | The Gdk::EventSelection.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual void Inti::Gtk::Widget::on_size_allocate | ( | const Allocation & | allocation | ) | `[protected, virtual]`

Called when a child widget is allocated a size and position.

Parameters:

  allocation | The position and size allocated to the widget.

virtual void Inti::Gtk::Widget::on_size_request | ( | Requisition * | requisition | ) | `[protected, virtual]`

Called to obtain the preferred size of a widget.

Parameters:

  requisition | The Requisition to be filled in.

virtual void Inti::Gtk::Widget::on_state_changed | ( | StateType | previous_state | ) | `[protected, virtual]`

Called when the widget state changes.

Parameters:

  previous_state | The previous StateType.

virtual void Inti::Gtk::Widget::on_style_set | ( | Style * | previous_style | ) | `[protected, virtual]`

Called when the widget style is changed.

Parameters:

  previous_style | The previous Style, or null.

virtual bool Inti::Gtk::Widget::on_unmap_event | ( | const Gdk::EventAny & | event | ) | `[protected, virtual]`

Called when the widget has been unmapped (no longer visible on the screen).

Parameters:

  event | The Gdk::EventAny.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_visibility_notify_event | ( | const Gdk::EventVisibility & | event | ) | `[protected, virtual]`

Called when the widget's visibility status has changed (either fully obscured, partially obscured or unobscured.

Parameters:

  event | The Gdk::EventVisibility.

Returns:
  true to stop invoking other handlers, false to propagate the event.

virtual bool Inti::Gtk::Widget::on_window_state_event | ( | const Gdk::EventWindowState & | event | ) | `[protected, virtual]`

Called when the state of a toplevel window changes (either not shown, minimized, maximized, sticky or fullscreen).

Parameters:

  event | The Gdk::EventWindowState.

Returns:
  true to stop invoking other handlers, false to propagate the event.

void Inti::Gtk::Widget::path | ( | String & | path,
|  | String & | path_reversed
| ) | const

Obtains the full path to the widget.

Parameters:

  path | The location to store the path string, or null.
  path_reversed | The location to store path string, or null.

The path is simply the name of a widget and all its parents in the container hierarchy, separated by periods. The name of a widget comes from get_name(). Paths are used to apply styles to a widget in gtkrc configuration files. Widget names are the type of the widget by default (e.g. "Button") or can be set to an application-specific value with set_name(). By setting the name of a widget, you allow users or theme authors to apply styles to that specific widget in their gtkrc file. path_reversed fills in the path in reverse order, i.e. starting with widget's name instead of starting with the name of widget's outermost ancestor.

Gdk::GrabStatus Inti::Gtk::Widget::pointer_grab | ( | Gdk::EventMaskField | event_mask,
|  | Widget * | confine_to = 0,
|  | Gdk::Cursor * | cursor = 0,
|  | bool | owner_events = false,
|  | unsigned int | time = GDK_CURRENT_TIME
| ) |

Grabs the pointer (usually a mouse) so that all events are passed to this widget until the pointer is ungrabbed with Gdk::pointer_ungrab(), or the grab widget becomes unviewable.

Parameters:

  event_mask | Specifies the event mask, which is used in accordance with owner_events.
  confine_to | If non-null, the pointer will be confined to this widget during the grab. If the pointer is outside confine_to, it will automatically be moved to the closest edge of confine_to and enter and leave events will be generated as necessary.
  cursor | The cursor to display while the grab is active. If this is null then the normal cursors are used for the widget and its descendants, and the cursor for the widget is used for all other windows.
  owner_events | If false then all pointer events are reported with respect to the widget and are only reported if selected by event_mask. If true then pointer events for this application are reported as normal, but pointer events outside this application are reported with respect to the widget and only if selected by event_mask. In either mode, unreported events are discarded.
  time | The timestamp of the event which led to this pointer grab. This usually comes from a Gdk::EventButton, though GDK_CURRENT_TIME can be used if the time isn't known.

Returns:
  Gdk::GRAB_SUCCESS if the grab was successful.

This overrides any previous pointer grab by this client. The widget's Gdk::Window will own the grab (the grab window). Pointer grabs are used for operations which need complete control over mouse events, even if the mouse leaves the application. For example in GTK+ it is used for Drag and Drop, for dragging the handle in the HPaned and VPaned widgets. Note that if the event mask of an X window has selected both button press and button release events, then a button press event will cause an automatic pointer grab until the button is released. X does this automatically since most applications expect to receive button press and release events in pairs. It is equivalent to a pointer grab on the window with owner_events set to true.

void Inti::Gtk::Widget::push_colormap | ( | Gdk::Colormap & | cmap | ) | `[static]`

Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets.

Parameters:

  cmap | A Gdk::Colormap

Remove cmap with pop_colormap(). There's little reason to use this method.

void Inti::Gtk::Widget::push_composite_child | ( |  | ) | `[static]`

| A composite child is a child that's an implementation detail of the container it's inside and should not be visible to people using the container. Composite children aren't treated differently by GTK but e.g. GUI builders might want to treat them in a different way.

void Inti::Gtk::Widget::queue_draw_area | ( | const Gdk::Rectangle & | rectangle | ) |

Invalidates the rectangular area of the widget defined by rectangle by calling Gdk::Window::invalidate_rect() on the widget's window and all its child windows.

Parameters:

  rectangle | A rectangle that specifies the area of the widget to invalidate.

void Inti::Gtk::Widget::queue_draw_area | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height
| ) |

Invalidates the rectangular area of the widget defined by x, y, width and height by calling Gdk::Window::invalidate_rect() on the widget's window and all its child windows.

Parameters:

  x | The X coordinate of upper-left corner of rectangle to redraw.
  y | The Y coordinate of upper-left corner of rectangle to redraw
  width | The width of region to draw.
  height | The height of region to draw.

Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated.

Normally you would only use this method in widget implementations. You might also use it, or Gdk::Window::invalidate_rect() directly, to schedule a redraw of a DrawingArea or some portion thereof. Frequently you can just call Gdk::Window::invalidate_rect() or Gdk::Window::invalidate_region() instead of this method. Those methods will invalidate only a single window, instead of the widget and all its children.

The advantage of adding to the invalidated region compared to simply drawing immediately is efficiency; using an invalid region ensures that you only have to redraw one time.

void Inti::Gtk::Widget::queue_resize | ( |  | ) |

| This method is only for use in widget implementations. Flags a widget to have its size renegotiated; should be called when a widget for some reason has a new size request. For example, when you change the text in a Label, Label queues a resize to ensure there's enough space for the new text.

Style* Inti::Gtk::Widget::rc_get_style | ( |  | ) | const

Finds all matching RC styles for a given widget, composites them together, and then creates a Style representing the composite appearance.

Returns:
  The resulting style. No refcount is added to the returned style, so if you want to keep this style around, you should add a reference yourself.

GTK+ actually keeps a cache of previously created styles, so a new style may not be created.

void Inti::Gtk::Widget::realize | ( |  | ) |

Creates the GDK (windowing system) resources associated with a widget.

For example, a widget's GDK window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically. Realizing a widget requires all the widget's parent widgets to be realized; calling realize() realizes the widget's parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen.

This method is primarily used in widget implementations, and isn't very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as expose_event signal. Or simply connect to the realize signal specifying after as true in the signal's connect method.

bool Inti::Gtk::Widget::remove_accelerator | ( | AccelGroup & | accel_group,
|  | const AccelKey & | accel_key
| ) |

Removes an accelerator from the widget previously installed with add_accelerator().

Parameters:

  accel_group | The accel group for this widget.
  accel_key | An AccelKey that holds the accelerator key, modifier and flag values.

Returns:
  Whether an accelerator was installed and could be removed.

Pointer<Gdk::Pixbuf> Inti::Gtk::Widget::render_icon | ( | const char * | stock_id,
|  | IconSize | size,
|  | const char * | detail = 0
| ) |

A convenience method that uses the theme engine and RC file settings for the widget to look up stock_id and render it to a pixbuf.

Parameters:

  stock_id | A stock ID.
  size | A stock size.
  detail | The render detail to pass to a theme engine.

Returns:
  A smart pointer to the new pixbuf, or null if the stock ID wasn't known.

stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK. size should be a size such as Gtk::ICON_SIZE_MENU. detail should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code. The pixels in the returned Gdk::Pixbuf are shared with the rest of the application and should not be modified.

void Inti::Gtk::Widget::reparent | ( | Widget & | new_parent | ) |

Moves a widget from one Container to another, handling reference count issues to avoid destroying the widget.

Parameters:

  new_parent | A Container to move the widget into.

void Inti::Gtk::Widget::reset_rc_styles | ( |  | ) |

| Reset the styles of the widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings. This method is not useful for applications

void Inti::Gtk::Widget::selection_add_target | ( | Gdk::Atom | selection,
|  | const TargetEntry & | entry
| ) |

Adds the specified target to the list of supported targets for the widget and selection.

Parameters:

  selection | The selection.
  entry | The target entry to add.

void Inti::Gtk::Widget::selection_add_target | ( | Gdk::Atom | selection,
|  | Gdk::Atom | target,
|  | unsigned int | info
| ) |

Adds the specified target to the list of supported targets for the widget and selection.

Parameters:

  selection | The selection.
  target | The target to add.
  info | An unsigned integer which will be passed back to the application.

void Inti::Gtk::Widget::selection_add_targets | ( | Gdk::Atom | selection,
|  | const std::vector< TargetEntry > & | targets
| ) |

Adds the targets specified in targets to the list of supported targets for the widget and selection.

Parameters:

  selection | The selection.
  targets | A reference to a vector of TargetEntry that holds the targets to add.

void Inti::Gtk::Widget::selection_clear_targets | ( | Gdk::Atom | selection | ) |

Remove all targets registered for the given selection for the widget.

Parameters:

  selection | An atom representing a selection.

bool Inti::Gtk::Widget::selection_convert | ( | Gdk::Atom | selection,
|  | Gdk::Atom | target,
|  | unsigned int | time = GDK_CURRENT_TIME
| ) |

Requests the contents of a selection.

Parameters:

  selection | Which selection to get.
  target | Form of information desired (e.g., STRING).
  time | Time of request (usually of triggering event), or you could use GDK_CURRENT_TIME.

Returns:
  true if the request succeeded. false if we could not process the request (e.g. there was already a request in process for this widget).

When received, a selection_received signal will be generated.

bool Inti::Gtk::Widget::selection_owner_get | ( | Gdk::Atom | selection | ) |

Returns whether the widget owns selection.

Parameters:

  selection | An interned atom representing the selection to check.

Returns:
  true if this widget owns selection.

bool Inti::Gtk::Widget::selection_owner_set | ( | Gdk::Atom | selection,
|  | unsigned int | time,
|  | const Gdk::Display * | display = 0
| ) |

Claim ownership of a given selection for a particular widget.

Parameters:

  selection | An interned atom representing the selection to claim.
  time | A timestamp with which to claim the selection, or GDK_CURRENT_TIME.
  display | The Gdk::Display where the selection is set, or null for the default display.

Returns:
  true if the operation succeeded.

bool Inti::Gtk::Widget::selection_owner_unset | ( | Gdk::Atom | selection,
|  | unsigned int | time,
|  | const Gdk::Display * | display = 0
| ) | `[static]`

Releases ownership of a given selection.

Parameters:

  selection | An interned atom representing the selection to release.
  time | A timestamp with which to claim the selection, or GDK_CURRENT_TIME.
  display | The Gdk::Display where the selection is set, or null for the default display.

Returns:
  true if the operation succeeded.

void Inti::Gtk::Widget::selection_remove_all | ( |  | ) |

| Removes all handlers and unsets ownership of all selections for the widget. Called when the widget is being destroyed. This method will not generally be called by applications.

int Inti::Gtk::Widget::send_expose | ( | const Gdk::EventExpose & | event | ) |

This rarely-used method is used to emit an expose_event signal on the widget.

Parameters:

  event | A Gdk::GdkEventExpose.

Returns:
  The return from the event signal emission (true if the event was handled).

This method is not normally used directly. The only time it is used is when propagating an expose event to a child NO_WINDOW widget, and that is normally done using Gtk::Container::propagate_expose().

If you want to force an area of a window to be redrawn, use Gdk::Window::invalidate_rect() or Gdk::Window::invalidate_region(). To cause the redraw to be done immediately, follow that call with a call to Gdk::Window::process_updates().

void Inti::Gtk::Widget::set_accel_path | ( | const char * | accel_path,
|  | 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, the widget will be activated.

Parameters:

  accel_path | The path used to look up the the accelerator.
  accel_group | The accelerator group.

This removes any accelerators (for any accelerator group) installed by previous calls to set_accel_path(). Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See Gtk::AccelMap_save().)

This method is a low level function that would most likely be used by a menu creation system like ItemFactory. If you use ItemFactory, setting up accelerator paths will be done automatically. Even when you you aren't using ItemFactory, if you only want to set up accelerators on menu items Gtk::MenuItem::set_accel_path() provides a somewhat more convenient interface.

void Inti::Gtk::Widget::set_allocation | ( | const Allocation & | allocation | ) | `[protected]`

Sets the position and size allocated to a child widget.

Parameters:

  allocation | The position and size to be allocated to the widget.

This method can be called from the widget's virtual on_size_request to set the allocation (see the Dial example program).

void Inti::Gtk::Widget::set_app_paintable | ( | bool | app_paintable | ) |

Sets the Gtk::APP_PAINTABLE flags on the widget.

Parameters:

  app_paintable | true if Gtk::APP_PAINTABLE should be set.

Must be set on widgets whose window the application directly draws on, in order to keep GTK+ from overwriting the drawn stuff.

void Inti::Gtk::Widget::set_child_visible | ( | bool | is_visible | ) |

Sets whether the widget should be mapped along with its parent when its parent is mapped and the widget has been shown with show().

Parameters:

  is_visible | If true, the widget should be mapped along with its parent.

The child visibility can be set for a widget before it is added to a container with set_parent(), to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of true when the widget is removed from a container.

Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself. This method is only useful for container implementations and never should be called by an application.

void Inti::Gtk::Widget::set_colormap | ( | Gdk::Colormap & | colormap | ) |

Sets the colormap for the widget to colormap.

Parameters:

  colormap | A colormap.

The widget must not have been previously realized. This probably should only be used from a constructor for the widget.

void Inti::Gtk::Widget::set_composite_name | ( | const String & | name | ) |

Sets a widgets composite name.

Parameters:

  name | The name to set.

The widget must be a composite child of its parent (see push_composite_child()).

void Inti::Gtk::Widget::set_default_colormap | ( | Gdk::Colormap * | colormap | ) | `[static]`

Sets the default colormap to use when creating widgets.

Parameters:

  colormap | A Gdk::Colormap.

push_colormap() is a better method to use if you only want to affect a few widgets, rather than all widgets.

void Inti::Gtk::Widget::set_default_direction | ( | TextDirection | dir | ) | `[static]`

Sets the default reading direction for widgets where the direction has not been explicitly set by set_direction().

Parameters:

  dir | The new default direction. This cannot be Gtk::TEXT_DIR_NONE.

void Inti::Gtk::Widget::set_direction | ( | TextDirection | dir | ) |

Sets the reading direction on a particular widget.

Parameters:

  dir | The new direction.

This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitely visual rather than logical (such as buttons for text justification). If the direction is set to Gtk::TEXT_DIR_NONE, then the value set by set_default_direction() will be used.

void Inti::Gtk::Widget::set_double_buffered | ( | bool | double_buffered | ) |

Widgets are double buffered by default; you can use this function to turn off the buffering.

Parameters:

  double_buffered | true to double-buffer a widget.

Double buffered simply means that Gdk::Window::begin_paint() and Gdk::Window::end_paint() are called automatically around expose events sent to the widget. Gdk::Window::begin_paint() diverts all drawing to a widget's window to an offscreen buffer, and Gdk::Window::end_paint() draws the buffer to the screen. The result is that users see the window update in one smooth step, and don't see individual graphics primitives being rendered. In very simple terms, double buffered widgets don't flicker, so you would only use this function to turn off double buffering if you had special needs and really knew what you were doing.

void Inti::Gtk::Widget::set_events | ( | Gdk::EventMaskField | events | ) |

Sets the event mask (see Gdk::EventMask) for a widget.

Parameters:

  events | The event mask.

The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget's functionality, so be careful. This method must be called while a widget is unrealized. Consider add_events() for widgets that are already realized, or if you want to preserve the existing event mask. This method can't be used with Gtk::NO_WINDOW widgets; to get events on those widgets, place them inside an EventBox and receive events on the event box.

void Inti::Gtk::Widget::set_extension_events | ( | Gdk::ExtensionMode | mode | ) |

Sets the extension events mask to mode (see Gdk::ExtensionMode and Gdk::Input::set_extension_events()).

Parameters:

  mode | The extension events to receive.

void Inti::Gtk::Widget::set_flags | ( | WidgetFlagsField | flags | ) |

Turns on certain widget flags.

Parameters:

  flags | The widget flags to set.

void Inti::Gtk::Widget::set_name | ( | const String & | name | ) |

Widgets can be named, which allows you to refer to them in a gtkrc file.

Parameters:

  name | The name for the widget.

You can apply a style to widgets with a particular name in the gtkrc file. See the GTK+ documentation for gtkrc files (on the same page as the docs for GtkRcStyle).

void Inti::Gtk::Widget::set_parent | ( | Widget & | parent | ) |

Sets the container as the parent of widget, and takes care of some details such as updating the state and style of the child to reflect its new location.

Parameters:

  parent | The parent container.

This method is useful only when implementing subclasses of Container. The opposite method is unparent().

void Inti::Gtk::Widget::set_parent_window | ( | Gdk::Window * | parent_window | ) |

Sets a non default parent window for widget.

Parameters:

  parent_window | The new parent window.

void Inti::Gtk::Widget::set_redraw_on_allocate | ( | bool | redraw_on_allocate | ) |

When a widgets size allocation changes, sets whether the entire widget is queued for drawing or not.

Parameters:

  redraw_on_allocate | Set true to redraw the entire widget when it's resized, and false to only redraw the new portion of the widget

By default, this setting is true and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting on will improve performance. Note that for NO_WINDOW widgets setting this flag to false turns off all allocation on resizing: the widget will not even redraw if its position changes; this is to allow containers that don't draw anything to avoid excess invalidations. If you set this flag on a NO_WINDOW widget that does draw on the widget's GDK window, you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size.

bool Inti::Gtk::Widget::set_scroll_adjustments | ( | Adjustment * | hadjustment,
|  | Adjustment * | vadjustment
| ) |

Sets the widget's scroll adjustments.

Parameters:

  hadjustment | An adjustment for horizontal scrolling, or null.
  vadjustment | An adjustment for vertical scrolling, or null.

Returns:
  true if the widget supports scrolling.

For widgets that support scrolling, sets the scroll adjustments and returns true. For widgets that don't support scrolling, does nothing and returns false. Widgets that don't support scrolling can be scrolled by placing them in a Viewport, which does support scrolling.

void Inti::Gtk::Widget::set_sensitive | ( | bool | sensitive | ) |

Sets the sensitivity of the widget.

Parameters:

  sensitive | true to make the widget sensitive.

A widget is sensitive if the user can interact with it. Insensitive widgets are grayed out and the user can't interact with them. Insensitive widgets are known as inactive, disabled, or ghosted in some other toolkits.

void Inti::Gtk::Widget::set_size_request | ( | int | width,
|  | int | height
| ) |

Sets the minimum size of a widget; that is, the widget's size request will be width by height.

Parameters:

  width | The width the widget should request, or -1 to unset.
  height | The height widget should request, or -1 to unset.

You can use this method to force a widget to be either larger or smaller than it normally would be. In most cases, set_default_size() is a better choice for toplevel windows than this method; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, Gtk::Window::set_geometry_hints() can be a useful method as well.

Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct.

The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested. If the size request in a given direction is -1 (unset), then the "natural" size request of the widget will be used instead. Widgets can't actually be allocated a size less than 1 by 1, but you can pass 0,0 to this function to mean "as small as possible."

void Inti::Gtk::Widget::set_state | ( | StateType | state | ) |

Used in widget implementations; sets the state of the widget (insensitive, prelighted, etc).

Parameters:

  state | The new state for the widget.

Usually you should set the state using wrapper functions such as set_sensitive().

void Inti::Gtk::Widget::set_style | ( | Style & | style | ) |

Sets the Style for the widget.

Parameters:

  style | A Gtk::Style, or null to remove the effect of a previous set_style() and go back to the default style.

You probably don't want to use this function; it interacts badly with themes, because themes work by replacing the Style. Instead, use modify_style().

void Inti::Gtk::Widget::set_window | ( | const Gdk::Window & | window | ) | `[protected]`

Sets the Gdk::Window for the widget.

Parameters:

  window | A Gdk::Window.

This method only works if gtk_widget()->window is null. It is only for use when implementing a custom widget that derives directly from Gtk::Widget. After creating a Gdk::Window for the custom widget in the widget's virtual on_realize() method you should call this method to set the window. If the widget already has a Gdk::Window nothing happens (see the Dial example program).

void Inti::Gtk::Widget::shape_combine_mask | ( | const Gdk::Bitmap & | shape_mask,
|  | int | offset_x,
|  | int | offset_y
| ) |

Sets a shape for this widget's GDK window.

Parameters:

  shape_mask | The shape to be added.
  offset_x | The X position of shape mask with respect to window.
  offset_y | The Y position of shape mask with respect to window.

This allows for transparent windows etc., see Gdk::Window::shape_combine_mask() for more information.

void Inti::Gtk::Widget::show | ( |  | ) |

Flags a widget to be displayed.

Any widget that isn't shown will not appear on the screen. If you want to show all the widgets in a container, it's easier to call widget_show_all() on the container, instead of individually showing the widgets.

Remember that you have to show the container containing a widget, in addition to the widget itself, before it will appear onscreen. When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.

void Inti::Gtk::Widget::show_now | ( |  | ) |

| Shows a widget. If the widget is an unmapped toplevel widget (i.e. a Gtk::Window that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this method.

const GrabFocusSignalProxy Inti::Gtk::Widget::sig_grab_focus | ( |  | ) | `[inline]`

| Connect to the grab_focus_signal; emitted when the widget receives the keyboard focus for the Window it's inside.

const HierarchyChangedSignalProxy Inti::Gtk::Widget::sig_hierarchy_changed | ( |  | ) | `[inline]`

| Connect to the hierarchy_changed_signal; emitted when there is a change in the hierarchy to which the widget belongs. More precisely, when its toplevel ancestor changes.

void Inti::Gtk::Widget::size_allocate | ( | const Allocation & | allocation | ) |

This method is only used by Container subclasses to assign a size and position to their child widgets.

Parameters:

  allocation | The position and size to be allocated to the widget.

void Inti::Gtk::Widget::size_request | ( | Requisition * | requisition | ) |

Typically used when implementing a Container subclass; obtains the preferred size of the widget.

Parameters:

  requisition | A Requisition to be filled in.

The container uses this information to arrange its child widgets and decide what size allocations to give them with size_allocate().

You can also call this function from an application, with some caveats. Most notably, getting a size request requires the widget to be associated with a screen, because font information may be needed. Multihead-aware applications should keep this in mind. Also remember that the size request is not necessarily the size a widget will actually be allocated. See also get_child_requisition().

void Inti::Gtk::Widget::style_get | ( | const char * | first_property_name,
|  | ... |
| ) | const

Gets the values of multiple style properties of the widget.

Parameters:

  first_property_name | The name of the first property to get.
  ... | Pairs of property names and locations to return the property values, starting with the location for first_property_name, terminated by null.

Note the return locations are GValue*, not G::Value*.

void Inti::Gtk::Widget::style_get_property | ( | const char * | property_name,
|  | G::Value & | value
| ) |

Gets the value of a style property of the widget.

Parameters:

  property_name | The name of a style property.
  value | The location to return the property value.

void Inti::Gtk::Widget::thaw_child_notify | ( |  | ) |

| Reverts the effect of a prevoious call to freeze_child_notify(). This causes all queued child_notify signals on widget to be emitted.

bool Inti::Gtk::Widget::translate_coordinates | ( | Widget & | src_widget,
|  | int | src_x,
|  | int | src_y,
|  | int * | dest_x,
|  | int * | dest_y
| ) | const

Translate coordinates relative to src_widget's allocation to coordinates relative to this widget's allocation.

Parameters:

  src_widget | The source widget.
  src_x | The X position relative to src_widget.
  src_y | The Y position relative to src_widget.
  dest_x | The location to store X position relative to this widget.
  dest_y | The location to store Y position relative to this widget.

Returns:
  false if either widget was not realized, or there was no common ancestor. In this case, nothing is stored in dest_x and dest_y. Otherwise true.

In order to perform this operation, both widgets must be realized, and must share a common toplevel.

void Inti::Gtk::Widget::unset_flags | ( | WidgetFlagsField | flags | ) |

Turns off certain widget flags.

Parameters:

  flags | The widget flags to unset.

The documentation for this class was generated from the following file:

- widget.h

Main Page - Footer