"Fossies" - the Fresh Open Source Software Archive

Member "mapgenerator-1.1.2/src/objects.cpp" (26 Oct 2003, 1639 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 "objects.cpp" see the Fossies "Dox" file reference documentation.

    1 /***************************************************************************
    2                           objects.cpp  -  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 #include "objects.h"
   19 
   20 Objects::Objects(const std::string & alt,const std::string oth){
   21     URL="";
   22     black_line=FL_BLACK;
   23     white_line=FL_WHITE;
   24     alt_text=alt;
   25     oth_atr=oth;
   26 }
   27 
   28 Objects::~Objects(){
   29 }
   30 
   31 void Objects::draw(int,int){
   32     fl_color(black_line);
   33     fl_line_style(FL_DASH);
   34 }
   35 
   36 void Objects::editURL(){
   37     const char *help=fl_input("Insert URL",URL.c_str());
   38     if(help==0) return;
   39     URL=help;
   40 }
   41 
   42 void Objects::setURL(const std::string & name){
   43     if(name=="") return;
   44     URL=name;
   45 }
   46 
   47 void Objects::edit(bool what){
   48     if(what){
   49         black_line=FL_BLUE;
   50         white_line=FL_RED;
   51     }
   52     else{
   53     black_line=FL_BLACK;
   54     white_line=FL_WHITE;
   55     }
   56 }