[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]  


Package Gtk.Widget

This widget is the base of the tree for displayable objects. (A displayable object is one which takes up some amount of screen real estate). It provides a common base and interface which actual widgets must adhere to.

This package provides some services which might have been more appropriate in some other packages, but could not because of dependency circularities (there are for instance some functions relating to colors and colormaps). We have tried to reference these functions in the other packages as well.

Widget Hierarchy

Gtk_Object                    (see section Package Gtk.Object)
   \___ Gtk_Widget            (see section Package Gtk.Widget)

Signals

Types

type Gtk_Allocation is record
    X      : Gint16;
    Y      : Gint16;
    Width  : Guint16;
    Height : Guint16;
    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 Pack (Gtk_Allocation);


type Gtk_Allocation_Access is access all Gtk_Allocation;

This type is used to create new widgets.


type Gtk_Requisition is record
    Width  : Gint16;
    Height : Gint16;
    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 Pack (Gtk_Requisition);


type Gtk_Requisition_Access is access all Gtk_Requisition;

This type is used to create new widgets.


type Widget_Type is new Gtk_Widget_Record with private;




Subprograms

Widgets' life cycle


procedure Initialize_Widget    
  (Widget             : access Gtk_Widget_Record'Class);

Internal initialization function.
See the section "Creating your own widgets" in the documentation.


procedure Destroy_Cb           
  (Widget             : access Gtk_Widget_Record'Class);

This function should be used as a callback to destroy a widget.
All it does is call Destroy on its argument, but its profile is compatible with the handlers found in Gtk.Handlers.


procedure Unparent             
  (Widget             : access Gtk_Widget_Record'Class);

Detach the widget from its parent.
As a side effect, the widget will be erased from the screen.


procedure Show                 
  (Widget             : access Gtk_Widget_Record);

Schedule the widget to be displayed on the screen when its parent is
also shown (emits the "show" signal). If its ancestors are already mapped to the screen, then the widget is immediately displayed through a call to Map below.


procedure Show_Now             
  (Widget             : access Gtk_Widget_Record);

Show the widget.
If it is an unmapped toplevel widget, wait for it to be mapped. This creates a recursive main_loop.


procedure Hide                 
  (Widget             : access Gtk_Widget_Record);

Hide the widget from the screen (emits the "hide" signal).
If Widget was visible, it is immediately hidden. If one of its ancestor is later shown on the screen, Widget won't appear.


procedure Show_All             
  (Widget             : access Gtk_Widget_Record);

Show Widget and all its children recursively.


procedure Hide_All             
  (Widget             : access Gtk_Widget_Record);

Hide Widget and all its children.
Note that if you simply want to delete Widget from the screen, you can simply call the Hide subprogram on it. This procedure Hide_All should only be used if you want to unschedule a widget to be displayed later, not to remove an actual widget from the screen.


procedure Map                  
  (Widget             : access Gtk_Widget_Record);

Map a widget to the screen.
A window is created for it on the screen (through a call to Realize) and Widget is then drawn on the screen (if its ancestors are also mapped). This function is recursive and will also map all the children of Widget.

It is recommended to use the higher-level Show instead.


procedure Unmap                
  (Widget             : access Gtk_Widget_Record);

Unmap a widget from the screen.
This results in the widget being hidden, but not destroyed. It can be shown again any time through a call to Map (provided its ancestors are also mapped).

It is recommended to use the higher-level Hide instead.


procedure Realize              
  (Widget             : access Gtk_Widget_Record);

Create a window for Widget and its ancestors (emit the "realize" signal)
This does not mean that the widget will appear on the screen, but resources such as colormaps, etc. become available. Some routines require that the widget is realized before any call. You must set the Event_Mask before calling this routine if you want to change it from its default value.


procedure Unrealize            
  (Widget             : access Gtk_Widget_Record);

Hide the widget from the screen and deletes the associated window.
This does not destroy the widget itself, only its server-side resources.


procedure Set_Realize          
  (Widget             : access Gtk_Widget_Record'Class);

Set the realize handler at the low level.
This is needed to replace the default realize in new widgets.


function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Widget.


Drawing a widget


procedure Queue_Draw           
  (Widget             : access Gtk_Widget_Record);

Add a drawing request to the event queue for the whole widget.
This is more efficient than calling Draw directly, since GtkAda groups drawing requests as much as possible to speed up the drawing process. The actual drawing will take place as soon as GtkAda is not busy processing other events, but before idle events.


procedure Queue_Draw_Area      
  (Widget             : access Gtk_Widget_Record;
   X                  :        Gint;
   Y                  :        Gint;
   Width              :        Gint;
   Height             :        Gint);

Add a drawing request to the event queue for part of the widget.
This is more efficient that calling Draw directly (see Queue_Draw).


procedure Queue_Clear          
  (Widget             : access Gtk_Widget_Record);

Add a clear request to the event queue for the whole widget.
This is added to the same list as for Queue_Draw, and thus is coalesced as much as possible with other drawing requests.


procedure Queue_Clear_Area     
  (Widget             : access Gtk_Widget_Record;
   X                  :        Gint;
   Y                  :        Gint;
   Width              :        Gint;
   Height             :        Gint);

Add a clear request to the event queue for part of the widget.
This is added to the same list as for Queue_Draw, and thus is coalesced as much as possible with other drawing requests.


procedure Queue_Resize         
  (Widget             : access Gtk_Widget_Record);

Queue drawing requests after a resizing of the widget.
This clears the widget, and its parent if any, so that everything is correctly redrawn. You should not have to call this function directly.


procedure Draw                 
  (Widget             : access Gtk_Widget_Record;
   Area               : in     Gdk.Rectangle.Gdk_Rectangle
                       := Gdk.Rectangle.Full_Area);

Emit a "draw" signal for a specific area of the widget.
The visual aspect might be different whether the widget has the focus or not.


procedure Draw_Focus           
  (Widget             : access Gtk_Widget_Record);

Emit a "draw_focus" signal for the widget.
The widget will be painted as it appears when it has the focus.


procedure Draw_Default         
  (Widget             : access Gtk_Widget_Record);

Emit a "draw_default" signal for the widget.
The widget will be painted as it appears when it doesn't have the focus.


Size and position


procedure Size_Request         
  (Widget             : access Gtk_Widget_Record;
   Requisition        : in out Gtk_Requisition);

Emit a "size_request" event for the widget


procedure Size_Allocate        
  (Widget             : access Gtk_Widget_Record;
   Allocation         : in out Gtk_Allocation);

Emit a "size_allocate" event for the widget.
Allocation'size is first constrained to a range between 1x1 and 32767x32767. A clear and draw request is also queued if required.


function Get_Child_Requisition 
  (Widget             : access Gtk_Widget_Record)
   return Gtk_Requisition;

Return the size requests by the widget.
This is the ideal size for the widget, not necessarily its actual size. See the user guide's section on how to create new widgets for more information on the size requisition and allocation.


procedure Set_UPosition        
  (Widget             : access Gtk_Widget_Record;
   X, Y               : in     Gint);

Modify the position of the widget.
This should be used only for toplevel widgets (windows and dialogs), since other widgets' positions are handled by their parent.


procedure Set_USize            
  (Widget             : access Gtk_Widget_Record;
   Width, Height      : in     Gint);

Modify the size of the widget.
This sets an absolute size for the widget, no matter what its requested size would be. For Gtk_Windows, you should consider using Set_Default_Size instead, which sets a minimal size, but use the widget's requested size if it is bigger. If Width or Height is negative, they are ignored, and the widget's default width is kept.


function Get_Allocation_Width  
  (Widget             : access Gtk_Widget_Record)
   return Guint;

Return the current width of the widget.


function Get_Allocation_Height 
  (Widget             : access Gtk_Widget_Record)
   return Guint;

Return the current height of the widget.


function Get_Allocation_X      
  (Widget             : access Gtk_Widget_Record)
   return Gint;

Return the current position of the widget, relative to its parent.


function Get_Allocation_Y      
  (Widget             : access Gtk_Widget_Record)
   return Gint;

Return the current position of the widget, relative to its parent.


Accelerators


procedure Add_Accelerator      
  (Widget             : access Gtk_Widget_Record;
   Accel_Signal       : in     String;
   Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group;
   Accel_Key          : in     Gdk.Types.Gdk_Key_Type;
   Accel_Mods         : in     Gdk.Types.Gdk_Modifier_Type;
   Accel_Flags        : in     Gtk.Accel_Group.Gtk_Accel_Flags);

Add a new accelerator for the widget.
The signal Accel_Signal will be sent to Widget when the matching key is pressed and the widget has the focus.


procedure Remove_Accelerator   
  (Widget             : access Gtk_Widget_Record;
   Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group;
   Accel_Key          : in     Gdk.Types.Gdk_Key_Type;
   Accel_Mods         : in     Gdk.Types.Gdk_Modifier_Type);

Remove an accelerator for the widget.


procedure Remove_Accelerators  
  (Widget             : access Gtk_Widget_Record;
   Accel_Signal       : in     String;
   Visible_Only       : in     Boolean := True);

Remove all the accelerators for the widget that emits the Accel_Signal
signal when the key is pressed. Visible_Only is currently unused in the code of gtk+.


function Accelerator_Signal    
  (Widget             : access Gtk_Widget_Record;
   Accel_Group        : in     Gtk.Accel_Group.Gtk_Accel_Group;
   Accel_Key          : in     Gdk.Types.Gdk_Key_Type;
   Accel_Mods         : in     Gdk.Types.Gdk_Modifier_Type)
   return Guint;

Return the signal id of the signal emitted when Accel_Key is pressed
inside the widget.


procedure Lock_Accelerators    
  (Widget             : access Gtk_Widget_Record);

Lock the accelerators for the widget.
No new accelerator can be added to Widget (the default behavior is that the user can dynamically create new accelerators, for instance by pressing a not-yet assigned key on any menu item. If you call this function on the menu_item, this behavior will not longer be activated.


procedure Unlock_Accelerators  
  (Widget             : access Gtk_Widget_Record);

Unlock the accelerators for the widget.
It is now possible to add new accelerators to the widget.


Events and signals


function Event                 
  (Widget             : access Gtk_Widget_Record'Class;
   Event              :        Gdk.Event.Gdk_Event)
   return Gint;

Emit a signal on the widget.
The exact signal depends on the event type (i.e. if the type is Gdk_Button_Press, then a "button_press" signal is emitted).


procedure Activate             
  (Widget             : access Gtk_Widget_Record);

Emit an activate signal on the widget.
The exact signal emitted depends on the widget type (i.e. for a Gtk_Button this emits a "clicked" signal, for a Gtk_Editable this emits the "activate" signal, ...).


procedure Grab_Focus           
  (Widget             : access Gtk_Widget_Record);

Emit the "grab_focus" signal for the widget.
This is sent when the widget gets the focus. Its visual aspect might change. The "Can_Focus" flag must have been set first.


procedure Set_Events           
  (Widget             : access Gtk_Widget_Record;
   Events             : in     Gdk.Types.Gdk_Event_Mask);

Sets the event mask for the widget.
Widget should not have been realized before, or nothing is done. This is the only way you can explicitly get mouse or keyboards events on widgets that do not automatically get them, as for instance in a Gtk_Drawing_Area.


function Get_Events            
  (Widget             : access Gtk_Widget_Record)
   return Gdk.Types.Gdk_Event_Mask;

Get the event mask for the widget.
This indicates the list of events that the widget receives.


procedure Add_Events           
  (Widget             : access Gtk_Widget_Record;
   Events             : in     Gdk.Types.Gdk_Event_Mask);

Add some events to the current event mask of the widget.


procedure Set_Extension_Events 
  (Widget             : access Gtk_Widget_Record;
   Mode               : in     Gdk.Types.Gdk_Extension_Mode);

Set the extension event mask for the widget.
This is used to activate some special input modes for other devices than keyboard and mouse.


function Get_Extension_Events  
  (Widget             : access Gtk_Widget_Record)
   return Gdk.Types.Gdk_Extension_Mode;

Return the current extension events mask.


function Default_Motion_Notify_Event
  (Widget             : access Gtk_Widget_Record'Class;
   Event              :        Gdk.Event.Gdk_Event)
   return Gint;

Access to the standard default callback for motion events:
This is mainly used for rulers in Gtk.Ruler (See the example in testgtk, with create_rulers.adb)


function Has_Default_Motion_Notify_Handler
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Return True if Widget has a default handler for motion_notify events.
Note that the function Default_Motion_Notify_Event should not be called if this one returns False, since it would create a segmentation fault.


Colors and colormaps


function Get_Colormap          
  (Widget             : access Gtk_Widget_Record)
   return Gdk.Color.Gdk_Colormap;

Return the colormap used for the widget. This will generally be the
same one for all widgets, but might be different if for instance a Gtk_Drawing_Area needs to display some different colors on a screen that only has a limited amount of colors.


function Get_Visual            
  (Widget             : access Gtk_Widget_Record)
   return Gdk.Visual.Gdk_Visual;

Get the visual used for the widget.
I.e. the structure that indicates the depth of the widget (number of bits per pixel), and some information used internally by GtkAda to handle colors and colormaps.


procedure Set_Colormap         
  (Widget             : access Gtk_Widget_Record;
   Cmap               :        Gdk.Color.Gdk_Colormap);

Modify the colormap of the widget.
The widget must not have been realized.


procedure Set_Visual           
  (Widget             : access Gtk_Widget_Record;
   Visual             :        Gdk.Visual.Gdk_Visual);

Modify the visual of the widget.
The widget must not have been realized.


procedure Push_Colormap        
  (Cmap               :        Gdk.Color.Gdk_Colormap);

Modify temporarily the default colormap set for newly created widgets.
You should use this in pair with Pop_Colormap below (Push the new value, create the widget, and pop the value).


procedure Pop_Colormap;        

See Push_Colormap for more information.


procedure Push_Visual          
  (Visual             :        Gdk.Visual.Gdk_Visual);

Modify temporarily the default visual set for newly created widgets.
You should use this in pair with Pop_Colormap below (Push the new value, create the widget, and pop the value).


procedure Pop_Visual;          

See Push_Visual for more information.


function Get_Default_Colormap  return Gdk.Color.Gdk_Colormap;

Return the default colormap used when a widget is created.


procedure Set_Default_Colormap 
  (Cmap               :        Gdk.Color.Gdk_Colormap);

Modify permanently the default colormap used when a widget is created.
If you only want to modify this colormap temporarily for a few widgets, you should consider using Push_Colormap and Pop_Colormap instead.


function Get_Default_Visual    return Gdk.Visual.Gdk_Visual;

Return the default visual used when a new widget is created.


procedure Set_Default_Visual   
  (Visual             :        Gdk.Visual.Gdk_Visual);

Modify permanently the default visual used when a widget is created.
If you only want to modify this visual temporarily for a few widgets, you should consider using Push_Visual and Pop_Visual instead.


Styles


procedure Push_Style           
  (Style              :        Gtk.Style.Gtk_Style);

Change the default values for styles.
This is generally used just before creating a widget. You should use this procedure in pair with Pop_Style (Push the new value, create the widget then pop the value)


procedure Pop_Style;           

Restore the default values for styles.
This is generally used just after creating a widget. You should use this procedure in pair with Push_Style (Push the new value, create the widget then pop the value)


procedure Set_Style            
  (Widget             : access Gtk_Widget_Record;
   Style              :        Gtk.Style.Gtk_Style);

Set the style for a given widget.


function Get_Style             
  (Widget             : access Gtk_Widget_Record)
   return Gtk.Style.Gtk_Style;

Return the style of a given widget.


procedure Modify_Style         
  (Widget             : access Gtk_Widget_Record;
   Style              :        Gtk_Rc_Style);

Modify the default style of a widget.


procedure Set_Default_Style    
  (Style              :        Gtk.Style.Gtk_Style);

Set the default global style.


function Get_Default_Style     return Gtk.Style.Gtk_Style;

Get the default global style.


procedure Set_Rc_Style         
  (Widget             : access Gtk_Widget_Record);

Restore the default style of a widget.
The default style is given by the configuration file initially parsed by GtkAda.


procedure Ensure_Style         
  (Widget             : access Gtk_Widget_Record);

Make sure that the widget has a style associated to it.
Either the default one as set by Set_Rc_Style above or one set by the user with Set_Style.


procedure Restore_Default_Style
  (Widget             : access Gtk_Widget_Record);

Restore the default style that was set for the widget.
The default style is the first one that was set either by a call to Set_Style or Set_Rc_Style.


procedure Reset_Rc_Styles      
  (Widget             : access Gtk_Widget_Record);

Restore the Rc style recursively for widget and its children.


Widgets' tree


procedure Set_Name             
  (Widget             : access Gtk_Widget_Record;
   Name               : in     String);

Set the name for the widget.
This name is used purely internally to identify the widget, and does not give any visual clue.


function Get_Name              
  (Widget             : access Gtk_Widget_Record)
   return String;

Return the name of the widget if it was set by Set_Name.
Return the name of its class otherwise.


procedure Set_Parent           
  (Widget             : access Gtk_Widget_Record;
   Parent             : in     Gtk_Widget);

Modify the parent for the widget.
This is not the recommended way to do this, you should use Gtk.Container.Add or Gtk.Box.Pack_Start instead.


function Get_Parent            
  (Widget             : access Gtk_Widget_Record)
   return Gtk_Widget;

Return the parent of the widget, or null if Widget is a toplevel
widget.


function Get_Toplevel          
  (Widget             : access Gtk_Widget_Record)
   return Gtk_Widget;

Return the toplevel ancestor of the widget.
This is the window or dialog in which the widget is included. The widget returned does not have any parent.


function Get_Ancestor          
  (Widget             : access Gtk_Widget_Record;
   Ancestor_Type      : in     Gtk_Type)
   return Gtk_Widget;

Return the closest ancestor of Widget which is of type Ancestor_Type.
Return null if there is none.


function Is_Ancestor           
  (Widget             : access Gtk_Widget_Record;
   Ancestor           : access Gtk_Widget_Record'Class)
   return Boolean;

Return True if Ancestor is in the ancestor tree for Widget.
I.e. if Widget is contained within Ancestor.


procedure Reparent             
  (Widget             : access Gtk_Widget_Record;
   New_Parent         : access Gtk_Widget_Record'Class);

Change the parent of the widget dynamically.
If both the new parent and the widget are shown, then the widget is visually redrawn in its new parent.


Misc functions


procedure Set_Scroll_Adjustments
  (Widget             : access Gtk_Widget_Record;
   Hadj               :        Gtk.Adjustment.Gtk_Adjustment;
   Vadj               :        Gtk.Adjustment.Gtk_Adjustment);

Emit the "set_scroll_adjustments" signal.
The exact signal emitted depends on the widget type. The handler creates the adjustments if null is passed as argument, and makes sure both adjustments are in the correct range.


procedure Popup                
  (Widget             : access Gtk_Widget_Record;
   X, Y               : in     Gint);

Realize the widget (see Realize above), moves it to the screen position
(X, Y), and shows the widget. This should only be used for toplevel windows and dialogs, as you can no modify the position of a widget that has a parent (the parent is then responsible for its position).


function Intersect             
  (Widget             : access Gtk_Widget_Record;
   Area               :        Gdk.Rectangle.Gdk_Rectangle;
   Intersection       : access Gdk.Rectangle.Gdk_Rectangle)
   return Boolean;

Return True if the widget intersects the screen area Area.
The intersection area is returned in Intersection.


procedure Grab_Default         
  (Widget             : access Gtk_Widget_Record);

The widget becomes the default widget for its parent window or dialog.
All keyboard events will be sent to it if no other widget has the focus. Note that the "Can_Default" flag must have been set first on WIDGET.


procedure Set_State            
  (Widget             : access Gtk_Widget_Record;
   State              : in     Enums.Gtk_State_Type);

Modify the state of the widget.
This modifies its visual aspect, and thus should be used only if you change its behavior at the same time, so as not to confuse the user.


function Get_State             
  (Widget             : access Gtk_Widget_Record)
   return Enums.Gtk_State_Type;

Return the state of the widget.


procedure Set_Sensitive        
  (Widget             : access Gtk_Widget_Record;
   Sensitive          : in     Boolean := True);

Modify the sensitivity of the widget.
An insensitive widget is generally grayed out, and can not be activated. For instance, an insensitive menu item is grayed, and can never be selected.


procedure Set_App_Paintable    
  (Widget             : access Gtk_Widget_Record;
   App_Paintable      :        Boolean);

Modify the "App_Paintable" flag for the widget.


procedure Get_Pointer          
  (Widget             : access Gtk_Widget_Record;
   X                  : out    Gint;
   Y                  : out    Gint);

Return the coordinates of the pointer (i.e. mouse) relative to Widget.


procedure Set_Window           
  (Widget             : access Gtk_Widget_Record;
   Window             : in     Gdk.Window.Gdk_Window);

Set the Gdk window associated with the widget.


function Get_Window            
  (Widget             : access Gtk_Widget_Record)
   return Gdk.Window.Gdk_Window;

Get the Gdk window associated with the widget.
You can use this window if you need to draw directly on the widget using the functions found in the Gdk hierarchy.


procedure Shape_Combine_Mask   
  (Widget             : access Gtk_Widget_Record;
   Shape_Mask         :        Gdk.Bitmap.Gdk_Bitmap;
   Offset_X           :        Gint;
   Offset_Y           :        Gint);

Modify the shape of the window that contains the widget.
This allows for transparent windows, and requires the Xext library to be available on your system. If this library is not available, your program will still work. See the manual page for XShapeCombineMask(3x) for more information.


Flags


Some additional flags are defined for all the visual objects (widgets).
They are defined in addition to the ones defined in Gtk.Object. These flags are important in that they define exactly the different states a widget can be in.

  • "Toplevel": Set if the widget is a toplevel widget, ie has no parent. This is mostly true for windows and dialogs.
  • "No_Window": Set if the widget does not have an associated X11 window, ie can not receive events directly. For instance, a Gtk_Toolbar does not have an associated window. These objects are more lightweight, but require more work from GtkAda. This flag is only set if the widget will never have a window, even after it is realized.
  • "Realized": Set if the widget has been realized, ie its associated X11 window has been created (providing the widget excepts a window, see the No_Window flag
  • "Mapped": Set if the widget is visible on the screen. This is only possible if the Visible flag is also set.
  • "Visible": Set if the widget will be displayed on the screen when mapped (see the functions Show and Hide in this package).
  • "Sensitive": Set if the widget is listening to events. See the function Set_Sensitive in this package. An insensitive widget will generally have a different visual aspect to clue that it is unavailable (for instance an insensitive item menu will be grayed)
  • "Parent_Sensitive": Set if the parent is sensitive. A widget is sensitive only if both the Sensitive and Parent_Sensitive are set.
  • "Can_Focus": Set if the widget can have the focus, ie get keyboard events. Most widgets can not have the focus.
  • "Has_Focus": Set if the widget currently has the focus. See the function Grab_Focus in this package.
  • "Can_Default": Set if the widget can be the default widget in a window, ie the one that will get the keyboard events by default. For instance, the default button in a dialog is the one that gets clicked on when the user pressed Enter anywhere in the dialog.
  • "Has_Default": Set if the widget is currently the default widget. See the function Grab_Default in this package.
  • "Has_Grab": Set if the widget currently grabs all mouse and keyboard events in the application, even if it does not have the focus. There can be only such widget per application at any given time.
  • "Rc_Style": Set if the widget's style is either the default style, or in a customization file. This is unset if the style has been modified by the user.
  • "Composite_Child": ???
  • "No_Reparent": This flags is never used in gtk+.
  • "App_Paintable": For some containers (including Gtk_Window and Gtk_Layout), this is unset when the container itself has some special drawing routines.
  • "Receives_Default": Set when the widget receives the default at the time it receives the focus. This is how the default button in a dialog is automatically changed when you press another button.

function Toplevel_Is_Set       
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Toplevel flag is set.


function No_Window_Is_Set      
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the No_Window flag is set.


function Realized_Is_Set       
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Realized flag is set.


function Mapped_Is_Set         
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Mapped flag is set.


function Visible_Is_Set        
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Visible flag is set.


function Drawable_Is_Set       
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

True if the widget is both visible and mapped.
In other words, if it does appear on the screen.


function Is_Sensitive          
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the widget is Sensitive.


function Can_Focus_Is_Set      
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Can_Focus flag is set.


function Has_Focus_Is_Set      
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Has_Focus flag is set.


function Has_Default_Is_Set    
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Has_Default flag is set.


function Has_Grab_Is_Set       
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Has_Grab flag is set.


function Rc_Style_Is_Set       
  (Widget             : access Gtk_Widget_Record'Class)
   return Boolean;

Test whether the Rc_Style flag is set.



[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]