Ventanas primarias

Una ventana primaria generalmente presenta una vista de los datos del usuario, como un documento de texto en una aplicación de procesado de textos, una imagen en un programa de dibujo o cálculos en una calculadora o en una hoja de cálculo. También puede ser la vista de algo más abstracto, como un juego. Una única instancia de una aplicación puede tener más de una ventana primaria y más de un tipo de ventana primaria.

Una ventana primaria siempre se muestra en la lista de ventanas del panel.

Figura 3-2Una típica ventana primaria (gedit)

Generalmente la ventana de una aplicación primaria tiene un borde, una barra de menú y una barra de estado, y también puede contener una o más barras de herramientas.

3.2.1. Título

El elemento más importante del título de ventana de una aplicación basada en un documento, es el nombre del documento abierto. Para otras aplicaciones, generalmente se usa el nombre de la aplicación.

Guías
  • Use el Nombre de archivo como el título de la ventana para aplicaciones basadas en documentos. No use la ruta completa, ya que el nombre de archivo es más fácil para distinguir entre otros títulos de ventanas abiertas, por ejemplo en la lista de ventanas.

    Ejemplo 3-1Usar los nombres de documentos como títulos de ventanas
    Aplicación Ejemplo de título de ventana
    AbiWord Mi reporte.abw
    Evolution Bandeja de entrada
    Reproductor de música U2 - Better Than the Real Thing

    Si la ruta es importante, por ejemplo, el usuario ha abierto dos documentos con el mismo nombre de carpetas diferentes en la misma aplicación, muestre la ruta completa en la barra de estado.

  • Before a new document has been saved for the first time, set the window title to Unsaved <document type>. For example, Unsaved Drawing, Unsaved Spreadsheet, or the more generic Unsaved Document.

  • Cuando un documento tiene cambios pendientes, introduzca un asterisco (*) al comienzo del título de la ventana. Por ejemplo, *Dibujo sin guardar, *InformeAnual.

  • Para aplicaciones no basadas en documentos use Nombre de la aplicación como título de la ventana.

    Ejemplo 3-2Usar nombres de aplicaciones como títulos de ventanas
    Aplicación Título de la ventana
    Diccionario Diccionario
    Calculadora Calculadora
  • Do not place version numbers, company names, or other information that is of no immediate use to the user in the window title. These consume space, making titles in limited spaces such as the system window list less useful, and add more text the user has to scan to find useful information. In a "beta" product, where version numbers are critical for bug information, placing version numbers can be useful, but remove them from stable releases. Place version information in the about box instead.

While document names are most pertinent to users, we understand that application developers may want to increase recognition of their application. If you plan to include your application's name in the title of a primary window, use the following format: Document Name - Application Name. This will ensure that the document name appears in limited space situations such as the system window list.

No se recomienda incluir el nombre de la aplicación en el título de una aplicación basada en documentos.

Think about naming windows in the context of the panel window list. On a typical screen with a relatively small number of windows open, a window will have 20-30 characters of text and an icon. Consider which text will provide the most immediately obvious clues to a user looking for a particular window.

3.2.2. Comandos de ventana

Cerrar, maximizar/restaurar, minimizar, enrollar/desenrrollar

3.2.3. Relación entre documentos y ventanas

3.2.3.1. Interfaz simple de documentos (ISD, «SDI»)

A single document interface places each document in its own primary window. Toolboxes and other utility windows may be shared between multiple SDI documents, but closing them should have no effect on the document windows. Use SDI for your GNOME application unless there is a compelling reason not to.

Figura 3-3Una aplicación SDI típica (Eye of GNOME)

3.2.3.2. Interfaz de múltiples documentos (IMD, «MDI»)

Una interfaz de múltiples documentos presenta dos documentos en dos paneles o pestañas, en una sola ventana.

Figura 3-4Una típica aplicación IMD (gedit) mostrando tres documentos abiertos en páginas en pestañas

MDI has several inherent usability problems, so its use is discouraged in applications. It is better to open each document in a new primary window, with its own menubar, toolbars and statusbar, or allow multiple instances of your application to be run simultaneously. In either case, this leaves it for the window manager (acting on the user's preferences) rather than your application to decide how to group and present document windows from the same application.

3.2.3.3. Interfaz controlada de un solo documento (ICSD, «CSDI»)

In a typical SDI application, document windows are treated as primary. For example, when all document windows have been closed, the application (including utility windows) exits as well. In CSDI a utility window is treated as the primary window. For example, closing this utility window will close all document windows and exit the application.

No se recomienda usar ICSD

CSDI is sometimes used because document windows might be too small to have menu bars. Typically this is not the normal use case for the application, but does represent a significant minority use case. For example, an image editor being used to edit small web page elements will often result in very small document windows that cannot accomodate a title bar.

A better way to address this problem is to allow menu bars to "collapse" into an overflow button, in much the same way toolbars operate when the window shrinks to below the toolbar width. This allows for small windows, but also provides an opportunity for people to figure out where their menus have gone.

Note that if very small documents are the primary use case for your application, you should consider finding a means to avoid windows altogether. Windows are not an effective interface for dealing with large numbers of small items. Consider looking for a fixed/automated layout system for presenting the "documents". Also consider if the "documents" will be primarily used in a higher level grouping, in which case that grouping could become the document instead.