/****************************************************************** * * * Nest version 2 - 3D Wasp Nest Simulator * * Copyright (C) 1997 Sylvain GUERIN * * LIASC, ENST Bretagne & Santa Fe Institute * * * ****************************************************************** E-mail: Sylvain.Guerin@enst-bretagne.fr or: Sylvain Guerin 13 rue des Monts Lorgeaux, 51460 L'EPINE, FRANCE ****************************************************************** This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ****************************************************************** Name : EditInt.h Component : edition interface Fonctionality : contains specifications refering to the colony's edition interface ******************************************************************/ #ifndef __EditInterface_H #define __EditInterface_H #include "graphical.h" #include "algo.h" #include "simu.h" #include "view3d.h" #define editorHexaSize 25 class EditInterface : public Interface { public: EditInterface (Interface* theMainInterface, int x0, int y0, char* windowLabel, char* iconLabel, Display* aDisplay, Simulation* aSimulation); virtual ~EditInterface (); actionType manageInterface (XEvent report); void refresh (); protected: Interface* mainInterface; Button* acceptButton; Button* cancelButton; Button* parametersButton; TextInput* ruleName; TextInput* ruleFileName; TextInput* rulePathName; TextWidget* ruleNumber; GraphicWindow* editWindow; GraphicWindow* rule3dView; GraphicWindow* rule3dIcon; HorizontalBar* bar1; HorizontalBar* bar2; HorizontalBar* bar3; HorizontalBar* bar4; HorizontalBar* bar5; HorizontalBar* bar6; UpArrow* upButton; DownArrow* downButton; UpArrow* incPhiButton; DownArrow* decPhiButton; LeftArrow* incTetaButton; RightArrow* decTetaButton; Button* firstButton; Button* lastButton; Button* addButton; Button* deleteButton; Button* insertButton; Button* newRuleButton; Button* newColonyButton; int alreadyComputed; View* aView; RuleArray* modifiedRuleArray; Rule* currentRule; int currentIndex; Architecture* currentArch; Simulation* modifiedSimulation; char ruleNameText[256]; char ruleFileNameText[256]; char rulePathNameText[256]; double pRedCell; double pYellowCell; double averageRuleNb; double sdRuleNb; RandomGenerationType randomGenerationType; Enumeration randomGenerationTypeEnum; void displayView3d (); void setArchFromRule (); void redrawEditWindow (); void setHexa (XPoint* pts, unsigned int x, unsigned int y); void updateRule (unsigned int x, unsigned int y, int button); void updateRuleNumber (); void manageAdd (); void manageDelete (); void manageInsert (); void manageNewRule (); void manageNewColony (); }; #endif