table.foreach (sigc::mem_fun (table, &Gtk::Table::remove));
widget_map.clear();
/* Calculate table dimensions */
table.foreach (sigc::mem_fun (table, &Gtk::Table::remove));
widget_map.clear();
/* Calculate table dimensions */
if (graph->channel_configs.size() > max_width) {
max_width = graph->channel_configs.size();
max_level = ChannelConfigs;
}
if (graph->channel_configs.size() > max_width) {
max_width = graph->channel_configs.size();
max_level = ChannelConfigs;
}
for (list<ExportProfileManager::TimespanNodePtr>::const_iterator it = graph->timespans.begin(); it != graph->timespans.end(); ++it) {
draw_timespan (*it, get_bounds (it->get(), Timespans, max_level));
}
for (list<ExportProfileManager::TimespanNodePtr>::const_iterator it = graph->timespans.begin(); it != graph->timespans.end(); ++it) {
draw_timespan (*it, get_bounds (it->get(), Timespans, max_level));
}
for (list<ExportProfileManager::ChannelConfigNodePtr>::const_iterator it = graph->channel_configs.begin(); it != graph->channel_configs.end(); ++it) {
draw_channel_config (*it, get_bounds (it->get(), ChannelConfigs, max_level));
}
for (list<ExportProfileManager::ChannelConfigNodePtr>::const_iterator it = graph->channel_configs.begin(); it != graph->channel_configs.end(); ++it) {
draw_channel_config (*it, get_bounds (it->get(), ChannelConfigs, max_level));
}
for (list<ExportProfileManager::FormatNodePtr>::const_iterator it = graph->formats.begin(); it != graph->formats.end(); ++it) {
draw_format (*it, get_bounds (it->get(), Formats, max_level));
}
for (list<ExportProfileManager::FormatNodePtr>::const_iterator it = graph->formats.begin(); it != graph->formats.end(); ++it) {
draw_format (*it, get_bounds (it->get(), Formats, max_level));
}
for (list<ExportProfileManager::FilenameNodePtr>::const_iterator it = graph->filenames.begin(); it != graph->filenames.end(); ++it) {
draw_filename (*it, get_bounds (it->get(), Filenames, max_level));
}
for (list<ExportProfileManager::FilenameNodePtr>::const_iterator it = graph->filenames.begin(); it != graph->filenames.end(); ++it) {
draw_filename (*it, get_bounds (it->get(), Filenames, max_level));
}
bool (ExportProfileManager::GraphNode::*relation_func) (ExportProfileManager::GraphNode const *) const;
if (max_level < current_level) {
std::cout << "using 'is_ancestor_of'" << std::endl;
bool (ExportProfileManager::GraphNode::*relation_func) (ExportProfileManager::GraphNode const *) const;
if (max_level < current_level) {
std::cout << "using 'is_ancestor_of'" << std::endl;
std::cout << "using 'equals'" << std::endl;
relation_func = &ExportProfileManager::GraphNode::equals;
}
std::cout << "using 'equals'" << std::endl;
relation_func = &ExportProfileManager::GraphNode::equals;
}
case ChannelConfigs:
for (list<ExportProfileManager::ChannelConfigNodePtr>::const_iterator it = graph->channel_configs.begin(); it != graph->channel_configs.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
case ChannelConfigs:
for (list<ExportProfileManager::ChannelConfigNodePtr>::const_iterator it = graph->channel_configs.begin(); it != graph->channel_configs.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
case Formats:
for (list<ExportProfileManager::FormatNodePtr>::const_iterator it = graph->formats.begin(); it != graph->formats.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
case Formats:
for (list<ExportProfileManager::FormatNodePtr>::const_iterator it = graph->formats.begin(); it != graph->formats.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
case Filenames:
for (list<ExportProfileManager::FilenameNodePtr>::const_iterator it = graph->filenames.begin(); it != graph->filenames.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
case Filenames:
for (list<ExportProfileManager::FilenameNodePtr>::const_iterator it = graph->filenames.begin(); it != graph->filenames.end(); ++it) {
if (CALL_MEMBER_FN(**it, relation_func) (node)) {
{
WidgetMap::iterator it = widget_map.find (position);
if (it != widget_map.end()) { return it->second; }
{
WidgetMap::iterator it = widget_map.find (position);
if (it != widget_map.end()) { return it->second; }
boost::shared_ptr<Gtk::HBox> widget = widget_map.insert (WidgetPair (position, boost::shared_ptr<Gtk::HBox> (new Gtk::HBox ()))).first->second;
table.attach (*widget, position.left, position.right, position.row - 1, position.row);
boost::shared_ptr<Gtk::HBox> widget = widget_map.insert (WidgetPair (position, boost::shared_ptr<Gtk::HBox> (new Gtk::HBox ()))).first->second;
table.attach (*widget, position.left, position.right, position.row - 1, position.row);
-ExportMultiplicator::ButtonWidget::ButtonWidget (Glib::ustring name, boost::shared_ptr<ExportProfileManager> m, ExportProfileManager::GraphNode * node) :
+ExportMultiplicator::ButtonWidget::ButtonWidget (std::string name, boost::shared_ptr<ExportProfileManager> m, ExportProfileManager::GraphNode * node) :
menu_actions = Gtk::ActionGroup::create();
menu_actions->add (Gtk::Action::create ("Split", _("_Split here")), sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::split));
menu_actions->add (Gtk::Action::create ("Remove", _("_Remove")), sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::remove));
menu_actions = Gtk::ActionGroup::create();
menu_actions->add (Gtk::Action::create ("Split", _("_Split here")), sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::split));
menu_actions->add (Gtk::Action::create ("Remove", _("_Remove")), sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::remove));
add_events (Gdk::BUTTON_PRESS_MASK);
signal_button_press_event ().connect (sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::on_button_press_event));
add_events (Gdk::BUTTON_PRESS_MASK);
signal_button_press_event ().connect (sigc::mem_fun (*this, &ExportMultiplicator::ButtonWidget::on_button_press_event));
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#0000"));
set_border_width (1);
vbox.pack_start (label, true, true, 4);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#0000"));
set_border_width (1);
vbox.pack_start (label, true, true, 4);
if(event->type != GDK_BUTTON_PRESS) { return false; }
if (event->button == 1) {
node->select (!node->selected ());
if(event->type != GDK_BUTTON_PRESS) { return false; }
if (event->button == 1) {
node->select (!node->selected ());
if (node->selected ()) {
unset_bg (Gtk::STATE_NORMAL);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#194756"));
if (node->selected ()) {
unset_bg (Gtk::STATE_NORMAL);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#194756"));
unset_bg (Gtk::STATE_NORMAL);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#0000"));
}
unset_bg (Gtk::STATE_NORMAL);
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#0000"));
}