|
Packit |
1470ea |
|
|
Packit |
1470ea |
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="view-switchers" xml:lang="pt-BR">
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<link type="guide" xref="patterns#secondary"/>
|
|
Packit |
1470ea |
<desc>Toggle buttons that change the view, like tabs</desc>
|
|
Packit |
1470ea |
<credit type="author">
|
|
Packit |
1470ea |
<name>Allan Day</name>
|
|
Packit |
1470ea |
<email>aday@gnome.org</email>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
<include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Georges Neto</mal:name>
|
|
Packit |
1470ea |
<mal:email>georges.stavracas@gmail.com</mal:email>
|
|
Packit |
1470ea |
<mal:years>2014.</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Rafael Fontenelle</mal:name>
|
|
Packit |
1470ea |
<mal:email>rafaelff@gnome.org</mal:email>
|
|
Packit |
1470ea |
<mal:years>2017</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>View switchers</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<media type="image" mime="image/svg" src="figures/patterns/view-switcher.svg"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
A view switcher is a control that allows switching between a number of predefined views. It appears as a set of toggle buttons that are placed in the center of a header bar.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="when-to-use">
|
|
Packit |
1470ea |
<title>Quando usar</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
There are two primary cases when a view switcher is appropriate:
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>When presenting content, and it is useful to be able to view different sets or sub-sets of content. For example, a music application could show different views for artists, albums and playlists. </item>
|
|
Packit |
1470ea |
<item>If your application provides discrete groups of functionality which are typically used independently. </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
As a rule of thumb, a view switcher should contain between three and five views. If you have more views, a <link xref="sidebar-lists">sidebar list</link> might be a more appropriate view switching control.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="additional-guidelines">
|
|
Packit |
1470ea |
<title>Additional guidelines</title>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item>Each view should have a short and clear title. </item>
|
|
Packit |
1470ea |
<item>Buttons in the view switcher widget can indicate when there is activity in a view. </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="api-reference">
|
|
Packit |
1470ea |
<title>ReferĂȘncia de API</title>
|
|
Packit |
1470ea |
<list>
|
|
Packit |
1470ea |
<item><link href="https://developer.gnome.org/gtk3/stable/GtkStack.html">GtkStack</link> </item>
|
|
Packit |
1470ea |
<item><link href="https://developer.gnome.org/gtk3/stable/GtkStackSwitcher.html">GtkStackSwitcher</link> </item>
|
|
Packit |
1470ea |
</list>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</page>
|