X-Git-Url: https://git.piment-noir.org/?p=lsystem3d.git;a=blobdiff_plain;f=src%2Frenderingsurface.h;fp=src%2Frenderingsurface.h;h=1c7ebff77251ee9bd8d5290b7372b17305c3107b;hp=fd9bbc65327cd14ca1e95205f7e788b9cf6d6890;hb=68a7b857d7778c1a7b33d916d062de317fdd5069;hpb=b983918b252749f97e0fe2a85dd86bb3306921cc diff --git a/src/renderingsurface.h b/src/renderingsurface.h index fd9bbc6..1c7ebff 100644 --- a/src/renderingsurface.h +++ b/src/renderingsurface.h @@ -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,