// 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.
// Copyright 2003 Liam Girdwood
#ifndef _CASTOR_STAR_OBJECT_HH
#define _CASTOR_STAR_OBJECT_HH
#include "deep_object.hh"
#include <gdkmm/color.h>
namespace Castor
{
class StarObject : public DeepObject
{
public:
struct rgb_color_data {
std::string sp;
short r,g,b;
};
const static rgb_color_data star_color_data[];
StarObject();
~StarObject();
void get_spectral_type (std::string& type);
bool add_element (std::string& name, element_type type,
std::string& value);
bool check_element (std::string& name);
int save (std::ofstream* file);
int load (std::ifstream* file);
int init ();
/*! \fn void get_info (std::list<Glib::ustring> name, std::list<Glib::ustring> value);
* \brief Get object information
*/
void get_info (std::list<Glib::ustring>& name, std::list<Glib::ustring>& value);
/*! \fn int render(double x, double y, double mag_max, Gnome::Canvas::Group& group);
* \brief Render object
*/
void render(double x, double y, double mag_max, Gnome::Canvas::Group& group, bool bright, double ppd = 0);
protected:
std::string m_sp;
void init_color (std::string& sp, Gdk::Color& color);
Gdk::Color m_colour;
private:
};
};
#endif
syntax highlighted by Code2HTML, v. 0.9.1