Minor cleanup.
[lsystem3d.git] / src / renderingsurface.h
index fd9bbc65327cd14ca1e95205f7e788b9cf6d6890..1c7ebff77251ee9bd8d5290b7372b17305c3107b 100644 (file)
@@ -45,18 +45,24 @@ public:
         ID_CANVAS = FXMainWindow::ID_LAST,
         ID_LAST
     };
-
+    
+    
     /**
      * Constructor
-     * @param application the FOX application object
-     * @param lsystem the Lindenmayer-system
+     * @param application the application object
      */
-    RenderingSurface(FXApp *application, LindenmayerSystem *lsystem);
-
+    RenderingSurface(FXApp *application);
+    
+    /**
+     * Destructor
+     */
+    virtual ~RenderingSurface();
+    
+    
     /**
      * Create and initialize the window
      */
-    void create();
+    virtual void create();
     
     /**
      * Initialize OpenGL
@@ -68,6 +74,7 @@ public:
      */
     void draw();
     
+    
     /**
      * Called by the system when the left mouse button is pressed
      * @param sender the sender object
@@ -139,6 +146,22 @@ public:
      * @return 
      */
     long onRepaint(FXObject *sender, FXSelector selector, void *data);
+    
+    /**
+     * Called by the system when the close button is pressed
+     * @param sender the sender object
+     * @param selector message type and id
+     * @param data event related data
+     * @return 
+     */
+    long onQuit(FXObject *sender, FXSelector selector, void *data);
+    
+    
+    /**
+     * Set current L-system generator
+     * @param lsystem the L-system generator
+     */
+    void setLSystem(LindenmayerSystem *lsystem);
 
 protected:
     
@@ -147,12 +170,12 @@ protected:
      */
     RenderingSurface() {}
     
-private:
     
     FXGLVisual *_visual;    // Pixel format info
     FXGLCanvas *_canvas;    // OpenGL-capable drawing area
 
-    LindenmayerSystem *_lsystem;    // The Lindenmayer System
+    LindenmayerSystem *_lsystem;    // The Lindenmayer system generator
+    
     
     // Model position
     double _modelX,