# Handbok för Gränssnittsbyggaren Glade

Glade är en användargränssnittsbyggare för GTK+-program.

2006 Vincent Geddes
2004 2003 Sun Microsystems
2002 2000 Michael Vance
Dokumentationsprojekt för GNOME
Vincent Geddes
Dokumentationsprojekt för GNOME

    vincent.geddes@gmail.com

Suns GNOME-dokumentationsteam
Sun Microsystems
Michael Vance
Dokumentationsprojekt för GNOME
Handbok för Glade 3.0
5 December 2006

Vincent Geddes

Dokumentationsprojekt för GNOME

Handbok för Glade 2.1;
17 Juni 2004

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Användarhandbok för Glade 2.0
25 Februari 2004

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Användarhandbok för Glade 1.2
10 februari 2004

Suns GNOME-dokumentationsteam

Dokumentationsprojekt för GNOME

Användarhandbok för Glade 1.1
30 mars 2002

Michael Vance

Dokumentationsprojekt för GNOME

Användarhandbok för Glade 1.0
11 maj 2000

Michael Vance

Dokumentationsprojekt för GNOME

Den här handboken beskriver version 3.1.0 av Glade.

Återkoppling

To report a bug or make a suggestion regarding the Glade application or this manual, follow the directions in the GNOME Feedback Page.

## Introduktion

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, dialog 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.

## Komma igång

### Starta Glade

You can start Glade in the following ways:

Applications menu

  Choose Programming Glade Interface Designer .

Kommandorad

  To start Glade from a command line, type the following command, then press Return: `glade-3`

### När du startar Glade

When you start Glade, the following window is displayed.

Glade-fönstret

VisarGlade-fönstret.

The Glade window contains the following elements:

Menyrad

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

Verktygsrad

  Verktygsraden innehåller ett mindre antal kommandon som du kan komma åt från menyraden.

Designrutan

  Designrutan är där ett användargränssnitt kan redigeras visuellt.

Palett

  Paletten innehåller widgetar som kan användas för att bygga ett användargränssnitt.

Inspekteraren

  Inspekteraren visar information om widgetarna i ett projekt.

Egenskapsredigerare

  Egenskapsredigeraren används för att manipulera egenskaperna för widgetar, såväl som att lägga till kopplingar till källkod.

Statusrad

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

## Arbeta med projekt

### Skapa ett nytt projekt

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

### Öppna ett projekt

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

### Spara ett projekt

Du kan spara projekt på följande sätt:

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

## Arbeta med widgetar

### Välja widgetar från palettfönstret

You can work with the widgets in the Palett 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 Palett 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 Palett to return to normal mode.

Widget placement mode

  To use widget placement mode, select a widget in the Palett 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 Palett window. When you select a top-level widget in the Palett 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.

### Organisera widgetar i ditt projekt

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

- Horisontell ruta

- Vertikal ruta

- Tabell

- Fasta positioner

- Horisontell knappruta

- Vertikal knappruta

- Horisontella paneler

- Vertikala paneler

- Notebook

- Ram

- Rullbart fönster

- 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 localized.

### Placera en widget i urklipp

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

### Kopiera en widget till urklipp

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

### Klistra in en widget från urklipp in i ditt projekt

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.

### Ta bort en widget

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

### Ändra en egenskap för en 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.

## Om 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 bugzilla.

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
användargränssnittsbyggare