Ardour
9.0-pre0-386-g96ef4d20f2
tabbable.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2015 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_TABBABLE_H_
21
#define _WIDGETS_TABBABLE_H_
22
23
#include <
gtkmm/bin.h
>
24
#include <
gtkmm/box.h
>
25
#include <
gtkmm/button.h
>
26
#include <
gtkmm/image.h
>
27
#include <
gtkmm/label.h
>
28
#include <
gtkmm/notebook.h
>
29
30
#include "
gtkmm2ext/window_proxy.h
"
31
#include "
widgets/visibility.h
"
32
33
namespace
Gtk
{
34
class
Window
;
35
class
Notebook;
36
}
37
38
namespace
Gtkmm2ext
{
39
class
VisibilityTracker;
40
}
41
42
namespace
ArdourWidgets
{
43
44
class
LIBWIDGETS_API
Tabbable
:
public
Gtkmm2ext::WindowProxy
45
{
46
public
:
47
Tabbable
(
Gtk::Widget
&,
const
std::string& user_visible_name, std::string
const
& untranslated_name,
bool
tabbed_by_default =
true
);
48
~Tabbable
();
49
50
void
add_to_notebook
(
Gtk::Notebook
& notebook);
51
void
make_visible
();
52
void
make_invisible
();
53
void
change_visibility
();
54
void
attach
();
55
void
detach
();
56
57
Gtk::Widget
&
contents
()
const
{
return
_contents; }
58
59
Gtk::Window
*
get
(
bool
create =
false
);
60
Gtk::Window
*
own_window
() {
return
get (
false
); }
61
virtual
Gtk::Window
*
use_own_window
(
bool
and_pack_it);
62
63
void
set_default_tabbed
(
bool
yn);
64
65
virtual
void
show_window
();
66
67
bool
window_visible
()
const
;
68
bool
tabbed
()
const
;
69
bool
tabbed_by_default
()
const
;
70
71
72
Gtk::Window
*
current_toplevel
()
const
;
73
74
Gtk::Notebook
*
tab_root_drop
();
75
76
int
set_state
(
const
XMLNode
&,
int
version);
77
XMLNode
&
get_state
()
const
;
78
79
static
std::string
xml_node_name
();
80
81
sigc::signal1<void,Tabbable&>
StateChange
;
82
83
protected
:
84
bool
delete_event_handler
(
GdkEventAny
*ev);
85
86
sigc::signal1<void, bool>
signal_tabbed_changed
;
87
88
private
:
89
Gtk::Widget
&
_contents
;
90
Gtk::Notebook
_own_notebook
;
91
Gtk::Notebook
*
_parent_notebook
;
92
bool
tab_requested_by_state
;
93
94
void
show_tab
();
95
void
hide_tab
();
96
bool
tab_close_clicked
(
GdkEventButton
*);
97
void
show_own_window
(
bool
and_pack_it);
98
void
window_mapped
();
99
void
window_unmapped
();
100
};
101
102
}
/* end namespace */
103
104
#endif
bin.h
ArdourWidgets::Tabbable
Definition:
tabbable.h:45
ArdourWidgets::Tabbable::change_visibility
void change_visibility()
ArdourWidgets::Tabbable::~Tabbable
~Tabbable()
ArdourWidgets::Tabbable::StateChange
sigc::signal1< void, Tabbable & > StateChange
Definition:
tabbable.h:81
ArdourWidgets::Tabbable::get
Gtk::Window * get(bool create=false)
ArdourWidgets::Tabbable::tabbed_by_default
bool tabbed_by_default() const
ArdourWidgets::Tabbable::contents
Gtk::Widget & contents() const
Definition:
tabbable.h:57
ArdourWidgets::Tabbable::hide_tab
void hide_tab()
ArdourWidgets::Tabbable::add_to_notebook
void add_to_notebook(Gtk::Notebook ¬ebook)
ArdourWidgets::Tabbable::tab_requested_by_state
bool tab_requested_by_state
Definition:
tabbable.h:92
ArdourWidgets::Tabbable::make_invisible
void make_invisible()
ArdourWidgets::Tabbable::set_state
int set_state(const XMLNode &, int version)
ArdourWidgets::Tabbable::tabbed
bool tabbed() const
ArdourWidgets::Tabbable::xml_node_name
static std::string xml_node_name()
ArdourWidgets::Tabbable::_parent_notebook
Gtk::Notebook * _parent_notebook
Definition:
tabbable.h:91
ArdourWidgets::Tabbable::make_visible
void make_visible()
ArdourWidgets::Tabbable::use_own_window
virtual Gtk::Window * use_own_window(bool and_pack_it)
ArdourWidgets::Tabbable::tab_close_clicked
bool tab_close_clicked(GdkEventButton *)
ArdourWidgets::Tabbable::own_window
Gtk::Window * own_window()
Definition:
tabbable.h:60
ArdourWidgets::Tabbable::window_unmapped
void window_unmapped()
ArdourWidgets::Tabbable::signal_tabbed_changed
sigc::signal1< void, bool > signal_tabbed_changed
Definition:
tabbable.h:86
ArdourWidgets::Tabbable::window_mapped
void window_mapped()
ArdourWidgets::Tabbable::delete_event_handler
bool delete_event_handler(GdkEventAny *ev)
ArdourWidgets::Tabbable::_own_notebook
Gtk::Notebook _own_notebook
Definition:
tabbable.h:90
ArdourWidgets::Tabbable::get_state
XMLNode & get_state() const
ArdourWidgets::Tabbable::current_toplevel
Gtk::Window * current_toplevel() const
ArdourWidgets::Tabbable::window_visible
bool window_visible() const
ArdourWidgets::Tabbable::_contents
Gtk::Widget & _contents
Definition:
tabbable.h:89
ArdourWidgets::Tabbable::detach
void detach()
ArdourWidgets::Tabbable::tab_root_drop
Gtk::Notebook * tab_root_drop()
ArdourWidgets::Tabbable::Tabbable
Tabbable(Gtk::Widget &, const std::string &user_visible_name, std::string const &untranslated_name, bool tabbed_by_default=true)
ArdourWidgets::Tabbable::show_window
virtual void show_window()
ArdourWidgets::Tabbable::show_tab
void show_tab()
ArdourWidgets::Tabbable::attach
void attach()
ArdourWidgets::Tabbable::show_own_window
void show_own_window(bool and_pack_it)
ArdourWidgets::Tabbable::set_default_tabbed
void set_default_tabbed(bool yn)
Gtk::Notebook
Definition:
notebook.h:362
Gtk::Widget
Definition:
tk/ytkmm/ytkmm/gtkmm/widget.h:336
Gtk::Window
Definition:
ytkmm/ytkmm/gtkmm/window.h:159
Gtkmm2ext::WindowProxy
Definition:
window_proxy.h:43
Window
Definition:
Window.h:41
XMLNode
Definition:
xml++.h:114
label.h
ArdourWidgets
Definition:
ardour_ui.h:191
Gtk
Definition:
ardour_ui.h:187
Gtkmm2ext
Definition:
editor.h:81
notebook.h
_GdkEventAny
Definition:
gdkevents.h:274
_GdkEventButton
Definition:
gdkevents.h:321
box.h
button.h
image.h
visibility.h
LIBWIDGETS_API
#define LIBWIDGETS_API
Definition:
widgets/widgets/visibility.h:39
window_proxy.h
libs
widgets
widgets
tabbable.h
Generated on Sun Nov 10 2024 05:34:31 for Ardour by
1.9.1