<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="dispatch.xsl" ?>
<Object name="Application" project="SuperEdi">

  <Title>Application Object</Title>

  <ProgID>SuperEdi.Application</ProgID>

  <Description>The Application object represents SuperEdi
    and is the topmost object in the SuperEdi object hierarchy. 
    From the Application object, you can directly access other 
    SuperEdi objects by using the Application object's properties
    and methods, or you can indirectly access objects through 
    other objects obtained by these properties and methods.
  </Description>

  <Keywords>Application, ActiveDocument, BrowserBar, Caption, ClipPath, Console,
    DefaultCodePage, DefaultFilePath, Documents, FileTypes, FilterPath, FullName,
    Height, HWND, Interactive, Left, Macros, Name, Parent, Path, ScriptPath, StatusBar,
    Top, Visible, Width,
    AboutBox, HtmlDialog, MessageBox, PropertiesDialog, Sleep,
    Startup, Shutdown</Keywords>
  
  <!-- Properties -->

  <Property name="ActiveDocument" type="Document" write="no" xlink="yes">
  	<Description>Returns the document that is currently being edited in
	  the active window. Returns null if no documents is currently open.</Description>
  </Property>

  <Property name="Application" type="Application" write="no">
  	<Description>Returns the SuperEdi Application object.</Description>
  </Property>

  <Property name="BrowserBar" type="BrowserBar" write="no">
  	<Description>Returns the web browser bar object.</Description>
  </Property>
  
  <Property name="Caption" type="string">
  	<Description>Sets or returns string displayed in the main
  	  window's title bar.</Description>
  </Property>

  <Property name="ClipPath" type="string">
  	<Description>Sets or returns the directory for text clip files.
  	</Description>
  </Property>

  <Property name="Console" type="Console" write="no" xlink="yes">
  	<Description>Returns the Console object.</Description>
  </Property>

  <Property name="DefaultCodePage" type="long">
    <Description>Returns or sets the code page used for
      saving this document. The following values have a special meaning:
      0=ANSI, -1=UTF-16</Description>
  </Property>
  
  <Property name="DefaultFilePath" type="string">
  	<Description>Sets or returns the current working directory.</Description>
  </Property>

  <Property name="Documents" type="Documents" write="no" xlink="yes">
  	<Description>Returns the collection of open documents.</Description>
  </Property>

  <Property name="FileTypes" type="FileTypes" write="no" xlink="yes">
  	<Description>Returns the file collection of user defined file types.
  	</Description>
  </Property>

  <Property name="FilterPath" type="string">
  	<Description>Sets or returns the directory for TextPipe filters.
  	</Description>
  </Property>

  <Property name="FullName" type="string" write="no">
  	<Description>Returns the file specification for the application, 
  	  including path. For example, C:\Program Files\SuperEdi\SuperEdi.exe.
  	</Description>
  </Property>

  <Property name="Height" type="long">
  	<Description>Sets or returns the distance between the top and bottom 
  	  edge of the main application window.</Description>
  </Property>

  <Property name="HWND" type="long" write="no">
  	<Description>Returns the window handle of the main application window.</Description>
  </Property>

  <Property name="Interactive" type="boolean">
  	<Description>Sets or returns True if the application accepts actions 
  	  from the user, otherwise False.</Description>
  </Property>

  <Property name="Left" type="long">
  	<Description>Sets or returns the distance between the left edge of
  	  the physical screen and the main application window.</Description>
  </Property>

  <Property name="Macros" type="Macros" write="no" xlink="yes">
  	<Description>Returns the collection of all registered macros.</Description>
  </Property>

  <Property name="Name" type="string" write="no">
  	<Description>Returns the name of the application.</Description>
  </Property>

  <Property name="Parent" type="Application" write="no">
  	<Description>Returns the Application object.</Description>
  </Property>

  <Property name="Path" type="string" write="no">
  	<Description>Returns the path specification for the application's 
  	  executable file; read only. For example, C:\Program Files\SuperEdi.
  	</Description>
  </Property>

  <Property name="ScriptPath" type="string">
  	<Description>Sets or returns the directory for script files.
  	</Description>
  </Property>

  <Property name="StatusBar" type="string">
  	<Description>Sets or returns the text displayed in the status bar.</Description>
  </Property>

  <Property name="Top" type="long">
  	<Description>Sets or returns the distance between the top edge of
  	  the physical screen and main application window.</Description>
  </Property>

  <Property name="Visible" type="boolean">
  	<Description>Sets or returns whether the application is visible
  	  to the user.</Description>
  </Property>

  <Property name="Version" type="string" write="no">
  	<Description>Returns the application version string, for example 
	  '3.0.1'.</Description>
  </Property>

  <Property name="Width" type="long">
  	<Description>Sets or returns the distance between the left and 
  	  right edges of the main application window.</Description>
  </Property>
  
  <!-- Methods -->

  <Method name="AboutBox">
	<Description>Displays the About box with copyright and version information.</Description>
    <Syntax>application.AboutBox()</Syntax>
  </Method>

  <Method name="HtmlDialog">
	<Description>Displays a dialog box using an HTML file.</Description>
    <Syntax>application.HtmlDialog( URL )</Syntax>
	<Parameter name="URL" type="string">
	  <Description>Path of the HTML file to be displayed in the dialog box</Description>
	</Parameter>
  </Method>

  <Method name="MessageBox">
	<Description>Displays a modal message box.</Description>
    <Syntax>application.MessageBox( text )</Syntax>
	<Parameter name="text" type="string" />
  </Method>

  <Method name="PropertiesDialog">
	<Description>Displays the property sheet of an ActiveX control.</Description>
    <Syntax>application.PropertiesDialog( Caption, Object )</Syntax>
	<Parameter name="Caption" type="string">
	  <Description>Dialog box caption</Description>
	</Parameter>
	<Parameter name="Object" type="Object">
	  <Description>A reference to an ActiveX control</Description>
	</Parameter>
  </Method>

  <Method name="Sleep">
	<Description>Waits for the specified duratio.</Description>
    <Syntax>application.Sleep( Milliseconds )</Syntax>
	<Parameter name="Milliseconds" type="long">
	  <Description>duration in milliseconds</Description>
	</Parameter>
  </Method>

  <!-- Events -->

  <Event name="Startup">
	<Description>This event is fired when the application has started and all
	  macros have been loaded.</Description>
    <Syntax>Application_Startup()</Syntax>
  </Event>

  <Event name="Shutdown">
	<Description>This event is fired when the application is about to shut down
	  and before macros will be unloaded.</Description>
    <Syntax>Application_Shutdown()</Syntax>
  </Event>

  <Example language="JScript">
var app = Document.Application;
var console = app.Console;
console.WriteLine( app.Name + " version " + app.Version );
console.WriteLine( app.Documents.Count + " open documents" );
  </Example>

</Object>
