# app.cpp File Reference

writeme More...

`#include <fstream>`
`#include <iostream>`
`#include <locale>`
`#include <cstring>`
`#include <gtkmm/fileselection.h>`
`#include <gtkmm/dialog.h>`
`#include <gtkmm/messagedialog.h>`
`#include <gtkmm/label.h>`
`#include <gtkmm/stock.h>`
`#include <gtkmm/stockitem.h>`
`#include <gtkmm/iconsource.h>`
`#include <gtkmm/inputdialog.h>`
`#include <gtkmm/accelmap.h>`
`#include <gtkmm/uimanager.h>`
`#include <gtkmm/textview.h>`
`#include <gtk/gtk.h>`
`#include <gdkmm/general.h>`
`#include <synfig/loadcanvas.h>`
`#include <synfig/savecanvas.h>`
`#include "app.h"`
`#include "about.h"`
`#include "splash.h"`
`#include "instance.h"`
`#include "canvasview.h"`
`#include "dialog_setup.h"`
`#include "dialog_gradient.h"`
`#include "dialog_color.h"`
`#include "toolbox.h"`
`#include "compview.h"`
`#include "onemoment.h"`
`#include "dockmanager.h"`
`#include "state_eyedrop.h"`
`#include "state_normal.h"`
`#include "state_draw.h"`
`#include "state_fill.h"`
`#include "state_bline.h"`
`#include "state_polygon.h"`
`#include "state_sketch.h"`
`#include "state_gradient.h"`
`#include "state_circle.h"`
`#include "state_rectangle.h"`
`#include "state_smoothmove.h"`
`#include "state_scale.h"`
`#include "state_star.h"`
`#include "state_text.h"`
`#include "state_width.h"`
`#include "state_rotate.h"`
`#include "state_zoom.h"`
`#include "devicetracker.h"`
`#include "dialog_tooloptions.h"`
`#include "widget_enum.h"`
`#include "autorecover.h"`
`#include <synfigapp/settings.h>`
`#include "dock_history.h"`
`#include "dock_canvases.h"`
`#include "dock_keyframes.h"`
`#include "dock_layers.h"`
`#include "dock_params.h"`
`#include "dock_metadata.h"`
`#include "dock_children.h"`
`#include "dock_info.h"`
`#include "dock_navigator.h"`
`#include "dock_layergroups.h"`
`#include "dock_timetrack.h"`
`#include "dock_curves.h"`
`#include "mod_palette/mod_palette.h"`
`#include "mod_mirror/mod_mirror.h"`
`#include <sys/stat.h>`
`#include "ipc.h"`
`#include "module.h"`
`#include "statemanager.h"`
`#include <gtkmm/filechooser.h>`
`#include <gtkmm/filechooserdialog.h>`
`#include "general.h"`
`#include <synfigapp/main.h>`

## Namespaces

namespace | studio

## Defines

#define | SYNFIG_USER_APP_DIR ".synfig"
#define | DPM2DPI(x) (float(x)/39.3700787402f)
#define | DPI2DPM(x) (float(x)*39.3700787402f)
#define | IMAGE_DIR "/usr/local/share/pixmaps"
#define | IMAGE_EXT "tif"
#define | DEFINE_ACTION(x, stock) { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); }
#define | DEFINE_ACTION2(x, stock, label) { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock,label,label) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); }
#define | DEFINE_ACTION_SIG(group, x, stock, sig) { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ group->add(action,sig); }
#define | ACCEL(accel, path)
#define | ACCEL2(accel)
#define | SCALE_FACTOR (1280)

## Functions

bool | studio::really_delete_widget (Gtk::Widget *widget)
void | studio::delete_widget (Gtk::Widget *widget)
void | init_ui_manager ()
static Time::Format | _App_time_format (Time::FORMAT_NORMAL)
gint | Signal_Open_Ok (GtkWidget *, int *val)
gint | Signal_Open_Cancel (GtkWidget *, int *val)
static bool | try_open_url (const std::string &url)

## Variables

static sigc::signal< void > | signal_present_all_
static sigc::signal< void > | signal_recent_files_changed_
static sigc::signal< void, etl::loose_handle< CanvasView > > | signal_canvas_view_focus_
static sigc::signal< void, etl::handle< Instance > > | signal_instance_selected_
static sigc::signal< void, etl::handle< Instance > > | signal_instance_created_
static sigc::signal< void, etl::handle< Instance > > | signal_instance_deleted_
static std::list< std::string > | recent_files
static std::list< std::string > | recent_files_window_size
etl::handle< studio::ModPalette > | mod_palette_
static etl::handle < synfigapp::UIInterface > | ui_interface_
studio::IPC * | ipc = NULL
studio::Dock_History * | dock_history
studio::Dock_Canvases * | dock_canvases
studio::Dock_Keyframes * | dock_keyframes
studio::Dock_Layers * | dock_layers
studio::Dock_Params * | dock_params
studio::Dock_MetaData * | dock_meta_data
studio::Dock_Children * | dock_children
studio::Dock_Info * | dock_info
studio::Dock_LayerGroups * | dock_layer_groups
studio::Dock_Navigator * | dock_navigator
studio::Dock_Timetrack * | dock_timetrack
studio::Dock_Curves * | dock_curves
std::list< etl::handle < studio::Module > > | module_list_
static int | max_recent_files_ = 25
static synfig::String | app_base_path_
studio::StateManager * | state_manager
::Preferences | _preferences

## Detailed Description

writeme

$Id$

## Define Documentation

#define SYNFIG_USER_APP_DIR ".synfig"

Referenced by studio::App::get_user_app_directory().

#define DPM2DPI | ( | x |  | ) | (float(x)/39.3700787402f)

Referenced by studio::Widget_RendDesc::refresh().

#define DPI2DPM | ( | x |  | ) | (float(x)*39.3700787402f)

Referenced by studio::App::new_instance().

#define IMAGE_DIR "/usr/local/share/pixmaps"

#define IMAGE_EXT "tif"

#define DEFINE_ACTION | ( | x,
|  | stock |  | ) | { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); }

Referenced by init_ui_manager().

#define DEFINE_ACTION2 | ( | x,
|  | stock,
|  | label |  | ) | { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock,label,label) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); }

Referenced by init_ui_manager().

#define DEFINE_ACTION_SIG | ( | group,
|  | x,
|  | stock,
|  | sig |  | ) | { Glib::RefPtr<Gtk::Action> action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ group->add(action,sig); }

#define ACCEL | ( | accel,
|  | path |  | ) |

Value:

    {                                           \
            Gtk::AccelKey accel_key(accel,path);    \
            Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod());   \
        }

Referenced by init_ui_manager().

#define ACCEL2 | ( | accel |  | ) |

Value:

    {                                           \
            Gtk::AccelKey accel_key(accel);         \
            Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod());   \
        }

Referenced by init_ui_manager().

#define SCALE_FACTOR (1280)

Referenced by studio::App::add_recent_file(), and studio::App::set_recent_file_window_size().

## Function Documentation

void init_ui_manager | ( |  | ) |

References _, ACCEL, ACCEL2, synfigapp::Action::book(), synfigapp::Action::create(), DEFINE_ACTION, DEFINE_ACTION2, studio::get_action_stock_id(), studio::CanvasView::get_pixel_sizes(), and studio::App::ui_manager().

Referenced by studio::App::App().

static Time::Format _App_time_format | ( | Time::FORMAT_NORMAL |  | ) | `[static]`

Referenced by studio::App::get_time_format(), and studio::App::set_time_format().

gint Signal_Open_Ok | ( | GtkWidget * | ,
|  | int * | val |
| ) |  |  |

gint Signal_Open_Cancel | ( | GtkWidget * | ,
|  | int * | val |
| ) |  |  |

static bool try_open_url | ( | const std::string & | url | ) | `[static]`

References studio::App::browser_command.

Referenced by studio::App::dialog_help(), and studio::App::open_url().

## Variable Documentation

sigc::signal<void> signal_present_all_ `[static]`

Referenced by studio::App::signal_present_all().

sigc::signal<void> signal_recent_files_changed_ `[static]`

Referenced by studio::App::signal_recent_files_changed().

sigc::signal<void,etl::loose_handle<CanvasView> > signal_canvas_view_focus_ `[static]`

Referenced by studio::App::signal_canvas_view_focus().

sigc::signal<void,etl::handle<Instance> > signal_instance_selected_ `[static]`

Referenced by studio::App::signal_instance_selected().

sigc::signal<void,etl::handle<Instance> > signal_instance_created_ `[static]`

Referenced by studio::App::signal_instance_created().

sigc::signal<void,etl::handle<Instance> > signal_instance_deleted_ `[static]`

Referenced by studio::App::signal_instance_deleted().

std::list<std::string> recent_files `[static]`

Referenced by studio::App::get_recent_files(), studio::App::load_settings(), and studio::App::save_settings().

std::list<std::string> recent_files_window_size `[static]`

Referenced by studio::App::load_settings(), studio::App::save_settings(), and studio::App::set_recent_file_window_size().

etl::handle< studio::ModPalette > mod_palette_

etl::handle<synfigapp::UIInterface> ui_interface_ `[static]`

Referenced by studio::App::App(), studio::CanvasView::get_ui_interface(), synfigapp::CanvasInterface::get_ui_interface(), studio::App::get_ui_interface(), synfigapp::Action::System::get_ui_interface(), synfigapp::CanvasInterface::set_ui_interface(), synfigapp::Action::System::set_ui_interface(), synfigapp::CanvasInterface::unset_ui_interface(), and synfigapp::Action::System::unset_ui_interface().

studio::IPC* ipc = NULL

studio::Dock_History* dock_history

studio::Dock_Canvases* dock_canvases

studio::Dock_Keyframes* dock_keyframes

studio::Dock_Layers* dock_layers

studio::Dock_Params* dock_params

studio::Dock_MetaData* dock_meta_data

studio::Dock_Children* dock_children

studio::Dock_Info* dock_info

studio::Dock_LayerGroups* dock_layer_groups

studio::Dock_Navigator* dock_navigator

studio::Dock_Timetrack* dock_timetrack

studio::Dock_Curves* dock_curves

std::list< etl::handle< studio::Module > > module_list_

Referenced by studio::App::App(), and studio::App::~App().

int max_recent_files_ = 25`[static]`

Referenced by studio::App::get_max_recent_files(), and studio::App::set_max_recent_files().

synfig::String app_base_path_ `[static]`

Referenced by studio::App::App(), and studio::App::get_base_path().

studio::StateManager* state_manager

::Preferences _preferences `[static]`