This is gtkada_rm.info, produced by makeinfo version 4.5 from gtkada_rm.texi. INFO-DIR-SECTION User Interface Toolkit START-INFO-DIR-ENTRY * GtkAda_Rm: (gtkada_rm). Ada95 graphical tookit based on GTK+ (Reference Manual) END-INFO-DIR-ENTRY  File: gtkada_rm.info, Node: Gtk.Widget Signals, Next: Gtk.Widget Types, Prev: Gtk.Widget Widget Hierarchy, Up: Package_Gtk.Widget Signals ======= * "add_accelerator" ??? * "button_press_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Button) return Boolean; A button was pressed while the pointer was inside the widget. To get this signal, some widgets by have to use the Set_Events subprogram first to get this event. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "button_release_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Button) return Boolean; A button was released while the pointer was inside the widget. Note that in some cases (Gtk_Buttons for instance), another "clicked" signal could be emitted). This "button_release_event" should mainly be used for widgets that don't already have specific signals to cover that case (Gtk_Drawing_Area for instance). To get this signal, some widgets may have to use the Set_Events subprogram first to get this event. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "client_event" ??? * "configure_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Configure) return Boolean; Some configuration of the window has changed (it has been moved or resized). If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "delete_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event) return Boolean; The user has clicked on the "close" button in the window's frame (the button that is automatically set by the window manager). If the handler returns False, the widget will be destroyed (and the window closed), but if the handler returns True, nothing will be done. This is a good way to prevent the user from closing your application's window if there should be some clean ups first (like saving the document). * "destroy_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event) return Boolean; This signal is apparently never emitted by Gtk+. You might want to use "destroy" instead, which is documented in Gtk.Object. * "drag_begin" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_data_delete" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_data_get" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_data_received" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_drop" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_end" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_leave" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "drag_motion" Event related to drag-and-drop support. See the Gtk.Dnd documentation. * "draw" procedure Handler (Widget : access Gtk_Widget_Record'Class; Area : Gdk.Rectangle.Gdk_Rectangle); Emitted when a widget needs to be drawn. The default handler emits the "expose" event. * "draw_default" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget needs to be drawn and it does not have the focus. This is never called if the widget can not have the focus (ie the "Can_Focus" flag is unset). * "draw_focus" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget needs to be drawn and it has the focus. Some widgets might want to provide visual clues that they have the focus, like a black border. This is never called if the widget can not have the focus (ie the "Can_Focus" flag is unset). * "enter_notify_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Crossing) return Boolean; The pointer has just entered the widget. If the "Can_Focus" flag is set, Widget will gain the focus, and the widget might be drawn differently. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event) return Boolean; Some event was sent to the widget. This covers all the cases below, and acts as a general handler. This is called in addition to the relevant specific handler below. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "expose_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Expose) return Boolean; The widget needs to be partly redrawn. The exact area to redraw is found in Event. For some widgets, you should rather connect to the "draw" signal. However, for instance for Gtk_Drawing_Area widgets, you have to use this, after setting the correct event mask with Set_Events. If the handler returns False, the event might be passed to the parent of widget (if no other handler of widget has returned True). * "focus_in_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Focus) return Boolean; The widget has just gained the focus. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). This event is only emitted if you called Add_Events with a Enter_Notify_Mask parameter * "focus_out_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Focus) return Boolean; The widget has just lost the focus. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). This event is only emitted if you called Add_Events with a Leave_Notify_Mask parameter * "grab_focus" procedure Handler (Widget : access Gtk_Widget_Record'Class); The widget has got the focus, ie will now get the keyboard events sent to a window. This is only called if the "Can_Focus" flag is set. The "Has_Focus" flag might not be set when this signal is emitted. * "hide" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget is to be hidden (see explanation for the Hide subprogram). Hides the widget from the screen, and if its parent is shown, the widget will not appear on the screen again. * "key_press_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Key) return Boolean; A key has been pressed while Widget had the focus. Note that some widgets like Gtk_Editable provide some higher-level signals to handle this. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "key_release_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Key) return Boolean; A key has been released while Widget had the focus. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "leave_notify_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Crossing) return Boolean; The pointer has just leaved the widget. If the "Can_Focus" flag is set, Widget will gain the focus, and the widget might be drawn differently. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "map" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget is mapped on the screen (the default handler simply emits the "show" signal). * "map_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event) return Boolean; The widget has just been mapped. This is different from the "map" signal, which is called *before* the widget is actually mapped. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "motion_notify_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Motion) return Boolean; The pointer has moved while remaining inside the widget. The Set_Events subprogram has to be called first to get this event. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "no_expose_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event) return Boolean; ??? * "parent_set" procedure Handler (Widget : access Gtk_Widget_Record'Class; Previous_Parent : access Gtk_Widget_Record'Class); A new parent has been set for the widget. The previous parent is given in arguments (if there was none, Gdk.Is_Created (Previous_Parent) returns False). * "property_notify_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Property) return Boolean; ??? * "proximity_in_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Proximity) return Boolean; Used for special input devices. See the description of Gdk.Event.Gdk_Event_Proximity. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "proximity_out_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Proximity) return Boolean; Used for special input devices. See the description of Gdk.Event.Gdk_Event_Proximity. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "realize" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget is realized. The default handler creates the Gdk window associated with the widget, and its ancestors. * "remove_accelerator" ??? * "selection_clear_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Selection) return Boolean; ??? * "selection_get" Related to the selection mechanism, see Gtk.Selection * "selection_notify_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Selection) return Boolean; ??? * "selection_received" Related to the selection mechanism, see Gtk.Selection * "selection_request_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Selection) return Boolean; ??? * "show" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget is to be shown (see explanation for the Show subprogam). This schedules the widget to be displayed on the screen, and if this is a toplevel widget it actually appears on the screen and all its children that have been shown. * "size_allocate" procedure Handler (Widget : access Gtk_Widget_Record'Class; Allocation : Gtk_Allocation); A size and position were assigned to the widget. This is called every time the size of the widget changes. The default handler takes care of resizing and moving the widget. * "size_request" procedure Handler (Widget : access Gtk_Widget_Record'Class; Requisition : access Gtk_Requisition); Should return (in Requisition) the ideal size the widget would like to have. It is not sure this is the size that will be assigned to it, since it depends on the size of its parent). * "state_changed" procedure Handler (Widget : access Gtk_Widget_Record'Class; Previous_State : Gtk.Enums.Gtk_State_Type); The state of the widget has changed. * "style_set" procedure Handler (Widget : access Gtk_Widget_Record'Class); Previous_Style : Gtk.Style.Gtk_Style); The widget's style has been changed (this is not call when some settings in the style are changed, only when the style itself is completely changed with a call to Set_Style or Set_Default_Style). * "unmap" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget needs to be unmapped on the screen (the default handler simply emits the "hide" signal). * "unmap_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event) return Boolean; The widget has just been unmapped. This is different from the "unmap" signal, which is called *before* the widget is actually unmapped. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True). * "unrealize" procedure Handler (Widget : access Gtk_Widget_Record'Class); Emitted when a widget is unrealized. The default handler destroys the Gdk windows of the widget and all its children. * "visibility_notify_event" function Handler (Widget : access Gtk_Widget_Record'Class; Event : Gdk.Event.Gdk_Event_Visibility) return Boolean; The visibility state of the widget has changed (partially visible, fully visible, ...). You might want to use the "expose" signal instead. If the handler returns False, the event might be pass to the parent of widget (if no other handler of widget has returned True).  File: gtkada_rm.info, Node: Gtk.Widget Types, Next: Gtk.Widget Subprograms, Prev: Gtk.Widget Signals, Up: Package_Gtk.Widget Types ===== type Expose_Event_Handler is access function (Widget : System.Address; Event : Gdk.Event.Gdk_Event) return Boolean; type Gtk_Allocation is record X : Gint; Y : Gint; Width : Allocation_Int; Height : Allocation_Int; end record; Gtk_Allocation indicates a size and position a widget was allocated. See the section in the user guide on how to create new widgets for more information. pragma Convention (C, Gtk_Allocation); type Gtk_Allocation_Access is access all Gtk_Allocation; type Gtk_Requisition is record Width : Gint; Height : Gint; end record; Gtk_Requisition is the desired amount of screen real-estate a widget requests to the server. Its real allocated size might be different. See the section in the GtkAda user guide on how to create new widgets in Ada, and the examples/base_widget directory for an example on how to use this. pragma Convention (C, Gtk_Requisition); type Gtk_Requisition_Access is access all Gtk_Requisition; type Size_Allocate_Handler is access procedure type Widget_Type is new Gtk_Widget_Record with private;