get_selection()->set_mode(Gtk::SELECTION_MULTIPLE);
//get_param_tree_view().get_selection()->set_mode(Gtk::SELECTION_MULTIPLE);
get_layer_tree_view().show();
- param_tree_view().show();
+ get_param_tree_view().show();
hbox->show();
Gtk::IconSize icon_size(Gtk::ICON_SIZE_SMALL_TOOLBAR);
{ // --- N A M E --------------------------------------------------------
- Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Param")) );
+ Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Name")) );
// Set up the icon cell-renderer
Gtk::CellRendererPixbuf* icon_cellrenderer = Gtk::manage( new Gtk::CellRendererPixbuf() );
column->set_resizable();
column->set_clickable();
- param_tree_view().append_column(*column);
+ get_param_tree_view().append_column(*column);
}
{ // --- V A L U E -----------------------------------------------------
- Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("ValueBase")) );
+ Gtk::TreeView::Column* column = Gtk::manage( new Gtk::TreeView::Column(_("Value")) );
// Set up the value cell-renderer
cellrenderer_value=LayerParamTreeStore::add_cell_renderer_value(column);
cellrenderer_value->signal_edited().connect(sigc::mem_fun(*this, &studio::LayerTree::on_edited_value));
cellrenderer_value->property_value()=synfig::ValueBase();
column->add_attribute(cellrenderer_value->property_param_desc(), param_model.param_desc);
- column->add_attribute(cellrenderer_value->property_inconsistant(),param_model.is_inconsistent);
+ column->add_attribute(cellrenderer_value->property_inconsistent(),param_model.is_inconsistent);
//cellrenderer_value->property_canvas()=canvas_interface->get_canvas(); // Is this line necessary?
cellrenderer_value->property_attributes()=attr_list;
// Finish setting up the column
- param_tree_view().append_column(*column);
+ get_param_tree_view().append_column(*column);
column->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE);
column->set_clickable();
column->set_min_width(120);
column->set_reorderable();
column->set_resizable();
column->set_min_width(200);
- //param_tree_view().append_column(*column);
+ //get_param_tree_view().append_column(*column);
}*/
// This makes things easier to read.
- param_tree_view().set_rules_hint();
+ get_param_tree_view().set_rules_hint();
// Make us more sensitive to several events
- param_tree_view().add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK|Gdk::POINTER_MOTION_MASK);
+ get_param_tree_view().add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK | Gdk::BUTTON2_MOTION_MASK|Gdk::POINTER_MOTION_MASK);
- param_tree_view().signal_event().connect(sigc::mem_fun(*this, &studio::LayerTree::on_param_tree_event));
- param_tree_view().show();
+ get_param_tree_view().signal_event().connect(sigc::mem_fun(*this, &studio::LayerTree::on_param_tree_event));
+ get_param_tree_view().show();
Gtk::ScrolledWindow *scroll = manage(new class Gtk::ScrolledWindow());
scroll->set_flags(Gtk::CAN_FOCUS);
scroll->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- //scroll->add(param_tree_view());
+ //scroll->add(get_param_tree_view());
scroll->set_shadow_type(Gtk::SHADOW_ETCHED_IN);
scroll->show();
layer_tree_store_->canvas_interface()->signal_time_changed().connect(
sigc::mem_fun(
- ¶m_tree_view(),
+ &get_param_tree_view(),
&Gtk::Widget::queue_draw
)
);
if(!param_tree_store_)
{
param_tree_store_=LayerParamTreeStore::create(layer_tree_store_->canvas_interface(), this);
- param_tree_view().set_model(param_tree_store_);
+ get_param_tree_view().set_model(param_tree_store_);
}
/* if(cellrenderer_time_track && layer_tree_store_ && layer_tree_store_->canvas_interface())
LayerTree::set_time_adjustment(Gtk::Adjustment &adjustment)
{
//cellrenderer_time_track->set_adjustment(adjustment);
- adjustment.signal_value_changed().connect(sigc::mem_fun(param_tree_view(),&Gtk::TreeView::queue_draw));
- adjustment.signal_changed().connect(sigc::mem_fun(param_tree_view(),&Gtk::TreeView::queue_draw));
+ adjustment.signal_value_changed().connect(sigc::mem_fun(get_param_tree_view(),&Gtk::TreeView::queue_draw));
+ adjustment.signal_changed().connect(sigc::mem_fun(get_param_tree_view(),&Gtk::TreeView::queue_draw));
}
void
button_duplicate->set_sensitive(true);
button_delete->set_sensitive(true);
- if(layer_list.size()==1 && (*layer_list.begin())->get_param("amount").is_valid()&& (*layer_list.begin())->get_param("amount").same_as(Real()))
+ if(layer_list.size()==1 && (*layer_list.begin())->get_param("amount").is_valid()&& (*layer_list.begin())->get_param("amount").same_type_as(Real()))
{
quick_layer=*layer_list.begin();
}
{
Gtk::TreePath path(path_string);
- const Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
+ const Gtk::TreeRow row = *(get_param_tree_view().get_model()->get_iter(path));
if(!row)
return;
row[param_model.value]=value;
{
Gtk::TreePath path(path_string);
- const Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
+ const Gtk::TreeRow row = *(get_param_tree_view().get_model()->get_iter(path));
if(!row)
return;
Gtk::TreeModel::Path path;
Gtk::TreeViewColumn *column;
int cell_x, cell_y;
- if(!param_tree_view().get_path_at_pos(
+ if(!get_param_tree_view().get_path_at_pos(
int(event->button.x),int(event->button.y), // x, y
path, // TreeModel::Path&
column, //TreeViewColumn*&
cell_x,cell_y //int&cell_x,int&cell_y
)
) break;
- const Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
+ const Gtk::TreeRow row = *(get_param_tree_view().get_model()->get_iter(path));
/* if(column && column->get_first_cell_renderer()==cellrenderer_time_track)
{
Gdk::Rectangle rect;
- param_tree_view().get_cell_area(path,*column,rect);
+ get_param_tree_view().get_cell_area(path,*column,rect);
cellrenderer_time_track->property_value_desc()=row[param_model.value_desc];
cellrenderer_time_track->property_canvas()=row[param_model.canvas];
cellrenderer_time_track->activate(event,*this,path.to_string(),rect,rect,Gtk::CellRendererState());
- param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
+ get_param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
return true;
//return signal_param_user_click()(event->button.button,row,COLUMNID_TIME_TRACK);
}
{
synfigapp::ValueDesc value_desc(row[param_model.value_desc]);
Gtk::Menu* menu(manage(new Gtk::Menu()));
+ menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), menu));
App::get_instance(param_tree_store_->canvas_interface()->get_canvas())->make_param_menu(menu,param_tree_store_->canvas_interface()->get_canvas(),value_desc,0.5f);
menu->popup(event->button.button,gtk_get_current_event_time());
return true;
}
Gtk::Menu* menu(manage(new Gtk::Menu()));
+ menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), menu));
std::list<synfigapp::ValueDesc> value_desc_list;
ParamDesc param_desc(row[param_model.param_desc]);
for(;!layer_list.empty();layer_list.pop_back())
Gtk::TreeModel::Path path;
Gtk::TreeViewColumn *column;
int cell_x, cell_y;
- if(!param_tree_view().get_path_at_pos(
+ if(!get_param_tree_view().get_path_at_pos(
(int)event->motion.x,(int)event->motion.y, // x, y
path, // TreeModel::Path&
column, //TreeViewColumn*&
)
) break;
- if(!param_tree_view().get_model()->get_iter(path))
+ if(!get_param_tree_view().get_model()->get_iter(path))
break;
- Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
+ Gtk::TreeRow row = *(get_param_tree_view().get_model()->get_iter(path));
/* if((event->motion.state&GDK_BUTTON1_MASK ||event->motion.state&GDK_BUTTON3_MASK) && column && cellrenderer_time_track==column->get_first_cell_renderer())
{
Gdk::Rectangle rect;
- param_tree_view().get_cell_area(path,*column,rect);
+ get_param_tree_view().get_cell_area(path,*column,rect);
cellrenderer_time_track->property_value_desc()=row[param_model.value_desc];
cellrenderer_time_track->property_canvas()=row[param_model.canvas];
cellrenderer_time_track->activate(event,*this,path.to_string(),rect,rect,Gtk::CellRendererState());
- param_tree_view().queue_draw();
- //param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
+ get_param_tree_view().queue_draw();
+ //get_param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
return true;
}
else
Gtk::TreeModel::Path path;
Gtk::TreeViewColumn *column;
int cell_x, cell_y;
- if(!param_tree_view().get_path_at_pos(
+ if(!get_param_tree_view().get_path_at_pos(
(int)event->button.x,(int)event->button.y, // x, y
path, // TreeModel::Path&
column, //TreeViewColumn*&
)
) break;
- if(!param_tree_view().get_model()->get_iter(path))
+ if(!get_param_tree_view().get_model()->get_iter(path))
break;
- Gtk::TreeRow row = *(param_tree_view().get_model()->get_iter(path));
+ Gtk::TreeRow row = *(get_param_tree_view().get_model()->get_iter(path));
/* if(column && cellrenderer_time_track==column->get_first_cell_renderer())
{
Gdk::Rectangle rect;
- param_tree_view().get_cell_area(path,*column,rect);
+ get_param_tree_view().get_cell_area(path,*column,rect);
cellrenderer_time_track->property_value_desc()=row[param_model.value_desc];
cellrenderer_time_track->property_canvas()=row[param_model.canvas];
cellrenderer_time_track->activate(event,*this,path.to_string(),rect,rect,Gtk::CellRendererState());
- param_tree_view().queue_draw();
- param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
+ get_param_tree_view().queue_draw();
+ get_param_tree_view().queue_draw_area(rect.get_x(),rect.get_y(),rect.get_width(),rect.get_height());
return true;
}