X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Finstance.h;h=16842c1ef16b64d82b3221dd10800c45e997ee2c;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=4d14b1ced735d45cdcfa8bdfef8e8e44f2fd8dab;hpb=c6af6e1c3816eb3b15c573089b32e6ae65cd2f49;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/instance.h b/synfig-studio/trunk/src/gtkmm/instance.h index 4d14b1c..16842c1 100644 --- a/synfig-studio/trunk/src/gtkmm/instance.h +++ b/synfig-studio/trunk/src/gtkmm/instance.h @@ -2,10 +2,11 @@ /*! \file gtkmm/instance.h ** \brief writeme ** -** $Id: instance.h,v 1.2 2005/01/13 18:37:30 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -37,6 +38,7 @@ #include /* === M A C R O S ========================================================= */ +#define DEFAULT_FILENAME_PREFIX _("Synfig Animation ") // will be followed by a different number for each document /* === T Y P E D E F S ===================================================== */ @@ -54,6 +56,13 @@ class Instance : public synfigapp::Instance public: typedef std::list< etl::handle > CanvasViewList; + enum Status + { + STATUS_OK, + STATUS_ERROR, + STATUS_CANCEL + }; + class CanvasTreeModel : public Gtk::TreeModel::ColumnRecord { public: @@ -167,14 +176,18 @@ public: const CanvasViewList & canvas_view_list()const { return canvas_view_list_; } - bool save_as(const synfig::String &filename)const; - bool save_as(const synfig::String &filename); + //! returns true if the instance has a real filename associated with it, rather than the made up "synfig animation 1" or some such + bool has_real_filename(); + //! Opens a "Save As" dialog, and then saves the composition to that file - void dialog_save_as(); + //! returns true if the save was successful + bool dialog_save_as(); + + void open(); - bool save(); + Status save(); void dialog_cvs_commit(); @@ -203,7 +216,7 @@ public: void process_action(synfig::String name, synfigapp::Action::ParamList param_list); - void make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfigapp::ValueDesc value_desc, float location=0.5f); + void make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas, synfigapp::ValueDesc value_desc, float location=0.5f, bool bezier=false); void make_param_menu(Gtk::Menu *menu,synfig::Canvas::Handle canvas,const std::list& value_desc_list);