File: cs_229.html

package info (click to toggle)
crystalspace 0.94-20020412-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 62,276 kB
  • ctags: 52,843
  • sloc: cpp: 274,783; ansic: 6,608; perl: 6,276; objc: 3,952; asm: 2,942; python: 2,354; php: 542; pascal: 530; sh: 430; makefile: 370; awk: 193
file content (107 lines) | stat: -rw-r--r-- 4,019 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!-- 
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
 
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: AWS Quick Start</TITLE>

<META NAME="description" CONTENT="Crystal Space: AWS Quick Start">
<META NAME="keywords" CONTENT="Crystal Space: AWS Quick Start">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">

</HEAD>

<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">

<A NAME="SEC562"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_228.html#SEC561"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_230.html#SEC563"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_226.html#SEC559"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_228.html#SEC561"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_246.html#SEC610"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 7.12.1 Quick Start </H3>
<!--docid::SEC562::-->
<P>

In order to startup and use AWS, currently, the following tasks need to be
accomplished:
</P><P>

<OL>
<LI>
Load the AWS plugin.
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>aws = CS_LOAD_PLUGIN(plugin_mgr,
  "crystalspace.window.alternatemanager", "awsManager", iAws);
</pre></td></tr></table></P><P>

<LI>
Create the AWS canvas.
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>awsCanvas = aws-&#62;CreateCustomCanvas (myG2D, myG3D);
aws-&#62;SetFlag (AWSF_AlwaysRedrawWindows);
aws-&#62;SetCanvas (awsCanvas);
</pre></td></tr></table></P><P>

<LI>
Load definition files.
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>aws-&#62;GetPrefMgr()-&#62;Load("./data/temp/awstest.def");
</pre></td></tr></table></P><P>

<LI>
Select a default skin that <EM>all</EM> windows will use.
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>aws-&#62;GetPrefMgr()-&#62;SelectDefaultSkin("Normal Windows");
</pre></td></tr></table></P><P>

<LI>
Create and display your windows.
<P>

<TABLE><tr><td>&nbsp;</td><td class=example><pre>awsWindow *test1 = aws-&#62;CreateWindowFrom("Splash");
awsWindow *test2 = aws-&#62;CreateWindowFrom("Another");
if (test1) test1-&#62;Show();
if (test2) test2-&#62;Show();
</pre></td></tr></table></OL>
<P>

That's all there is to it.  AWS is designed to be easy to use.  Of course,
this brief look does not illustrate how to get user input, from components in
the windows, nor does it illustrate how to do anything other than display your
windows.  However, the windows created here are full-fledged windows with all
the controls listed in the definition that you've created.  For more advanced
topics, read about signals (see section <A HREF="cs_230.html#SEC563">7.12.2 Signals: Responding To User Input</A>) and custom components
(see section <A HREF="cs_231.html#SEC564">7.12.3 Creating Custom AWS Components</A>).
<A NAME="AWS Signals"></A>
<HR SIZE=1>
<BR>  
<FONT SIZE="-1">
This document was generated

using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>

</BODY>
</HTML>