/*! \file widget_value.cpp
** \brief Template File
**
-** $Id: widget_value.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
+** $Id$
**
** \legal
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package 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.
**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package 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.
** \endlegal
*/
/* ========================================================================= */
#include "app.h"
#include "widget_distance.h"
+#include "general.h"
+
#endif
using namespace synfig;
angle_adjustment(0,-2000000000,2000000000,1,1,1)
{
set_no_show_all();
-
+
label=manage(new class Gtk::Label("Unknown Datatype"));
pack_start(*label);
label->show();
angle_widget=manage(new class Gtk::SpinButton(angle_adjustment,15,2));
pack_start(*angle_widget);
- bool_widget=manage(new class Gtk::CheckButton());
+ bool_widget=manage(new class Gtk::CheckButton());
pack_start(*bool_widget);
//color_widget=manage(new class Gtk::ColorSelection());
string_widget=manage(new class Gtk::Entry());
pack_start(*string_widget);
-
+
canvas_widget=manage(new class Widget_CanvasChooser());
pack_start(*canvas_widget);
distance_widget=manage(new class Widget_Distance());
pack_start(*distance_widget);
-
+
vector_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
color_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
enum_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
filename_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
time_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
distance_widget->signal_activate().connect(sigc::mem_fun(*this,&Widget_ValueBase::activate));
-
+
/*signal_focus_in_event().connect(
sigc::bind_return(
sigc::hide(
void
Widget_ValueBase::activate()
{
- //DEBUGPOINT();
signal_activate()();
}
distance_widget->set_has_frame(false);
//static_cast<Gtk::Entry*>(distance_widget)->gobj()->is_cell_renderer = true; // XXX
-
+
integer_widget->set_has_frame(false);
//static_cast<Gtk::Entry*>(integer_widget)->gobj()->is_cell_renderer = true; // XXX
vector_widget->set_has_frame(false);
filename_widget->hide();
time_widget->hide();
distance_widget->hide();
-
+
value=data;
try{
switch(value.get_type())
{
value=enum_widget->get_value();
}
-
+
break;
case ValueBase::TYPE_BOOL:
value=bool_widget->get_active();
color.set_g(gdkcolor.get_green_p());
color.set_b(gdkcolor.get_blue_p());
color.set_a(color_widget->get_current_alpha()/65535.0);
-
+
value=color;
*/
}
return value;
}
-
+
void
Widget_ValueBase::on_grab_focus()
{
enum_widget->grab_focus();
}
-
+
break;
case ValueBase::TYPE_BOOL:
bool_widget->grab_focus();
return distance_widget->signal_activate();
else
return real_widget->signal_activate();
-
+
break;
case ValueBase::TYPE_TIME:
return time_widget->signal_activate();
return integer_widget->signal_activate();
else
return enum_widget->signal_activate();
-
+
break;
case ValueBase::TYPE_BOOL:
return string_widget->signal_activate();