Files
ardour/libs/gtkmm2/gtk/src/scalebutton.hg
Paul Davis 449aab3c46 rollback to 3428, before the mysterious removal of libs/* at 3431/3432
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02 21:41:35 +00:00

69 lines
2.3 KiB
Plaintext

/* $Id: scalebutton.hg,v 1.5 2005/11/30 14:10:49 murrayc Exp $ */
/* scalebutton.h
*
* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtkmm/button.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/enums.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/button_p.h)
namespace Gtk
{
/** A button which pops up a scale widget.
*
* This kind of widget is commonly used for volume controls in multimedia
* applications, and there is a Gtk::VolumeButton subclass that is tailored
* for this use case.
*
* @ingroup Widgets
* @newin2p12
*/
class ScaleButton : public Button
{
_CLASS_GTKOBJECT(ScaleButton, GtkScaleButton, GTK_SCALE_BUTTON, Gtk::Button, GtkButton)
public:
_WRAP_CTOR(ScaleButton(IconSize size, double min, double max, double step, const Glib::StringArrayHandle& icons), gtk_scale_button_new)
_WRAP_METHOD(void set_icons(const Glib::StringArrayHandle& icons), gtk_scale_button_set_icons)
_WRAP_METHOD(double get_value() const, gtk_scale_button_get_value)
_WRAP_METHOD(void set_value(double value), gtk_scale_button_set_value)
_WRAP_METHOD(Gtk::Adjustment* get_adjustment(), gtk_scale_button_get_adjustment, refreturn)
_WRAP_METHOD(Gtk::Adjustment* get_adjustment() const, gtk_scale_button_get_adjustment, constversion)
_WRAP_METHOD(void set_adjustment(Gtk::Adjustment& adjustment), gtk_scale_button_set_adjustment)
_WRAP_SIGNAL(void value_changed(double value), "value_changed")
//Ignore key-binding signals:
_IGNORE_SIGNAL("popup")
_IGNORE_SIGNAL("popdown")
_WRAP_PROPERTY("value", double)
_WRAP_PROPERTY("size", IconSize)
_WRAP_PROPERTY("adjustment", Adjustment*)
};
} // namespace Gtk