Ardour
9.0-pre0-582-g084a23a80d
search_path_option.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010-2012 Paul Davis <paul@linuxaudiosystems.com>
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
*/
18
19
#pragma once
20
21
#include <string>
22
23
#include <
gtkmm/filechooserbutton.h
>
24
#include <
gtkmm/entry.h
>
25
#include <
gtkmm/button.h
>
26
#include <
gtkmm/box.h
>
27
28
#include "
option_editor.h
"
29
30
class
SearchPathOption
:
public
Option
31
{
32
public
:
33
SearchPathOption
(
const
std::string& pathname,
const
std::string& label,
34
const
std::string& default_path,
35
sigc::slot<std::string>, sigc::slot<bool, std::string>);
36
~SearchPathOption
();
37
38
void
set_state_from_config
();
39
void
add_to_page
(
OptionEditorPage
*);
40
void
clear
();
41
42
Gtk::Widget
&
tip_widget
() {
return
add_chooser
; }
43
44
protected
:
45
sigc::slot<std::string>
_get
;
46
sigc::slot<bool, std::string>
_set
;
47
48
struct
PathEntry
49
{
50
PathEntry
(
const
std::string&
path
,
bool
removable=
true
);
51
52
Gtk::Entry
entry
;
53
Gtk::Button
remove_button
;
54
Gtk::HBox
box
;
55
56
std::string
path
;
57
};
58
59
std::list<PathEntry*>
paths
;
60
Gtk::FileChooserButton
add_chooser
;
61
Gtk::VBox
vbox
;
62
Gtk::VBox
path_box
;
63
Gtk::Label
session_label
;
64
65
void
add_path
(
const
std::string& path,
bool
removable=
true
);
66
void
remove_path
(
PathEntry
*);
67
void
changed
();
68
void
path_chosen
();
69
};
70
Gtk::Button
Definition:
tk/ytkmm/ytkmm/gtkmm/button.h:60
Gtk::Entry
Definition:
entry.h:101
Gtk::FileChooserButton
Definition:
filechooserbutton.h:64
Gtk::HBox
Definition:
tk/ytkmm/ytkmm/gtkmm/box.h:588
Gtk::Label
Definition:
label.h:55
Gtk::VBox
Definition:
tk/ytkmm/ytkmm/gtkmm/box.h:505
Gtk::Widget
Definition:
tk/ytkmm/ytkmm/gtkmm/widget.h:336
OptionEditorPage
Definition:
option_editor.h:678
Option
Definition:
option_editor.h:174
SearchPathOption
Definition:
search_path_option.h:31
SearchPathOption::add_to_page
void add_to_page(OptionEditorPage *)
SearchPathOption::tip_widget
Gtk::Widget & tip_widget()
Definition:
search_path_option.h:42
SearchPathOption::add_chooser
Gtk::FileChooserButton add_chooser
Definition:
search_path_option.h:60
SearchPathOption::clear
void clear()
SearchPathOption::_set
sigc::slot< bool, std::string > _set
slot to set the configuration variable's value
Definition:
search_path_option.h:46
SearchPathOption::session_label
Gtk::Label session_label
Definition:
search_path_option.h:63
SearchPathOption::SearchPathOption
SearchPathOption(const std::string &pathname, const std::string &label, const std::string &default_path, sigc::slot< std::string >, sigc::slot< bool, std::string >)
SearchPathOption::path_box
Gtk::VBox path_box
Definition:
search_path_option.h:62
SearchPathOption::remove_path
void remove_path(PathEntry *)
SearchPathOption::paths
std::list< PathEntry * > paths
Definition:
search_path_option.h:59
SearchPathOption::path_chosen
void path_chosen()
SearchPathOption::changed
void changed()
SearchPathOption::add_path
void add_path(const std::string &path, bool removable=true)
SearchPathOption::~SearchPathOption
~SearchPathOption()
SearchPathOption::set_state_from_config
void set_state_from_config()
SearchPathOption::_get
sigc::slot< std::string > _get
slot to get the configuration variable's value
Definition:
search_path_option.h:45
SearchPathOption::vbox
Gtk::VBox vbox
Definition:
search_path_option.h:61
entry.h
filechooserbutton.h
option_editor.h
Base class for option editing dialog boxes.
SearchPathOption::PathEntry
Definition:
search_path_option.h:49
SearchPathOption::PathEntry::path
std::string path
Definition:
search_path_option.h:56
SearchPathOption::PathEntry::PathEntry
PathEntry(const std::string &path, bool removable=true)
SearchPathOption::PathEntry::entry
Gtk::Entry entry
Definition:
search_path_option.h:52
SearchPathOption::PathEntry::remove_button
Gtk::Button remove_button
Definition:
search_path_option.h:53
SearchPathOption::PathEntry::box
Gtk::HBox box
Definition:
search_path_option.h:54
box.h
button.h
gtk2_ardour
search_path_option.h
Generated on Wed Dec 25 2024 05:44:46 for Ardour by
1.9.1