"Fossies" - the Fresh Open Source Software Archive

Member "mapgenerator-1.1.2/src/opolygon.h" (26 Oct 2003, 1779 Bytes) of package /linux/www/old/mapgenerator-1.1.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "opolygon.h" see the Fossies "Dox" file reference documentation.

    1 /***************************************************************************
    2                           opolygon.h  -  description
    3                              -------------------
    4     begin                : Mon Aug 13 2001
    5     copyright            : (C) 2001 by Gabriel Huber
    6     email                : Gabriel-Huber@gmx.de
    7  ***************************************************************************/
    8 
    9 /***************************************************************************
   10  *                                                                         *
   11  *   This program is free software; you can redistribute it and/or modify  *
   12  *   it under the terms of the GNU General Public License as published by  *
   13  *   the Free Software Foundation; either version 2 of the License, or     *
   14  *   (at your option) any later version.                                   *
   15  *                                                                         *
   16  ***************************************************************************/
   17 
   18 #ifndef OPOLYGON_H
   19 #define OPOLYGON_H
   20 
   21 #include "objects.h"
   22 #include <math.h>
   23 #include <vector>
   24 #include <FL/fl_ask.H>
   25 
   26 /**
   27   *@author Gabriel Huber
   28   */
   29 
   30 #ifndef enum_Objects
   31 #define enum_Objects
   32 enum {objCircle,objSquare,objPolygon,objSelector};
   33 #endif
   34 
   35 class oPolygon : public Objects {
   36 private:
   37     int startx;
   38     int starty;
   39     std::vector<int> px;
   40     std::vector<int> py;
   41     int objnum;
   42     bool end;
   43     int selectedobj;
   44 public:
   45     oPolygon(int x,int y,const std::string & alt="", const std::string & oth="");
   46     ~oPolygon();
   47     void draw(int xpos,int ypos);
   48     void add_size(int x,int y);
   49     int select(int x,int y);
   50     void save(htmlfile *html);
   51     int type(){return objPolygon;}
   52     void move(int x,int y);
   53     void add_item();
   54     bool del_item();
   55     void moveitem(int x,int y);
   56 };
   57 
   58 #endif