/* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
#include
#include
#include //For strlen()
#include
using std::strlen;
namespace Gtk
{
VScale::VScale(double min, double max, double step)
:
_CONSTRUCT_SPECIFIC(Scale, VScale)
{
auto adjustment = Adjustment::create(min, min, max, step, 10 * step, step);
set_adjustment(adjustment);
set_digits( calc_digits_(step) );
}
VScale::VScale(const Glib::RefPtr& adjustment)
:
_CONSTRUCT_SPECIFIC(Scale, VScale)
{
set_adjustment(adjustment);
}
VScale::VScale()
:
_CONSTRUCT_SPECIFIC(Scale, VScale)
{
auto adjustment = Adjustment::create(0.0, 0.0, 0.0,
0.0, 0.0, 0.0);
set_adjustment(adjustment);
}
HScale::HScale(double min, double max, double step)
:
_CONSTRUCT_SPECIFIC(Scale, HScale)
{
auto adjustment = Adjustment::create(min, min, max, step, 10 * step, step);
set_adjustment(adjustment);
set_digits( calc_digits_(step) );
}
HScale::HScale()
:
_CONSTRUCT_SPECIFIC(Scale, HScale)
{
auto adjustment = Adjustment::create(0.0, 0.0, 0.0,
0.0, 0.0, 0.0);
set_adjustment(adjustment);
}
HScale::HScale(const Glib::RefPtr& adjustment)
:
_CONSTRUCT_SPECIFIC(Scale, HScale)
{
set_adjustment(adjustment);
}
} // namespace Gtk