📄 scriptapp.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
<TITLE>ScriptApp.jc</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.4 (Win32)">
<META NAME="CREATED" CONTENT="20050225;20023015">
<META NAME="CHANGED" CONTENT="20050614;21381389">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<STYLE>
<!--
@page { size: 21cm 29.7cm }
H1.western { font-family: "Arial", sans-serif }
P.western { font-family: "Arial", sans-serif; font-size: 10pt }
H2.western { font-family: "Arial", sans-serif }
-->
</STYLE>
</HEAD>
<BODY LANG="de-DE" DIR="LTR">
<H1 CLASS="western"><FONT COLOR="#000000"><SPAN STYLE="background: #ffffff"><FONT FACE="arial">ScriptApp
native types</SPAN></FONT></FONT></H1>
<P CLASS="western"><FONT FACE="arial">This document shows the methods
and classes that JewelScript can import from the ScriptApp
application.<BR>Of course this is by no means a complete
documentation, but just a brief overview of what classes and<BR>methods
are available.</FONT></P>
<P CLASS="western"><FONT FACE="arial">In addition to the classes and
methods listed in this document, the ScriptApp also contains the
native types<BR><I>stdlib</I>, <I>math</I>, <I>File</I>, <I>String
</I>and <I>Trex</I>. For documentation on these, see document
<I>"nativetypes.html".</I></FONT></P>
<H2 CLASS="western"><FONT FACE="arial">interface Applet</FONT></H2>
<P CLASS="western"><FONT FACE="arial">In order to write an applet for
the ScriptApp application you must create a class and derive from
this interface.<BR>You must implement all functions from this
interface.</FONT></P>
<PRE><SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">interface </FONT></SPAN>Applet
<FONT COLOR="#ff0000"><SPAN STYLE="background: #ffffff">{</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Applet<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT></SPAN>Screen<SPAN STYLE="background: #ffffff"><FONT COLOR="#000000">&</FONT><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>OnOpen<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>OnClose<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>OnClick<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>button, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>x, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>y<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>OnKey<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>key<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Idle<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<FONT COLOR="#ff0000"><SPAN STYLE="background: #ffffff">}</SPAN></FONT></PRE><H2 CLASS="western">
<FONT FACE="arial">function CreateApplet</FONT></H2>
<P CLASS="western"><FONT FACE="arial">Your applet needs to have this
global function. The ScriptApp will call this function and pass a
reference to the<BR><I>Screen</I> object. You need to instantiate
your own applet in this function, and return the instance.</FONT></P>
<PRE STYLE="margin-bottom: 0.5cm"><SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">function </FONT></SPAN>Applet<SPAN STYLE="background: #ffffff"><FONT COLOR="#000000">& </FONT></SPAN>CreateApplet<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT></SPAN>Screen<SPAN STYLE="background: #ffffff"><FONT COLOR="#000000">&</FONT><FONT COLOR="#ff0000">)</FONT></SPAN>;</PRE><H2 CLASS="western">
<FONT FACE="arial">interface Layer</FONT></H2>
<P CLASS="western"><FONT FACE="arial">This is the basic functionality
all layer classes support. Each of the following three Layer classes
guarantee that these<BR>methods are supported. Sometimes it makes
sense to store a reference to a Layer by their common interface
type,<BR>instead of their final type.</FONT></P>
<PRE><SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">interface </FONT></SPAN>Layer
<FONT COLOR="#ff0000"><SPAN STYLE="background: #ffffff">{</SPAN></FONT>
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Layer<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>IsVisible<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>X<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Y<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Width<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Height<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>Index<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Show<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>Hide<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>MoveTo<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>x, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>y<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>MoveBy<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>dx, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>dy<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>ResizeTo<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>w, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>h<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>ResizeBy<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>dw, <SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> </FONT></SPAN>dh<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>GroupID<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>GroupID<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#ff0000">)</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method long </FONT><FONT COLOR="#000000"> </FONT></SPAN>ItemID<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">()</FONT></SPAN>;
<SPAN STYLE="background: #ffffff"><FONT COLOR="#0000ff">method </FONT></SPAN>ItemID<SPAN STYLE="background: #ffffff"><FONT COLOR="#ff0000">(</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#ff0000">)</FONT></SPAN>;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -