From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../index.html | 107 +++++ files/pt-br/archive/mozilla/index.html | 10 + files/pt-br/archive/mozilla/xpinstall/index.html | 56 +++ .../archive/mozilla/xpinstall/reference/index.html | 193 +++++++++ .../xpinstall/reference/install_object/index.html | 45 +++ .../install_object/methods/alert/index.html | 16 + .../reference/install_object/methods/index.html | 58 +++ files/pt-br/archive/mozilla/xul/index.html | 81 ++++ .../archive/mozilla/xul/namespaces/index.html | 74 ++++ .../pt-br/archive/mozilla/xul/navegador/index.html | 447 +++++++++++++++++++++ .../pt-br/archive/mozilla/xul/tutorial/index.html | 142 +++++++ .../tutorial/localiza\303\247\303\243o/index.html" | 326 +++++++++++++++ .../archive/mozilla/xul/xul_reference/index.html | 286 +++++++++++++ files/pt-br/archive/mozilla/xulrunner/index.html | 84 ++++ 14 files changed, 1925 insertions(+) create mode 100644 files/pt-br/archive/mozilla/activex_control_for_hosting_netscape_plug-ins_in_ie/index.html create mode 100644 files/pt-br/archive/mozilla/index.html create mode 100644 files/pt-br/archive/mozilla/xpinstall/index.html create mode 100644 files/pt-br/archive/mozilla/xpinstall/reference/index.html create mode 100644 files/pt-br/archive/mozilla/xpinstall/reference/install_object/index.html create mode 100644 files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/alert/index.html create mode 100644 files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/index.html create mode 100644 files/pt-br/archive/mozilla/xul/index.html create mode 100644 files/pt-br/archive/mozilla/xul/namespaces/index.html create mode 100644 files/pt-br/archive/mozilla/xul/navegador/index.html create mode 100644 files/pt-br/archive/mozilla/xul/tutorial/index.html create mode 100644 "files/pt-br/archive/mozilla/xul/tutorial/localiza\303\247\303\243o/index.html" create mode 100644 files/pt-br/archive/mozilla/xul/xul_reference/index.html create mode 100644 files/pt-br/archive/mozilla/xulrunner/index.html (limited to 'files/pt-br/archive/mozilla') diff --git a/files/pt-br/archive/mozilla/activex_control_for_hosting_netscape_plug-ins_in_ie/index.html b/files/pt-br/archive/mozilla/activex_control_for_hosting_netscape_plug-ins_in_ie/index.html new file mode 100644 index 0000000000..90f77c6e87 --- /dev/null +++ b/files/pt-br/archive/mozilla/activex_control_for_hosting_netscape_plug-ins_in_ie/index.html @@ -0,0 +1,107 @@ +--- +title: Controlo ActiveX para alojar Netscape Plugins no IE +slug: Archive/Mozilla/ActiveX_Control_for_Hosting_Netscape_Plug-ins_in_IE +translation_of: Archive/Mozilla/ActiveX_Control_for_Hosting_Netscape_Plug-ins_in_IE +--- +

Introdução

+ +

A Microsoft retirou o apoio aos Netscape plugins desde a versão IE 5.5 SP 2 .  Este projeto poupa muito trabalho aos desenvolvedores de plugins . 

+ +

Esta página descreve um controlo que implementa a NPAPI e aloja a maioria dos plugins compativeis com Netscape. A partir de agora pode-se usar os passados plugins nas versões recentes do IE ou em outro contentor Activex. O próprio controlo é implementado numa DLL, a "pluginhostctrl.dll" autónoma do restante projeto Mozilla.

+ +

Quem quiser saber como a Microsoft mantinha a NPAPI deve procurar a ficha "plugin.ocx" na diretoria do sistema Windows. Este controlo Activex de 100k contem toda a implementação NPAPI e equivalia ao funcionamento  da atual "pluginhostctrl.dll".

+ +

A secção subjacente conta como obter a fonte, construir e usar a pluginhostctrl.dll.

+ +

 

+ +

Obter a fonte

+ +

É preciso ter CVS para obter o código fonte.  Admitindo que tem o CVS  escreva ou copie e cole o código subjacente no  command prompt:

+ +
C:\> set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
+C:\> set HOME=\TEMP
+C:\> cvs login
+(Logging in to anonymous@cvs-mirror.mozilla.org)
+CVS password: anonymous
+C:\> cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl
+
+ +

 Isto coloca o código fonte do controlo  em   mozilla\embedding\browser\activex\src\pluginhostctrl.

+ +

Também pode-se ver o código fonte  online.

+ +

 

+ +

Construir o controlo 

+ +

 E fácil construir o controlo:

+ +
    +
  1. Locatize a diretoria da pluginhostctrl :
  2. +
  3. Abra a pluginhostctrl.dsp
  4. +
  5. Faça o ficheiro  "Win32 Debug" or outro 
  6. +
  7. Abra algumas das fichas de teste em  pluginhostctrl\tests no Internet Explorer e verifique se o controlo está construído e ficou registado corretamente. 
  8. +
+ +

O controlo lê os  plugins do Netscape 4.x e  IE instalados, mas ainda não funciona  com o Mozilla ou NS 6.x .

+ +

Nota para os desenvolvedores

+ +

 Se pretender ALTERAR  este contolo tem de OBRIGATÓRIAMENTE alterar a  CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} para algo diverso e outras GUIDs que o controlam (IID, LIBIDs etc). Isto é necessário para que possa coexistir com a versão genérica e outras versões que outros produtores de plugins que estejam ou possam ser instaladas. 

+ +

IAconselha-se a renomear o controlo e a não instalar à toa, ou na diretoria do Windows, para não ser ignorado. 

+ +

Use uma aplicação como guidgen.exe ou uuidgen.exe para fazer novas  GUIDs.

+ +

Empacotamento

+ +

Há uma subdirectoria  chamada cab/ com um script  e um README.txt para cada desenvolvedor fazer or seus próprios ficheiros CAB.

+ +

Instalação manual

+ +

Após ter precompilado a pluginhostctrl.dll, para a instalar num  computador, é preciso  registar com um script de instalação ou manualmente.:

+ +
regsvr32 pluginhostctrl.dll
+ +

Para instalar um controlo num sistema operativo Windows NT, 2000 & XP precisa de autorização do nível de administrador..

+ +

Utilização

+ +

Escreva HTML como o do conteúdo.subjacente:

+ +
    <OBJECT classid="CLSID:DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2"
+        width="500" height="300">
+      <PARAM name="type" value="video/quicktime"/>
+      <PARAM name="src" value="http://www.foobar.com/some_movie.mov"/>
+      <!-- Custom arguments -->
+      <PARAM name="loop" value="true"/>
+    </OBJECT>
+
+ +

O atributo CLASSID diz ao IE para criar uma instància do plugin alojador do controlo. A WIDTH e a HEIGHT especificam as dimensões em pixeis.

+ +

Pode-se optat por especificar um atributo CODEBASE se o controlo foi empacotado num ficheiro  CAB  para instalação automática. .

+ +

Os seguintes atributos <EMBED> tem  <PARAM> tag equivalentes:

+ + + +

Pode-se  colocar qualquer plugin personalizado  como elemento adicional de  <PARAM>.

+ +

Limitações: 

+ + diff --git a/files/pt-br/archive/mozilla/index.html b/files/pt-br/archive/mozilla/index.html new file mode 100644 index 0000000000..0acec76e6d --- /dev/null +++ b/files/pt-br/archive/mozilla/index.html @@ -0,0 +1,10 @@ +--- +title: Archived Mozilla and build documentation +slug: Archive/Mozilla +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/Mozilla +--- +

These articles are archived, obsolete documents about Mozilla, Gecko, and the process of building Mozilla projects.

+

{{SubpagesWithSummaries}}

diff --git a/files/pt-br/archive/mozilla/xpinstall/index.html b/files/pt-br/archive/mozilla/xpinstall/index.html new file mode 100644 index 0000000000..44738d65b2 --- /dev/null +++ b/files/pt-br/archive/mozilla/xpinstall/index.html @@ -0,0 +1,56 @@ +--- +title: XPInstall +slug: Archive/Mozilla/XPInstall +tags: + - NeedsTranslation + - TopicStub + - XPInstall + - XPInstall_API_reference +translation_of: Archive/Mozilla/XPInstall +--- +

Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension.

+ +
Cross-Platform Install (XPInstall) is a technology used by Mozilla Application Suite, Mozilla Firefox, Mozilla Thunderbird and other XUL-based applications for installing extensions. An XPI (pronounced "zippy" and derived from XPInstall) installer module is a ZIP file that contains an install script or manifest (entitled install.js or install.rdf) at the root of the file.
+ + + + + + + + +
+

Documentation

+ +
+
XPInstall API Reference
+
XPInstall API Reference.
+
Learn XPI Installer Scripting by Example
+
This article uses the installer script from browser.xpi install package as the basis for discussing XPI installations in general.
+
Creating XPI Installer Modules
+
This article describes the packaging scheme of the Mozilla and offers a tutorial for creating a new package that can then be redistributed, installed, and made available to users.
+
Install Wizards (aka: Stub Installers)
+
+ +

View All...

+
+

Community

+ +
    +
  • View Mozilla forums... {{ DiscussionList("dev-platform", "mozilla.dev.platform") }}
  • +
+ +

Tools

+ + + + + + +
+ +

 

diff --git a/files/pt-br/archive/mozilla/xpinstall/reference/index.html b/files/pt-br/archive/mozilla/xpinstall/reference/index.html new file mode 100644 index 0000000000..f17f898062 --- /dev/null +++ b/files/pt-br/archive/mozilla/xpinstall/reference/index.html @@ -0,0 +1,193 @@ +--- +title: XPInstall API reference +slug: Archive/Mozilla/XPInstall/Reference +tags: + - NeedsTranslation + - TopicStub + - XPInstall + - XPInstall_API_reference +translation_of: Archive/Mozilla/XPInstall/Reference +--- +

Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension.

+ +

Objects

+ +

Install

+ +
+
Properties
+
Methods
+
+ +
+
+
+
addDirectory
+
addFile
+
alert
+
cancelInstall
+
confirm
+
deleteRegisteredFile
+
execute
+
gestalt
+
getComponentFolder
+
getFolder
+
getLastError
+
getWinProfile
+
getWinRegistry
+
initInstall
+
loadResources
+
logComment
+
patch
+
performInstall
+
refreshPlugins
+
registerChrome
+
resetError
+
setPackageFolder
+
+
+
+ +

InstallTrigger

+ +
+
No properties
+
Methods
+
+ +
+
+
+
compareVersion
+
enabled
+
getVersion
+
install
+
installChrome
+
startSoftwareUpdate
+
+
+
+ +

InstallVersion

+ +
+
Properties
+
Methods
+
+ +
+
+
+
compareTo
+
init
+
toString
+
+
+
+ +

File

+ +
+
No properties
+
Methods
+
+ +
+
+
+
copy
+
dirCreate
+
dirGetParent
+
dirRemove
+
dirRename
+
diskSpaceAvailable
+
execute
+
exists
+
isDirectory
+
isFile
+
macAlias
+
modDate
+
modDateChanged
+
move
+
remove
+
rename
+
size
+
windowsGetShortName
+
windowsRegisterServer
+
windowsShortcut
+
+
+
+ +

WinProfile

+ +
+
No properties
+
Methods
+
+ +
+
+
+
getString
+
writeString
+
+
+
+ +

WinReg

+ +
+
No properties
+
Methods
+
+ +
+
+
+
createKey
+
deleteKey
+
deleteValue
+
enumKeys
+
enumValueNames
+
getValue
+
getValueNumber
+
getValueString
+
isKeyWritable
+
keyExists
+
setRootKey
+
setValue
+
setValueNumber
+
setValueString
+
valueExists
+
+
+
+ +
+
WinRegValue constructor
+
+ +

Other Information

+ +

Return Codes

+ +

See complete list

+ +

Examples

+ +
+
Trigger Scripts and Install Scripts
+
+ +
Code Samples
+ +
+
File.macAlias
+
File.windowsShortcut
+
Install.addDirectory
+
Install.addFile
+
InstallTrigger.installChrome
+
InstallTrigger.startSoftwareUpdate
+
Windows Install
+
diff --git a/files/pt-br/archive/mozilla/xpinstall/reference/install_object/index.html b/files/pt-br/archive/mozilla/xpinstall/reference/install_object/index.html new file mode 100644 index 0000000000..006b785484 --- /dev/null +++ b/files/pt-br/archive/mozilla/xpinstall/reference/install_object/index.html @@ -0,0 +1,45 @@ +--- +title: Install Object +slug: Archive/Mozilla/XPInstall/Reference/Install_Object +tags: + - NeedsTranslation + - TopicStub + - XPInstall_API_reference +translation_of: Archive/Mozilla/XPInstall/Reference/Install_Object +--- +

Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension.

+ +

Install

+ +

Use the Install object to manage the downloading and installation of software with the XPI Installation Manager.

+ +

Overview

+ +

The Install object is used primarily in installation scripts. In all cases, the Install object is implicit--like the window object in regular web page scripts--and needn't be prefixed to the object methods. The following two lines, for example, are equivalent:

+ +
f = getFolder("Program");
+f = Install.getFolder("Program");
+
+ +

An installation script is composed of calls to the Install object, and generally takes the following form:

+ +
+
Initialize the installation
+
Call initInstall with the name of the installation and the necessary registry and version information.
+
Add the files to the installation
+
Add files to the installation by calling getFolder to get file objects and passing those object refs to addFile as many times as necessary.
+
Perform installation
+
Check that the files have been added successfully (e.g., by checking the error Return Codes from many of the main installation methods, and go ahead with the install if everything is in order:
+
+ +
performOrCancel();
+function performOrCancel()
+{
+  if (0 == getLastError())
+     performInstall();
+   else
+     cancelInstall();
+}
+
+ +

For complete script examples, see Script Examples.

diff --git a/files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/alert/index.html b/files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/alert/index.html new file mode 100644 index 0000000000..6a676d5b70 --- /dev/null +++ b/files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/alert/index.html @@ -0,0 +1,16 @@ +--- +title: alert +slug: Archive/Mozilla/XPInstall/Reference/Install_Object/Methods/alert +translation_of: Archive/Mozilla/XPInstall/Reference/Install_Object/Methods/alert +--- +

Sumário

+

A função alert mostra uma caixa de diálogo modal com uma mensagem.

+

Método de

+

Install object

+

Sintaxe

+
void alert ( String message );
+
+

Parâmetros

+

O parâmetro message é exibido como uma string na caixa de diálogo. Se message não é uma string, é convertido em uma e é exibido.

+

Retorna

+

Nada.

diff --git a/files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/index.html b/files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/index.html new file mode 100644 index 0000000000..8ddb834c1f --- /dev/null +++ b/files/pt-br/archive/mozilla/xpinstall/reference/install_object/methods/index.html @@ -0,0 +1,58 @@ +--- +title: Methods +slug: Archive/Mozilla/XPInstall/Reference/Install_Object/Methods +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/Mozilla/XPInstall/Reference/Install_Object/Methods +--- +

Parts of this page show the use of the XPInstall API. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. Extension, Theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. In particular plugin developers should see how to package a plugin as an extension.

+ +

Methods

+ +
+
addDirectory
+
Unpacks an entire subdirectory.
+
addFile
+
Unpacks a single file.
+
alert
+
Displays an Alert dialog box with a message and an OK button.
+
cancelInstall
+
Aborts the installation of the software.
+
confirm
+
Displays a Confirm dialog box with the specified message and OK and Cancel buttons. Also allows custom button labels and a checkbox.
+
deleteRegisteredFile
+
Deletes the specified file and its entry in the Client Version Registry.
+
execute
+
Extracts a file from the XPI file to a temporary location and schedules it for later execution.
+
gestalt
+
Retrieves information about the operating environment. (Mac OS only)
+
getComponentFolder
+
Returns an object representing the directory in which a component is installed.
+
getFolder
+
Returns an object representing a directory, for use with the addFile method.
+
getLastError
+
Returns the most recent non-zero error code.
+
getWinProfile
+
Constructs an object for working with a Windows .ini file.
+
getWinRegistry
+
Constructs an object for working with the Windows Registry.
+
initInstall
+
Initializes installation for the given software and version.
+
loadResources
+
Returns an object whose properties are localized strings loaded from the specified property file.
+
logComment
+
Add a comment line to the install log.
+
patch
+
Applies a set of differences between two versions.
+
performInstall
+
Finalizes the installation of the software.
+
refreshPlugins
+
Refreshes the list of plug-ins registered for the browser.
+
registerChrome
+
Registers chrome with the chrome registry.
+
resetError
+
Resets a saved error code to zero.
+
setPackageFolder
+
Sets the default package folder that is saved with the root node.
+
diff --git a/files/pt-br/archive/mozilla/xul/index.html b/files/pt-br/archive/mozilla/xul/index.html new file mode 100644 index 0000000000..cebb1550b8 --- /dev/null +++ b/files/pt-br/archive/mozilla/xul/index.html @@ -0,0 +1,81 @@ +--- +title: XUL +slug: Archive/Mozilla/XUL +tags: + - NeedsTranslation + - TopicStub + - XUL +translation_of: Archive/Mozilla/XUL +--- +
Tutorial XUL
+Um tutorial guiado que o ajudará a começar com XUL, originario do XULPlanet.
+ +
+

XUL (XML Linguagem de Interface do usuário) é a linguagem baseada em XML da Mozilla, para construir interfaces de usuário. Em particular, é usado pelo Firefox. Os desenvolvedores da Web já familiarizados com HTML aprenderão XUL rapidamente e podem começar a criar aplicativos de imediato. Abra a Tabela Periódica XUL no Firefox ou em outro navegador baseado em Gecko para ver alguns demos da XUL.

+ +
Nota: Esta "Tabela Periódica XUL" não pode ser mostrada nas versões recentes do Gecko porque ele usa o XUL remoto, uma tecnologia cujo suporte foi descartado devido a possíveis problemas de segurança. Existe uma aplicação XULRunner que contém a tabela periódica XUL que pode ser aberta com navegadores baseados em Gecko. Você pode obtê-la aqui. Veja: XULRunner_tips#Using_Firefox_3_to_run_XULRunner_applications para obter instruções sobre a execução de aplicativos XULRunner no Firefox.
+
+ + + + + + + + +
+

Documentação

+ +
+
Referencias XUL
+
Elementos XUL, atributos, propriedades, métodos e manipuladores de eventos.
+
Controle XUL
+
Uma lista rápida de todos os controles XUL disponíveis.
+
Escola XUL
+
Um tutorial abrangente sobre o desenvolvimento de add-on no Mozilla.
+
A Alegria de XUL
+
Descreve os principais recursos e componentes do XUL.
+
Guia de menus e Popups
+
Um guia sobre o uso de menus e painéis popups.
+
Guia de Template
+
Um guia detalhado sobre modelos XUL, que é um meio de gerar conteúdo de uma base de dados.
+
Drag e Drop
+
Como executar operações de Drag e Drop.
+
Adaptando aplicações XUL para o Firefox 3.0
+
Uma lista de alterações em Firefox 3.0, afetando os desenvolvedores XUL.
+
Adaptando aplicações XUL para o Firefox 2.0
+
Uma lista de alterações em Firefox 2.0, afetando os desenvolvedores XUL.
+
Adaptando aplicações XUL para Firefox 1.5
+
Uma lista de alterações em Firefox 1.5, afetando os desenvolvedores XUL.
+
+ +

Veja mais...

+
+

Comunidade

+ +
    +
  • Veja os fóruns de Mozilla...{{ DiscussionList("dev-tech-xul", "mozilla.dev.tech.xul") }}
  • +
  • #xul no irc.mozilla.org
  • +
+ +

Ferramentas

+ + + +

Veja mais...

+ + + + +
diff --git a/files/pt-br/archive/mozilla/xul/namespaces/index.html b/files/pt-br/archive/mozilla/xul/namespaces/index.html new file mode 100644 index 0000000000..ff8d74461d --- /dev/null +++ b/files/pt-br/archive/mozilla/xul/namespaces/index.html @@ -0,0 +1,74 @@ +--- +title: Namespaces +slug: Archive/Mozilla/XUL/Namespaces +tags: + - Add-ons + - Extensions +translation_of: Archive/Mozilla/XUL/Namespaces +--- +

 

+ +

Em adição a este documento, veja Intensivo de Namespaces.

+ +

Namespaces em XML fornecem uma forma de distinguir elementos duplicados e nomes de atributos. Elementos duplicados e nomes de atributos podem ocorrer quando um documento XML contêm elementos de dois ou mais esquemas XML (ou DTDs, Definição de Tipo de Documento). Citando a Wikipedia:  "Em geral, um namespace é um recipiente abstrato fornecendo contexto para os itens ... detém e permite desambiguação de itens que tem o mesmo nome."

+ +

Se você se sente familiar com namespaces em C++, pacotes Java, pacotes Perl, ou módulo de importação em Python, você já é familiar com o conceito de namespace.

+ +

Um namespace é identificado por um nome únco (chamado de URI, não uma URL, apesar de poder parecer com uma URL). Um URI é qualquer string, apesar de que a maioria das pessoas escolhem um URI baseado em uma URL pois URLs são uma forma fácil de esperar por singularidade. Apesarde que não há nada prevenindo alguém de usar o namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul, é bastante improvável que alguém iria escolhê-lo acidentalmente. Mesmo se alguém acidentalmente o escolhe, pode talvez não definir os mesmos elementos como XUL de qualquer forma (e.g., <textbox/>) em seu esquema/DTD.

+ +

Qualquer tipo de elemento ou nome de elemento em um namespace XML pode ser identificado por seu namespace XML e seu "nome local". Juntos, estes dois definem um nome qualificado, ou QName.

+ +

Por exemplo, <xul:textbox/> usa um namespace chamado "xul" e um nome local "textbox". Isto o distingue de, por exemplo, <foobar:textbox/> que pode ocorrer no mesmo documento. Os namespaces xul e foobar devem ser definidos no topo do documento XML em que estão sendo usados, como:

+ +
 <foobar:algum-elemento
+     xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+     xmlns:foobar="o-namespace-foobar">
+   <xul:textbox id="foo" value="bar"/>
+   <foobar:textbox comida-favorita="pizza"/>
+ </foobar:algum-elemento>
+
+ +

Note que misturei dois <textbox/> no mesmo documento. A única forma de distinguir que eles tem significados diferentes é com namespaces.

+ +

Há mais uma outra coisa a saber: "namespace padrão", e é usado com elementos XUL por todo o tempo. Em documentos XUL, você normalmente vê isto:

+ +
 <window
+     id="foo"
+     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+   ...
+   ...
+ </window>
+
+ +

e documentos XHTML você vê isto:

+ +
 <html xmlns="http://www.w3.org/1999/xhtml">
+   ...
+   ...
+ </html>
+
+ +

Há uma diferença muito sutil aqui em comparação com o anterior. Antes eu escrevi xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" mas aqui a peça :xul é omitida. Isto mostra ao analisador XML que http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xulé o namespace padrão para o elemento e seus elementos descendentes (até que seja substituído posteriormente por um namespace padrão em um elemento descendente), e que qualquer elemento sem um namespace (ex.: sem prefixo e vírgula) pertence ao namespace padrão. Por isto que podemos escrever de forma abreviada <textbox/> ao invés de <xul:textbox/> em XUL (embora o último é tão correcto quando não usamos http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul como namespace padrão) -- o namespace XUL é definido como o padrão no elemento mais elevado. Em outras palavras, um namespace padrão permite um tipo de forma abreviada a ser usada por todos os descendentes de um elemento.

+ +

Aqui vai uma pergunta: qual namespace contêm o elemento foo no documento XML abaixo?

+ +
  <foo/>
+
+ +

A resposta é que é em nenhum namespace, ou alternadamente, está no namespace denotado pela string vazia:

+ +
  <foo xmlns=""/>
+
+ +

Este segundo exemplo é semanticamente equivalente ao primeiro. This second example is semantically equivalent to the first.

+ +

Agora, uma segunda pergunta: em quais namespaces estão os atributos bar, baz e quux?

+ +
  <foo bar="value">
+    <element xmlns="namespace!" baz="value">
+      <element quux="value"/>
+    </element>
+  </foo>
+
+ +

bar não é, obviamente, um namespace. E baz e quux? A resposta é que eles não são um namespace também. Na verdade nenhum atributo não pré-fixado é um namespace, principalmente porque XML originalmente não tinha namespaces, e todos os XML's do tempo tinham que ficar sem namespace. Isto é uma fonte de confusão geral em volta de namespaces em XML.

diff --git a/files/pt-br/archive/mozilla/xul/navegador/index.html b/files/pt-br/archive/mozilla/xul/navegador/index.html new file mode 100644 index 0000000000..b7426dd4ea --- /dev/null +++ b/files/pt-br/archive/mozilla/xul/navegador/index.html @@ -0,0 +1,447 @@ +--- +title: Navegador +slug: Archive/Mozilla/XUL/Navegador +translation_of: Archive/Mozilla/XUL/browser +--- +
+ « XUL Reference home [ + Examples | + Attributes | + Properties | + Methods | + Related ] +
+ +

Um quadro que deverá conter uma visão de um documento da Web. É semelhante a iframe, exceto que ele contém um histórico de páginas e contém métodos adicionais para manipular a página atualmente exibida.

+ +

A maioria das propriedades e métodos do navegador raramente serão usados e só podem ser chamados de Chrome URLs. Outros URLs precisarão usar os objetos do documento e do histórico para alterar o documento exibido.

+ +
+
Atributos
+
autocompleteenabled, autocompletepopup, autoscroll, disablehistory, disableglobalhistory, disablesecurity, droppedLinkHandler, homepage, remote,showcaret, src, type
+
+ +
+
Propriedades
+
accessibleType, canGoBack, canGoForward, contentDocument, contentPrincipal, contentTitle, contentViewerEdit, contentViewerFile, contentWindow, currentURI, docShell, documentCharsetInfo, homePage, markupDocumentViewer, messageManager, preferences, securityUI, sessionHistory, webBrowserFind, webNavigation, webProgress
+
+ +
+
Métodos
+
addProgressListener, goBack, goForward, goHome, gotoIndex, loadURI, loadURIWithFlags, reload, reloadWithFlags, removeProgressListener, stop, swapDocShells
+
+ +

Exemplos

+ +
Image:XUL_ref_browser.png
+ +
<!-- Mostra a página inicial do Mozilla dentro de um groupbox -->
+<groupbox flex="1">
+  <caption label="Mozilla homepage"/>
+  <browser type="content" src="http://www.mozilla.org" flex="1"/>
+</groupbox>
+
+ +

Atributos

+ + + +
+ + +
+
autocompleteenabled
+
Type: boolean
+
Set to true to enable autocomplete of fields.
+
+
+ +
+
+ autocompletepopup
+
+ Type: id
+
+ The id of a popup element used to hold autocomplete results for the element.
+
+ +
+ + +
+
autoscroll
+
Type: boolean
+
Set to false to disable autoscroll for this browser. If this attribute is set to true or omitted, autoscroll will be enabled or depending on the user preference general.autoScroll.
+
+
+ +
disablehistory
Type: boolean
Disables both session and global history for the docshell attached to the browser.
+
+
+ +
disableglobalhistory
Type: boolean
Disables global history for the docshell attached to the browser while keeping session history active.
+
+
+ + +
+
disablesecurity
+
Type: boolean
+
Set this attribute to true to disable the security UI for this browser. Omit this attribute off to enable it.
+
+
+ + +
+
droppedLinkHandler
+
Type: function
+
+

This function is called when links are dropped to the browser element, with the following arguments.

+ +
droppedLinkHandler(event, uri, name) -- Firefox 51 or older
+droppedLinkHandler(event, links) -- Firefox 52 or newer
+ +
    +
  • event -- drop event, or null if no event is available
  • +
  • uri -- uri string of the dropped link
  • +
  • name -- name string of the dropped link
  • +
  • links -- array of the dropped items with nsIDroppedLinkItem interface
  • +
+
+
+
+ + +
+
homepage
+
Type: URL
+
This attribute allows you to set a homepage for the browser element. It does not have any correlation with the user's browser homepage; instead it is a convenient property to hold a home page. You can switch to this home page using the goHome method.
+
+
+ +
+
+ remote
+
+ Type: Boolean
+
+ If true, the content of the XUL <browser> will be processed inside its own process. The document is then accessible from the chrome content only through the message manager.
+
+
+ + +
+
showcaret
+
Type: boolean
+
Whether or not to cause a typing caret to be visible in the content area. Default is false.
+
+ + +
+ +
+
+ src
+
+ Type: URI
+
+ The URI of the content to appear in the element.
+
+ + +
+ + +
+
type
+
Type: one of the values below.
+
The type of browser, which can be used to set access of the document loaded inside the browser. If this is not set, the loaded document has the same access as the window containing the browser. More precisely: The document loaded into a chrome window is always of chrome type. Subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type. This boundary has a number of special effects, such as making window.top == window (unless the browser is added to a chrome document), and preventing documents from inheriting the principal of the parent document. The type attribute on all frames in content documents is ignored; subdocuments of content documents are always content documents.
+
+
Warning: The type attribute must be set before the element is inserted into the document.
+
+
+
+
content
+
A browser for content. The content that is loaded inside the browser is not allowed to access the chrome above it.
+
content-primary
+
The primary browser for content. The content that is loaded inside the browser is not allowed to access the chrome above it. For instance, in a web browser, this would be the element that displays the web page. The window for the primary content can be retrieved more conveniently using window.content.
+
content-targetable
+
One browser among many for content. The content that is loaded inside the browser is not allowed to access the chrome above it. This is the preferred value for any browser element in an application, which will use multiple browsers of equal privileges, and is unselected at the moment.
+
chrome
+
(default behaviour): A browser, intended to be used for loading privileged content using a chrome:// URI. Don't use for content from web, as this may cause serious security problems!
+
+
+
+ + +
+ +

Propriedades

+ + + +
+
+
+ accessibleType
+
+ Type: integer
+
+ A value indicating the type of accessibility object for the element.
+
+
+
+
+ canGoBack
+
+ Type: boolean
+
+ This read-only property is true if there is a page to go back to in the session history and the Back button should be enabled.
+
+ +
+
canGoForward
+
Type: boolean
+
This read-only property is true if there is a page to go forward to in the session history and the Forward button should be enabled.
+
+
+
+ contentDocument
+
+ Type: document
+
+ This read-only property contains the document object in the element.
+
+ +
+
contentPrincipal
+
Type: nsIPrincipal
+
This read-only property contains the principal for the content loaded in the browser, which provides security context information.
+
+
+
+ contentTitle
+
+ Type: string
+
+ This read-only property contains the title of the document object in the browser.
+
+
+
+ contentViewerEdit
+
+ Type: nsIContentViewerEdit
+
+ This read-only property contains the nsIContentViewerEdit which handles clipboard operations on the document.
+
+
+
+ contentViewerFile
+
+ Type: nsIContentViewerFile
+
+ Reference to the nsIContentViewerFile interface for the document.
+
+
contentWindow
Type: TODO
Use the contentWindow.wrappedJSObject to obtain a DOM(html) window object
+
+
+
+ currentURI
+
+ Type: nsIURI
+
+ This read-only property contains the currently loaded URL. To change the URL, use the loadURI method.
+
+
+
+ docShell
+
+ Type: nsIDocShell
+
+ This read-only property contains the nsIDocShell object for the document.
+
+
+
+ documentCharsetInfo Obsolete since Gecko 12.0
+
+ Type: nsIDocumentCharsetInfo
+
+ This read-only property contains the nsIDocumentCharsetInfo object for the document which is used to handle which character set should be used to display the document. The properties of the nsIDocumentCharsetInfo object were merged into the docshell in Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9).
+
+
+
+ homePage
+
+ Type: string home page URL
+
+ This property holds the value of the user's home page setting.
+
+
+
+ markupDocumentViewer
+
+ Type: nsIMarkupDocumentViewer
+
+ This read-only property contains the nsIMarkupDocumentViewer which is responsible for drawing the document.
+
+
+
+ messageManager
+
+ Type: message manager object
+
+ This read-only property returns the message manager object for the browser element.
+
+
+
+ preferences
+
+ Type: nsIPrefService
+
+ This read-only property contains an nsIPref object for getting and setting user preferences.
+
+
+
+ securityUI
+
+ Type: nsISecureBrowserUI
+
+ The read-only property holds an object which may be used to determine the security level of the loaded document.
+
+
+
+ sessionHistory
+
+ Type: nsISHistory
+
+ This read-only property contains the nsISHistory object which holds the session history.
+
+
+
+ webBrowserFind
+
+ Type: nsIWebBrowserFind
+
+ This read-only property contains an nsIWebBrowserFind object which can be used to search for text in the document.
+
+
+
+ webNavigation
+
+ Type: nsIWebNavigation
+
+ This read-only property contains the nsIWebNavigation object for the document. Most of its methods are callable directly on the element itself, such as goBack and goForward. It also contains the load constants used by reloadWithFlags and loadURIWithFlags.
+
+
+
+ webProgress
+
+ Type: nsIWebProgress
+
+ This read-only property contains an nsIWebProgress object which is used to monitor the progress of a document loading.
+
+ +

Métodos

+ + + + + + + +
+

Inherited Methods
+addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature(), getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData

+ +
+ +
+
+ addProgressListener( listener )
+
+ Return type: no return value
+
+ Add a progress listener to the browser which will monitor loaded documents. The progress listener should implement the nsIWebProgressListener interface.
+
+
goBack()
+
Return type: no return value
+
Go back one page in the history.
+
+
goForward()
+
Return type: no return value
+
Go forward one page in the history.
+
+
goHome()
+
Return type: no return value
+
Load the user's home page into the browser.
+
+
gotoIndex( index )
+
Return type: no return value
+
Navigate to the page in the history with the given index. Use a positive number to go forward and a negative number to go back.
+

NOTE: This is the XUL method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. Please check which one you're documenting! (This one has no post data parameter, see loadURIWithFlags for a version that does)

+
+
+ loadURI( uri, referrer, charset )
+
+ Return type: no return value
+
+ Load a URL into the document, with the given referrer and character set.
+
+ The first argument should be a string, not a nsIURI object. To get a string from an nsIURI, use nsIURI.spec or nsIURI.asciiSpec
+
+
loadURIWithFlags( uri, flags, referrer, charset, postData )
+
Return type: no return value
+
Load a URL into the document, with the specified load flags, the given referrer, character set, and POST data. In addition to the flags allowed for the reloadWithFlags method, the following flags are also valid: +
    +
  • LOAD_FLAGS_IS_REFRESH: This flag is used when the URL is loaded because of a meta tag refresh or redirect.
  • +
  • LOAD_FLAGS_IS_LINK: This flag is used when the URL is loaded because a user clicked on a link. The HTTP Referer header is set accordingly.
  • +
  • LOAD_FLAGS_BYPASS_HISTORY: Do not add the URL to the session history.
  • +
  • LOAD_FLAGS_REPLACE_HISTORY: Replace the current URL in the session history with a new one. This flag might be used for a redirect.
  • +
+
+
+ +

(See nsIWebNavigation.loadURI() for details on the referrer and postData parameters.)

+
reload()
+
Return type: no return value
+
Reloads the document in the browser element on which you call this method.
+
+
reloadWithFlags( flags )
+
Return type: no return value
+
Reloads the document in the browser with the given load flags. The flags listed below may be used, which are all constants of the webNavigation property (or the nsIWebNavigation interface). You may combine flags using a or symbol ( | ). +
    +
  • LOAD_FLAGS_NONE: No special flags. The document is loaded normally.
  • +
  • LOAD_FLAGS_BYPASS_CACHE: Reload the page, ignoring if it is already in the cache. This is the flag used when the reload button is pressed while the Shift key is held down.
  • +
  • LOAD_FLAGS_BYPASS_PROXY: Reload the page, ignoring the proxy server.
  • +
  • LOAD_FLAGS_CHARSET_CHANGE: This flag is used if the document needs to be reloaded because the character set changed.
  • +
+
+
+
removeProgressListener( listener )
+
Return type: no return value
+
Remove a nsIWebProgressListener from the browser.
+
+
+ stop()
+
+ Return type: no return value
+
+ Equivalent to pressing the Stop button, this method stops the currently loading document.
+
+
+ swapDocShells( otherBrowser )
+
+ Return type: no return value
+
+ Swaps the content, history and current state of this browser with another browser. During the swap, pagehide and pageshow events are fired on both browsers. This method can be used to move browser between windows or tear off a browser into a new window.
+
+ +
+

Note: Both browsers must be either standalone browsers or embedded in a tabbrowser. You can't mix them.

+ + + +
+
Interfaces
+
nsIAccessibleProvider
+
diff --git a/files/pt-br/archive/mozilla/xul/tutorial/index.html b/files/pt-br/archive/mozilla/xul/tutorial/index.html new file mode 100644 index 0000000000..8071ee6794 --- /dev/null +++ b/files/pt-br/archive/mozilla/xul/tutorial/index.html @@ -0,0 +1,142 @@ +--- +title: XUL Tutorial +slug: Archive/Mozilla/XUL/Tutorial +tags: + - NeedsTranslation + - TopicStub + - Tutorials + - XUL + - XUL_Tutorial +translation_of: Archive/Mozilla/XUL/Tutorial +--- +

This tutorial describes XUL, the XML User-interface Language. This language was created for the Mozilla application and is used to describe its user interface.

+

Introduction

+ +

Simple Elements

+ +

The Box Model

+ +

More Layout Elements

+ +

Toolbars and Menus

+ +

Events and Scripts

+ +

Document Object Model

+ +

Trees

+ +

RDF and Templates

+ +

Skins and Locales

+ +

Bindings

+ +

Specialized Window Types

+ +

Installation

+ +
+

This XUL tutorial was originally created by Neil Deakin. He has graciously given us permission to use it as part of the MDN.

+
+
+

Original Document Information

+ +
+

 

diff --git "a/files/pt-br/archive/mozilla/xul/tutorial/localiza\303\247\303\243o/index.html" "b/files/pt-br/archive/mozilla/xul/tutorial/localiza\303\247\303\243o/index.html" new file mode 100644 index 0000000000..5bb49fa3f2 --- /dev/null +++ "b/files/pt-br/archive/mozilla/xul/tutorial/localiza\303\247\303\243o/index.html" @@ -0,0 +1,326 @@ +--- +title: Localização +slug: Archive/Mozilla/XUL/Tutorial/Localização +tags: + - Internacionalização + - Localização + - Tutoriais + - XUL + - XUL_Tutorial +translation_of: Archive/Mozilla/XUL/Tutorial/Localization +--- +

XUL e XML fornecem entidades, que são uma forma conveniente de permitir localização.

+ +

Entidades

+ +

Muitos aplicativos são compilados de forma que a tradução da interface para um idioma diferente seja o mais simples possível. Geralmente, uma tabela de strings é criada para cada idioma. Em vez de codificar texto diretamente para um aplicativo, cada pedaço de texto só é uma referência na tabela de strings. XML fornece entidades que podem ser usadas para um propósito similar.

+ +

Você já deve ser familiar com entidades se você escreveu HTML. Os códigos &lt; e &gt; são exemplos de entidades que podem ser usadas para colocar sinais de menor que e maior que no texto. XML possui uma sintaxe que lhe permite declarar entidades personalizadas. Você pode usá-las, de forma que a entidade seja substituída com seu valor, que pode ser uma string de texto. Entidades podem ser usados sempre que houver texto, inclundo os valores de atributos. O exemplo abaixo demonstra o uso de uma entidade em um botão.

+ +
<button label="&findLabel;"/>
+
+ +

O texto que aparecerá no rótulo será o valor que a entidade &findLabel; tem. Um arquivo é criado contendo as declarações da entidade para cada idioma suportado. Em ingçês, a entidade &findLabel; provavelmente será declarada para ter o texto "Find" ("localizar", "encontrar").

+ +

DTD Files

+ +

Entities are declared in Document Type Definition (DTD) files. Files of this type are normally used to declare the syntax and semantics of a particular XML file, but they also let you declare entities. In the Mozilla chrome system, you will find DTD files located in the locales subdirectory. You would normally have one DTD file (with an extension .dtd) per XUL file.

+ +

If you look in the chrome directory, you should see an archive for your language. (en-US.jar is the default for English.) You might have locale files in multiple languages, for example, US English (en-US) and French (fr). Inside these archives, you will find the files that hold the localized text for each window. The structure of the archives is very similar to the directory structure used for skins.

+ +

Inside the archives, you would place the DTD files in which you declare entities. Typically, you will have one DTD file for each XUL file, usually with the same filename except with a .dtd extension. So, for the find files dialog, we will need a file called findfile.dtd.

+ +

For non-installed chrome files, you can just put the DTD file in the same directory as the XUL file.

+ +
Note: You should encode DTD files as UTF-8 for non-ASCII characters. That is, you should save them in UTF-8 format (without BOM). For more information, see Mozilla Language Packs.
+ +

Once you have created a DTD file for your XUL, you will need to add a line to the XUL file which indicates that you want to use the DTD file. Otherwise, errors will occur as it won't be able to find the entities. To do this, add a line of the following form somewhere near the top of the XUL file:

+ +
<!DOCTYPE window SYSTEM "chrome://findfile/locale/findfile.dtd">
+
+ +

This line specifies that the URL indicated is to be used as a DTD for the file. In this case, we have declared that we want to use the findfile.dtd DTD file. This line is typically placed just before the window element.

+ +

You also need to add the locale to the chrome.manifest file, for example:

+ +
locale findfile en-US locale/
+
+ +

Declaring Entities

+ +

The entities are declared using a simple syntax as shown below:

+ +
<!ENTITY findLabel "Find">
+
+ +

This example creates an entity with the name findLabel and the value "Find". This means that wherever the text "&findLabel;" appears in the XUL file, it will be replaced with the text "Find". Note that entity declarations do not have a trailing slash at the end of them. In the DTD file for a different language, the text for that language will be used instead.

+ +
for Japanese:
+<!ENTITY findLabel "検索">
+
+ +

For example, the following text:

+ +
<description value="&findLabel;"/>
+
+ +

is translated as:

+ +
English version:
+<description value="Find"/>
+
+Japanese version:
+<description value="検索"/>
+
+ +

You would declare an entity for each label or string of text that you use in your interface. You should not have any directly displayed text in the XUL file at all.

+ +

In addition to using entities for text labels, you should use them for any value that could be different in a different language. Access keys and keyboard shortcuts for example.

+ +
 XUL
+ <menuitem label="&undo.label;" accesskey="&undo.key;"/>
+ DTD
+ <!ENTITY undo.label "Undo">
+ <!ENTITY undo.key "u">
+
+ +

The example above uses two entities, one for the label on the Undo menu item and the second for the access key.

+ +

 

+ +
+

Changing the Find Files example

+ +

Let's take a look at how we would put all of this together by modifying the find files dialog so that it uses a DTD file for all of its text strings. The entire XUL file is shown below with the changes shown in red.

+ +
<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="findfile.css" type="text/css"?>
+
+<!DOCTYPE window SYSTEM "chrome://findfile/locale/findfile.dtd">
+
+<window
+  id="findfile-window"
+  title="&findWindow.title;"
+  persist="screenX screenY width height"
+  orient="horizontal"
+  onload="initSearchList()"
+  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script src="findfile.js"/>
+
+<popupset>
+   <menupopup id="editpopup">
+     <menuitem label="&cutCmd.label;" accesskey="&cutCmd.accesskey;"/>
+     <menuitem label="&copyCmd.label;" accesskey="&copyCmd.accesskey;"/>
+     <menuitem label="&pasteCmd.label;" accesskey="&pasteCmd.accesskey;" disabled="true"/>
+   </menupopup>
+</popupset>
+
+<keyset>
+   <key id="cut_cmd" modifiers="accel" key="&cutCmd.commandkey;"/>
+   <key id="copy_cmd" modifiers="accel" key="&copyCmd.commandkey;"/>
+   <key id="paste_cmd" modifiers="accel" key="&pasteCmd.commandkey;"/>
+   <key id="close_cmd" keycode="VK_ESCAPE" oncommand="window.close();"/>
+</keyset>
+
+<vbox flex="1">
+
+ <toolbox>
+
+  <menubar id="findfiles-menubar">
+    <menu id="file-menu" label="&fileMenu.label;"
+        accesskey="&fileMenu.accesskey;">
+      <menupopup id="file-popup">
+        <menuitem label="&openCmd.label;"
+                  accesskey="&openCmd.accesskey;"/>
+        <menuitem label="&saveCmd.label;"
+                  accesskey="&saveCmd.accesskey;"/>
+        <menuseparator/>
+        <menuitem label="&closeCmd.label;"
+                  accesskey="&closeCmd.accesskey;" key="close_cmd" oncommand="window.close();"/>
+      </menupopup>
+    </menu>
+    <menu id="edit-menu" label="&editMenu.label;"
+          accesskey="&editMenu.accesskey;">
+      <menupopup id="edit-popup">
+        <menuitem label="&cutCmd.label;"
+                  accesskey="&cutCmd.accesskey;" key="cut_cmd"/>
+        <menuitem label="&copyCmd.label;"
+                  accesskey="&copyCmd.accesskey;" key="copy_cmd"/>
+        <menuitem label="&pasteCmd.label;"
+                  accesskey="&pasteCmd.accesskey;" key="paste_cmd" disabled="true"/>
+      </menupopup>
+    </menu>
+  </menubar>
+
+  <toolbar id="findfiles-toolbar">
+    <toolbarbutton id="opensearch" label="&openCmdToolbar.label;"/>
+    <toolbarbutton id="savesearch" label="&saveCmdToolbar.label;"/>
+  </toolbar>
+ </toolbox>
+
+ <tabbox>
+  <tabs>
+    <tab label="&searchTab;" selected="true"/>
+    <tab label="&optionsTab;"/>
+  </tabs>
+
+  <tabpanels>
+
+   <tabpanel id="searchpanel" orient="vertical" context="editpopup">
+
+   <description>
+     &findDescription;
+   </description>
+
+   <spacer class="titlespace"/>
+
+   <groupbox orient="horizontal">
+     <caption label="&findCriteria;"/>
+
+     <menulist id="searchtype">
+       <menupopup>
+         <menuitem label="&type.name;"/>
+         <menuitem label="&type.size;"/>
+         <menuitem label="&type.date;"/>
+       </menupopup>
+     </menulist>
+   <spacer class="springspace"/>
+     <menulist id="searchmode">
+       <menupopup>
+         <menuitem label="&mode.is;"/>
+         <menuitem label="&mode.isnot;"/>
+       </menupopup>
+     </menulist>
+   <spacer class="springspace"/>
+
+   <menulist id="find-text" flex="1"
+             editable="true"
+             datasources="file:///mozilla/recents.rdf"
+             ref="http://www.xulplanet.com/rdf/recent/all">
+     <template>
+       <menupopup>
+         <menuitem label="rdf:http://www.xulplanet.com/rdf/recent#Label" uri="rdf:*"/>
+       </menupopup>
+     </template>
+   </menulist>
+
+   </groupbox>
+
+  </tabpanel>
+
+  <tabpanel id="optionspanel" orient="vertical">
+     <checkbox id="casecheck" label="&casesensitive;"/>
+     <checkbox id="wordscheck" label="&matchfilename;"/>
+    </tabpanel>
+
+  </tabpanels>
+ </tabbox>
+
+ <tree id="results" style="display: none;" flex="1">
+   <treecols>
+     <treecol id="name" label="&results.filename;" flex="1"/>
+     <treecol id="location" label="&results.location;" flex="2"/>
+     <treecol id="size" label="&results.size;" flex="1"/>
+   </treecols>
+
+   <treechildren>
+     <treeitem>
+       <treerow>
+         <treecell label="mozilla"/>
+         <treecell label="/usr/local"/>
+         <treecell label="&bytes.before;2520&bytes.after;"/>
+       </treerow>
+     </treeitem>
+   </treechildren>
+ </tree>
+
+ <splitter id="splitbar" resizeafter="grow" style="display: none;"/>
+
+ <spacer class="titlespace"/>
+
+ <hbox>
+   <progressmeter id="progmeter" value="50%" style="display: none;"/>
+   <spacer flex="1"/>
+   <button id="find-button" label="&button.find;"
+           oncommand="doFind()"/>
+   <button id="cancel-button" label="&button.cancel;"
+           oncommand="window.close();"/>
+ </hbox>
+</vbox>
+
+</window>
+
+ +

Each text string has been replaced by an entity reference. A DTD file has been included near the beginning of the XUL file. Each entity that was added should be declared in the DTD file. The window will not be displayed if an entity is found in the XUL file that hasn't been declared.

+ +

Note that the name of the entity is not important. In the example above, words in entities have been separated with periods. You don't have to do this. The entity names here follow similar conventions as the rest of the Mozilla code.

+ +

You might notice that the text '2520 bytes' has been replaced by two entities. This is because the phrase structure may be different in another locale. For example, the number might need to appear before the equivalent of 'bytes' instead of after. Of course, this might need to be more complicated in order to display KB or MB as needed.

+ +

The access keys and keyboard shortcuts have also been translated into entities because they will likely be different in a different locale.

+ +

Next, the DTD file - findfile.dtd:

+ +
<!ENTITY findWindow.title "Find Files">
+<!ENTITY fileMenu.label "File">
+<!ENTITY editMenu.label "Edit">
+<!ENTITY fileMenu.accesskey "f">
+<!ENTITY editMenu.accesskey "e">
+<!ENTITY openCmd.label "Open Search...">
+<!ENTITY saveCmd.label "Save Search...">
+<!ENTITY closeCmd.label "Close">
+<!ENTITY openCmd.accesskey "o">
+<!ENTITY saveCmd.accesskey "s">
+<!ENTITY closeCmd.accesskey "c">
+<!ENTITY cutCmd.label "Cut">
+<!ENTITY copyCmd.label "Copy">
+<!ENTITY pasteCmd.label "Paste">
+<!ENTITY cutCmd.accesskey "t">
+<!ENTITY copyCmd.accesskey "c">
+<!ENTITY pasteCmd.accesskey "p">
+<!ENTITY cutCmd.commandkey "X">
+<!ENTITY copyCmd.commandkey "C">
+<!ENTITY pasteCmd.commandkey "V">
+<!ENTITY openCmdToolbar.label "Open">
+<!ENTITY saveCmdToolbar.label "Save">
+<!ENTITY searchTab "Search">
+<!ENTITY optionsTab "Options">
+<!ENTITY findDescription "Enter your search criteria below and select the Find button to begin the search.">
+<!ENTITY findCriteria "Search Criteria">
+<!ENTITY type.name "Name">
+<!ENTITY type.size "Size">
+<!ENTITY type.date "Date Modified">
+<!ENTITY mode.is "Is">
+<!ENTITY mode.isnot "Is Not">
+<!ENTITY casesensitive "Case Sensitive Search">
+<!ENTITY matchfilename "Match Entire Filename">
+<!ENTITY results.filename "Filename">
+<!ENTITY results.location "Location">
+<!ENTITY results.size "Size">
+<!ENTITY bytes.before "">
+<!ENTITY bytes.after "bytes">
+<!ENTITY button.find "Find">
+<!ENTITY button.cancel "Cancel">
+
+ +

Now, to add text for a new language all you need to do is create another DTD file. By using the chrome system to add the DTD file to a different locale, the same XUL file can be used in any language.

+ +

Find files example so far: Source

+
+ +

Next, we'll look at property files.

+ +
+

« PreviousNext »

+
+ + + +

See Also

+ + diff --git a/files/pt-br/archive/mozilla/xul/xul_reference/index.html b/files/pt-br/archive/mozilla/xul/xul_reference/index.html new file mode 100644 index 0000000000..2ef2b7c473 --- /dev/null +++ b/files/pt-br/archive/mozilla/xul/xul_reference/index.html @@ -0,0 +1,286 @@ +--- +title: Referência XUL +slug: Archive/Mozilla/XUL/XUL_Reference +translation_of: Archive/Mozilla/XUL/XUL_Reference +--- +

« Referência XUL «

+

Lista em ordem alfabética de todos os elementos XUL

+ +

Lista por categoria de todos os elementos XUL

+

« Referência XUL «

+

Windows

+

Estrutura da Janela

+ +

Barra de Ferramentas

+

Abas e  agrupamento

+

Controles

+

Textos e imagens

+

Listas

+

Árvores

+

Layout

+

Modelos

+

Scripting

+

Elementos auxiliares

+

Outras listas XUL

+
    +
  1. dialog
  2. +
  3. overlay
  4. +
  5. page
  6. +
  7. window
  8. +
  9. wizard
  10. +
  11. wizardpage
  12. +
  13. preference
  14. +
  15. preferences
  16. +
  17. prefpane
  18. +
  19. prefwindow
  20. +
  21. browser
  22. +
  23. tabbrowser
  24. +
  25. editor
  26. +
  27. iframe
  28. +
  29. titlebar
  30. +
  31. resizer
  32. +
  33. statusbar
  34. +
  35. statusbarpanel
  36. +
  37. dialogheader
  38. +
  39. notification
  40. +
  41. notificationbox
  42. +
  43. menubar
  44. +
  45. menu
  46. +
  47. menuitem
  48. +
  49. menuseparator
  50. +
  51. menupopup
  52. +
  53. panel
  54. +
  55. tooltip
  56. +
  57. popupset
  58. +
  59. toolbar
  60. +
  61. toolbarbutton
  62. +
  63. toolbargrippy
  64. +
  65. toolbaritem
  66. +
  67. toolbarpalette
  68. +
  69. toolbarseparator
  70. +
  71. toolbarset
  72. +
  73. toolbarspacer
  74. +
  75. toolbarspring
  76. +
  77. toolbox
  78. +
  79. tabbox
  80. +
  81. tabs
  82. +
  83. tab
  84. +
  85. tabpanels
  86. +
  87. tabpanel
  88. +
  89. groupbox
  90. +
  91. caption
  92. +
  93. separator
  94. +
  95. spacer
  96. +
  97. button
  98. +
  99. checkbox
  100. +
  101. colorpicker
  102. +
  103. datepicker
  104. +
  105. menulist
  106. +
  107. progressmeter
  108. +
  109. radio
  110. +
  111. radiogroup
  112. +
  113. scale
  114. +
  115. splitter
  116. +
  117. textbox
  118. +
  119. textbox (Firefox autocomplete)
  120. +
  121. textbox (Mozilla autocomplete)
  122. +
  123. timepicker
  124. +
  125. description
  126. +
  127. label
  128. +
  129. image
  130. +
  131. listbox
  132. +
  133. listitem
  134. +
  135. listcell
  136. +
  137. listcol
  138. +
  139. listcols
  140. +
  141. listhead
  142. +
  143. listheader
  144. +
  145. richlistbox
  146. +
  147. richlistitem
  148. +
  149. tree
  150. +
  151. treecell
  152. +
  153. treechildren
  154. +
  155. treecol
  156. +
  157. treecols
  158. +
  159. treeitem
  160. +
  161. treerow
  162. +
  163. treeseparator
  164. +
  165. box
  166. +
  167. hbox
  168. +
  169. vbox
  170. +
  171. bbox
  172. +
  173. deck
  174. +
  175. stack
  176. +
  177. grid
  178. +
  179. columns
  180. +
  181. column
  182. +
  183. rows
  184. +
  185. row
  186. +
  187. scrollbox
  188. +
  189. action
  190. +
  191. assign
  192. +
  193. binding
  194. +
  195. bindings
  196. +
  197. conditions
  198. +
  199. content
  200. +
  201. member
  202. +
  203. param
  204. +
  205. query
  206. +
  207. queryset
  208. +
  209. rule
  210. +
  211. template
  212. +
  213. textnode
  214. +
  215. triple
  216. +
  217. where
  218. +
  219. script
  220. +
  221. commandset
  222. +
  223. command
  224. +
  225. broadcaster
  226. +
  227. broadcasterset
  228. +
  229. observes
  230. +
  231. key
  232. +
  233. keyset
  234. +
  235. stringbundle
  236. +
  237. stringbundleset
  238. +
  239. arrowscrollbox
  240. +
  241. dropmarker
  242. +
  243. grippy
  244. +
  245. scrollbar
  246. +
  247. scrollcorner
  248. +
  249. spinbuttons
  250. +
+ diff --git a/files/pt-br/archive/mozilla/xulrunner/index.html b/files/pt-br/archive/mozilla/xulrunner/index.html new file mode 100644 index 0000000000..7ae61e0398 --- /dev/null +++ b/files/pt-br/archive/mozilla/xulrunner/index.html @@ -0,0 +1,84 @@ +--- +title: XULRunner +slug: Archive/Mozilla/XULRunner +translation_of: Archive/Mozilla/XULRunner +--- +
+ Começando com o XULRunner
+ Uma breve introduçao ao XULRunner.
+
+ XULRunner é um ambiente de execução fornecido pela Mozilla que pode ser utilizado para inicializar aplicações XUL+XPCOM com interfaces ricas como do Firefox e Thunderbird. Ele provê mecanismos para instalação, atualização e desinstalação de aplicações. XULRunner também fornece a libxul, uma solução que permite embarcar tecnologias da Mozilla em outros projetos e produtos.
+ + + + + + + +
+

Lançamentos

+
+

XULRunner 22.0 foi lançado e pode ser baixado em ftp.mozilla.org. Leia as notas de lançamento para instalação, desinstalação e outras informações.

+

Firefox 3 e versões recentes trazem um pacote privado do XULRunner, que pode rodar qualquer aplicação compatível com XULRunner usando -app switch.

+

Compilações antigas também estão disponíveis.

+
+

Visão geral

+ +

DocumentaÇÃO

+
+
+ Iniciando com XULRunner
+
+ Breve tutorial sobre desenvolvimento de aplicações desktop com XULRunner.
+
+ Tutorial XUL
+
+ Assim que você tiver uma aplicação XULRunner em funcionamento, utilize o tutorial XUL para expandí-la em uma fantástica aplicação XUL.
+
+ Dicas XULRunner
+
+ Uma coleção de dicas para trabalhar com o XULRunner.
+
+ Deploy com XULRunner
+
+ Uma introdução em como empacotar sua aplicação com XULRunner.
+
+ Hall da Fama do XULRunner
+
+ Siga todas as aplicações baseadas em XULRunner disponíveis.
+
+ Documentação para build
+
+ Aprenda como obter os códigos-fonte e efetuar o build.
+
+ Documentação de Debug
+
+ Etapas para configurar Venkman para debugar sua aplicação
+
+ Guia XULRunner
+
+ Introdução e tutorial bastante completos, porém desatualizados para o XULRunner, que agregam grande parte da documentação encontrada aqui.
+
+

Ver todos...

+
+

COMUNIDADE

+ + + +

Ver também

+ +
+

 

-- cgit v1.2.3-54-g00ecf