/*! \file inputdevice.cpp
** \brief Template File
**
-** $Id: inputdevice.cpp,v 1.2 2005/01/12 04:08:32 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 <ETL/stringf>
#include "main.h"
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
public:
DeviceSettings(InputDevice* input_device):
input_device(input_device) { }
-
+
virtual bool get_value(const synfig::String& key, synfig::String& value)const
{
return true;
}
-
+
return Settings::get_value(key, value);
}
-
+
virtual bool set_value(const synfig::String& key,const synfig::String& value)
{
- DEBUGPOINT();
if(key=="state")
{
input_device->set_state(value);
input_device->set_foreground_color(synfig::Color(r,g,b,a));
return true;
}
-
+
return Settings::set_value(key, value);
}
-
+
virtual KeyList get_key_list()const
{
KeyList ret(Settings::get_key_list());
state_="normal";
break;
}
-
+
device_settings=new DeviceSettings(this);
Main::settings().add_domain(device_settings,"input_device."+id_);
}
InputDevice::~InputDevice()
{
- Main::settings().remove_domain("input_device."+id_);
+ Main::settings().remove_domain("input_device."+id_);
delete device_settings;
}