## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Accel_Label

- Goto spec source

# Description

    package Gtk.Accel_Label is

The Gtk_Accel_Label widget is a child of Gtk_Label that also displays an accelerator key on the right of the label text, e.g. 'Ctl+S'. It is commonly used in menus to show the keyboard short-cuts for commands.

The accelerator key to display is not set explicitly. Instead, the Gtk_Accel_Label displays the accelerators which have been added to a particular widget. This widget is set by calling Set_Accel_Widget.

For example, a Gtk_Menu_Item widget may have an accelerator added to emit the "activate" signal when the 'Ctl+S' key combination is pressed.

A Gtk_Accel_Label is created and added to the Gtk_Menu_Item, and Set_Accel_Widget is called with the Gtk_Menu_Item as the second argument.

The Gtk_Accel_Label will now display 'Ctl+S' after its label.

Note that creating a Gtk_Menu_Item with Gtk_New and a non null "label" parameter (ditto for Gtk_Check_Menu_Item and Gtk_Radio_Menu_Item) automatically adds a Gtk_Accel_Label to the Gtk_Menu_Item and calls Set_Accel_Widget to set it up for you.

A Gtk_Accel_Label will only display accelerators which have the Accel_Visible (see Gtk.Accel_Group) flag set. A Gtk_Accel_Label can display multiple accelerators and even signal names, though it is almost always used to display just one accelerator key.

Binding from C File version 2.8.17

### Screenshot

# Classes

### Gtk_Accel_Label_Record

- Goto declaration in source
- Goto full declaration in source

    type Gtk_Accel_Label_Record is new Gtk.Label.Gtk_Label_Record with private;

#### Ancestors:

Gtk.Label.Gtk_Label_Record
Gtk.Misc.Gtk_Misc_Record
Gtk.Widget.Gtk_Widget_Record
Glib.Object.GObject_Record

#### Primitive operations:

Get_Accel_Widget

- To API doc
- To spec

Get_Accel_Width

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Angle

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Attributes

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Current_Uri

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Ellipsize

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Justify

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Label

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Layout

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Layout_Offsets

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Line_Wrap

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Line_Wrap_Mode

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Max_Width_Chars

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Mnemonic_Keyval

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Mnemonic_Widget

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Selectable

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Selection_Bounds

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Single_Line_Mode

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Text

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Track_Visited_Links

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Use_Markup

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Use_Underline

- To API doc
- To spec

(Inherited)
Gtk.Label.Get_Width_Chars

- To API doc
- To spec

(Inherited)
Gtk.Label.Parse_Uline

- To API doc
- To spec

(Inherited)
Gtk.Label.Select_Region

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Angle

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Attributes

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Ellipsize

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Justify

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Label

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Line_Wrap

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Line_Wrap_Mode

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Markup

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Markup_With_Mnemonic

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Max_Width_Chars

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Mnemonic_Widget

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Pattern

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Selectable

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Single_Line_Mode

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Text

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Text_With_Mnemonic

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Track_Visited_Links

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Use_Markup

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Use_Underline

- To API doc
- To spec

(Inherited)
Gtk.Label.Set_Width_Chars

- To API doc
- To spec

(Inherited)
Gtk.Misc.Get_Alignment

- To API doc
- To spec

(Inherited)
Gtk.Misc.Get_Padding

- To API doc
- To spec

(Inherited)
Gtk.Misc.Set_Alignment

- To API doc
- To spec

(Inherited)
Gtk.Misc.Set_Padding

- To API doc
- To spec

(Inherited)
Gtk.Widget.Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Can_Activate_Accel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Layout

- To API doc
- To spec

(Inherited)
Gtk.Widget.Destroy

- To API doc
- To spec

(Inherited)
Gtk.Widget.Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Ensure_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Error_Bell

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flag_Is_Set

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Freeze_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Height

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Width

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_X

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Y

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Requisition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pointer

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Root_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Snapshot

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Toplevel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Visual

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Default

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Has_Screen

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Input_Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Composited

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Keynav_Failed

- To API doc
- To spec

(Inherited)
Gtk.Widget.List_Mnemonic_Labels

- To API doc
- To spec

(Inherited)
Gtk.Widget.Map

- To API doc
- To spec

(Inherited)
Gtk.Widget.Mnemonic_Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Base

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Bg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Cursor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Fg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Font

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize_No_Redraw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Realize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Region_Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Render_Icon

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reparent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Rc_Styles

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Shapes

- To API doc
- To spec

(Inherited)
Gtk.Widget.Restore_Default_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Send_Expose

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Accel_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_App_Paintable

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Double_Buffered

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Redraw_On_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Scroll_Adjustments

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Sensitive

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_UPosition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_USize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_Now

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Style_Get_Property

- To API doc
- To spec

(Inherited)
Gtk.Widget.Thaw_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Trigger_Tooltip_Query

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unmap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unrealize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unset_Flags

- To API doc
- To spec

(Inherited)
Refetch

- To API doc
- To spec

Set_Accel_Widget

- To API doc
- To spec

# Types

### Gtk_Accel_Label

- Goto declaration in source

    type Gtk_Accel_Label is access all Gtk_Accel_Label_Record;

# Constants & Global variables

### Accel_Widget_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Accel_Widget_Property  : constant Glib.Properties.Property_Object;

Accel_Closure_Property : constant Glib.Properties.Property_Boxed;

# Subprograms & Entries

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Accel_Label: out Gtk_Accel_Label;Str: UTF8_String);

Create a new Gtk_Accel_Label. Str is the label string.

### Initialize

- Goto spec in source

    procedure Initialize (Accel_Label: access Gtk_Accel_Label_Record'Class;Str: UTF8_String);

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

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Accel_Label.

### Set_Accel_Widget

- Goto spec in source

    procedure Set_Accel_Widget (Accel_Label: access Gtk_Accel_Label_Record;Accel_Widget: access Gtk.Widget.Gtk_Widget_Record'Class);

Add an accelerator to a particular widget.

### Get_Accel_Widget

- Goto spec in source

    function Get_Accel_Widget (Accel_Label: access Gtk_Accel_Label_Record) return Gtk.Widget.Gtk_Widget;

Return the widget monitored by Accel_Label.

### Get_Accel_Width

- Goto spec in source

    function Get_Accel_Width (Accel_Label: access Gtk_Accel_Label_Record) return Guint;

Return the width needed to display the accelerator key(s). This is used by menus to align all of the Gtk_Menu_Item widgets, and shouldn't be needed by applications.

### Refetch

- Goto spec in source

    function Refetch (Accel_Label: access Gtk_Accel_Label_Record) return Boolean;

Recreate the string representing the accelerator keys. This should not be needed since the string is automatically updated whenever accelerators are added or removed from the associated widget. Always return False.