mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-29 09:57:44 +01:00
[Summary] Making namespace WavesUI a class.
[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 466991]
This commit is contained in:
parent
250fd20658
commit
706f89993a
21 changed files with 205 additions and 264 deletions
|
|
@ -24,7 +24,8 @@ const char * DeviceConnectionControl::id_name = "_id_name";
|
|||
|
||||
DeviceConnectionControl::DeviceConnectionControl (const std::string& device_capture_name, bool active, uint16_t capture_number, const std::string& track_name)
|
||||
|
||||
: Gtk::Layout()
|
||||
: Gtk::Layout(),
|
||||
WavesUI("device_capture_control.xml", *this)
|
||||
, _active(false)
|
||||
, _active_on_button (NULL)
|
||||
, _active_off_button (NULL)
|
||||
|
|
@ -32,18 +33,22 @@ DeviceConnectionControl::DeviceConnectionControl (const std::string& device_capt
|
|||
, _track_name_label (NULL)
|
||||
, _number_label (NULL)
|
||||
{
|
||||
build_layout("device_capture_control.xml");
|
||||
_active_on_button = &_children.get_waves_button ("capture_on_button");
|
||||
_active_off_button = &_children.get_waves_button ("capture_off_button");
|
||||
_name_label = &_children.get_label ("capture_name_label");
|
||||
_number_label = &_children.get_label ("capture_number_label");
|
||||
_track_name_label = &_children.get_label ("track_name_label");
|
||||
XMLNode* root = xml_tree()->root();
|
||||
WavesUI::set_attributes(*this, *root, XMLNodeMap());
|
||||
|
||||
_active_on_button = &get_waves_button ("capture_on_button");
|
||||
_active_off_button = &get_waves_button ("capture_off_button");
|
||||
_name_label = &get_label ("capture_name_label");
|
||||
_number_label = &get_label ("capture_number_label");
|
||||
_track_name_label = &get_label ("track_name_label");
|
||||
|
||||
init(device_capture_name, active, capture_number, track_name);
|
||||
}
|
||||
|
||||
DeviceConnectionControl::DeviceConnectionControl (const std::string& device_playback_name, bool active, uint16_t playback_number)
|
||||
|
||||
: Gtk::Layout()
|
||||
, WavesUI("device_playback_control.xml", *this)
|
||||
, _active(false)
|
||||
, _active_on_button (NULL)
|
||||
, _active_off_button (NULL)
|
||||
|
|
@ -51,11 +56,14 @@ DeviceConnectionControl::DeviceConnectionControl (const std::string& device_play
|
|||
, _track_name_label (NULL)
|
||||
, _number_label (NULL)
|
||||
{
|
||||
build_layout("device_playback_control.xml");
|
||||
_active_on_button = &_children.get_waves_button ("playback_on_button");
|
||||
_active_off_button = &_children.get_waves_button ("playback_off_button");
|
||||
_name_label = &_children.get_label ("playback_name_label");
|
||||
_number_label = &_children.get_label ("playback_number_label");
|
||||
XMLNode* root = xml_tree()->root();
|
||||
WavesUI::set_attributes(*this, *root, XMLNodeMap());
|
||||
|
||||
_active_on_button = &get_waves_button ("playback_on_button");
|
||||
_active_off_button = &get_waves_button ("playback_off_button");
|
||||
_name_label = &get_label ("playback_name_label");
|
||||
_number_label = &get_label ("playback_number_label");
|
||||
|
||||
init(device_playback_name, active, playback_number);
|
||||
}
|
||||
|
||||
|
|
@ -85,22 +93,6 @@ void DeviceConnectionControl::init(const std::string& name, bool active, uint16_
|
|||
set_active(active);
|
||||
}
|
||||
|
||||
bool
|
||||
DeviceConnectionControl::build_layout (const std::string& file_name)
|
||||
{
|
||||
const XMLTree* layout = WavesUI::load_layout(file_name);
|
||||
if (layout == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
XMLNode* root = layout->root();
|
||||
if ((root == NULL) || strcasecmp(root->name().c_str(), "layout")) {
|
||||
return false;
|
||||
}
|
||||
WavesUI::set_attributes(*this, *root, XMLNodeMap());
|
||||
WavesUI::create_ui(layout, *this, _children);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
DeviceConnectionControl::set_number (uint16_t number)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue