Ardour
9.0-pre0-582-g084a23a80d
ardour_dropdown.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014 Paul Davis <paul@linuxaudiosystems.com>
3
* Copyright (C) 2017-2018 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_ARDOUR_DROPDOWN_H_
21
#define _WIDGETS_ARDOUR_DROPDOWN_H_
22
23
#include <list>
24
#include <stdint.h>
25
26
#include <
gtkmm/action.h
>
27
#include <
gtkmm/menu.h
>
28
#include <
gtkmm/menuitem.h
>
29
30
#include "
widgets/ardour_button.h
"
31
#include "
widgets/visibility.h
"
32
33
namespace
ArdourWidgets
{
34
35
class
LIBWIDGETS_API
ArdourDropdown
:
public
ArdourButton
36
{
37
public
:
38
39
ArdourDropdown
(
Element
e = default_elements);
40
virtual
~ArdourDropdown
();
41
42
bool
on_button_press_event
(
GdkEventButton
*);
43
bool
on_scroll_event
(
GdkEventScroll
*);
44
void
menu_size_request
(
Gtk::Requisition
*);
45
46
void
clear_items
();
47
void
AddMenuElem
(
Gtk::Menu_Helpers::Element
e);
48
49
void
disable_scrolling
();
50
51
Gtk::Menu_Helpers::MenuList
&
items
() {
return
_menu.items (); }
52
53
void
append_text_item
(std::string
const
& text);
54
void
set_active
(std::string
const
& text);
55
56
protected
:
57
void
default_text_handler
(std::string
const
&);
58
59
private
:
60
Gtk::Menu
_menu
;
61
62
bool
_scrolling_disabled
;
63
};
64
65
}
/* end namespace */
66
67
#endif
action.h
ardour_button.h
ArdourWidgets::ArdourButton
Definition:
ardour_button.h:39
ArdourWidgets::ArdourButton::Element
Element
Definition:
ardour_button.h:41
ArdourWidgets::ArdourDropdown
Definition:
ardour_dropdown.h:36
ArdourWidgets::ArdourDropdown::AddMenuElem
void AddMenuElem(Gtk::Menu_Helpers::Element e)
ArdourWidgets::ArdourDropdown::~ArdourDropdown
virtual ~ArdourDropdown()
ArdourWidgets::ArdourDropdown::disable_scrolling
void disable_scrolling()
ArdourWidgets::ArdourDropdown::default_text_handler
void default_text_handler(std::string const &)
ArdourWidgets::ArdourDropdown::append_text_item
void append_text_item(std::string const &text)
ArdourWidgets::ArdourDropdown::_menu
Gtk::Menu _menu
Definition:
ardour_dropdown.h:60
ArdourWidgets::ArdourDropdown::_scrolling_disabled
bool _scrolling_disabled
Definition:
ardour_dropdown.h:62
ArdourWidgets::ArdourDropdown::on_button_press_event
bool on_button_press_event(GdkEventButton *)
This is a default handler for the signal signal_button_press_event().
ArdourWidgets::ArdourDropdown::menu_size_request
void menu_size_request(Gtk::Requisition *)
ArdourWidgets::ArdourDropdown::items
Gtk::Menu_Helpers::MenuList & items()
Definition:
ardour_dropdown.h:51
ArdourWidgets::ArdourDropdown::clear_items
void clear_items()
ArdourWidgets::ArdourDropdown::set_active
void set_active(std::string const &text)
ArdourWidgets::ArdourDropdown::on_scroll_event
bool on_scroll_event(GdkEventScroll *)
This is a default handler for the signal signal_scroll_event().
ArdourWidgets::ArdourDropdown::ArdourDropdown
ArdourDropdown(Element e=default_elements)
Gtk::Menu_Helpers::Element
Definition:
tk/ytkmm/ytkmm/gtkmm/menu_elems.h:46
Gtk::Menu_Helpers::MenuList
Definition:
menushell.h:60
Gtk::Menu
Definition:
tk/ytkmm/ytkmm/gtkmm/menu.h:59
menuitem.h
ArdourWidgets
Definition:
ardour_ui.h:192
_GdkEventButton
Definition:
gdkevents.h:321
_GdkEventScroll
Definition:
gdkevents.h:351
_GtkRequisition
Definition:
gtkwidget.h:520
menu.h
visibility.h
LIBWIDGETS_API
#define LIBWIDGETS_API
Definition:
widgets/widgets/visibility.h:39
libs
widgets
widgets
ardour_dropdown.h
Generated on Wed Dec 25 2024 05:43:55 for Ardour by
1.9.1