Ardour
9.0-pre0-427-gd2a3450e2f
barcontroller.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2004 Paul Davis <paul@linuxaudiosystems.com>
3
* Copyright (C) 2017 Robin Gareus <robin@gareus.org>
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
#ifndef _WIDGETS_BAR_CONTROLLER_H_
21
#define _WIDGETS_BAR_CONTROLLER_H_
22
23
#include <
gtkmm/alignment.h
>
24
#include <cairo.h>
25
26
#include "
widgets/binding_proxy.h
"
27
#include "
widgets/slider_controller.h
"
28
#include "
widgets/visibility.h
"
29
30
namespace
ArdourWidgets
{
31
32
class
LIBWIDGETS_API
BarController
:
public
Gtk::Alignment
33
{
34
public
:
35
BarController
(
Gtk::Adjustment
& adj, std::shared_ptr<PBD::Controllable>);
36
37
virtual
~BarController
();
38
39
void
set_sensitive
(
bool
yn);
40
void
set_digits
(guint d) { _slider.get_spin_button().set_digits (d); }
41
42
ArdourFader::Tweaks
tweaks
()
const
{
return
_slider.tweaks (); }
43
void
set_tweaks
(
ArdourFader::Tweaks
t) { _slider.set_tweaks (t);}
44
45
sigc::signal<void,int>
StartGesture
;
46
sigc::signal<void,int>
StopGesture
;
47
48
/* export this to allow direct connection to button events */
49
Gtk::Widget
&
event_widget
() {
return
_slider; }
50
54
sigc::signal<void, bool>
SpinnerActive
;
55
56
protected
:
57
bool
on_button_press_event
(
GdkEventButton
*);
58
bool
on_button_release_event
(
GdkEventButton
*);
59
void
on_style_changed
(
const
Glib::RefPtr<Gtk::Style>&);
60
61
virtual
std::string
get_label
(
double
&
/*x*/
) {
62
return
""
;
63
}
64
65
private
:
66
HSliderController
_slider
;
67
bool
entry_focus_out
(
GdkEventFocus
*);
68
void
entry_activated
();
69
void
before_expose
();
70
71
gint
switch_to_bar
();
72
gint
switch_to_spinner
();
73
74
bool
_switching
;
75
bool
_switch_on_release
;
76
77
void
passtrhu_gesture_start
(
int
state) { StartGesture (state); }
78
void
passtrhu_gesture_stop
(
int
state) { StopGesture (state); }
79
};
80
81
82
};
/* namespace */
83
84
#endif
// __gtkmm2ext_bar_controller_h__
alignment.h
binding_proxy.h
ArdourWidgets::BarController
Definition:
barcontroller.h:33
ArdourWidgets::BarController::tweaks
ArdourFader::Tweaks tweaks() const
Definition:
barcontroller.h:42
ArdourWidgets::BarController::_switch_on_release
bool _switch_on_release
Definition:
barcontroller.h:75
ArdourWidgets::BarController::passtrhu_gesture_start
void passtrhu_gesture_start(int state)
Definition:
barcontroller.h:77
ArdourWidgets::BarController::BarController
BarController(Gtk::Adjustment &adj, std::shared_ptr< PBD::Controllable >)
ArdourWidgets::BarController::entry_activated
void entry_activated()
ArdourWidgets::BarController::StopGesture
sigc::signal< void, int > StopGesture
Definition:
barcontroller.h:46
ArdourWidgets::BarController::set_sensitive
void set_sensitive(bool yn)
ArdourWidgets::BarController::switch_to_spinner
gint switch_to_spinner()
ArdourWidgets::BarController::set_tweaks
void set_tweaks(ArdourFader::Tweaks t)
Definition:
barcontroller.h:43
ArdourWidgets::BarController::on_style_changed
void on_style_changed(const Glib::RefPtr< Gtk::Style > &)
ArdourWidgets::BarController::entry_focus_out
bool entry_focus_out(GdkEventFocus *)
ArdourWidgets::BarController::event_widget
Gtk::Widget & event_widget()
Definition:
barcontroller.h:49
ArdourWidgets::BarController::passtrhu_gesture_stop
void passtrhu_gesture_stop(int state)
Definition:
barcontroller.h:78
ArdourWidgets::BarController::on_button_release_event
bool on_button_release_event(GdkEventButton *)
This is a default handler for the signal signal_button_release_event().
ArdourWidgets::BarController::~BarController
virtual ~BarController()
ArdourWidgets::BarController::_switching
bool _switching
Definition:
barcontroller.h:74
ArdourWidgets::BarController::on_button_press_event
bool on_button_press_event(GdkEventButton *)
This is a default handler for the signal signal_button_press_event().
ArdourWidgets::BarController::_slider
HSliderController _slider
Definition:
barcontroller.h:66
ArdourWidgets::BarController::set_digits
void set_digits(guint d)
Definition:
barcontroller.h:40
ArdourWidgets::BarController::StartGesture
sigc::signal< void, int > StartGesture
Definition:
barcontroller.h:45
ArdourWidgets::BarController::switch_to_bar
gint switch_to_bar()
ArdourWidgets::BarController::get_label
virtual std::string get_label(double &)
Definition:
barcontroller.h:61
ArdourWidgets::BarController::before_expose
void before_expose()
ArdourWidgets::BarController::SpinnerActive
sigc::signal< void, bool > SpinnerActive
Definition:
barcontroller.h:54
ArdourWidgets::FaderWidget::Tweaks
Tweaks
Definition:
fader_widget.h:40
ArdourWidgets::HSliderController
Definition:
slider_controller.h:76
Gtk::Adjustment
Definition:
adjustment.h:63
Gtk::Alignment
Definition:
alignment.h:62
Gtk::Widget
Definition:
tk/ytkmm/ytkmm/gtkmm/widget.h:336
ArdourWidgets
Definition:
ardour_ui.h:192
slider_controller.h
_GdkEventButton
Definition:
gdkevents.h:321
_GdkEventFocus
Definition:
gdkevents.h:400
visibility.h
LIBWIDGETS_API
#define LIBWIDGETS_API
Definition:
widgets/widgets/visibility.h:39
libs
widgets
widgets
barcontroller.h
Generated on Mon Nov 11 2024 08:48:51 for Ardour by
1.9.1