28 #ifndef __SYNFIG_STUDIO_APP_H
29 #define __SYNFIG_STUDIO_APP_H
33 #include <sigc++/bind.h>
35 #include <gtkmm/main.h>
39 #include <ETL/smart_ptr>
41 #include <synfig/distance.h>
42 #include <synfig/string.h>
43 #include <synfig/time.h>
45 #include <synfig/filecontainerzip.h>
47 #include <gtkmm/uimanager.h>
55 #define MISC_DIR_PREFERENCE "misc_dir"
56 #define ANIMATION_DIR_PREFERENCE "animation_dir"
57 #define IMAGE_DIR_PREFERENCE "image_dir"
58 #define SKETCH_DIR_PREFERENCE "sketch_dir"
59 #define RENDER_DIR_PREFERENCE "render_dir"
63 #define SINGLE_THREADED
168 etl::smart_ptr<synfigapp::Main> synfigapp_main;
171 static etl::handle<Instance> selected_instance;
172 static etl::handle<CanvasView> selected_canvas_view;
174 static Glib::RefPtr<UIManager> ui_manager_;
176 static int jack_locks_;
213 #ifdef SINGLE_THREADED
214 static bool single_threaded;
269 etl::loose_handle<CanvasView>
274 etl::handle<Instance>
279 etl::handle<Instance>
284 etl::handle<Instance>
292 static void add_recent_file(
const std::string &filename);
300 App(
const synfig::String& basepath,
int *argc,
char ***argv);
311 static Glib::RefPtr<UIManager>&
ui_manager() {
return ui_manager_; }
313 static void add_recent_file(
const etl::handle<Instance> instance);
317 static bool load_settings(
const synfig::String& key_filter =
"");
335 static etl::loose_handle<Instance>
get_instance(etl::handle<synfig::Canvas> canvas);
340 static bool open(std::string filename);
342 static bool open_as(std::string filename,std::string as,synfig::FileContainerZip::file_size_t truncate_storage_size = 0);
348 static void dialog_open(std::string filename =
"");
373 static bool dialog_open_file(
const std::string &title, std::string &filename, std::string preference);
374 static bool dialog_open_file_spal(
const std::string &title, std::string &filename, std::string preference);
376 static bool dialog_open_file_image(
const std::string &title, std::string &filename, std::string preference);
377 static bool dialog_open_file_audio(
const std::string &title, std::string &filename, std::string preference);
379 static bool dialog_save_file(
const std::string &title, std::string &filename, std::string preference);
380 static bool dialog_save_file_spal(
const std::string &title, std::string &filename, std::string preference);
384 static bool dialog_select_list_item(
const std::string &title,
const std::string &message,
const std::list<std::string> &list,
int &item_index);
386 static bool dialog_entry(
const std::string &action,
const std::string &content, std::string &text,
const std::string &button1,
const std::string &button2);
388 static bool dialog_paragraph(
const std::string &title,
const std::string &message,std::string &text);
395 const std::string &type,
396 const std::string &message,
397 const std::string &detials,
398 const std::string &button1,
399 const std::string &long_details =
"long_details");
402 const std::string &details,
403 const Gtk::MessageType &type,
404 const std::string &button1,
405 const std::string &button2);
408 const std::string &details,
409 const Gtk::MessageType &type,
410 const std::string &button1,
411 const std::string &button2,
412 const std::string &button3);
414 static void open_url(
const std::string &url);