root/trunk/luigi/doc/bitmaps.html

Revision 36, 7.4 kB (checked in by baxissimo, 2 years ago)

First cut at docs using Candydoc.

Line 
1 <html><head>
2 <meta http-equiv="content-type" content="text/html; charset=utf-8">
3 <meta content="text/javascript" http-equiv="content-script-type">
4 <title>luigi.themes.bitmaps</title>
5 <link rel="stylesheet" type="text/css" href="candydoc/style.css">
6 <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]-->
7 <script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script>
8 <script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script>
9 <script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script>
10 </head><body>
11 <div id="tabarea"></div><div id="explorerclient"></div>
12 <div id="content"><script>explorer.initialize("luigi.themes.bitmaps");</script>
13     <table class="content">
14         <tr><td id="docbody"><h1>luigi.themes.bitmaps</h1><!-- Generated by Ddoc from themes\bitmaps.d -->
15 $(DDOC_SECTIONS
16 $(DDOC_SUMMARY GLUI User Interface Toolkit
17 <pre class="d_code"></pre>
18 glui_bitmaps.cpp
19 <br><br>
20
21 Draws the hardcoded images listed in glui_bitmap_img_data with OpenGL.
22
23 <br><br>
24 <b>FIXME:</b><br>
25 upload the images to a texture.  This will allow them to be:
26     - Drawn with alpha blending
27     - Drawn at random sizes and angles onscreen
28     - Drawn much faster than with glDrawPixels
29 <br><br>
30
31 <pre class="d_code">
32   Copyright (c) 1998 Paul Rademacher
33
34 </pre>
35 <b>WWW:</b><br>
36 <br><br>
37 <b>http:</b><br>
38 //sourceforge.net/projects/glui/
39 <br><br>
40 <b>Forums:</b><br>
41 <br><br>
42 <b>http:</b><br>
43 //sourceforge.net/forum/?group_id=92496
44 <br><br>
45
46   Converted to ZLIB license with Paul's permission.
47
48 <br><br>
49 <br><br>
50
51 <script>explorer.outline.incSymbolLevel();</script>
52 <dl>
53 <script>explorer.outline.writeEnabled = true;</script>
54 <dt><span class="decl">struct
55 <span class="currsymbol">Bitmap</span>
56 <script>explorer.outline.addDecl('Bitmap');</script>
57
58 ;
59 </span></dt>
60 <script>explorer.outline.writeEnabled = false;</script>
61
62
63 <dd><b>GLUI Bitmap:</b><br>
64 :load_from_array()
65 <br><br>
66
67 <br><br>
68
69  GLUI_Bitmap is a simple 2D texture map.  It's used
70  to represent small textures like checkboxes, arrows, etc.
71  via the GLUI_StdBitmaps class.
72 <br><br>
73
74
75 <script>explorer.outline.incSymbolLevel();</script>
76 <dl>
77 <script>explorer.outline.writeEnabled = true;</script>
78 <dt><span class="decl">void
79 <span class="currsymbol">init_grayscale</span>
80 <script>explorer.outline.addDecl('init_grayscale');</script>
81
82 (ubyte* <span class="funcparam">array</span>);
83 </span></dt>
84 <script>explorer.outline.writeEnabled = false;</script>
85
86
87 <dd>Create bitmap from grayscale byte image
88 <br><br>
89
90 </dd>
91 </dl>
92 <script>explorer.outline.decSymbolLevel();</script>
93
94
95 </dd>
96
97 <script>explorer.outline.writeEnabled = true;</script>
98 <dt><span class="decl">class
99 <span class="currsymbol">StdBitmapSet</span>
100 <script>explorer.outline.addDecl('StdBitmapSet');</script>
101
102 ;
103 </span></dt>
104 <script>explorer.outline.writeEnabled = false;</script>
105
106
107 <dd>Keeps an array of Bitmap objects to represent all the
108  images used in the UI: checkboxes, arrows, etc.
109  
110 <br><br>
111
112
113 <script>explorer.outline.incSymbolLevel();</script>
114 <dl>
115 <script>explorer.outline.writeEnabled = true;</script>
116 <dt><span class="decl">int
117 <span class="currsymbol">width</span>
118 <script>explorer.outline.addDecl('width');</script>
119
120 (int <span class="funcparam">i</span>);
121 </span></dt>
122 <script>explorer.outline.writeEnabled = false;</script>
123
124
125 <dd>Return the
126 <span class="currsymbol">width</span>
127 <script>explorer.outline.addDecl('width');</script>
128
129  (in pixels) of the n'th standard bitmap.
130 <br><br>
131
132 </dd>
133
134 <script>explorer.outline.writeEnabled = true;</script>
135 <dt><span class="decl">int
136 <span class="currsymbol">height</span>
137 <script>explorer.outline.addDecl('height');</script>
138
139 (int <span class="funcparam">i</span>);
140 </span></dt>
141 <script>explorer.outline.writeEnabled = false;</script>
142
143
144 <dd>Return the
145 <span class="currsymbol">height</span>
146 <script>explorer.outline.addDecl('height');</script>
147
148  (in pixels) of the n'th standard bitmap.
149 <br><br>
150
151 </dd>
152
153 <script>explorer.outline.writeEnabled = true;</script>
154 <dt><span class="decl">void
155 <span class="currsymbol">draw</span>
156 <script>explorer.outline.addDecl('draw');</script>
157
158 (int <span class="funcparam">i</span>, Size <span class="funcparam">p</span>);
159 </span></dt>
160 <script>explorer.outline.writeEnabled = false;</script>
161
162
163 <dd>Draw the n'th standard bitmap (one of the enums
164        listed in GLUI_StdBitmaps_Codes) at pixel corner (x,y).
165    
166 <br><br>
167
168 </dd>
169 </dl>
170 <script>explorer.outline.decSymbolLevel();</script>
171
172
173 </dd>
174
175 <script>explorer.outline.writeEnabled = true;</script>
176 <dt><span class="decl">ubyte[171]
177 <span class="currsymbol">img_checkbox_off</span>
178 <script>explorer.outline.addDecl('img_checkbox_off');</script>
179
180 ;
181 </span></dt>
182 <script>explorer.outline.writeEnabled = false;</script>
183
184
185 <dd>Bitmaps for all GLUI images.
186 <br><br>
187 These were converted from original PPM images
188  (mostly lost) with the tools/ppm2array program.
189 <br><br>
190
191  The images here are extracted in typical OpenGL
192  bottom-to-top fashion.
193
194 <br><br>
195 <b>FIXME:</b><br>
196 don't use grayscale brightness here--this prevents
197  people changing the background color.  Instead, use a code
198  indicating the underlying purpose of the pixel:
199     0 = shadows; outlines; UI elements (check boxes, arrows)
200     64 = disabled shadows and UI elements
201     128 = shadowing, disabled
202     192 = disabled white; background
203     255 = highlights; checkbox/radio background
204 <br><br>
205
206  I'm thinking the way to do this would be to have an
207 enum {
208   BG = 0, // Background shines through-- totally alpha transparent
209   BS, // Background of scrollbar/spin box-- opaque gray
210   SB, // Shadowed-black element-- strong alpha blend to black
211   SD, // Shadowed-dark element-- weak alpha blend to black
212   HL, // Highlight-light-- weak alpha blend to white
213   HW, // Highlight-white-- strong alpha blend to white
214   UB, // User-interface black-- arrows, checkboxes, radio buttons
215   UW, // User-interface white-- backgrounds of checkboxes and radio buttons
216 };
217 <br><br>
218
219  Orion Sky Lawlor, olawlor@acm.org
220  @ This stuff was orignally in C++ and labelled LGPL, but Bill Baxter
221  @ got Lawlor's permission to make it ZLIB via email on Aug 13, 2006
222 <br><br>
223
224 </dd>
225 </dl>
226 <script>explorer.outline.decSymbolLevel();</script>
227
228
229 </td></tr>
230         <tr><td id="docfooter">
231             Page was generated with
232             <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px">
233             on Wed Dec  6 09:51:45 2006
234
235         </td></tr>
236     </table>
237 </div>
238 <script>
239     explorer.packageExplorer.addModule("luigi.base");
240     explorer.packageExplorer.addModule("luigi.arranger");
241     explorer.packageExplorer.addModule("luigi.adapter");
242     explorer.packageExplorer.addModule("luigi.adapters.gld");
243     explorer.packageExplorer.addModule("luigi.adapters.glfw");
244     explorer.packageExplorer.addModule("luigi.event");
245     explorer.packageExplorer.addModule("luigi.font");
246     explorer.packageExplorer.addModule("luigi.gldraw");
247     explorer.packageExplorer.addModule("luigi.gui");
248     explorer.packageExplorer.addModule("luigi.theme");
249     explorer.packageExplorer.addModule("luigi.themes.std");
250     explorer.packageExplorer.addModule("luigi.themes.dxut");
251     explorer.packageExplorer.addModule("luigi.opengl");
252     explorer.packageExplorer.addModule("luigi.signalobj");
253     explorer.packageExplorer.addModule("wrapres");</script>
254 </body></html>
Note: See TracBrowser for help on using the browser.