## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Builder

- Goto spec source

# Description

    package Gtkada.Builder is

This package provides a high-level API for using Gtk.Builder and user interface files produced with the GUI builder glade-3.

Here is how to use this package: Step 1: create a Builder and add the XML data, just as you would a standard Gtk.Builder: declare Builder : Gtkada_Builder; Error : GError; begin Gtk_New (Builder); Error := Add_From_File (Builder, Default_Filename); Step 2: add calls to "Register_Handler" to associate your handlers with your callbacks. Register_Handler (Builder => Builder, Handler_Name => "my_handler_id", Handler => My_Handler'Access); Where: - Builder is your Gtkada_Builder, - "my_handler_id" is the name of the handler as specified in Glade-3, in the "Handler" column of the "Signals" tab for your object, - Handler is your Ada subprogram. You will need one call to "Register_Handler" per handler declared in the Glade-3 interface. If there is one or more handler declared in Glade-3 which does not have an associated call to Register_Handler, an ASSERT_FAILURE will be raised by the Gtk main loop. There are multiple way to call Register_Handler, see below. Step 3: call Do_Connect. Step 4: when the application terminates or all Windows described through your builder should be closed, call Unref to free memory associated with the Builder.

# Classes

### Gtkada_Builder_Record

- Goto declaration in source
- Goto full declaration in source

    type Gtkada_Builder_Record is new
         Gtk.Builder.Gtk_Builder_Record with private;

#### Ancestors:

Gtk.Builder.Gtk_Builder_Record
Glib.Object.GObject_Record

#### Primitive operations:

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.Builder.Add_From_File

- To API doc
- To spec

(Inherited)
Gtk.Builder.Add_From_String

- To API doc
- To spec

(Inherited)
Gtk.Builder.Connect_Signals_Full

- To API doc
- To spec

(Inherited)
Gtk.Builder.Get_Object

- To API doc
- To spec

(Inherited)
Gtk.Builder.Get_Widget

- To API doc
- To spec

(Inherited)

# Types

### Gtkada_Builder

- Goto declaration in source

    type Gtkada_Builder is access all Gtkada_Builder_Record'Class;

### Builder_Handler

- Goto declaration in source

    type Builder_Handler is access procedure
         (Builder : access Gtkada_Builder_Record'Class);

### Builder_Return_Handler

- Goto declaration in source

    type Builder_Return_Handler is access function
         (User_Data : access Gtkada_Builder_Record'Class) return Boolean;

### Object_Handler

- Goto declaration in source

    type Object_Handler is access procedure
         (User_Data : access GObject_Record'Class);

### Object_Return_Handler

- Goto declaration in source

    type Object_Return_Handler is access function
         (User_Data : access GObject_Record'Class) return Boolean;

# Subprograms & Entries

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Builder: out Gtkada_Builder);

### Initialize

- Goto spec in source

    procedure Initialize (Builder: access Gtkada_Builder_Record'Class);

Create a new Gtkada_Builder.

### Do_Connect

- Goto spec in source

    procedure Do_Connect (Builder: access Gtkada_Builder_Record'Class);

Activate in the builder callabacks that have been connected using calls to Register_Handler functions below.

### Register_Handler

- Goto spec in source

    procedure Register_Handler (Builder: access Gtkada_Builder_Record'Class;Handler_Name: String;Handler: Builder_Handler);

### Register_Handler

- Goto spec in source

    procedure Register_Handler (Builder: access Gtkada_Builder_Record'Class;Handler_Name: String;Handler: Builder_Return_Handler);

### Register_Handler

- Goto spec in source

    procedure Register_Handler (Builder: access Gtkada_Builder_Record'Class;Handler_Name: String;Handler: Object_Handler);

### Register_Handler

- Goto spec in source

    procedure Register_Handler (Builder: access Gtkada_Builder_Record'Class;Handler_Name: String;Handler: Object_Return_Handler);