Ardour
9.0-pre0-427-gd2a3450e2f
tearoff.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2003 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_TEAROFF_H_
21
#define _WIDGETS_TEAROFF_H_
22
23
#include <
gtkmm/arrow.h
>
24
#include <
gtkmm/box.h
>
25
#include <
gtkmm/eventbox.h
>
26
#include <
gtkmm/window.h
>
27
28
#include "
widgets/visibility.h
"
29
30
class
XMLNode
;
31
32
namespace
ArdourWidgets
{
33
34
class
LIBWIDGETS_API
TearOff
:
public
Gtk::HBox
35
{
36
public
:
37
TearOff
(
Gtk::Widget
&
contents
,
bool
allow_resize =
false
);
38
virtual
~TearOff
();
39
40
void
set_visible
(
bool
yn,
bool
force =
false
);
41
void
set_can_be_torn_off
(
bool
);
42
bool
can_be_torn_off
()
const
{
return
_can_be_torn_off; }
43
bool
visible
()
const
{
return
_visible; }
44
45
sigc::signal<void>
Detach
;
46
sigc::signal<void>
Attach
;
47
sigc::signal<void>
Visible
;
48
sigc::signal<void>
Hidden
;
49
50
Gtk::Window
&
tearoff_window
() {
return
own_window; }
51
bool
torn_off
()
const
;
52
void
tear_it_off
();
53
void
put_it_back
();
54
void
hide_visible
();
55
56
void
set_state
(
const
XMLNode
&);
57
void
add_state
(
XMLNode
&)
const
;
58
59
private
:
60
Gtk::Widget
&
contents
;
61
Gtk::Window
own_window
;
62
Gtk::Arrow
tearoff_arrow
;
63
Gtk::Arrow
close_arrow
;
64
Gtk::HBox
window_box
;
65
Gtk::EventBox
tearoff_event_box
;
66
Gtk::EventBox
close_event_box
;
67
double
drag_x
;
68
double
drag_y
;
69
bool
dragging
;
70
bool
_visible
;
71
bool
_torn
;
72
bool
_can_be_torn_off
;
73
int
own_window_width
;
74
int
own_window_height
;
75
int
own_window_xpos
;
76
int
own_window_ypos
;
77
78
gint
tearoff_click
(
GdkEventButton
*);
79
gint
close_click
(
GdkEventButton
*);
80
81
gint
window_motion
(
GdkEventMotion
*);
82
gint
window_button_press
(
GdkEventButton
*);
83
gint
window_button_release
(
GdkEventButton
*);
84
gint
window_delete_event
(
GdkEventAny
*);
85
86
void
own_window_realized
();
87
bool
own_window_configured
(
GdkEventConfigure
*);
88
};
89
90
}
/* namespace */
91
92
#endif
ArdourWidgets::TearOff
Definition:
tearoff.h:35
ArdourWidgets::TearOff::own_window
Gtk::Window own_window
Definition:
tearoff.h:61
ArdourWidgets::TearOff::TearOff
TearOff(Gtk::Widget &contents, bool allow_resize=false)
ArdourWidgets::TearOff::set_state
void set_state(const XMLNode &)
ArdourWidgets::TearOff::close_event_box
Gtk::EventBox close_event_box
Definition:
tearoff.h:66
ArdourWidgets::TearOff::drag_x
double drag_x
Definition:
tearoff.h:67
ArdourWidgets::TearOff::_can_be_torn_off
bool _can_be_torn_off
Definition:
tearoff.h:72
ArdourWidgets::TearOff::window_box
Gtk::HBox window_box
Definition:
tearoff.h:64
ArdourWidgets::TearOff::~TearOff
virtual ~TearOff()
ArdourWidgets::TearOff::tearoff_arrow
Gtk::Arrow tearoff_arrow
Definition:
tearoff.h:62
ArdourWidgets::TearOff::visible
bool visible() const
Definition:
tearoff.h:43
ArdourWidgets::TearOff::drag_y
double drag_y
Definition:
tearoff.h:68
ArdourWidgets::TearOff::close_click
gint close_click(GdkEventButton *)
ArdourWidgets::TearOff::tearoff_event_box
Gtk::EventBox tearoff_event_box
Definition:
tearoff.h:65
ArdourWidgets::TearOff::close_arrow
Gtk::Arrow close_arrow
Definition:
tearoff.h:63
ArdourWidgets::TearOff::own_window_configured
bool own_window_configured(GdkEventConfigure *)
ArdourWidgets::TearOff::Visible
sigc::signal< void > Visible
Definition:
tearoff.h:47
ArdourWidgets::TearOff::set_visible
void set_visible(bool yn, bool force=false)
ArdourWidgets::TearOff::window_delete_event
gint window_delete_event(GdkEventAny *)
ArdourWidgets::TearOff::dragging
bool dragging
Definition:
tearoff.h:69
ArdourWidgets::TearOff::add_state
void add_state(XMLNode &) const
ArdourWidgets::TearOff::_torn
bool _torn
Definition:
tearoff.h:71
ArdourWidgets::TearOff::window_button_press
gint window_button_press(GdkEventButton *)
ArdourWidgets::TearOff::Detach
sigc::signal< void > Detach
Definition:
tearoff.h:45
ArdourWidgets::TearOff::own_window_realized
void own_window_realized()
ArdourWidgets::TearOff::can_be_torn_off
bool can_be_torn_off() const
Definition:
tearoff.h:42
ArdourWidgets::TearOff::contents
Gtk::Widget & contents
Definition:
tearoff.h:60
ArdourWidgets::TearOff::set_can_be_torn_off
void set_can_be_torn_off(bool)
ArdourWidgets::TearOff::_visible
bool _visible
Definition:
tearoff.h:70
ArdourWidgets::TearOff::window_button_release
gint window_button_release(GdkEventButton *)
ArdourWidgets::TearOff::own_window_width
int own_window_width
Definition:
tearoff.h:73
ArdourWidgets::TearOff::window_motion
gint window_motion(GdkEventMotion *)
ArdourWidgets::TearOff::torn_off
bool torn_off() const
ArdourWidgets::TearOff::own_window_ypos
int own_window_ypos
Definition:
tearoff.h:76
ArdourWidgets::TearOff::own_window_height
int own_window_height
Definition:
tearoff.h:74
ArdourWidgets::TearOff::tear_it_off
void tear_it_off()
ArdourWidgets::TearOff::Attach
sigc::signal< void > Attach
Definition:
tearoff.h:46
ArdourWidgets::TearOff::own_window_xpos
int own_window_xpos
Definition:
tearoff.h:75
ArdourWidgets::TearOff::put_it_back
void put_it_back()
ArdourWidgets::TearOff::hide_visible
void hide_visible()
ArdourWidgets::TearOff::Hidden
sigc::signal< void > Hidden
Definition:
tearoff.h:48
ArdourWidgets::TearOff::tearoff_click
gint tearoff_click(GdkEventButton *)
ArdourWidgets::TearOff::tearoff_window
Gtk::Window & tearoff_window()
Definition:
tearoff.h:50
Gtk::Arrow
Definition:
tk/ytkmm/ytkmm/gtkmm/arrow.h:59
Gtk::EventBox
Definition:
eventbox.h:59
Gtk::HBox
Definition:
tk/ytkmm/ytkmm/gtkmm/box.h:588
Gtk::Widget
Definition:
tk/ytkmm/ytkmm/gtkmm/widget.h:336
Gtk::Window
Definition:
ytkmm/ytkmm/gtkmm/window.h:159
XMLNode
Definition:
xml++.h:114
eventbox.h
ARDOUR::Properties::contents
PBD::PropertyDescriptor< bool > contents
ArdourWidgets
Definition:
ardour_ui.h:192
_GdkEventAny
Definition:
gdkevents.h:274
_GdkEventButton
Definition:
gdkevents.h:321
_GdkEventConfigure
Definition:
gdkevents.h:408
_GdkEventMotion
Definition:
gdkevents.h:306
arrow.h
box.h
visibility.h
LIBWIDGETS_API
#define LIBWIDGETS_API
Definition:
widgets/widgets/visibility.h:39
window.h
libs
widgets
widgets
tearoff.h
Generated on Mon Nov 11 2024 08:49:07 for Ardour by
1.9.1