# Glade Interface Designer Manual

Glade is a user interface designer for GTK+ applications.

2006 Vincent Geddes
2004 2003 Sun Microsystems
2002 2000 Michael Vance
GNOME Documentation Project
Vincent Geddes
GNOME Documentation Project

    vincent.geddes@gmail.com

Sun GNOME Documentation Team
Sun Microsystems
Michael Vance
GNOME Documentation Project
Glade Manual 3.0
5 December 2006

Vincent Geddes

GNOME Documentation Project

Glade Manual 2.1;
17 June 2004

Sun GNOME Documentation Team

GNOME Documentation Project

Glade User Manual 2.0
25 February 2004

Sun GNOME Documentation Team

GNOME Documentation Project

Glade User Manual 1.2
10 Feb 2004

Sun GNOME Documentation Team

GNOME Documentation Project

Glade User Manual 1.1
30 Mar 2002

Michael Vance

GNOME Documentation Project

Glade User Manual 1.0
11 May 2000

Michael Vance

GNOME Documentation Project

This manual describes version 3.1.0 of Glade.

Feedback

To report a bug or make a suggestion regarding the Glade application or this manual, visit the GNOME Issue Tracker.

## Introduction

The Glade interface designer enables you to create and edit user interface designs for GTK+ applications.

The GTK+ library provides an extensive collection of user interface building blocks such as text boxes, dialogue labels, numeric entries, check boxes, and menus. These building blocks are called widgets. You can use Glade to place widgets in a GUI. Glade allows you to modify the layout and properties of these widgets. You can also use Glade to add connections between widgets and application source code.

The user interfaces designed in Glade are stored in an XML format, enabling easy integration with external tools. You can use the libglade library to dynamically create GUIs from the XML description.

## Getting Started

### To Start Glade

You can start Glade in the following ways:

Applications menu

  Choose Programming Glade Interface Designer .

Command line

  To start Glade from a command line, type `glade` and then press Return.

### When You Start Glade

When you start Glade, the following window is displayed.

Glade window

Shows the Glade window.

The Glade window contains the following elements:

Menubar

  The menus on the menubar contain all of the commands you need to work with files in Glade.

Toolbar

  The toolbar contains a subset of the commands that you can access from the menubar.

Design Area

  The design area is where a user interface can be visually edited.

Palette

  The palette contains the widgets that can be used to build a user interface.

Inspector

  The inspector displays information about the widgets in a project.

Property Editor

  The property editor is used to manipulate the properties of widgets, as well as adding connections to source code.

Status bar

  The status bar displays information about current Glade activity and contextual information about the menu items.

## Working with Projects

### Creating a New Project

To create a new project, choose File New. The application displays a new blank project in the Glade window.

### Opening a Project

To open an existing project, choose File Open. The application displays the project in the Glade window.

### Saving a Project

You can save projects in the following ways:

- To save changes to an existing project file, choose File Save.

- To save a new project file or to save an existing project file under a new filename, choose File Save As . Enter a name for the project file in the Save As dialog, then click Save.

## Working with Widgets

### To Select Widgets From the Palette Window

You can work with the widgets in the Palette window in the following ways:

Selection mode

  To use selection mode, click on the Selector arrow. The pointer changes to an arrow to indicate that selection mode is active. In this mode, you use the mouse to select widgets in your project. You can then use the Properties window to edit the properties of the widgets.

  You can also use the widget context menu to select a widget. Right-click on a widget to open the widget context menu.

  You can add multiple widgets of a specific type from the Palette to your project by holding down the Control key when you select a widget. You need to click on the Selector arrow or another widget in the Palette to return to normal mode.

Widget placement mode

  To use widget placement mode, select a widget in the Palette window. When you select most widgets, the pointer changes to a pointer-plus-cross. You can then place the widget inside containers, top-level widgets, and so on. After you place a widget, the mode returns to selection mode.

Top-level placement mode

  To use top level placement mode, select a defined top-level widget in the Palette window. When you select a top-level widget in the Palette window, the widget appears immediately on your desktop. You can then edit the widget. After you select a top-level widget, the mode returns to selection mode.

### To Organise Widgets In Your Project

You use widget containers, or boxes, to layout and organise widgets in your project window. You can choose the following widget containers from the Palette window:

- Horizontal Box

- Vertical Box

- Table

- Fixed Positions

- Horizontal Button Box

- Vertical Button Box

- Horizontal Panes

- Vertical Panes

- Notebook

- Frame

- Scrolled Window

- Viewport

You can nest boxes to create complex layout structures. When you create horizontal and vertical boxes, Glade asks you how many rows or columns to create initially, though rows and columns can easily be added or deleted later.

When you have created all the boxes you require, you can add specific widgets like labels, buttons, and more complicated widgets into the boxes. Notice that Glade packs widgets into the layout which eliminates a lot of tedious work. The use of boxes enables windows to change size to accommodate different size labels in different languages when the application is localised.

### To Place a Widget on the Clipboard

To remove a widget from a parent and place the widget on the clipboard, select the widget then choose Edit Cut .

### To Copy a Widget to the Clipboard

To copy a widget to the clipboard, select the widget then choose Edit Copy . The original widget remains attached to the parent.

### To Paste a Widget From the Clipboard Into Your Project

To paste a widget that exists on the clipboard into your project, choose Edit Paste .

All widgets must have a unique name within Glade. If you cut a widget, and then paste the widget into your project, then the widget and all of the children of the widget keep their original names. If you copy a widget, or paste the widget multiple times into your project, then Glade generates new names for the widget copies.

### To Delete a Widget

To delete a widget from the parent without moving the widget to the clipboard, select the widget then choose Edit Delete .

### To Change a Property of a Widget

The property editor is used to edit the properties of a selected widget. To change a property of a widget, select the widget and then enter an appropriate value in one of the Property window's property fields.

## About Glade

Glade is maintained by the Glade developers and GNOME community volunteers. To find more information about Glade, please visit the Glade Web site.

To report a bug or make a suggestion regarding this application or this manual, you can submit them using our issue tracking system.

Another excellent source of information are the Glade user and developer mailing lists. In addition to subscribing, you might also want to browse the list archives, available via these same links.

This program is distributed under the terms of the GNU General Public license as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program.

glade
user interface designer