X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Floadcanvas.h;h=9c53d1233b1cefaf011e845e79353b349eb48791;hb=da8f23724af3bc3c98a62f75fe91424412501f43;hp=ecd82556c7650aa3e3a637030d01680685aa3e75;hpb=bf92e1e2c959ab1fb668fa5a8274004a6f30a140;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/loadcanvas.h b/synfig-core/trunk/src/synfig/loadcanvas.h index ecd8255..9c53d12 100644 --- a/synfig-core/trunk/src/synfig/loadcanvas.h +++ b/synfig-core/trunk/src/synfig/loadcanvas.h @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 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 @@ -72,6 +73,8 @@ private: String path; + String errors_text; + GUID guid_; /* @@ -112,13 +115,10 @@ public: const synfig::String& get_path()const { return path; } - //! \todo writeme - Canvas::Handle parse_from_file(const String &filename); - - Canvas::Handle parse_from_file_as(const String &filename,const String &as); + const synfig::String& get_errors_text()const { return errors_text; } //! \todo writeme - Canvas::Handle parse_from_string(const String &data); + Canvas::Handle parse_from_file_as(const String &filename,const String &as,String &errors); private: @@ -160,7 +160,6 @@ private: etl::handle parse_animated(xmlpp::Element *node,Canvas::Handle canvas); etl::handle parse_subtract(xmlpp::Element *node,Canvas::Handle canvas); etl::handle parse_linkable_value_node(xmlpp::Element *node,Canvas::Handle canvas); - etl::handle parse_composite(xmlpp::Element *node,Canvas::Handle canvas); etl::handle parse_dynamic_list(xmlpp::Element *node,Canvas::Handle canvas); }; // END of CanvasParser @@ -169,11 +168,8 @@ private: //! Loads a canvas from \a filename /*! \return The Canvas's handle on success, an empty handle on failure */ -extern Canvas::Handle open_canvas(const String &filename); -extern Canvas::Handle open_canvas_as(const String &filename,const String &as); - -//! Retrieves a Canvas from a string in XML format -extern Canvas::Handle string_to_canvas(const String &data); +extern Canvas::Handle open_canvas(const String &filename,String &errors); +extern Canvas::Handle open_canvas_as(const String &filename,const String &as,String &errors); std::map >& get_open_canvas_map();