summaryrefslogtreecommitdiff
path: root/libs/widgets/widgets
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-25 05:21:53 +0200
committerRobin Gareus <robin@gareus.org>2017-09-25 15:45:27 +0200
commitf27ff4c8b882444a569e73e4b21aded280ee748f (patch)
treef444228c3af67526e6284d2f532860401adac37d /libs/widgets/widgets
parentfe964ccfdf59a709b46bf4041a7ca74021ccfa29 (diff)
Retire ClickBox + AutoSpin
After over 17 years of honorable service to the Ardour Codebase. ClickBox and AutoSpin are retiring into the git nirvana. We're glad for the duty, decency, reliability, dignity, respect which these classes brought to Arodur and look back in gratitude on their years of service. PS. First one to say "cruft" will be fired.
Diffstat (limited to 'libs/widgets/widgets')
-rw-r--r--libs/widgets/widgets/auto_spin.h76
-rw-r--r--libs/widgets/widgets/click_box.h82
2 files changed, 0 insertions, 158 deletions
diff --git a/libs/widgets/widgets/auto_spin.h b/libs/widgets/widgets/auto_spin.h
deleted file mode 100644
index 099976f4db..0000000000
--- a/libs/widgets/widgets/auto_spin.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- Copyright (C) 2000 Paul Barton-Davis
-
- 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#ifndef _WIDGETS_AUTO_SPIN_H_
-#define _WIDGETS_AUTO_SPIN_H_
-
-#ifdef interface
-#undef interface
-#endif
-
-#include <gtkmm/adjustment.h>
-
-#include "widgets/visibility.h"
-
-namespace ArdourWidgets {
-
-class LIBWIDGETS_API AutoSpin
-{
-public:
- AutoSpin (Gtk::Adjustment &adj, gfloat cr = 0, bool round_to_steps_yn = false);
-
- Gtk::Adjustment &get_adjustment() { return adjustment; }
-
- void use_left_as_decrement (bool yn) { left_is_decrement = yn; }
- void set_wrap (bool yn) { wrap = yn; }
- void set_climb_rate (gfloat cr) { climb_rate = cr; }
- void set_bounds (gfloat initial, gfloat low, gfloat high, bool with_reset = true);
-
- gint button_press (GdkEventButton *);
- gint stop_spinning (GdkEventButton *ignored_but_here_for_clicked);
- void start_spinning (bool decrementing, bool use_page);
- gint scroll_event (GdkEventScroll *);
-
-private:
- Gtk::Adjustment &adjustment;
- gfloat climb_rate;
- gfloat timer_increment;
- gfloat initial;
- unsigned int timer_calls;
- bool have_timer;
- bool need_timer;
- bool wrap;
- gint timeout_tag;
- bool left_is_decrement;
- bool round_to_steps;
-
- static const unsigned int initial_timer_interval;
- static const unsigned int timer_interval;
- static const unsigned int climb_timer_calls;
-
- void stop_timer ();
- static gint _timer (void *arg);
- gint timer ();
- bool adjust_value (gfloat increment);
- void set_value (gfloat value);
-};
-
-} /* namespace */
-
-#endif
diff --git a/libs/widgets/widgets/click_box.h b/libs/widgets/widgets/click_box.h
deleted file mode 100644
index ae4ee8961a..0000000000
--- a/libs/widgets/widgets/click_box.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- Copyright (C) 1999 Paul Barton-Davis
-
- 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#ifndef _WIDGETS_CLICK_BOX_H_
-#define _WIDGETS_CLICK_BOX_H_
-
-#ifdef interface
-#undef interface
-#endif
-
-#include <string>
-
-#include <gtkmm/adjustment.h>
-#include <gtkmm/drawingarea.h>
-
-#include "widgets/auto_spin.h"
-#include "widgets/binding_proxy.h"
-#include "widgets/visibility.h"
-
-namespace PBD {
- class Controllable;
-}
-
-namespace ArdourWidgets {
-
-class LIBWIDGETS_API ClickBox : public Gtk::DrawingArea, public AutoSpin
-{
- public:
- ClickBox (Gtk::Adjustment *adj, const std::string &name, bool round_to_steps = false);
- ~ClickBox ();
-
- /** Set a slot to `print' the value to put in the box.
- * The slot should write the value of the Gtk::Adjustment
- * into the char array, and should return true if it has done the printing,
- * or false to use the ClickBox's default printing method.
- */
- void set_printer (sigc::slot<bool, char *, Gtk::Adjustment &>);
-
- void set_controllable (boost::shared_ptr<PBD::Controllable> c) {
- _binding_proxy.set_controllable (c);
- }
-
- protected:
- bool on_expose_event (GdkEventExpose*);
- bool on_enter_notify_event (GdkEventCrossing* ev);
- bool on_leave_notify_event (GdkEventCrossing* ev);
-
- BindingProxy _binding_proxy;
-
- private:
- Glib::RefPtr<Pango::Layout> layout;
- int twidth;
- int theight;
-
- void set_label ();
- void style_changed (const Glib::RefPtr<Gtk::Style> &);
- bool button_press_handler (GdkEventButton *);
- bool button_release_handler (GdkEventButton *);
- bool on_scroll_event (GdkEventScroll*);
-
- sigc::slot<bool, char *, Gtk::Adjustment &> _printer;
-};
-
-} /* namespace */
-
-#endif