summaryrefslogtreecommitdiff
path: root/gtk2_ardour/big_clock_window.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-05-04 22:01:13 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-05-04 22:01:13 -0400
commit9267648e5dd8d8db5fa39ae2a264b261d6c75dbe (patch)
tree79b5249abca0fc318bf38c59980b428f9c766143 /gtk2_ardour/big_clock_window.h
parent6fd66bd46768f205e4eb02d6e14ef4a3a20700d2 (diff)
VisibilityTracker needs to inherit from sigc::tracker so that it can be used without combination with other sigc::trackable parents; fix partially_visible() logic
Diffstat (limited to 'gtk2_ardour/big_clock_window.h')
-rw-r--r--gtk2_ardour/big_clock_window.h54
1 files changed, 54 insertions, 0 deletions
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__
+