Lumiera  0.pre.03
»edit your freedom«
timeline-zoom-scale.hpp
Go to the documentation of this file.
1 /*
2  TIMELINE-ZOOM-SCALE.hpp - widget to control timeline zoom scale
3 
4  Copyright (C) Lumiera.org
5  2011, Michael R. Fisher <mfisher31@gmail.com>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
36 #ifndef STAGE_WIDGET_TIMELINE_ZOOM_SCALE_H
37 #define STAGE_WIDGET_TIMELINE_ZOOM_SCALE_H
38 
39 #include "stage/gtk-base.hpp"
41 //#include "stage/widget/timeline-widget.hpp" //////////////////////////////////////////////////////////////TODO old GTK-2 UI is defunct (3/23)
43 
44 using namespace Gtk;
45 using namespace stage::widget;
46 
47 namespace stage {
48 namespace widget {
49 namespace timeline {
50 
52  : public Gtk::HBox
53  {
54  public:
56 
57  sigc::signal<void, double> signal_zoom();
58 
59  void set_value(double val) { adjustment->set_value(val); }
60 
61  void wireTimelineState (shared_ptr<TimelineState> currentState
62 // ,TimelineWidget::TimelineStateChangeSignal /////////////////////////////////////TODO old GTK-2 UI is defunct (3/23)
63  );
64 
65 
66 
67  private: /* ===== Event Handlers ===== */
68 
72  void on_timeline_state_changed (shared_ptr<TimelineState> newState);
73 
77  void on_zoom_in_clicked();
78 
82  void on_zoom_out_clicked();
83 
87  void on_zoom();
88 
90  TimelineViewWindow& getViewWindow();
91 
92  /* Widgets */
93  Glib::RefPtr<Gtk::Adjustment> adjustment;
94  Gtk::HScale slider;
95  MiniButton zoomIn;
96  MiniButton zoomOut;
97 
98 
99  private:
100  sigc::signal<void, double> zoomSignal;
101  const double button_step_size;
102  shared_ptr<TimelineState> timelineState;
103  };
104 
105 
106 }}}// namespace stage::widget::timeline
107 #endif /*STAGE_WIDGET_TIMELINE_ZOOM_SCALE_H*/
Lumiera custom widgets.
Definition: gtk-base.hpp:163
Presentation state for the first draft of the timeline display.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Adapter to wrap button widgets intended to serve as tool buttons.
A set of basic GTK includes for the UI.