Toc Gallery Index Tree Gtk.Tool_Button

Hierarchy

Description

This package defines a special kind of Gtk.Toolbar child that embeds a button. See also gtk-toggle_tool_button.ads, gtk-radio_tool_button.ads and gtk-menu_tool_button.ads

Types

Subprograms

    Creating buttons

  • procedure Gtk_New (Button : out Gtk_Tool_Button; Icon_Widget : Gtk.Widget.Gtk_Widget := null; Label : String := "");
    procedure Initialize (Button : access Gtk_Tool_Button_Record'Class; Icon_Widget : Gtk.Widget.Gtk_Widget := null; Label : String := "");
    Create or initialize a button, given its icon and label. Any of the parameters can be left unspecified if the button has none of these.
  • procedure Gtk_New_From_Stock (Button : out Gtk_Tool_Button; Stock_Id : String);
    procedure Initialize_From_Stock (Button : access Gtk_Tool_Button_Record'Class; Stock_Id : String);
    Create or initialize a button from a stock icon (see gtk-stock.ads)
  • function Get_Type return GType;
    Return the internal type used for this widget class
  • procedure Set_Icon_Name (Button : access Gtk_Tool_Button_Record; Icon_Name : String);
    function Get_Icon_Name (Button : access Gtk_Tool_Button_Record) return String;
    Sets the icon for the tool button from a named themed icon. See the docs for Gtk.Icon_them for more details. The "icon_name" property only has an effect if not overriden by non-null "label", "icon_widget" or "stock_id" properties
  • procedure Set_Icon_Widget (Button : access Gtk_Tool_Button_Record; Icon_Widget : Gtk.Widget.Gtk_Widget := null);
    function Get_Icon_Widget (Button : access Gtk_Tool_Button_Record) return Gtk.Widget.Gtk_Widget;
    Sets or gets the widget used as icon on Button. If Icon_Widget is null, the icon used for the button is determined by the "stock_id" property. If the latter is also null, the button has no icon
  • procedure Set_Label (Button : access Gtk_Tool_Button_Record; Label : String);
    function Get_Label (Button : access Gtk_Tool_Button_Record) return String;
    Sets or gets the label used for the button. The "label" property only has an effect if not overridden by a non-null "label_widget" property. If both are null, the label comes from the "stock_id" properties. If also null, the button has no label. Get_Label only returns the value of the "labeL" property.
  • procedure Set_Label_Widget (Button : access Gtk_Tool_Button_Record; Label_Widget : Gtk.Widget.Gtk_Widget := null);
    function Get_Label_Widget (Button : access Gtk_Tool_Button_Record) return Gtk.Widget.Gtk_Widget;
    Sets Label_Widget as the widget that will be used as the label for the button. If this is null, the "label" property is used as label.
  • procedure Set_Stock_Id (Button : access Gtk_Tool_Button_Record; Stock_Id : String);
    function Get_Stock_Id (Button : access Gtk_Tool_Button_Record) return String;
    Sets the name of the stock item. This property has no effect if overriden by non-null "label" or "icon_widget" properties.
  • procedure Set_Use_Underline (Button : access Gtk_Tool_Button_Record; Use_Underline : Boolean := True);
    function Get_Use_Underline (Button : access Gtk_Tool_Button_Record) return Boolean;
    If Use_Underline is true, an underline in the label property indicates that the next character should be used a mnemonic accelerator key in the overflow menu of the toolbar. For instance, if the label is "_Open", the item in the overflow menu can be activated with alt-O. Labels shown on tool buttons never have mnemonics on them.

Signals

  • clicked
    procedure Handler (Button : access Gtk_Tool_Button_Record'Class);
    Emitted when the button is clicked with the mouse or activated with the keyboard.

Properties

  • Icon_Name_Property
    String
  • Icon_Widget_Property
    Object
  • Label_Property
    String
  • Label_Widget_Property
    Object
  • Stock_Id_Property
    String
  • Use_Underline_Property
    Boolean

Alphabetical Index