From 9267648e5dd8d8db5fa39ae2a264b261d6c75dbe Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 4 May 2013 22:01:13 -0400 Subject: VisibilityTracker needs to inherit from sigc::tracker so that it can be used without combination with other sigc::trackable parents; fix partially_visible() logic --- gtk2_ardour/big_clock_window.h | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 gtk2_ardour/big_clock_window.h (limited to 'gtk2_ardour/big_clock_window.h') diff --git a/gtk2_ardour/big_clock_window.h b/gtk2_ardour/big_clock_window.h new file mode 100644 index 0000000000..790bf0f357 --- /dev/null +++ b/gtk2_ardour/big_clock_window.h @@ -0,0 +1,54 @@ +/* + Copyright (C) 2013 Paul 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 __bigclock_window_h__ +#define __bigclock_window_h__ + +#include "ardour_window.h" + +class AudioClock; + +class BigClockWindow : public Gtk::Window, public ARDOUR::SessionHandlePtr, public Gtkmm2ext::VisibilityTracker +{ + public: + BigClockWindow (AudioClock&); + + AudioClock* clock() const { return _clock; } + void set_clock (AudioClock* c) { _clock = c; } + + void float (Gtk::Window*); + + private: + AudioClock& clock; + bool resize_in_progress; + int original_height; + int original_width; + int original_font_size; + + void on_size_allocate (Gtk::Allocation&); + void on_realize (); + void on_unmap (); + bool on_key_press_event (); + + bool text_resizer (int, int); + void reset_aspect_ratio (); +}; + +#endif // __ardour_window_h__ + -- cgit v1.2.3