Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-studio / trunk / src / gtkmm / app.h
index decaaf8..89cd528 100644 (file)
@@ -1,32 +1,34 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file app.h
 **     \brief writeme
 **
-**     $Id: app.h,v 1.2 2005/01/13 21:11:16 darco Exp $
+**     $Id$
 **
 **     \legal
-**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007, 2008 Chris Moore
+**  Copyright (c) 2008 Carlos López
 **
-**     This software and associated documentation
-**     are CONFIDENTIAL and PROPRIETARY property of
-**     the above-mentioned copyright holder.
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
 **
-**     You may not copy, print, publish, or in any
-**     other way distribute this software without
-**     a prior written agreement with
-**     the copyright holder.
+**     This package is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+**     General Public License for more details.
 **     \endlegal
 */
 /* ========================================================================= */
 
 /* === S T A R T =========================================================== */
 
-#ifndef __SINFG_STUDIO_APP_H
-#define __SINFG_STUDIO_APP_H
+#ifndef __SYNFIG_STUDIO_APP_H
+#define __SYNFIG_STUDIO_APP_H
 
 /* === H E A D E R S ======================================================= */
 
-#include <sigc++/compatibility.h>
 #include <sigc++/bind.h>
 
 #include <gtkmm/main.h>
 
 #include <ETL/smart_ptr>
 
-#include <sinfg/distance.h>
-#include <sinfg/string.h>
-#include <sinfg/time.h>
+#include <synfig/distance.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
 
 #include <gtkmm/uimanager.h>
 
-#include <sinfgapp/instance.h>
-#include "iconcontroler.h"
+#include <synfigapp/instance.h>
+#include "iconcontroller.h"
 
 /* === M A C R O S ========================================================= */
 
+#define MISC_DIR_PREFERENCE                    "misc_dir"
+#define ANIMATION_DIR_PREFERENCE       "animation_dir"
+#define IMAGE_DIR_PREFERENCE           "image_dir"
+#define SKETCH_DIR_PREFERENCE          "sketch_dir"
+#define RENDER_DIR_PREFERENCE          "render_dir"
+
 /* === T Y P E D E F S ===================================================== */
 
 /* === C L A S S E S & S T R U C T S ======================================= */
@@ -57,18 +65,19 @@ namespace Gtk
        class ActionGroup;
 };
 
-namespace sinfgapp
+namespace synfigapp
 {
        class UIInterface;
        class Main;
 };
 
 class Preferences;
-       
+
 namespace studio {
 
 typedef Gtk::UIManager UIManager;
 
+class About;
 class Toolbox;
 class Instance;
 class CanvasView;
@@ -93,17 +102,17 @@ class Dock_Info;
 class Dock_Navigator;
 class Dock_LayerGroups;
 class IPC;
-       
+
 class Module;
 
 class StateManager;
-class IconControler;
-       
-class App : public Gtk::Main, private IconControler
+class IconController;
+
+class App : public Gtk::Main, private IconController
 {
        friend class Preferences;
        friend class Dialog_Setup;
-               
+
        /*
  -- ** -- P U B L I C   T Y P E S ---------------------------------------------
        */
@@ -123,7 +132,7 @@ public:
        */
 
 private:
-       //static etl::handle<sinfgapp::UIInterface> ui_interface_;
+       //static etl::handle<synfigapp::UIInterface> ui_interface_;
        //static int max_recent_files;
 
 /*
@@ -141,14 +150,14 @@ private:
        static IPC *ipc;
 */
 
-       etl::smart_ptr<sinfgapp::Main> sinfgapp_main;
+       etl::smart_ptr<synfigapp::Main> synfigapp_main;
 
 
        static etl::handle<Instance> selected_instance;
        static etl::handle<CanvasView> selected_canvas_view;
 
        static Glib::RefPtr<UIManager>  ui_manager_;
-       
+
 //     static std::list< etl::handle< Module > > module_list_;
 
        /*
@@ -170,18 +179,33 @@ public:
 //     static Dialog_Palette* dialog_palette;
        static Dialog_ToolOptions *dialog_tool_options;
 
-       static sinfg::Distance::System distance_system;
+       static synfig::Distance::System distance_system;
 
-       static sinfg::Gamma gamma;
+       static synfig::Gamma gamma;
 
+       static About *about;
        static Toolbox *toolbox;
 
        static std::list<etl::handle<Instance> > instance_list;
 
-       static bool shutdown_in_progress;       
+       static bool shutdown_in_progress;
 
        static bool use_colorspace_gamma;
 
+#ifdef SINGLE_THREADED
+       static bool single_threaded;
+#endif
+
+       static bool restrict_radius_ducks;
+       static bool resize_imported_images;
+
+       static synfig::String browser_command;
+       static synfig::String custom_filename_prefix;
+       static int preferred_x_size;
+       static int preferred_y_size;
+       static synfig::String predefined_size;
+       static synfig::String predefined_fps;
+       static float preferred_fps;
        /*
  -- ** -- S I G N A L S -------------------------------------------------------
        */
@@ -236,6 +260,7 @@ public:
        */
 
 private:
+       static void add_recent_file(const std::string &filename, const std::string &window_size = std::string());
 
        /*
  -- ** -- P U B L I C   M E T H O D S -----------------------------------------
@@ -256,21 +281,23 @@ public:
 
        static Glib::RefPtr<UIManager>& ui_manager() { return ui_manager_; }
 
-       static void add_recent_file(const std::string &filename);
+       static void set_recent_file_window_size(etl::handle<Instance> instance);
+       static void add_recent_file(const etl::handle<Instance> instance);
 
-       static sinfg::String get_base_path();
+       static synfig::String get_base_path();
        static void save_settings();
        static void load_settings();
+       static void reset_initial_window_configuration();
 
        static const std::list<std::string>& get_recent_files();
 
-       static const etl::handle<sinfgapp::UIInterface>& get_ui_interface();
+       static const etl::handle<synfigapp::UIInterface>& get_ui_interface();
 
 
        static void set_selected_instance(etl::loose_handle<Instance> instance);
        static void set_selected_canvas_view(etl::loose_handle<CanvasView>);
 
-       static etl::loose_handle<Instance> get_instance(etl::handle<sinfg::Canvas> canvas);
+       static etl::loose_handle<Instance> get_instance(etl::handle<synfig::Canvas> canvas);
 
        static etl::loose_handle<Instance> get_selected_instance() { return selected_instance; }
        static etl::loose_handle<CanvasView> get_selected_canvas_view() { return selected_canvas_view; }
@@ -281,48 +308,54 @@ public:
 
        static void new_instance();
 
-       static void dialog_open();
+       static void dialog_open(std::string filename = "");
 
        static void dialog_about();
-       
+
        static void quit();
-       
+
        static void show_setup();
 
        static void undo();
        static void redo();
-       
+
        static int get_max_recent_files();
        static void set_max_recent_files(int x);
 
 
-       static sinfg::Time::Format get_time_format();
-       static void set_time_format(sinfg::Time::Format x);
+       static synfig::Time::Format get_time_format();
+       static void set_time_format(synfig::Time::Format x);
 
        static bool shutdown_request(GdkEventAny*bleh=NULL);
-       
+
 //     static bool dialog_file(const std::string &title, std::string &filename);
 
-       static bool dialog_open_file(const std::string &title, std::string &filename);
-       static bool dialog_save_file(const std::string &title, std::string &filename);
-       static bool dialog_saveas_file(const std::string &title, std::string &filename);
+       static bool dialog_open_file(const std::string &title, std::string &filename, std::string preference);
+       static bool dialog_save_file(const std::string &title, std::string &filename, std::string preference);
 
        static void dialog_error_blocking(const std::string &title, const std::string &message);
 
        static void dialog_warning_blocking(const std::string &title, const std::string &message);
 
        static bool dialog_entry(const std::string &title, const std::string &message,std::string &text);
+       static bool dialog_paragraph(const std::string &title, const std::string &message,std::string &text);
 
        static bool dialog_yes_no(const std::string &title, const std::string &message);
 
        static int dialog_yes_no_cancel(const std::string &title, const std::string &message);
-       
+
        static void dialog_not_implemented();
 
-       static sinfg::String get_user_app_directory();
-       static sinfg::String get_config_file(const sinfg::String& file);
+       static void dialog_help();
+
+       static void open_url(const std::string &url);
+
+       static synfig::String get_user_app_directory();
+       static synfig::String get_config_file(const synfig::String& file);
 }; // END of class App
 
+       void delete_widget(Gtk::Widget *widget);
+
 }; // END namespace studio
 
 /* === E N D =============================================================== */