<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:uix="http://projectmallard.org/experimental/ui/" type="topic" id="primary-menus" xml:lang="pt-BR">

  <info>
    <link type="guide" xref="patterns#primary"/>
    <desc>O menu principal do aplicativo, representado por três linhas horizontais empilhadas</desc>
    <credit type="author">
      <name>Allan Day</name>
      <email>aday@gnome.org</email>
    </credit>
    <include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Georges Neto</mal:name>
      <mal:email>georges.stavracas@gmail.com</mal:email>
      <mal:years>2014,</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Rafael Fontenelle</mal:name>
      <mal:email>rafaelff@gnome.org</mal:email>
      <mal:years>2017-2019</mal:years>
    </mal:credit>
  </info>

<title>Menus primários</title>

<media type="image" mime="image/svg" src="figures/patterns/primary-menu.svg"/>

<p>Primary menus are a standard design pattern that is found in most applications. They are labelled with the menu icon (named <code>menu-open</code>) and contain the top-level menu items for the application. This can include standard items like <gui>Preferences</gui>, <gui>Help</gui> and <gui>About Application</gui>, as well as other application-specific items.</p>


<section id="when-to-use">
<title>Quando usar</title>

<p>Most applications have primary menus, since they are the standard location for <gui>About Application</gui>, which every application is expected to have.</p>

</section>

<section id="guidance">
<title>Orientação</title>

<p>Primary menus are typically placed on the right side of the header bar. However, there are two variations on this rule:</p>

<list>
<item><p>If the application incorporates in-window navigation, with a top-level location and sub-pages, the primary menu should only be placed on the top level: sub-pages can include a <link xref="secondary-menus">secondary menu</link>, if a menu is required.</p></item>
<item><p>When used in combination with a <link xref="sidebar-lists">sidebar list</link>, the primary menu should be placed above the sidebar list on the right. If a menu is required for items shown in the content side of the window, a <link xref="secondary-menus">secondary menu</link> can be used.</p></item>
</list>

<p>Other guidelines:</p>

<list>
<item><p>Os menus primários podem conter itens para a janela ou exibição atual, bem como o aplicativo como um todo. Isso os diferencia dos <link xref="secondary-menus">menus secundários</link>, que contêm apenas itens de menu relacionados a uma visão ou item específico.</p></item>
<item><p>Siga as <link xref="menus">diretrizes padrão para menus</link> ao decidir sobre o conteúdo e organização do menu primário.</p></item>
<item><p>A primary menu is contained within a <link xref="popovers">popover</link>. As such, a primary menu can include a variety of controls, such as groups of buttons.</p></item>
</list>

</section>

<section id="standard-menu-items">
<title>Itens de menu padrão</title>

<p>The following are standard primary menu items, and should be placed in a group at the end of the menu:</p>

<table>
<tr>
<td><p><gui>Preferences</gui></p></td>
<td><p>Opens the application's preferences dialog, if it has one.</p></td>
</tr>
<tr>
<td><p><gui>Keyboard Shortcuts</gui></p></td>
<td><p>Opens the application's keyboard shortcuts window, if it has one.</p></td>
</tr>
<tr>
<td><p><gui>Help</gui></p></td>
<td><p>Opens the application's user documentation in the <app>Help</app> application.</p></td>
</tr>
<tr>
<td><p><gui>About Application</gui></p></td>
<td><p>Opens the application's about dialog. This item should include the application's name, such as <gui>About Photos</gui> or <gui>About Calculator</gui>. Every primary menu should include this item.</p></td>
</tr>
</table>

<p>Os menus primários não devem incluir itens de menu para fechar ou sair: as janelas já podem ser fechadas usando o botão Close na barra de cabeçalho e pode ser ambíguo quanto ao item de menu de fechamento. Os usuários não diferenciam prontamente entre sair e fechar e, portanto, podem ser enganosos.</p>

</section>

<section id="api-reference">
<title>Referência de API</title>

<list>
<item><p><link href="https://developer.gnome.org/gtk3/stable/GtkMenuButton.html">GtkMenuButton</link></p></item>
<item><p><link href="https://developer.gnome.org/gtk3/stable/GtkPopoverMenu.html">GtkPopoverMenu</link></p></item>
</list>

</section>

</page>
