source: trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc @ 945

Last change on this file since 945 was 945, checked in by garnier, 16 years ago

en test

  • Property svn:mime-type set to text/cpp
File size: 18.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4OpenGLXViewer.cc,v 1.51 2009/03/05 16:36:13 lgarnier Exp $
28// GEANT4 tag $Name:  $
29//
30//
31// Andrew Walkden  7th February 1997
32// G4OpenGLXViewer : Class to provide XWindows specific
33//                 functionality for OpenGL in GEANT4
34
35#ifdef G4VIS_BUILD_OPENGLX_DRIVER
36
37#include "G4OpenGLXViewer.hh"
38#include "G4VViewer.hh"
39#include "G4OpenGLSceneHandler.hh"
40#include <GL/glu.h>
41
42#include "G4OpenGLFontBaseStore.hh"
43
44#include <sstream>
45
46#include "G4VisExtent.hh"
47#include "G4LogicalVolume.hh"
48#include "G4VSolid.hh"
49#include "G4Point3D.hh"
50#include "G4Normal3D.hh"
51
52#include <X11/Xatom.h>
53#include <X11/Xutil.h>
54#include <X11/Xmu/StdCmap.h>
55
56#include <assert.h>
57
58int G4OpenGLXViewer::snglBuf_RGBA[12] =
59{ GLX_RGBA,
60  GLX_RED_SIZE, 1,
61  GLX_GREEN_SIZE, 1,
62  GLX_BLUE_SIZE, 1,
63  GLX_DEPTH_SIZE, 1,
64  GLX_STENCIL_SIZE, 1,
65  None };
66
67int G4OpenGLXViewer::dblBuf_RGBA[13] =
68{ GLX_RGBA,
69  GLX_RED_SIZE, 1,
70  GLX_GREEN_SIZE, 1,
71  GLX_BLUE_SIZE, 1,
72  GLX_DOUBLEBUFFER,
73  GLX_DEPTH_SIZE, 1,
74  GLX_STENCIL_SIZE, 1,
75  None };
76
77#define NewString(str) \
78 ((str) != NULL ? (strcpy((char*)malloc((unsigned)strlen(str) + 1), str)) : (char*)NULL)
79
80#define USE_DEFAULT_COLORMAP 1
81#define USE_STANDARD_COLORMAP 0
82
83XVisualInfo*  G4OpenGLXViewer::vi_single_buffer = 0;
84XVisualInfo*  G4OpenGLXViewer::vi_double_buffer = 0;
85
86extern "C" {
87  static Bool G4OpenGLXViewerWaitForNotify (Display*, XEvent* e, char* arg) {
88    return (e->type == MapNotify) && (e->xmap.window == (Window) arg);
89  }
90}
91
92void G4OpenGLXViewer::SetView () {
93  glXMakeCurrent (dpy, fGLXWin, cx);
94  G4OpenGLViewer::SetView (); 
95}
96
97void G4OpenGLXViewer::ShowView () {
98  glXWaitGL (); //Wait for effects of all previous OpenGL commands to
99                //be propagated before progressing.
100  glFlush ();
101
102  if (fVP.IsPicking()) {
103    G4cout <<
104      "Window activated for picking (left-mouse), exit (middle-mouse)."
105           << G4endl;
106    while (true) {
107      if (XPending(dpy)) {
108        XNextEvent(dpy, &event);
109        if (event.type == ButtonPress && event.xbutton.button == 1) {
110          Pick(event.xbutton.x, event.xbutton.y);
111        }
112        else if (event.type == ButtonPress && event.xbutton.button == 2) break;
113      }
114    }
115  }
116}
117
118void G4OpenGLXViewer::GetXConnection () {
119// get a connection.
120  dpy = XOpenDisplay (0);
121  if (!dpy) {
122    fViewId = -1;  // This flags an error.
123    G4cerr << "G4OpenGLViewer::G4OpenGLViewer couldn't open display." << G4endl;
124    return;
125  }
126
127// make sure OpenGL is supported and installed properly.
128  if (!glXQueryExtension (dpy, &errorBase, &eventBase)) {
129    fViewId = -1;  // This flags an error.
130    G4cerr << "G4OpenGLViewer::G4OpenGLViewer X Server has no GLX extension."
131         << G4endl;
132    return;
133  }
134
135}
136
137void G4OpenGLXViewer::CreateGLXContext (XVisualInfo* v) {
138
139  vi = v;
140// get window's attributes
141  if (!XGetWindowAttributes(dpy, XRootWindow (dpy, vi -> screen), &xwa)) {
142    fViewId = -1;  // This flags an error.
143    G4cerr << "G4OpenGLViewer::G4OpenGLViewer couldn't return window attributes"
144         << G4endl;
145    return;
146  }
147 
148// create a GLX context
149  cx = glXCreateContext (dpy, vi, 0, true);
150  if (!cx) {
151    fViewId = -1;  // This flags an error.
152    G4cerr << "G4OpenGLViewer::G4OpenGLViewer couldn't create context."
153         << G4endl;
154    return;
155  }
156
157// New stab at getting a colormap
158
159  Status status;
160  XStandardColormap *standardCmaps = XAllocStandardColormap ();
161  int i, numCmaps;
162
163  status = XmuLookupStandardColormap (dpy,
164                                      vi -> screen,
165                                      vi -> visualid,
166                                      vi -> depth,
167                                      XA_RGB_DEFAULT_MAP,
168                                      False,
169                                      True);
170 
171  if (status == 1) {
172    cmap = 0;
173    status = XGetRGBColormaps (dpy,
174                               XRootWindow (dpy, vi -> screen),
175                               &standardCmaps,
176                               &numCmaps,
177                               XA_RGB_DEFAULT_MAP);
178    if (status == 1)
179      for (i = 0; i < numCmaps; i++) {
180        if (standardCmaps[i].visualid == vi -> visualid) {
181          cmap = standardCmaps[i].colormap;
182          XFree (standardCmaps);
183          break;
184        }
185      }
186    if (!cmap) {
187      fViewId = -1;  // This flags an error.
188      G4cerr <<
189   "G4OpenGLViewer::G4OpenGLViewer failed to allocate a standard colormap."
190             << G4endl;
191      return;
192    }
193    G4cout << "Got standard cmap" << G4endl;
194  } else {
195    cmap = XCreateColormap (dpy,
196                            XRootWindow(dpy, vi -> screen),
197                            vi -> visual,
198                            AllocNone);
199    G4cout << "Created own cmap" << G4endl;
200  }
201
202  if (!cmap) {
203    fViewId = -1;  // This flags an error.
204    G4cerr << "G4OpenGLViewer::G4OpenGLViewer failed to allocate a Colormap."
205         << G4endl;
206    return;
207  }
208
209}
210 
211void G4OpenGLXViewer::CreateMainWindow () {
212 
213// create a window
214  swa.colormap = cmap;
215  swa.border_pixel = 0;
216  swa.event_mask = ExposureMask | ButtonPressMask | StructureNotifyMask;
217  swa.backing_store = WhenMapped;
218
219  // Window size and position...
220  size_hints = XAllocSizeHints();
221   
222  fWinSize_x = fVP.GetWindowSizeHintX();
223  fWinSize_y = fVP.GetWindowSizeHintY();
224  G4int x_origin = fVP.GetWindowAbsoluteLocationHintX(DisplayWidth(dpy, vi -> screen));
225
226  // FIXME,  screen size != window size on MAC, but I don't know have to get the menuBar
227  // size on MAC. L.Garnier 01/2009
228  G4int y_origin = fVP.GetWindowAbsoluteLocationHintY(DisplayHeight(dpy, vi -> screen));
229
230  size_hints->base_width = fWinSize_x;
231  size_hints->base_height = fWinSize_y;
232  size_hints->x = x_origin;
233  size_hints->y = y_origin;
234  if (fVP.IsWindowSizeHintX () && fVP.IsWindowLocationHintX () && fVP.IsWindowLocationHintY ()) {
235    size_hints->flags |= PSize | PPosition;
236  } else if (fVP.IsWindowSizeHintX () && !(fVP.IsWindowLocationHintX () || fVP.IsWindowLocationHintY ())) {
237    size_hints->flags |= PSize;
238  } else if ((!fVP.IsWindowSizeHintX ()) && fVP.IsWindowLocationHintX () && fVP.IsWindowLocationHintY ()) {
239    size_hints->flags |= PPosition;
240  }
241  G4cout << "Window name: " << fName << G4endl;
242  strncpy (charViewName, fName, 100);
243  char *window_name = charViewName;
244  char *icon_name = charViewName;
245  //char tmpatom[] = "XA_WM_NORMAL_HINTS";
246  wm_hints = XAllocWMHints();
247  class_hints = XAllocClassHint();
248
249  XStringListToTextProperty (&window_name, 1, &windowName);
250  XStringListToTextProperty (&icon_name, 1, &iconName);
251
252  wm_hints -> initial_state = NormalState;
253  wm_hints -> input = True;
254  wm_hints -> icon_pixmap = icon_pixmap;
255  wm_hints -> flags = StateHint | IconPixmapHint | InputHint;
256
257  class_hints -> res_name  = NewString("G4OpenGL");
258  class_hints -> res_class = NewString("G4OpenGL");
259
260   fGLXWin = XCreateWindow (dpy, XRootWindow (dpy, vi -> screen), x_origin,
261                        y_origin, fWinSize_x, fWinSize_y, 0, vi -> depth,
262                        InputOutput, vi -> visual, 
263                        CWBorderPixel | CWColormap |
264                        CWEventMask | CWBackingStore,
265                        &swa);
266 
267   XSetWMProperties (dpy, fGLXWin, &windowName, &iconName, 0, 0,
268                     size_hints, wm_hints, class_hints);
269 
270// request X to Draw window on screen.
271  XMapWindow (dpy, fGLXWin);
272
273// Wait for window to appear (wait for an "expose" event).
274  XIfEvent (dpy, &event, G4OpenGLXViewerWaitForNotify, (char*) fGLXWin);
275
276// connect the context to a window
277  Bool success = glXMakeCurrent (dpy, fGLXWin, cx);
278  if (!success) {
279    fViewId = -1;  // This flags an error.
280    G4cerr << "G4OpenGLViewer::G4OpenGLViewer failed to attach a GLX context."
281         << G4endl;
282    GLint error = GL_NO_ERROR;
283    while ((error = glGetError()) != GL_NO_ERROR) {
284      G4cout << "GL Error: " << gluErrorString(error) << G4endl;
285    }
286    return;
287  }
288
289}
290
291void G4OpenGLXViewer::CreateFontLists () {
292
293  std::map<G4double,G4String> fonts;  // G4VMarker screen size and font name.
294  fonts[10.] = "-adobe-courier-bold-r-normal--10-100-75-75-m-60-iso8859-1";
295  fonts[11.] = "-adobe-courier-bold-r-normal--11-80-100-100-m-60-iso8859-1";
296  fonts[12.] = "-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1";
297  fonts[13.] = "fixed";
298  fonts[14.] = "-adobe-courier-bold-r-normal--14-100-100-100-m-90-iso8859-1";
299  fonts[17.] = "-adobe-courier-bold-r-normal--17-120-100-100-m-100-iso8859-1";
300  fonts[18.] = "-adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1";
301  fonts[20.] = "-adobe-courier-bold-r-normal--20-140-100-100-m-110-iso8859-1";
302  fonts[24.] = "-adobe-courier-bold-r-normal--24-240-75-75-m-150-iso8859-1";
303  fonts[25.] = "-adobe-courier-bold-r-normal--25-180-100-100-m-150-iso8859-1";
304  fonts[34.] = "-adobe-courier-bold-r-normal--34-240-100-100-m-200-iso8859-1";
305  std::map<G4double,G4String>::const_iterator i;
306  for (i = fonts.begin(); i != fonts.end(); ++i) {
307    XFontStruct* font_info = XLoadQueryFont(dpy, i->second);
308    if (!font_info) {
309      G4cerr <<
310        "G4OpenGLXViewer: XLoadQueryFont failed for font\n  "
311             << i->second
312             << G4endl;
313      continue;
314    }
315    G4int font_base = glGenLists(256);
316    if (!font_base) {
317      G4cerr << "G4OpenGLXViewer: out of display lists for fonts."
318             << G4endl;
319      continue;
320    }
321    G4int first = font_info->min_char_or_byte2;
322    G4int last  = font_info->max_char_or_byte2;
323    glXUseXFont(font_info->fid, first, last-first+1,font_base+first);
324    G4OpenGLFontBaseStore::AddFontBase(this,font_base,i->first,i->second);
325  }
326}
327
328G4OpenGLXViewer::G4OpenGLXViewer (G4OpenGLSceneHandler& scene):
329G4VViewer (scene, -1),
330G4OpenGLViewer (scene),
331vi_immediate (0),
332vi_stored (0),
333vi (0),
334cmap (0)
335{
336  GetXConnection ();
337  if (fViewId < 0) return;
338 
339  // Try for a visual suitable for OpenGLImmediate..
340  // first try for a single buffered RGB window
341  if (!vi_single_buffer) {
342    vi_single_buffer =
343      glXChooseVisual (dpy, XDefaultScreen (dpy), snglBuf_RGBA);
344  }
345  if (!vi_double_buffer) {
346    vi_double_buffer =
347      glXChooseVisual (dpy, XDefaultScreen (dpy), dblBuf_RGBA);
348  }
349
350  if (vi_single_buffer || vi_double_buffer) {
351    if (!vi_double_buffer) {
352      G4cout <<
353        "G4OpenGLXViewer::G4OpenGLXViewer: unable to get a double buffer visual."
354        "\n  Working with a single buffer."
355             << G4endl;
356    }
357  } else {
358    if (!vi_single_buffer) {
359      G4cout <<
360        "G4OpenGLXViewer::G4OpenGLXViewer: unable to get a single buffer visual."
361             << G4endl;
362    }
363    if (!vi_double_buffer) {
364      G4cout <<
365        "G4OpenGLXViewer::G4OpenGLXViewer: unable to get a double buffer visual."
366             << G4endl;
367    }
368  }
369
370  if (vi_single_buffer) {
371    vi_immediate = vi_single_buffer;
372    attributeList = snglBuf_RGBA;
373  }
374 
375  if (!vi_immediate){
376    // next try for a double buffered RGB, but Draw to top buffer
377    if (vi_double_buffer) {
378      vi_immediate = vi_double_buffer;
379      attributeList = dblBuf_RGBA;
380    }
381  }
382
383  // Now try for a visual suitable for OpenGLStored...
384  // Try for a double buffered RGB window
385  if (vi_double_buffer) {
386    vi_stored = vi_double_buffer;
387    attributeList = dblBuf_RGBA;
388  }
389
390  if (!vi_immediate || !vi_stored) {
391    G4cout <<
392    "G4OpenGLXViewer::G4OpenGLXViewer: unable to get required visuals."
393           << G4endl;
394    fViewId = -1;  // This flags an error.
395  }
396
397  //  glClearColor (0., 0., 0., 0.);
398  //  glClearDepth (1.);
399}
400
401G4OpenGLXViewer::~G4OpenGLXViewer () {
402  if (fViewId >= 0) {
403    //Close a window from here
404    glXMakeCurrent (dpy, None, NULL);
405    glXDestroyContext (dpy, cx);
406    if (fGLXWin) XDestroyWindow (dpy, fGLXWin); // ...if already deleted in
407    // sub-class G4OpenGLXmViewer.
408    XFlush (dpy);
409  }
410}
411
412void G4OpenGLXViewer::print() {
413 
414  //using namespace std;
415  //cout << "print_col_callback requested with file name: " << fPrintFilename << G4endl;
416 
417  if (fVectoredPs) {
418#ifdef G4DEBUG_VIS_OGL
419    printf("G4OpenGLXViewer::print Vectored\n");
420#endif
421    printEPS();   
422  } else {
423#ifdef G4DEBUG_VIS_OGL
424    printf("G4OpenGLXViewer::print non Vectored\n");
425#endif
426    //    printEPS ();
427    //    return;
428
429    XVisualInfo* pvi;
430    GLXContext pcx = create_GL_print_context(pvi);
431
432    if (!pcx) {
433      G4cout << "Unable to create print context." << G4endl;
434      return;
435    }
436
437    GLXContext tmp_cx;
438    tmp_cx = cx;
439    cx=pcx;
440   
441    Pixmap pmap = XCreatePixmap (dpy,
442                                 XRootWindow (dpy, pvi->screen),
443                                 fWinSize_x, fWinSize_y,
444                                 pvi->depth);
445   
446    GLXPixmap glxpmap = glXCreateGLXPixmap (dpy,
447                                            pvi,
448                                            pmap);
449   
450    GLXDrawable tmp_win;
451    tmp_win=fGLXWin;
452    fGLXWin=glxpmap;
453   
454    // This won't work because fGLXWin is not known in G4OpenGLViewer...
455
456    glXMakeCurrent (dpy,
457                    fGLXWin,
458                    cx);
459       
460    glViewport (0, 0, fWinSize_x, fWinSize_y);
461   
462    ClearView ();
463    SetView ();
464    DrawView ();
465   
466    std::string file = "G4OpenGL_XPixmap.eps";
467    generateEPSX (file.c_str(),
468                 fPrintColour,
469                 fWinSize_x, fWinSize_y);
470   
471    fGLXWin=tmp_win;
472    cx=tmp_cx;
473   
474    glXMakeCurrent (dpy,
475                    fGLXWin,
476                    cx);
477   
478  }
479
480}
481
482
483GLXContext G4OpenGLXViewer::create_GL_print_context(XVisualInfo*& pvi) {
484 
485  pvi = glXChooseVisual (dpy,
486                         XDefaultScreen (dpy),
487                         snglBuf_RGBA);
488
489  if (!pvi) {
490    pvi = glXChooseVisual (dpy,
491                           XDefaultScreen (dpy),
492                           dblBuf_RGBA);
493  }
494
495  return glXCreateContext (dpy,
496                           pvi,
497                           NULL,
498                           False);
499}
500
501
502GLubyte* G4OpenGLXViewer::grabPixelsX (int inColor, unsigned int width, unsigned int height) {
503         
504  GLubyte* buffer;
505  GLint swapbytes, lsbfirst, rowlength;
506  GLint skiprows, skippixels, alignment;
507  GLenum format;
508  int size;
509       
510  if (inColor) {
511    format = GL_RGB;
512    size = width*height*3;
513  } else {
514    format = GL_LUMINANCE;
515    size = width*height*1;
516  }
517       
518  buffer = new GLubyte[size];
519  if (buffer == NULL)
520    return NULL;
521       
522  glGetIntegerv (GL_UNPACK_SWAP_BYTES, &swapbytes);
523  glGetIntegerv (GL_UNPACK_LSB_FIRST, &lsbfirst);
524  glGetIntegerv (GL_UNPACK_ROW_LENGTH, &rowlength);
525       
526  glGetIntegerv (GL_UNPACK_SKIP_ROWS, &skiprows);
527  glGetIntegerv (GL_UNPACK_SKIP_PIXELS, &skippixels);
528  glGetIntegerv (GL_UNPACK_ALIGNMENT, &alignment);
529       
530  glPixelStorei (GL_UNPACK_SWAP_BYTES, GL_FALSE);
531  glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE);
532  glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
533       
534  glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
535  glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0);
536  glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
537       
538  glReadPixels (0, 0, (GLsizei)width, (GLsizei)height, format, GL_UNSIGNED_BYTE, (GLvoid*) buffer);
539       
540  glPixelStorei (GL_UNPACK_SWAP_BYTES, swapbytes);
541  glPixelStorei (GL_UNPACK_LSB_FIRST, lsbfirst);
542  glPixelStorei (GL_UNPACK_ROW_LENGTH, rowlength);
543         
544  glPixelStorei (GL_UNPACK_SKIP_ROWS, skiprows);
545  glPixelStorei (GL_UNPACK_SKIP_PIXELS, skippixels);
546  glPixelStorei (GL_UNPACK_ALIGNMENT, alignment);
547         
548  return buffer;
549}
550       
551int G4OpenGLXViewer::generateEPSX (const char* filnam,
552                                  int inColour,
553                                  unsigned int width,
554                                  unsigned int height) {
555       
556  FILE* fp;
557  GLubyte* pixels;
558  GLubyte* curpix;
559  int components, pos, i;
560       
561  pixels = grabPixelsX (inColour, width, height);
562       
563  if (pixels == NULL)
564    return 1;
565  if (inColour) {
566    components = 3;
567  } else {
568    components = 1;
569  }
570         
571  fp = fopen (filnam, "w");
572  if (fp == NULL) {
573    return 2;
574  }
575         
576  fprintf (fp, "%%!PS-Adobe-2.0 EPSF-1.2\n");
577  fprintf (fp, "%%%%Title: %s\n", filnam);
578  fprintf (fp, "%%%%Creator: OpenGL pixmap render output\n");
579  fprintf (fp, "%%%%BoundingBox: 0 0 %d %d\n", width, height);
580  fprintf (fp, "%%%%EndComments\n");
581  fprintf (fp, "gsave\n");
582  fprintf (fp, "/bwproc {\n");
583  fprintf (fp, "    rgbproc\n");
584  fprintf (fp, "    dup length 3 idiv string 0 3 0 \n");
585  fprintf (fp, "    5 -1 roll {\n");
586  fprintf (fp, "    add 2 1 roll 1 sub dup 0 eq\n");
587  fprintf (fp, "    { pop 3 idiv 3 -1 roll dup 4 -1 roll dup\n");
588  fprintf (fp, "       3 1 roll 5 -1 roll } put 1 add 3 0 \n");
589  fprintf (fp, "    { 2 1 roll } ifelse\n");
590  fprintf (fp, "    }forall\n");
591  fprintf (fp, "    pop pop pop\n");
592  fprintf (fp, "} def\n");
593  fprintf (fp, "systemdict /colorimage known not {\n");
594  fprintf (fp, "   /colorimage {\n");
595  fprintf (fp, "       pop\n");
596  fprintf (fp, "       pop\n");
597  fprintf (fp, "       /rgbproc exch def\n");
598  fprintf (fp, "       { bwproc } image\n");
599  fprintf (fp, "   }  def\n");
600  fprintf (fp, "} if\n");
601  fprintf (fp, "/picstr %d string def\n", width * components);
602  fprintf (fp, "%d %d scale\n", width, height);
603  fprintf (fp, "%d %d %d\n", width, height, 8);
604  fprintf (fp, "[%d 0 0 %d 0 0]\n", width, height);
605  fprintf (fp, "{currentfile picstr readhexstring pop}\n");
606  fprintf (fp, "false %d\n", components);
607  fprintf (fp, "colorimage\n");
608         
609  curpix = (GLubyte*) pixels;
610  pos = 0;
611  for (i = width*height*components; i>0; i--) {
612    fprintf (fp, "%02hx ", *(curpix++));
613    if (++pos >= 32) {
614      fprintf (fp, "\n");
615      pos = 0;
616    }
617  }
618  if (pos)
619    fprintf (fp, "\n");
620       
621  fprintf (fp, "grestore\n");
622  fprintf (fp, "showpage\n");
623  delete pixels;
624  fclose (fp);
625  return 0;
626}
627       
628
629#endif
Note: See TracBrowser for help on using the repository browser.