зеркало из https://github.com/mozilla/gecko-dev.git
no message
This commit is contained in:
Родитель
3bf7641eb0
Коммит
2edc20c239
|
@ -0,0 +1,187 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="xul.css" type="text/css"?>
|
||||
<!DOCTYPE window>
|
||||
<xul:window xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<html:script>
|
||||
function StartUp()
|
||||
{
|
||||
dump("Doing Startup...\n");
|
||||
appCore = XPAppCoresManager.Find("BrowserAppCore");
|
||||
dump("Looking up BrowserAppCore...\n");
|
||||
if (appCore == null) {
|
||||
dump("Creating BrowserAppCore...\n");
|
||||
appCore = new BrowserAppCore();
|
||||
if (appCore != null) {
|
||||
dump("BrowserAppCore has been created.\n");
|
||||
appCore.Init("BrowserAppCore");
|
||||
appCore.setToolbarWindow(window);
|
||||
appCore.setContentWindow(window.parent.frames[1]);
|
||||
appCore.setWebShellWindow(window.parent);
|
||||
appCore.setDisableCallback("DoDisableButtons();");
|
||||
appCore.setEnableCallback("DoEnableButtons();");
|
||||
dump("Adding BrowserAppCore to AppCoreManager...\n");
|
||||
XPAppCoresManager.Add(appCore);
|
||||
}
|
||||
} else {
|
||||
dump("BrowserAppCore has already been created! Why?\n");
|
||||
}
|
||||
}
|
||||
|
||||
function DoDisableButtons()
|
||||
{
|
||||
// Find buttons in the UI and disable them
|
||||
dump("Browser disabling buttons\n");
|
||||
}
|
||||
|
||||
function DoEnableButtons()
|
||||
{
|
||||
// Find buttons in the UI and enable them
|
||||
dump("Browser enabling buttons\n");
|
||||
}
|
||||
|
||||
function BrowserBack()
|
||||
{
|
||||
appCore = XPAppCoresManager.Find("BrowserAppCore");
|
||||
if (appCore != null) {
|
||||
dump("Going Back\n");
|
||||
appCore.back();
|
||||
} else {
|
||||
dump("BrowserAppCore has not been created!\n");
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserForward()
|
||||
{
|
||||
appCore = XPAppCoresManager.Find("BrowserAppCore");
|
||||
if (appCore != null) {
|
||||
dump("Going Forward\n");
|
||||
appCore.forward();
|
||||
} else {
|
||||
dump("BrowserAppCore has not been created!\n");
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserNewWindow()
|
||||
{
|
||||
appCore = XPAppCoresManager.Find("BrowserAppCore");
|
||||
if (appCore != null) {
|
||||
dump("Opening New Window\n");
|
||||
appCore.newWindow();
|
||||
} else {
|
||||
dump("BrowserAppCore has not been created!\n");
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserPrintPreview()
|
||||
{
|
||||
dump("BrowserPrintPreview\n");
|
||||
}
|
||||
|
||||
function BrowserClose()
|
||||
{
|
||||
dump("BrowserClose\n");
|
||||
}
|
||||
|
||||
function BrowserExit()
|
||||
{
|
||||
appCore = XPAppCoresManager.Find("BrowserAppCore");
|
||||
if (appCore != null) {
|
||||
dump("Exiting\n");
|
||||
appCore.exit();
|
||||
} else {
|
||||
dump("BrowserAppCore has not been created!\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</html:script>
|
||||
|
||||
|
||||
<xul:commands>
|
||||
<xul:command name="nsCmd:StartUp" onCommand="StartUp();"/>
|
||||
<xul:command name="nsCmd:BrowserBack" onCommand="BrowserBack();"/>
|
||||
<xul:command name="nsCmd:BrowserForward" onCommand="BrowserForward();"/>
|
||||
<xul:command name="nsCmd:BrowserReload" onCommand="window.reload();"/>
|
||||
<xul:command name="nsCmd:BrowserStop" onCommand="window.stop();"/>
|
||||
<xul:command name="nsCmd:BrowserHome" onCommand="window.home();"/>
|
||||
<xul:command name="nsCmd:BrowserPrint" onCommand="window.print();"/>
|
||||
<xul:command name="nsCmd:BrowserNewWindow" onCommand="BrowserNewWindow();"/>
|
||||
<xul:command name="nsCmd:BrowserExit" onCommand="BrowserExit();"/>
|
||||
<!-- other parameters of command are assumed to have
|
||||
some useful initial value -->
|
||||
</xul:commands>
|
||||
<xul:menubar>
|
||||
<xul:menu name="File">
|
||||
<xul:menuitem name="New Window" cmd="nsCmd:BrowserNewWindow"/>
|
||||
<xul:separator/>
|
||||
<xul:menuitem name="Print Setup" cmd="nsCmd:BrowserPrintSetup"/>
|
||||
<xul:menuitem name="Print Preview" cmd="nsCmd:BrowserPrintPreview"/>
|
||||
<xul:menuitem name="Print" cmd="nsCmd:BrowserPrint"/>
|
||||
<xul:separator/>
|
||||
<xul:menuitem name="Close" cmd="nsCmd:BrowserClose"/>
|
||||
<xul:menuitem name="Exit" cmd="nsCmd:BrowserExit"/>
|
||||
</xul:menu>
|
||||
<xul:menu name="View">
|
||||
<xul:menuitem name="Reload" cmd="nsCmd:BrowserReload"/>
|
||||
</xul:menu>
|
||||
<xul:menu name="Go">
|
||||
<xul:menuitem name="Back" cmd="nsCmd:BrowserBack"/>
|
||||
<xul:menuitem name="Forward" cmd="nsCmd:BrowserForward" />
|
||||
<xul:menuitem name="Home" cmd="nsCmd:BrowserHome"/>
|
||||
</xul:menu>
|
||||
|
||||
</xul:menubar>
|
||||
|
||||
<xul:toolbox>
|
||||
|
||||
<xul:toolbar>
|
||||
<html:button cmd="nsCmd:BrowserBack" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Back.gif"/><html:br/>Back
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserForward" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Forward.gif"/><html:br/>Forward
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserReload" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Reload.gif"/><html:br/>Reload
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserStop" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Stop.gif"/><html:br/>Stop
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserHome" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Home.gif"/><html:br/>Home
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserPrint" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Print.gif"/><html:br/>Print
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserHome">
|
||||
<html:img src="resource:/res/throbber/anims00.gif"/>
|
||||
</html:button>
|
||||
</xul:toolbar>
|
||||
<xul:toolbar style="background-color:rgb(192,192,192);">
|
||||
<html:button cmd="nsCmd:BrowserBookmarks" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Bookmarks.gif"/>Bookmarks
|
||||
</html:button>
|
||||
<html:input style="width:325px;"/>
|
||||
<html:button cmd="nsCmd:BrowserWhatsRelated" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_WhatsRelated.gif"/>What's Related
|
||||
</html:button>
|
||||
</xul:toolbar>
|
||||
|
||||
<xul:toolbar>
|
||||
<html:button cmd="nsCmd:BrowserHome" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Location.gif"/>Mozilla.org
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserHome" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Location.gif"/>Mozilla.org
|
||||
</html:button>
|
||||
<html:button cmd="nsCmd:BrowserHome" style="font-size:smaller;background-color:rgb(192,192,192);">
|
||||
<html:img src="resource:/res/toolbar/TB_Location.gif"/>Mozilla.org
|
||||
</html:button>
|
||||
</xul:toolbar>
|
||||
|
||||
</xul:toolbox>
|
||||
|
||||
</xul:window>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
VERSION 5.00
|
||||
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
|
||||
Begin VB.Form Form1
|
||||
Caption = "Form1"
|
||||
ClientHeight = 4932
|
||||
ClientLeft = 48
|
||||
ClientTop = 276
|
||||
ClientWidth = 5052
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4932
|
||||
ScaleWidth = 5052
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin MSComctlLib.TreeView treeXML
|
||||
Height = 4692
|
||||
Left = 120
|
||||
TabIndex = 3
|
||||
Top = 120
|
||||
Width = 3132
|
||||
_ExtentX = 5525
|
||||
_ExtentY = 8276
|
||||
_Version = 393217
|
||||
Indentation = 176
|
||||
LineStyle = 1
|
||||
Style = 7
|
||||
Appearance = 1
|
||||
End
|
||||
Begin VB.TextBox txtURL
|
||||
Height = 288
|
||||
Left = 3480
|
||||
TabIndex = 1
|
||||
Text = "M:\moz\mozilla\webshell\embed\ActiveX\xml\tests\vbxml\test.xml"
|
||||
Top = 480
|
||||
Width = 1332
|
||||
End
|
||||
Begin VB.CommandButton Command1
|
||||
Caption = "Parse XML"
|
||||
Height = 492
|
||||
Left = 3480
|
||||
TabIndex = 0
|
||||
Top = 960
|
||||
Width = 1332
|
||||
End
|
||||
Begin VB.Label Label1
|
||||
Caption = "XML File:"
|
||||
Height = 252
|
||||
Left = 3480
|
||||
TabIndex = 2
|
||||
Top = 120
|
||||
Width = 852
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "Form1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Private Sub Command1_Click()
|
||||
Dim o As New MozXMLDocument
|
||||
o.URL = txtURL.Text
|
||||
Debug.Print o.root.tagName
|
||||
treeXML.Nodes.Add , , "R", "XML"
|
||||
buildBranch "R", o.root
|
||||
End Sub
|
||||
|
||||
Sub buildBranch(ByRef sParentKey As String, o As Object)
|
||||
Dim n As Integer
|
||||
Dim c As Object
|
||||
Dim sKey As String
|
||||
|
||||
Set c = o.children
|
||||
For i = 0 To c.length - 1
|
||||
sKey = sParentKey + "." + CStr(i)
|
||||
treeXML.Nodes.Add sParentKey, tvwChild, sKey, c.Item(i).tagName
|
||||
buildBranch sKey, c.Item(i)
|
||||
Next
|
||||
End Sub
|
|
@ -0,0 +1,33 @@
|
|||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\StdOle2.Tlb#OLE Automation
|
||||
Reference=*\G{45E5B410-2805-11D3-9425-000000000000}#1.0#0#..\..\Debug\activexml.dll#Mozilla XML 1.0 Type Library
|
||||
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
|
||||
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
|
||||
Object={38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0; COMCT332.OCX
|
||||
Form=xml.frm
|
||||
Startup="Form1"
|
||||
ExeName32="xml.exe"
|
||||
Command32=""
|
||||
Name="Project1"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
RevisionVer=0
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
|
@ -0,0 +1 @@
|
|||
Form1 = 99, 16, 850, 493, , 22, 22, 653, 533, C
|
Загрузка…
Ссылка в новой задаче