Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Gtk::WidgetSignals Class Reference

Abstract base class that implements the virtual signal handlers for Gtk::Widget. More...

#include <xfc/gtk/widgetsignals.hh>

Inheritance diagram for Xfc::Gtk::WidgetSignals:
Xfc::Gtk::ObjectSignals Xfc::G::ObjectSignals Xfc::G::TypeInstance Xfc::Trackable Xfc::Gtk::CalendarSignals Xfc::Gtk::ContainerSignals Xfc::Gtk::CurveSignals Xfc::Gtk::EntrySignals Xfc::Gtk::LabelSignals Xfc::Gtk::RangeSignals Xfc::Gtk::ButtonSignals Xfc::Gtk::ColorSelectionSignals Xfc::Gtk::ComboBoxSignals Xfc::Gtk::HandleBoxSignals Xfc::Gtk::IconViewSignals Xfc::Gtk::ItemSignals Xfc::Gtk::LayoutSignals Xfc::Gtk::MenuShellSignals Xfc::Gtk::NotebookSignals Xfc::Gtk::SocketSignals Xfc::Gtk::StatusbarSignals Xfc::Gtk::TextViewSignals Xfc::Gtk::ToolbarSignals Xfc::Gtk::ToolItemSignals Xfc::Gtk::TreeViewSignals Xfc::Gtk::ViewportSignals Xfc::Gtk::WindowSignals Xfc::Gtk::SpinButtonSignals Xfc::Gtk::ScaleSignals

List of all members.

Public Member Functions

Basic Signal Handlers

Protected Member Functions

Constructors

Detailed Description

Abstract base class that implements the virtual signal handlers for Gtk::Widget.


Constructor & Destructor Documentation

Constructs a new WidgetSignals object.

Parameters:
widgetA Widget object inheriting the WidgetSignals implementation.

Member Function Documentation

virtual bool Xfc::Gtk::WidgetSignals::on_button_press_event ( const Gdk::EventButton event) [virtual]

Called when a mouse button has been pressed.

Parameters:
eventThe Gdk::EventButton.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_button_release_event ( const Gdk::EventButton event) [virtual]

Called when a mouse button has been released.

Parameters:
eventThe Gdk::EventButton.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_can_activate_accel ( unsigned int  signal_id) [virtual]

Called to determine whether an accelerator that activates the signal identified by signal_id can currently be activated.

Parameters:
signal_idThe id of a signal installed on the widget.
Returns:
true if the accelerator can be activated.

The default determination is made by checking to see if the widget is sensitive, and all of its parents mapped.

virtual void Xfc::Gtk::WidgetSignals::on_child_notify ( GParamSpec *  pspec) [virtual]

Called for each child property that has changed on a widget.

Parameters:
pspecA GParamSpec object that holds the meta data specifying the new property.
virtual bool Xfc::Gtk::WidgetSignals::on_client_event ( const Gdk::EventClient event) [virtual]

Called when a message has been received from another application.

Parameters:
eventThe Gdk::EventClient.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_configure_event ( const Gdk::EventConfigure event) [virtual]

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

Parameters:
eventThe 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 Xfc::Gtk::WidgetSignals::on_delete_event ( const Gdk::EventAny event) [virtual]

Called when the user tries to close an application from the window manager frame.

Parameters:
eventThe Gdk::Event.
Returns:
false to allow the application window to close.

The event.type() method will return the type identifier Gdk::DELETE. The event.window() method will return the Gdk::Window reporting the event. The event.send_event() method indicates whether the event came from the X server or another source. Returning true will prevent the application window from closing.

Note: only top-level windows can receive the delete_event.

virtual bool Xfc::Gtk::WidgetSignals::on_destroy_event ( const Gdk::EventAny event) [virtual]

Called when the widget has been destroyed.

Parameters:
eventThe Gdk::EventAny.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual void Xfc::Gtk::WidgetSignals::on_direction_changed ( TextDirection  previous_direction) [virtual]

Called when the reading direction on the widget is changed.

Parameters:
previous_directionThe previous direction.
virtual void Xfc::Gtk::WidgetSignals::on_drag_begin ( DragContext context) [virtual]

Called on the drag source to notify it that a drag has started.

Parameters:
contextA 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. A typical reason to override this handler is to set up a custom drag icon with drag_source_set_icon().

virtual void Xfc::Gtk::WidgetSignals::on_drag_data_delete ( DragContext context) [virtual]

Called on the drag source when a drag with the action Gdk::ACTION_MOVE is successfully completed.

Parameters:
contextA 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. It indicates that the data can be deleted.

virtual void Xfc::Gtk::WidgetSignals::on_drag_data_get ( DragContext context,
SelectionData data,
unsigned int  info,
unsigned int  time 
) [virtual]

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

Parameters:
contextA reference to a Gtk::DragContext (only used by GTK+).
dataThe SelectionData that needs to be filled in to provide the requested data.
infoThe info integer that was set when the target was registered (see TargertEntry).
timeThe 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 Xfc::Gtk::WidgetSignals::on_drag_data_received ( DragContext context,
int  x,
int  y,
const SelectionData data,
unsigned int  info,
unsigned int  time 
) [virtual]

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

Parameters:
contextA reference to a Gtk::DragContext.
xThe X position of the mouse pointer relative to the widget.
yThe Y position of the mouse pointer relative to the widget.
dataThe SelectionData that contains all the information about the data received.
infoThe info integer that was set when the target was registered (see TargertEntry).
timeThe time of the conversion request.
virtual bool Xfc::Gtk::WidgetSignals::on_drag_drop ( DragContext context,
int  x,
int  y,
unsigned int  time 
) [virtual]

Called to notify the widget that a drop has occurred.

Parameters:
contextA reference to the Gtk::DragContext for the current drag-and-drop event.
xThe X position of the mouse pointer relative to the widget.
yThe Y position of the mouse pointer relative to the widget.
timeThe 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 Xfc::Gtk::WidgetSignals::on_drag_end ( DragContext context) [virtual]

Called on the drag source to notify it when a drag is finished.

Parameters:
contextA reference to a Gtk::DragContext (only used by GTK+).

It's useful to be notified when a drag-and-drop event ends. A typical reason to override this handler is to undo things done in on_drag_begin().

virtual void Xfc::Gtk::WidgetSignals::on_drag_leave ( DragContext context,
unsigned int  time 
) [virtual]

Called on the drop site when the cursor leaves the widget.

Parameters:
contextA reference to the Gtk::DragContext for the current drag-and-drop event.
timeThe timestamp of the motion event.

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), such as undo highlighting with drag_unhighlight().

virtual bool Xfc::Gtk::WidgetSignals::on_drag_motion ( DragContext context,
int  x,
int  y,
unsigned int  time 
) [virtual]

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

Parameters:
contextA reference to the Gtk::DragContext for the current drag-and-drop event.
xThe X position of the mouse pointer relative to the widget.
yThe Y position of the mouse pointer relative to the widget.
timeThe 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 Xfc::Gtk::WidgetSignals::on_enter_notify_event ( const Gdk::EventCrossing event) [virtual]

Called when a widget is entered.

Parameters:
eventThe Gdk::EventCrossing.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_event ( const Gdk::Event event) [virtual]

Called when any GDK event occurs.

Parameters:
eventThe Gdk::Event.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_expose_event ( const Gdk::EventExpose event) [virtual]

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

Parameters:
eventThe Gdk::EventExpose.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_focus ( DirectionType  direction) [virtual]

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

Parameters:
directionThe direction of focus movement.
Returns:
true if the focus ended up inside the child widget.
virtual bool Xfc::Gtk::WidgetSignals::on_focus_in_event ( const Gdk::EventFocus event) [virtual]

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

Parameters:
eventThe Gdk::EventFocus.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_focus_out_event ( const Gdk::EventFocus event) [virtual]

Called when the widget looses the keyboard focus.

Parameters:
eventThe Gdk::EventFocus.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual void Xfc::Gtk::WidgetSignals::on_grab_notify ( bool  was_grabbed) [virtual]

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

Parameters:
was_grabbedtrue 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 Xfc::Gtk::WidgetSignals::on_hierarchy_changed ( Widget previous_toplevel) [virtual]

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

Parameters:
previous_toplevelThe 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 Xfc::Gtk::WidgetSignals::on_key_press_event ( const Gdk::EventKey event) [virtual]

Called when a key is pressed.

Parameters:
eventThe Gdk::EventKey.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_key_release_event ( const Gdk::EventKey event) [virtual]

Called when a key is released.

Parameters:
eventThe Gdk::EventKey.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_leave_notify_event ( const Gdk::EventCrossing event) [virtual]

Called when a widget is exited.

Parameters:
eventThe Gdk::EventCrossing.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_map_event ( const Gdk::EventAny event) [virtual]

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

Parameters:
eventThe Gdk::EventAny.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_mnemonic_activate ( bool  group_cycling) [virtual]

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

Parameters:
group_cycling
virtual bool Xfc::Gtk::WidgetSignals::on_motion_notify_event ( const Gdk::EventMotion event) [virtual]

Called when the mouse is moved.

Parameters:
eventThe Gdk::EventMotion.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_no_expose_event ( const Gdk::EventAny event) [virtual]

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

Parameters:
eventThe 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 Xfc::Gtk::WidgetSignals::on_parent_set ( Widget previous_parent) [virtual]

Called when the parent container of the widget is set.

Parameters:
previous_parentThe previous parent of the widget, or null.
virtual bool Xfc::Gtk::WidgetSignals::on_property_notify_event ( const Gdk::EventProperty event) [virtual]

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

Parameters:
eventThe Gdk::EventProperty.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_proximity_in_event ( const Gdk::EventProximity event) [virtual]

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

Parameters:
eventThe Gdk::EventProximity.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_proximity_out_event ( const Gdk::EventProximity event) [virtual]

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

Parameters:
eventThe Gdk::EventProximity.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual void Xfc::Gtk::WidgetSignals::on_screen_changed ( Gdk::Screen previous_screen) [virtual]

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

Parameters:
previous_screenThe previous Gdk:Screen.
virtual bool Xfc::Gtk::WidgetSignals::on_scroll_event ( const Gdk::EventScroll event) [virtual]

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

Parameters:
eventThe Gdk::EventScroll.
Returns:
true to stop invoking other handlers, false to propagate the event.

Called when an application has lost ownership of a selection.

Parameters:
eventThe Gdk::EventSelection.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual void Xfc::Gtk::WidgetSignals::on_selection_get ( SelectionData selection_data,
unsigned int  info,
unsigned int  time 
) [virtual]

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

Parameters:
selection_dataThe SelectionData object to be filled in.
infoThe info integer that was set when the target was registered (see TargetEntry).
timeThe 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.

Called when a selection has been received.

Parameters:
eventThe Gdk::EventSelection.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual void Xfc::Gtk::WidgetSignals::on_selection_received ( const SelectionData selection_data,
unsigned int  time 
) [virtual]

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

Parameters:
selection_dataThe requested selection data.
timeThe time of the conversion request.

Called when another application has requested a selection.

Parameters:
eventThe Gdk::EventSelection.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual void Xfc::Gtk::WidgetSignals::on_size_allocate ( const Allocation allocation) [virtual]

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

Parameters:
allocationThe position and size allocated to the widget.
virtual void Xfc::Gtk::WidgetSignals::on_size_request ( Requisition requisition) [virtual]

Called to obtain the preferred size of a widget.

Parameters:
requisitionThe Requisition to be filled in.
virtual void Xfc::Gtk::WidgetSignals::on_state_changed ( StateType  previous_state) [virtual]

Called when the widget state changes.

Parameters:
previous_stateThe previous StateType.
virtual void Xfc::Gtk::WidgetSignals::on_style_set ( Style previous_style) [virtual]

Called when the widget style is changed.

Parameters:
previous_styleThe previous Style, or null.
virtual bool Xfc::Gtk::WidgetSignals::on_unmap_event ( const Gdk::EventAny event) [virtual]

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

Parameters:
eventThe Gdk::EventAny.
Returns:
true to stop invoking other handlers, false to propagate the event.

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

Parameters:
eventThe Gdk::EventVisibility.
Returns:
true to stop invoking other handlers, false to propagate the event.
virtual bool Xfc::Gtk::WidgetSignals::on_window_state_event ( const Gdk::EventWindowState event) [virtual]

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

Parameters:
eventThe Gdk::EventWindowState.
Returns:
true to stop invoking other handlers, false to propagate the event.

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC