synfig-studio  1.0.3
Macros | Functions
canvasview.cpp File Reference

Template File. More...

#include <sigc++/adaptors/hide.h>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <gtkmm/paned.h>
#include <gtkmm/scale.h>
#include <gtkmm/dialog.h>
#include <gtkmm/messagedialog.h>
#include <gtkmm/treemodelsort.h>
#include <gtkmm/button.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/separator.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/label.h>
#include <gtkmm/box.h>
#include <gtkmm/menu.h>
#include <gtkmm/menuitem.h>
#include <gtkmm/imagemenuitem.h>
#include <gtkmm/separatormenuitem.h>
#include <gtkmm/toolitem.h>
#include <gtkmm/toolbutton.h>
#include <gtkmm/toggletoolbutton.h>
#include <gtkmm/separatortoolitem.h>
#include <gtkmm/menutoolbutton.h>
#include <glibmm/uriutils.h>
#include <glibmm/convert.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <synfig/valuenodes/valuenode_reference.h>
#include <synfig/valuenodes/valuenode_subtract.h>
#include <synfig/valuenodes/valuenode_linear.h>
#include <synfig/valuenodes/valuenode_timedswap.h>
#include <synfig/valuenodes/valuenode_scale.h>
#include <synfig/valuenodes/valuenode_range.h>
#include <synfig/valuenodes/valuenode_dynamiclist.h>
#include <synfig/valuenodes/valuenode_twotone.h>
#include <synfig/valuenodes/valuenode_stripes.h>
#include <synfig/valuenodes/valuenode_blinecalctangent.h>
#include <synfig/valuenodes/valuenode_blinecalcvertex.h>
#include <synfig/valuenodes/valuenode_blinecalcwidth.h>
#include <synfig/valuenodes/valuenode_bline.h>
#include <synfig/valuenodes/valuenode_bone.h>
#include <synfig/layer.h>
#include <synfig/layers/layer_pastecanvas.h>
#include <synfig/context.h>
#include <synfigapp/uimanager.h>
#include <synfigapp/canvasinterface.h>
#include <synfigapp/selectionmanager.h>
#include <sigc++/retype_return.h>
#include <sigc++/retype.h>
#include "canvasview.h"
#include "instance.h"
#include "app.h"
#include "cellrenderer/cellrenderer_value.h"
#include "cellrenderer/cellrenderer_timetrack.h"
#include "workarea.h"
#include "dialogs/dialog_color.h"
#include "eventkey.h"
#include "states/state_polygon.h"
#include "states/state_bline.h"
#include "states/state_normal.h"
#include "states/state_eyedrop.h"
#include "ducktransform_scale.h"
#include "ducktransform_translate.h"
#include "ducktransform_rotate.h"
#include "event_mouse.h"
#include "event_layerclick.h"
#include "mainwindow.h"
#include "docks/dockmanager.h"
#include "docks/dockbook.h"
#include "docks/dock_toolbox.h"
#include "dialogs/dialog_preview.h"
#include "dialogs/dialog_soundselect.h"
#include "preview.h"
#include "audiocontainer.h"
#include "widgets/widget_timeslider.h"
#include "widgets/widget_enum.h"
#include "dials/keyframedial.h"
#include "dials/jackdial.h"
#include <synfigapp/main.h>
#include <synfigapp/inputdevice.h>
#include <pangomm.h>
#include "general.h"

Macros

#define DEFAULT_TIME_WINDOW_SIZE   (10.0)
#define SMALL_BUTTON(button, stockid, tooltip)
#define NORMAL_BUTTON(button, stockid, tooltip)
#define NEW_SMALL_BUTTON(x, y, z)   Gtk::Button *SMALL_BUTTON(x,y,z)
#define NOT_IMPLEMENTED_SLOT   sigc::mem_fun(*reinterpret_cast<studio::CanvasViewUIInterface*>(get_ui_interface().get()),&studio::CanvasViewUIInterface::not_implemented)
#define SLOT_EVENT(x)   sigc::hide_return(sigc::bind(sigc::mem_fun(*this,&studio::CanvasView::process_event_key),x))
#define DUCK_MASK(lower, upper, string)
#define CURRENT_TIME_MIN_LENGHT   6
#define APPEND_MENU_ITEM(menu, StockId, Text)
#define APPEND_ITEMS_TO_ALL_MENUS3(Interpolation, StockId, TextIn, TextOut, TextBoth)
#define APPEND_ITEMS_TO_ALL_MENUS(Interpolation, StockId, Text)   APPEND_ITEMS_TO_ALL_MENUS3(Interpolation, StockId, Text, Text, Text)

Functions

static bool _close_instance (etl::handle< Instance > instance)
static void set_waypoint_model (std::set< synfig::Waypoint, std::less< UniqueID > > waypoints, Waypoint::Model model, etl::loose_handle< synfigapp::CanvasInterface > canvas_interface)
static void duplicate_waypoints (std::set< synfig::Waypoint, std::less< UniqueID > > waypoints, etl::loose_handle< synfigapp::CanvasInterface > canvas_interface)
static void remove_waypoints (std::set< synfig::Waypoint, std::less< UniqueID > > waypoints, etl::loose_handle< synfigapp::CanvasInterface > canvas_interface)

Detailed Description

Template File.

$Id$

Macro Definition Documentation

#define DEFAULT_TIME_WINDOW_SIZE   (10.0)
#define SMALL_BUTTON (   button,
  stockid,
  tooltip 
)
Value:
button = manage(new class Gtk::Button()); \
icon=manage(new Gtk::Image(Gtk::StockID(stockid),iconsize)); \
button->add(*icon); \
button->set_tooltip_text(tooltip);\
icon->set_padding(0,0);\
icon->show(); \
button->set_relief(Gtk::RELIEF_NONE); \
button->show()
#define NORMAL_BUTTON (   button,
  stockid,
  tooltip 
)
Value:
button = manage(new class Gtk::Button()); \
icon=manage(new Gtk::Image(Gtk::StockID(stockid),Gtk::ICON_SIZE_BUTTON)); \
button->add(*icon); \
button->set_tooltip_text(tooltip);\
icon->set_padding(0,0);\
icon->show(); \
/*button->set_relief(Gtk::RELIEF_NONE);*/ \
button->show()
#define NEW_SMALL_BUTTON (   x,
  y,
 
)    Gtk::Button *SMALL_BUTTON(x,y,z)
#define NOT_IMPLEMENTED_SLOT   sigc::mem_fun(*reinterpret_cast<studio::CanvasViewUIInterface*>(get_ui_interface().get()),&studio::CanvasViewUIInterface::not_implemented)
#define SLOT_EVENT (   x)    sigc::hide_return(sigc::bind(sigc::mem_fun(*this,&studio::CanvasView::process_event_key),x))
#define DUCK_MASK (   lower,
  upper,
  string 
)
Value:
action=Gtk::ToggleAction::create("mask-" #lower "-ducks", string); \
action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_##upper)); \
action_group->add(action, \
sigc::bind( \
sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), \
Duck::TYPE_##upper))
#define CURRENT_TIME_MIN_LENGHT   6
#define APPEND_MENU_ITEM (   menu,
  StockId,
  Text 
)
Value:
item = manage(new Gtk::ImageMenuItem( \
*manage(new Gtk::Image(Gtk::StockID(StockId),Gtk::IconSize::from_name("synfig-small_icon"))), \
_(Text) )); \
item->set_use_underline(true); \
item->signal_activate().connect( \
sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface())); \
item->show_all(); \
menu->append(*item);
#define APPEND_ITEMS_TO_ALL_MENUS3 (   Interpolation,
  StockId,
  TextIn,
  TextOut,
  TextBoth 
)
Value:
model.reset(); \
model.set_before(Interpolation); \
APPEND_MENU_ITEM(interp_menu_in, StockId, TextIn) \
model.reset(); \
model.set_after(Interpolation); \
APPEND_MENU_ITEM(interp_menu_out, StockId, TextOut) \
model.set_before(Interpolation); \
APPEND_MENU_ITEM(interp_menu_both, StockId, TextBoth)

Referenced by studio::CanvasView::on_waypoint_clicked_canvasview().

#define APPEND_ITEMS_TO_ALL_MENUS (   Interpolation,
  StockId,
  Text 
)    APPEND_ITEMS_TO_ALL_MENUS3(Interpolation, StockId, Text, Text, Text)

Function Documentation

static bool _close_instance ( etl::handle< Instance instance)
static
static void set_waypoint_model ( std::set< synfig::Waypoint, std::less< UniqueID > >  waypoints,
Waypoint::Model  model,
etl::loose_handle< synfigapp::CanvasInterface canvas_interface 
)
static

References _, and synfigapp::Action::create().

static void duplicate_waypoints ( std::set< synfig::Waypoint, std::less< UniqueID > >  waypoints,
etl::loose_handle< synfigapp::CanvasInterface canvas_interface 
)
static
static void remove_waypoints ( std::set< synfig::Waypoint, std::less< UniqueID > >  waypoints,
etl::loose_handle< synfigapp::CanvasInterface canvas_interface 
)
static