# Manual do deseñado de interfaces Glade

Glade é un deseñador de interface de usuario para aplicacións GTK+

2006
Vincent Geddes
2004
2003
Sun Microsystems
2002
2000
Michael Vance
Proxecto de Documentación de GNOME

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual.

This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license.

Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters.

DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT:

1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

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

Este manual describe a versión 3.1.0 de Glade.

## Comentarios

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

Fran Diéguez
frandieguez@gnome.org
2011-2020
Fran Diéguez

## Introdución

O deseñador de interfaces Glade permítelle crear e editar deseños de interfaces de usuario para aplicacións GTK+.

As bibliotecas GTK+ fornecen unha extensa colección de bloques de construción de interfaces de usuario tales como caixas, etiquetas de diálogo, entradas numéricas, casillas de selección e menús. Estes bloques de construción chámanse widgets. Pode usar Glade para emprazar widgets nun GUI. Glade permítelle modificar o esquema e propiedades deses widgets. Tamén pode usar Glade para engadir conexións entre widgets e o código fonte dunha aplicación.

As interfaces de usuario deseñados en Glade almacénanse nun formato XML, permitindo unha integración doada con ferramentas externas. Pode usar a biblioteca libglade para crear dinamicamente GUIs desde a descrición XML.

## Inicio

### Para iniciar Glade

Pode iniciar Glade das seguintes formas:

Menú Aplicativos

  Choose Programming Glade .

Liña de ordes

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

### Cando inicie Glade

Mostrarase a seguinte xanela cando inicie Glade.

#### Xanela de Glade

Shows the Glade window.

A xanela do Glade contén os seguintes elementos:

Barra de menú

  Os menús da barra de menú contén tódolas ordes que poida precisar para traballar con ficheiros en Glade.

Barra de ferramentas

  A barra de ferramentas contén un xogo de ordes ás que pode acceder desde a barra de menú.

Área de deseño

  O área de deseño é onde se pode editar visualmente unha interface de usuario.

Paleta

  A paleta contén os widtets que se poden usar para construír unha interface de usuario.

Inspector

  O inspector mostra información sobre os widgets dun proxecto.

Editor de propiedades

  O editor de propiedades úsase para manipular as propiedades dos widgets, así como para engadir conexións ao código fonte.

Barra de estado

  A barra de estado mostra información sobre a actividade actual de Glade e tamén información contextual sobre os elementos de menú.

## Traballar con proxectos

### Crear un novo proxecto

Para crear un novo proxecto, seleccoine Ficheiro Novo. A aplicación mostrará un proxecto baleiro nunha xanela de Glade.

### Abrir un proxecto

Para abrir un proxecto existente, seleccione Ficheiro Abrir. A aplicación mostrará o proxecto na xanela de Glade.

### Gardar un proxecto

Para gardar proxectos das seguintes formas:

- Para gardar cambios sobre un ficheiro de proxecto existente, seleccione Ficheiro Gardar.

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

## Traballar con widgets

### Para seleccionar widgets da xanela de paleta

Pode traballar con widgets da xanela Paleta das seguintes formas:

Modo de selección

  Para usar o modo de selección, prema na frecha do Selector. O punteiro do rato cambiará a unha frecha para indicar que o modo de selección está activado. Neste modo, pode usar o rato para seleccionar widgets no seu proxecto. Entón poderá usar a xanela de Propiedades para editar as propiedades dos widgets.

  Tamén pode usar o menú contextual para seleccionar un widget. Prema co botón dereito do rato sobre un widget para abrir un menú contextual do widget.

  Desde a Paleta pode engadir múltiples widgets dun tipo específico ao seu proxecto mantendo premida a tecla Control cando seleccione un widget. Debe premer sobre a tecla do Selector ou sobre outro widget na Paleta para volver ao modo normal.

Modo de emprazamento de widgets

  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, toplevel widgets, and so on. After you place a widget, the mode returns to selection mode.

Toplevel placement mode

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

### Para organizar os widgets no seu proxecto

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

- Caixa horizontal

- Caixa vertical

- Táboa

- Posicións fixas

- Botonera horizontal

- Botonera vertical

- Paneis horizontais

- Paneis verticais

- Caderno

- Marco

- Xanela con barras de desprazamento

- Área de visualización

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.

### Para emprazar un widget no portapapeis

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.

### Para eliminar un widget

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

### Para cambiar unha propiedade dun 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.

## Sobre Glade

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

Para informar dun erro ou facer unha suxestión sobre a aplicación Glade ou este manual, siga os consellos da Páxina de Feedback de GNOME.

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.