summaryrefslogtreecommitdiff
path: root/libs/ardour/session_command.cc
diff options
context:
space:
mode:
authorHans Fugal <hans@fugal.net>2006-07-28 23:38:30 +0000
committerHans Fugal <hans@fugal.net>2006-07-28 23:38:30 +0000
commit277b771a978b10580a46e19f19ae0cf2d8819f46 (patch)
treee41ff6ba913d42a6b8ef5da4037dbeffda08910a /libs/ardour/session_command.cc
parent6aeb09062f4b4ff8e684f6f5ba80d47cb69665d5 (diff)
r209@gandalf: fugalh | 2006-07-28 17:38:21 -0600
global {solo,mute,record enable,metering} state commands. Same philosophy as the MementoCommand but using only the appropriate state and not the entire state of the session. git-svn-id: svn://localhost/ardour2/branches/undo@718 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_command.cc')
-rw-r--r--libs/ardour/session_command.cc86
1 files changed, 86 insertions, 0 deletions
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc
new file mode 100644
index 0000000000..8693a9adc4
--- /dev/null
+++ b/libs/ardour/session_command.cc
@@ -0,0 +1,86 @@
+#include <ardour/session.h>
+
+// solo
+Session::GlobalSoloStateCommand::GlobalSoloStateCommand(void *src) : src(src)
+{
+ after = before = get_global_route_boolean(&Route::soloed);
+}
+void Session::GlobalSoloStateCommand::mark()
+{
+ after = get_global_route_boolean(&Route::soloed);
+}
+void operator()()
+{
+ set_global_solo(after, src);
+}
+void undo()
+{
+ set_global_solo(before, src);
+}
+XMLNode &serialize()
+{
+}
+
+// mute
+Session::GlobalMuteStateCommand::GlobalMuteStateCommand(void *src) : src(src)
+{
+ after = before = get_global_route_boolean(&Route::muted);
+}
+void Session::GlobalMuteStateCommand::mark()
+{
+ after = get_global_route_boolean(&Route::muted);
+}
+void operator()()
+{
+ set_global_mute(after, src);
+}
+void undo()
+{
+ set_global_mute(before, src);
+}
+XMLNode &serialize()
+{
+}
+
+// record enable
+Session::GlobalRecordEnableStateCommand::GlobalRecordEnableStateCommand(void *src) : src(src)
+{
+ after = before = get_global_route_boolean(&Route::record_enabled);
+}
+void Session::GlobalRecordEnableStateCommand::mark()
+{
+ after = get_global_route_boolean(&Route::record_enabled);
+}
+void operator()()
+{
+ set_global_record_enable(after, src);
+}
+void undo()
+{
+ set_global_record_enable(before, src);
+}
+XMLNode &serialize()
+{
+}
+
+// metering
+Session::GlobalMeteringStateCommand::GlobalMeteringStateCommand(void *src) : src(src)
+{
+ after = before = get_global_route_metering();
+}
+void Session::GlobalMeteringStateCommand::mark()
+{
+ after = get_global_route_metering();
+}
+void operator()()
+{
+ set_global_route_metering(after, src);
+}
+void undo()
+{
+ set_global_route_metering(before, src);
+}
+XMLNode &serialize()
+{
+}
+