package Implements_Gtk_Actionable is new Glib.Types.Implements (Gtk.Actionable.Gtk_Actionable, Gtk_Button_Record, Gtk_Button);
package Implements_Gtk_Activatable is new Glib.Types.Implements (Gtk.Activatable.Gtk_Activatable, Gtk_Button_Record, Gtk_Button);
package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Button_Record, Gtk_Button);
type Gtk_Button_Record is new Gtk_Bin_Record with null record;
type Gtk_Button is access all Gtk_Button_Record'Class;
type Cb_Gtk_Button_Void is not null access procedure (Self : access Gtk_Button_Record'Class);
type Cb_GObject_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class);
Always_Show_Image_Property : constant Glib.Properties.Property_Boolean;
Focus_On_Click_Property : constant Glib.Properties.Property_Boolean;
Image_Property : constant Glib.Properties.Property_Object;
Image_Position_Property : constant Gtk.Enums.Property_Gtk_Position_Type;
Label_Property : constant Glib.Properties.Property_String;
Relief_Property : constant Gtk.Enums.Property_Gtk_Relief_Style;
Use_Stock_Property : constant Glib.Properties.Property_Boolean;
Use_Underline_Property : constant Glib.Properties.Property_Boolean;
Xalign_Property : constant Glib.Properties.Property_Float;
Yalign_Property : constant Glib.Properties.Property_Float;
Signal_Activate : constant Glib.Signal_Name := "activate";
Signal_Clicked : constant Glib.Signal_Name := "clicked";
Signal_Enter : constant Glib.Signal_Name := "enter";
Signal_Leave : constant Glib.Signal_Name := "leave";
Signal_Pressed : constant Glib.Signal_Name := "pressed";
Signal_Released : constant Glib.Signal_Name := "released";
procedure Gtk_New_From_Stock
( | Button | : out Gtk_Button; |
Stock_Id | : UTF8_String); |
procedure Initialize_From_Stock
( | Button | : not null access Gtk_Button_Record'Class; |
Stock_Id | : UTF8_String); |
function Gtk_Button_New_From_Stock
( | Stock_Id | : UTF8_String) return Gtk_Button; |
procedure Gtk_New
( | Button | : out Gtk_Button; |
Label | : UTF8_String := ""); |
procedure Initialize
( | Button | : not null access Gtk_Button_Record'Class; |
Label | : UTF8_String := ""); |
function Gtk_Button_New_With_Label
( | Label | : UTF8_String := "") return Gtk_Button; |
procedure Gtk_New_With_Mnemonic
( | Button | : out Gtk_Button; |
Label | : UTF8_String); |
procedure Initialize_With_Mnemonic
( | Button | : not null access Gtk_Button_Record'Class; |
Label | : UTF8_String); |
function Gtk_Button_New_With_Mnemonic
( | Label | : UTF8_String) return Gtk_Button; |
function Get_Type return Glib.GType;
procedure Clicked
( | Button | : not null access Gtk_Button_Record); |
procedure Enter
( | Button | : not null access Gtk_Button_Record); |
procedure Get_Alignment
( | Button | : not null access Gtk_Button_Record; |
Xalign | : out Gfloat; | |
Yalign | : out Gfloat); |
procedure Set_Alignment
( | Button | : not null access Gtk_Button_Record; |
Xalign | : Gfloat; | |
Yalign | : Gfloat); |
function Get_Always_Show_Image
( | Button | : not null access Gtk_Button_Record) return Boolean; |
procedure Set_Always_Show_Image
( | Button | : not null access Gtk_Button_Record; |
Always_Show | : Boolean); |
function Get_Event_Window
( | Button | : not null access Gtk_Button_Record) return Gdk.Gdk_Window; |
function Get_Focus_On_Click
( | Button | : not null access Gtk_Button_Record) return Boolean; |
procedure Set_Focus_On_Click
( | Button | : not null access Gtk_Button_Record; |
Focus_On_Click | : Boolean); |
function Get_Image
( | Button | : not null access Gtk_Button_Record) return Gtk.Widget.Gtk_Widget; |
procedure Set_Image
( | Button | : not null access Gtk_Button_Record; |
Image | : not null access Gtk.Widget.Gtk_Widget_Record'Class); |
function Get_Image_Position
( | Button | : not null access Gtk_Button_Record) return Gtk.Enums.Gtk_Position_Type; |
procedure Set_Image_Position
( | Button | : not null access Gtk_Button_Record; |
Position | : Gtk.Enums.Gtk_Position_Type); |
function Get_Label
( | Button | : not null access Gtk_Button_Record) return UTF8_String; |
procedure Set_Label
( | Button | : not null access Gtk_Button_Record; |
Label | : UTF8_String); |
function Get_Relief
( | Button | : not null access Gtk_Button_Record) return Gtk.Enums.Gtk_Relief_Style; |
procedure Set_Relief
( | Button | : not null access Gtk_Button_Record; |
Newstyle | : Gtk.Enums.Gtk_Relief_Style); |
function Get_Use_Stock
( | Button | : not null access Gtk_Button_Record) return Boolean; |
procedure Set_Use_Stock
( | Button | : not null access Gtk_Button_Record; |
Use_Stock | : Boolean); |
function Get_Use_Underline
( | Button | : not null access Gtk_Button_Record) return Boolean; |
procedure Set_Use_Underline
( | Button | : not null access Gtk_Button_Record; |
Use_Underline | : Boolean); |
procedure Leave
( | Button | : not null access Gtk_Button_Record); |
procedure Pressed
( | Button | : not null access Gtk_Button_Record); |
procedure Released
( | Button | : not null access Gtk_Button_Record); |
function Get_Action_Name
( | Self | : not null access Gtk_Button_Record) return UTF8_String; |
procedure Set_Action_Name
( | Self | : not null access Gtk_Button_Record; |
Action_Name | : UTF8_String); |
function Get_Action_Target_Value
( | Self | : not null access Gtk_Button_Record) return Glib.Variant.Gvariant; |
procedure Set_Action_Target_Value
( | Self | : not null access Gtk_Button_Record; |
Target_Value | : Glib.Variant.Gvariant); |
procedure Set_Detailed_Action_Name
( | Self | : not null access Gtk_Button_Record; |
Detailed_Action_Name | : UTF8_String); |
procedure Do_Set_Related_Action
( | Self | : not null access Gtk_Button_Record; |
Action | : not null access Gtk.Action.Gtk_Action_Record'Class); |
function Get_Related_Action
( | Self | : not null access Gtk_Button_Record) return Gtk.Action.Gtk_Action; |
procedure Set_Related_Action
( | Self | : not null access Gtk_Button_Record; |
Action | : not null access Gtk.Action.Gtk_Action_Record'Class); |
function Get_Use_Action_Appearance
( | Self | : not null access Gtk_Button_Record) return Boolean; |
procedure Set_Use_Action_Appearance
( | Self | : not null access Gtk_Button_Record; |
Use_Appearance | : Boolean); |
procedure Sync_Action_Properties
( | Self | : not null access Gtk_Button_Record; |
Action | : access Gtk.Action.Gtk_Action_Record'Class); |
procedure On_Activate
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_Gtk_Button_Void; | |
After | : Boolean := False); |
procedure On_Activate
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Clicked
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_Gtk_Button_Void; | |
After | : Boolean := False); |
procedure On_Clicked
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Enter
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_Gtk_Button_Void; | |
After | : Boolean := False); |
procedure On_Enter
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Leave
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_Gtk_Button_Void; | |
After | : Boolean := False); |
procedure On_Leave
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Pressed
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_Gtk_Button_Void; | |
After | : Boolean := False); |
procedure On_Pressed
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Released
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_Gtk_Button_Void; | |
After | : Boolean := False); |
procedure On_Released
( | Self | : not null access Gtk_Button_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Button_Record'Class) return Gtk.Actionable.Gtk_Actionable renames Implements_Gtk_Actionable.To_Interface; |
function "-"
( | Interf | : Gtk.Actionable.Gtk_Actionable) return Gtk_Button renames Implements_Gtk_Actionable.To_Object; |
function "+"
( | Widget | : access Gtk_Button_Record'Class) return Gtk.Activatable.Gtk_Activatable renames Implements_Gtk_Activatable.To_Interface; |
function "-"
( | Interf | : Gtk.Activatable.Gtk_Activatable) return Gtk_Button renames Implements_Gtk_Activatable.To_Object; |
function "+"
( | Widget | : access Gtk_Button_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Button renames Implements_Gtk_Buildable.To_Object; |
The Gtk.Button.Gtk_Button widget is generally used to trigger a callback function that is called when the button is pressed. The various signals and how to use them are outlined below.
The Gtk.Button.Gtk_Button widget can hold any valid child widget. That is, it can hold almost any other standard Gtk.Widget.Gtk_Widget. The most commonly used child is the Gtk.Label.Gtk_Label.