[Summary] Progressing MASTER UI

This commit is contained in:
VKamyshniy 2014-07-15 01:01:45 +03:00
parent 44dcd48be4
commit b3efab32f4
7 changed files with 292 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,124 @@
/*
Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <utility>
#include <sigc++/bind.h>
#include "pbd/error.h"
#include "pbd/stl_delete.h"
#include "pbd/whitespace.h"
#include "pbd/memento_command.h"
#include "pbd/enumwriter.h"
#include "pbd/stateful_diff_command.h"
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/selector.h>
#include <gtkmm2ext/bindable_button.h>
#include <gtkmm2ext/utils.h>
#include "ardour/amp.h"
#include "ardour/meter.h"
#include "ardour/event_type_map.h"
#include "ardour/processor.h"
#include "ardour/profile.h"
#include "ardour/route_group.h"
#include "ardour/session.h"
#include "ardour/session_playlists.h"
#include "ardour/audio_track.h"
#include "evoral/Parameter.hpp"
#include "canvas/debug.h"
#include "ardour_ui.h"
#include "ardour_button.h"
#include "debug.h"
#include "global_signals.h"
#include "master_bus_ui.h"
#include "enums.h"
#include "gui_thread.h"
#include "keyboard.h"
#include "playlist_selector.h"
#include "point_selection.h"
#include "prompter.h"
#include "public_editor.h"
#include "region_view.h"
#include "rgb_macros.h"
#include "selection.h"
#include "streamview.h"
#include "utils.h"
#include "route_group_menu.h"
#include "ardour/track.h"
#include "i18n.h"
#include "dbg_msg.h"
using namespace ARDOUR;
using namespace PBD;
using namespace Gtkmm2ext;
using namespace Gtk;
using namespace Editing;
using namespace std;
using std::list;
MasterBusUI::MasterBusUI (PublicEditor& ed,
Session* sess)
: AxisView (sess)
, RouteUI (sess, "master_ui.xml")
, gain_meter_home (get_box ("gain_meter_home"))
, gm (sess, "master_ui_gain_meter.xml")
{
LevelMeterHBox& level_meter = gm.get_level_meter();
if (level_meter.get_parent ()) {
level_meter.get_parent ()->remove (level_meter);
}
gain_meter_home.pack_start(level_meter, true, true);
}
void
MasterBusUI::set_route (boost::shared_ptr<Route> rt)
{
RouteUI::set_route (rt);
}
MasterBusUI::~MasterBusUI ()
{
}
void MasterBusUI::set_button_names ()
{
}
std::string
MasterBusUI::state_id () const
{
return string_compose ("master %1", _route->id().to_s());
}

View file

@ -0,0 +1,85 @@
/*
Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __tracks_master_bus_ui_h__
#define __tracks_master_bus_ui_h__
#include <list>
#include <set>
#include <gtkmm/table.h>
#include <gtkmm/button.h>
#include <gtkmm/box.h>
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
#include <gtkmm/radiomenuitem.h>
#include <gtkmm/checkmenuitem.h>
#include <gtkmm/adjustment.h>
#include <gtkmm2ext/selector.h>
#include <gtkmm2ext/slider_controller.h>
#include "ardour/playlist.h"
#include "ardour/types.h"
#include "route_ui.h"
#include "enums.h"
#include "gain_meter.h"
namespace ARDOUR {
class Session;
class Region;
class RouteGroup;
class IOProcessor;
class Processor;
class Location;
class Playlist;
}
class PublicEditor;
class RegionView;
class StreamView;
class Selection;
class RegionSelection;
class Selectable;
class AutomationTimeAxisView;
class AutomationLine;
class ProcessorAutomationLine;
class TimeSelection;
class RouteGroupMenu;
class MasterBusUI : public RouteUI
{
public:
MasterBusUI (PublicEditor&,
ARDOUR::Session*);
virtual ~MasterBusUI ();
void set_route (boost::shared_ptr<ARDOUR::Route>);
virtual void set_button_names ();
virtual std::string state_id () const;
private:
Gtk::Box& gain_meter_home;
GainMeter gm;
};
#endif /* __tracks_master_bus_ui_h__ */

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<RouteUI bgnormal="#383838" bgactive="#6A6A6A">
<HBox>
<EventBox bgnormal="#000000">
<VBox spacing="1" borderwidth="1">
<iconbutton id="master_mute_button"
width="47"
height="27"
normalicon="master_mute"
activeicon="master_mute_active"
prelighticon="master_mute_prelight"/>
<iconbutton id="clear_solo_button"
width="47"
height="27"
normalicon="master_mute"
activeicon="master_mute_active"
prelighticon="master_mute_prelight"/>
<iconbutton id="global_rec_button"
width="47"
height="27"
normalicon="master_mute"
activeicon="master_mute_active"
prelighticon="master_mute_prelight"/>
</VBox>
</EventBox>
<VBox id="gain_meter_home"/>
<VBox visible="false" noshowall="true">
<button id="rec_enable_button"/>
<button id="solo_button"/>
<button id="mute_button"/>
<button id="monitor_input_button"/>
<Button id="show_sends_button"/>
<Button id="monitor_disk_button"/>
<Button id="comment_button"/>
<Button id="midi_input_enable_button"/>
<Button id="group_button" text="Grp"/>
<Button id="route_group_button"/>
<Button id="automation_button"/>
</VBox>
</HBox>
</RouteUI>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<GainSlider>
<Adjustment id="gain_adjustment"
minvalue="0"
maxvalue="1"/>
<HBox width="10">
<HBox id="level_meter_home" width="30">
<EventBox bgnormal="#ffff00" width="1" box.expand="true" box.fill="true"/>
</HBox>
<Fader id="gain_slider"
adjustment="gain_adjustment"
facesource="slider_controller_fader.png"
handlesource="slider_controller_fader_handle.png"
activehandlesource="slider_controller_fader_handle.png"
minposx="10"
minposy="187"
maxposx="10"
maxposy="0"/>
<Button id="peak_display_button"
x="0" y="0"
width="97" height="18"
bgnormal="#B1B1B1"
bgactive="#D83838"
fgnormal="#000000"
fgactive="#000000"
bghover="#C47474"
bordercolor="#C9C9C9"
borderwidth="1 1 0 0"/>
<EventBox id="gain_display_home"/>
<Button id="gain_display_button"
x="0" y="0"
width="97" height="18"
bgnormal="#B1B1B1"
bgactive="#D83838"
fgnormal="#000000"
fgactive="#000000"
bghover="#C47474"
bordercolor="#C9C9C9"
borderwidth="1 1 0 0"/>
</HBox>
</GainSlider>