1 /* This file is not used at the moment. It includes code related to export a
2 * multiplication graph system that can be used together with the code in
3 * libs/ardour/export_multiplication.cc and libs/ardour/ardour/export_multiplication.h
4 * - Sakari Bergen 6.8.2008 -
8 Copyright (C) 2008 Paul Davis
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #ifndef __export_multiplicator_h__
28 #define __export_multiplicator_h__
33 #include "ardour/export_profile_manager.h"
36 #include <boost/shared_ptr.hpp>
38 using ARDOUR::ExportProfileManager
;
40 class ExportMultiplicator
: public Gtk::EventBox
{
43 ExportMultiplicator ();
44 ~ExportMultiplicator ();
46 void set_manager (boost::shared_ptr
<ExportProfileManager
> _manager
);
50 boost::shared_ptr
<ExportProfileManager
> manager
;
51 ExportProfileManager::MultiplicationGraph
const * graph
;
67 std::pair
<uint32_t, uint32_t> get_bounds (ExportProfileManager::GraphNode
* node
, GraphLevel current_level
, GraphLevel max_level
) const;
69 void draw_timespan (ExportProfileManager::TimespanNodePtr node
, std::pair
<uint32_t, uint32_t> bounds
);
70 void draw_channel_config (ExportProfileManager::ChannelConfigNodePtr node
, std::pair
<uint32_t, uint32_t> bounds
);
71 void draw_format (ExportProfileManager::FormatNodePtr node
, std::pair
<uint32_t, uint32_t> bounds
);
72 void draw_filename (ExportProfileManager::FilenameNodePtr node
, std::pair
<uint32_t, uint32_t> bounds
);
74 struct TablePosition
{
79 TablePosition (uint32_t left
, uint32_t right
, uint32_t row
) :
80 left (left
), right (right
), row (row
) {}
82 bool operator== (TablePosition
const & other
) const { return (row
== other
.row
&& left
== other
.left
&& right
== other
.right
); }
83 bool operator< (TablePosition
const & other
) const { return (row
< other
.row
|| left
< other
.left
|| right
< other
.right
); }
86 typedef std::map
<TablePosition
, boost::shared_ptr
<Gtk::HBox
> > WidgetMap
;
87 typedef std::pair
<TablePosition
, boost::shared_ptr
<Gtk::HBox
> > WidgetPair
;
89 boost::shared_ptr
<Gtk::HBox
> get_hbox (TablePosition position
);
94 class ButtonWidget
: public Gtk::EventBox
{
96 ButtonWidget (std::string name
, boost::shared_ptr
<ExportProfileManager
> m
, ExportProfileManager::GraphNode
* node
);
103 bool on_button_press_event (GdkEventButton
* event
);
108 boost::shared_ptr
<ExportProfileManager
> manager
;
109 ExportProfileManager::GraphNode
* node
;
110 float split_position
;
114 Glib::RefPtr
<Gtk::ActionGroup
> menu_actions
;
115 Glib::RefPtr
<Gtk::UIManager
> ui_manager
;
120 #endif /* __export_multiplicator_h__ */