<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Iceiceice</id>
		<title>CEGUI Wiki - Crazy Eddie's GUI System (Open Source) - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Iceiceice"/>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/Special:Contributions/Iceiceice"/>
		<updated>2026-04-13T05:32:09Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Make_a_custom_resource_provider&amp;diff=5753</id>
		<title>Make a custom resource provider</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Make_a_custom_resource_provider&amp;diff=5753"/>
				<updated>2016-01-16T19:17:45Z</updated>
		
		<summary type="html">&lt;p&gt;Iceiceice: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: This page is a work in progress, targetted at CEGUI v0.8.4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;ResourceProvider&amp;lt;/code&amp;gt; is the interface that CEGUI uses to load data files of all kinds -- XML, images, fonts, etc.&lt;br /&gt;
&lt;br /&gt;
If you followed the tutorial, then you are probably already vaguely familiar with the &amp;lt;code&amp;gt;DefaultResourceProvider&amp;lt;/code&amp;gt;. The default resource provider requires you to specify certain folders for each kind of resource. When CEGUI needs to acquire a resource, the default resource provider simply tries to fetch it from disk, accounting for differences between Unix-like and Windows systems.&lt;br /&gt;
&lt;br /&gt;
There are a few other resource providers that come with CEGUI, particularly, an OGRE resource provider, and Irrlicht one, which integrate with those systems more tightly.&lt;br /&gt;
&lt;br /&gt;
However, maybe you want to write your own resource provider. Why might you want to do this?&lt;br /&gt;
&lt;br /&gt;
# Maybe you want to limit how CEGUI accesses your filesystem. Perhaps you have some kind of virtual filesystem setup, and you prefer for security reasons to have all filesystem calls go through your interface rather than directly through the C / C++ filesystem API. Maybe you are trying to cope with bugs when handling unicode characters in filepaths on some platforms.&lt;br /&gt;
# Maybe you are targetting a platform where the filesystem is a bit unusual -- for instance, in emscripten.&lt;br /&gt;
# Maybe you are trying to optimize the resource acquisition process by making it cache all available on-disk resources up front for some scenario, and then serve them fast from buffers to CEGUI after that.&lt;br /&gt;
&lt;br /&gt;
To do this, you simply need to derive from &amp;lt;code&amp;gt;CEGUI::ResourceProvider&amp;lt;/code&amp;gt;, and start CEGUI using an instance of that instead of the default. This page is to help explain in greater detail what these overrided methods that you provide should do, what responsibilities they have, when they will be called, etc. And especially, to explain how the ownership of the various involved objects works, so that you can avoid leaking / creating undefined behavior.&lt;br /&gt;
&lt;br /&gt;
== ResourceProvider ==&lt;br /&gt;
&lt;br /&gt;
Here is a synopsis of the &amp;lt;code&amp;gt;CEGUI::ResourceProvider&amp;lt;/code&amp;gt; class and its most important methods:&lt;br /&gt;
&lt;br /&gt;
    class CEGUIEXPORT ResourceProvider :&lt;br /&gt;
        public AllocatedObject&amp;lt;ResourceProvider&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        ResourceProvider() { }&lt;br /&gt;
        virtual ~ResourceProvider() {}&lt;br /&gt;
    &lt;br /&gt;
        virtual void loadRawDataContainer(const String&amp;amp; filename, RawDataContainer&amp;amp; output, const String&amp;amp; resourceGroup) = 0;&lt;br /&gt;
        virtual void unloadRawDataContainer(RawDataContainer&amp;amp;)  { }&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;AllocatedObject&amp;lt;/code&amp;gt; template is essentially a CEGUI internal detail related to memory management. You don't need to do anything special as a result of that inheritance -- you can just &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt; objects of this type, or derived from this type, and pass them to CEGUI as an appropriate argument to &amp;lt;code&amp;gt;CEGUI::System::create&amp;lt;/code&amp;gt;. CEGUI will take ownership of them and delete them as necessary.&lt;br /&gt;
&lt;br /&gt;
The two most important functions are the two that I picked out -- CEGUI calls these when it wants to load or unload a resource. It expects your resource provider to manipulate these &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; objects to pass it data.&lt;br /&gt;
&lt;br /&gt;
== RawDataContainer ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; is somewhat like a stripped-down &amp;lt;code&amp;gt;std::vector&amp;lt;/code&amp;gt;, except that it always points to an buffer of type &amp;lt;code&amp;gt;unsigned char&amp;lt;/code&amp;gt; and there are no &amp;quot;resize&amp;quot; methods or similar. It is always easy to get / set the size / data pointer of the &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt;, as it is intended that you should manipulate the class to get the semantics that you want.&lt;br /&gt;
&lt;br /&gt;
Synopsis of &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    class CEGUIEXPORT RawDataContainer :&lt;br /&gt;
        public AllocatedObject&amp;lt;RawDataContainer&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
    &lt;br /&gt;
        RawDataContainer() : mData(0), mSize(0) {}&lt;br /&gt;
        ~RawDataContainer() { release(); }&lt;br /&gt;
    &lt;br /&gt;
        void setData(uint8* data) { mData = data; }&lt;br /&gt;
        uint8* getDataPtr() { return mData; }&lt;br /&gt;
    &lt;br /&gt;
        void setSize(size_t size) { mSize = size; }&lt;br /&gt;
        size_t getSize() const { return mSize; }&lt;br /&gt;
    &lt;br /&gt;
        void release();&lt;br /&gt;
    &lt;br /&gt;
    private:&lt;br /&gt;
        uint8* mData;&lt;br /&gt;
        size_t mSize;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; function of a &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;operator delete[]&amp;lt;/code&amp;gt; on the buffer pointer, unless the buffer pointer is null. If that would cause a problem for you, then the &amp;lt;code&amp;gt;unloadRawDataContainer&amp;lt;/code&amp;gt; function is your opportunity to empty the &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; before it is destroyed so that you can do cleanup in a different way.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
For example: If you are using a C++ function like this to open files,&lt;br /&gt;
&lt;br /&gt;
    typedef unsigned char uchar;&lt;br /&gt;
    &lt;br /&gt;
    std::pair&amp;lt;uchar *, size_t&amp;gt; open_file(const std::string &amp;amp; file) {&lt;br /&gt;
      if (FILE * source = fopen(file.str().c_str(), &amp;quot;rb&amp;quot;)) {&lt;br /&gt;
        fseek(source, 0, SEEK_END);&lt;br /&gt;
        int size = ftell(source);&lt;br /&gt;
        fseek(source, 0, SEEK_SET);&lt;br /&gt;
    &lt;br /&gt;
        uchar * buffer = new uchar[size];&lt;br /&gt;
        size_t num_read = fread(buffer, size, 1, source);&lt;br /&gt;
        (void)num_read;&lt;br /&gt;
        fclose(source);&lt;br /&gt;
    &lt;br /&gt;
        return std::make_pair(buffer, size);&lt;br /&gt;
      }&lt;br /&gt;
      throw file_not_found_exception(file);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
you can overload &amp;lt;code&amp;gt;loadRawDataContainer&amp;lt;/code&amp;gt; like this:&lt;br /&gt;
&lt;br /&gt;
    void myResourceProvider::loadRawDataContainer(const String&amp;amp; filename, RawDataContainer&amp;amp; output, const String&amp;amp; resourceGroup) {&lt;br /&gt;
      std::pair&amp;lt;uchar *, size_t&amp;gt; result = open_file(filename);&lt;br /&gt;
      output.setData(result.first);&lt;br /&gt;
      output.setSize(result.second);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You then don't need to override &amp;lt;code&amp;gt;unloadRawDataContainer&amp;lt;/code&amp;gt;, as CEGUI will call &amp;lt;code&amp;gt;delete[]&amp;lt;/code&amp;gt; later on its own. CEGUI owns the buffer that you loaded in this case.&lt;br /&gt;
However, if you implemented &amp;lt;code&amp;gt;open_file&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;malloc&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;new[]&amp;lt;/code&amp;gt;, you will get undefined behavior. Or even, if you compiled your project with one compiler and CEGUI with a different compiler, you may have problems if their memory allocation implementations are not compatible.&lt;br /&gt;
&lt;br /&gt;
If YOU want to own the buffer and not have CEGUI take ownership of it, you might do it like this instead:&lt;br /&gt;
&lt;br /&gt;
    typedef unsigned char uchar;&lt;br /&gt;
    &lt;br /&gt;
    std::vector&amp;lt;uchar&amp;gt; open_file(const std::string &amp;amp; file) {&lt;br /&gt;
      if (FILE * source = fopen(file.str().c_str(), &amp;quot;rb&amp;quot;)) {&lt;br /&gt;
        std::vector&amp;lt;uchar&amp;gt; buffer;&lt;br /&gt;
    &lt;br /&gt;
        fseek(source, 0, SEEK_END);&lt;br /&gt;
        int size = ftell(source);&lt;br /&gt;
        fseek(source, 0, SEEK_SET);&lt;br /&gt;
    &lt;br /&gt;
        buffer.resize(size);&lt;br /&gt;
        size_t num_read = fread(&amp;amp;buffer[0], size, 1, source);&lt;br /&gt;
        (void)num_read;&lt;br /&gt;
        fclose(source);&lt;br /&gt;
    &lt;br /&gt;
        return buffer;&lt;br /&gt;
      }&lt;br /&gt;
      throw file_not_found_exception(file);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
I'll assume, for sake of exposition, that as a member of the resource provider, or somewhere else available to you, you have a variable &amp;lt;code&amp;gt;std::map&amp;lt;std::string, std::vector&amp;lt;uchar&amp;gt;&amp;gt; cache_&amp;lt;/code&amp;gt; that keeps track of loaded files for the resource provider. Then your resource provider implementation might look like this:&lt;br /&gt;
&lt;br /&gt;
    typedef std::map&amp;lt;std::string, std::vector&amp;lt;uchar&amp;gt;&amp;gt; file_map;&lt;br /&gt;
    &lt;br /&gt;
    std::vector&amp;lt;uchar&amp;gt; &amp;amp; myResourceProvider::load_helper(const std::string &amp;amp; filename) {&lt;br /&gt;
      file_map::iterator it = cache_.find(filename);&lt;br /&gt;
      if (it != cache_.end()) {&lt;br /&gt;
        return it-&amp;gt;second;&lt;br /&gt;
      }&lt;br /&gt;
      cache_[filename] = open_file(filename);&lt;br /&gt;
      return cache_[filename];&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    void myResourceProvider::loadRawDataContainer(const String&amp;amp; filename, RawDataContainer&amp;amp; output, const String&amp;amp; resourceGroup) {&lt;br /&gt;
      std::vector&amp;lt;uchar&amp;gt; &amp;amp; data = load_helper(filename);&lt;br /&gt;
      output.setData(&amp;amp;data[0]);&lt;br /&gt;
      output.setSize(data.size());&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    void myResourceProvider::unloadRawDataContainer(RawDataContainer &amp;amp; output) {&lt;br /&gt;
      // Make sure cegui doesn't try to delete a buffer owned by our vector!&lt;br /&gt;
      output.setData(0);&lt;br /&gt;
      output.setSize(0);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Iceiceice</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Make_a_custom_resource_provider&amp;diff=5752</id>
		<title>Make a custom resource provider</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Make_a_custom_resource_provider&amp;diff=5752"/>
				<updated>2016-01-16T19:16:24Z</updated>
		
		<summary type="html">&lt;p&gt;Iceiceice: Created page with &amp;quot;Note: This page is a work in progress, targetted at CEGUI v0.8.4  The &amp;lt;code&amp;gt;ResourceProvider&amp;lt;/code&amp;gt; is the interface that CEGUI uses to load data files of all kinds -- XML, im...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Note: This page is a work in progress, targetted at CEGUI v0.8.4&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;ResourceProvider&amp;lt;/code&amp;gt; is the interface that CEGUI uses to load data files of all kinds -- XML, images, fonts, etc.&lt;br /&gt;
&lt;br /&gt;
If you followed the tutorial, then you are probably already vaguely familiar with the &amp;lt;code&amp;gt;DefaultResourceProvider&amp;lt;/code&amp;gt;. The default resource provider requires you to specify certain folders for each kind of resource. When CEGUI needs to acquire a resource, the default resource provider simply tries to fetch it from disk, accounting for differences between Unix-like and Windows systems.&lt;br /&gt;
&lt;br /&gt;
There are a few other resource providers that come with CEGUI, particularly, an OGRE resource provider, and Irrlicht one, which integrate with those systems more tightly.&lt;br /&gt;
&lt;br /&gt;
However, maybe you want to write your own resource provider. Why might you want to do this?&lt;br /&gt;
&lt;br /&gt;
# Maybe you want to limit how CEGUI accesses your filesystem. Perhaps you have some kind of virtual filesystem setup, and you prefer for security reasons to have all filesystem calls go through your interface rather than directly through the C / C++ filesystem API. Maybe you are trying to cope with bugs when handling unicode characters in filepaths on some platforms.&lt;br /&gt;
# Maybe you are targetting a platform where the filesystem is a bit unusual -- for instance, in emscripten.&lt;br /&gt;
# Maybe you are trying to optimize the resource acquisition process by making it cache all available on-disk resources up front for some scenario, and then serve them fast from buffers to CEGUI after that.&lt;br /&gt;
&lt;br /&gt;
To do this, you simply need to derive from &amp;lt;code&amp;gt;CEGUI::ResourceProvider&amp;lt;/code&amp;gt;, and start CEGUI using an instance of that instead of the default. This page is to help explain in greater detail what these overrided methods that you provide should do, what responsibilities they have, when they will be called, etc. And especially, to explain how the ownership of the various involved objects works, so that you can avoid leaking / creating undefined behavior.&lt;br /&gt;
&lt;br /&gt;
== ResourceProvider ==&lt;br /&gt;
&lt;br /&gt;
Here is a synopsis of the &amp;lt;code&amp;gt;CEGUI::ResourceProvider&amp;lt;/code&amp;gt; class and its most important methods:&lt;br /&gt;
&lt;br /&gt;
    class CEGUIEXPORT ResourceProvider :&lt;br /&gt;
        public AllocatedObject&amp;lt;ResourceProvider&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
        ResourceProvider() { }&lt;br /&gt;
        virtual ~ResourceProvider() {}&lt;br /&gt;
    &lt;br /&gt;
        virtual void loadRawDataContainer(const String&amp;amp; filename, RawDataContainer&amp;amp; output, const String&amp;amp; resourceGroup) = 0;&lt;br /&gt;
        virtual void unloadRawDataContainer(RawDataContainer&amp;amp;)  { }&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;AllocatedObject&amp;lt;/code&amp;gt; template is essentially a CEGUI internal detail related to memory management. You don't need to do anything special as a result of that inheritance -- you can just &amp;lt;code&amp;gt;new&amp;lt;/code&amp;gt; objects of this type, or derived from this type, and pass them to CEGUI as an appropriate argument to &amp;lt;code&amp;gt;CEGUI::System::create&amp;lt;/code&amp;gt;. CEGUI will take ownership of them and delete them as necessary.&lt;br /&gt;
&lt;br /&gt;
The two most important functions are the two that I picked out -- CEGUI calls these when it wants to load or unload a resource. It expects your resource provider to manipulate these &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; objects to pass it data.&lt;br /&gt;
&lt;br /&gt;
== RawDataContainer ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; is somewhat like a stripped-down &amp;lt;code&amp;gt;std::vector&amp;lt;/code&amp;gt;, except that it always points to an buffer of type &amp;lt;code&amp;gt;unsigned char&amp;lt;/code&amp;gt; and there are no &amp;quot;resize&amp;quot; methods or similar. It is always easy to get / set the size / data pointer of the &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt;, as it is intended that you should manipulate the class to get the semantics that you want.&lt;br /&gt;
&lt;br /&gt;
Synopsis of &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
    class CEGUIEXPORT RawDataContainer :&lt;br /&gt;
        public AllocatedObject&amp;lt;RawDataContainer&amp;gt;&lt;br /&gt;
    {&lt;br /&gt;
    public:&lt;br /&gt;
    &lt;br /&gt;
        RawDataContainer() : mData(0), mSize(0) {}&lt;br /&gt;
        ~RawDataContainer() { release(); }&lt;br /&gt;
    &lt;br /&gt;
        void setData(uint8* data) { mData = data; }&lt;br /&gt;
        uint8* getDataPtr() { return mData; }&lt;br /&gt;
    &lt;br /&gt;
        void setSize(size_t size) { mSize = size; }&lt;br /&gt;
        size_t getSize() const { return mSize; }&lt;br /&gt;
    &lt;br /&gt;
        void release();&lt;br /&gt;
    &lt;br /&gt;
    private:&lt;br /&gt;
        uint8* mData;&lt;br /&gt;
        size_t mSize;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;release&amp;lt;/code&amp;gt; function of a &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; calls &amp;lt;code&amp;gt;operator delete[]&amp;lt;/code&amp;gt; on the buffer pointer, unless the buffer pointer is null. If that would cause a problem for you, then the &amp;lt;code&amp;gt;unloadRawDataContainer&amp;lt;/code&amp;gt; function is your opportunity to empty the &amp;lt;code&amp;gt;RawDataContainer&amp;lt;/code&amp;gt; before it is destroyed so that you can do cleanup in a different way.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
For example: If you are using a C++ function like this to open files,&lt;br /&gt;
&lt;br /&gt;
    typedef unsigned char uchar;&lt;br /&gt;
    &lt;br /&gt;
    std::pair&amp;lt;uchar *, size_t&amp;gt; open_file(const std::string &amp;amp; file) {&lt;br /&gt;
      if (FILE * source = fopen(file.str().c_str(), &amp;quot;rb&amp;quot;)) {&lt;br /&gt;
        fseek(source, 0, SEEK_END);&lt;br /&gt;
        int size = ftell(source);&lt;br /&gt;
        fseek(source, 0, SEEK_SET);&lt;br /&gt;
    &lt;br /&gt;
        uchar * buffer = new uchar[size];&lt;br /&gt;
        size_t num_read = fread(buffer, size, 1, source);&lt;br /&gt;
        (void)num_read;&lt;br /&gt;
        fclose(source);&lt;br /&gt;
    &lt;br /&gt;
        return std::make_pair(buffer, size);&lt;br /&gt;
      }&lt;br /&gt;
      throw file_not_found_exception(file);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
you can overload &amp;lt;code&amp;gt;loadRawDataContainer&amp;lt;/code&amp;gt; like this:&lt;br /&gt;
&lt;br /&gt;
    void myResourceProvider::loadRawDataContainer(const String&amp;amp; filename, RawDataContainer&amp;amp; output, const String&amp;amp; resourceGroup) {&lt;br /&gt;
      std::pair&amp;lt;uchar *, size_t&amp;gt; result = open_file(filename);&lt;br /&gt;
      output.setData(result.first);&lt;br /&gt;
      output.setSize(result.second);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You then don't need to override &amp;lt;code&amp;gt;unloadRawDataContainer&amp;lt;/code&amp;gt;, as CEGUI will call &amp;lt;code&amp;gt;delete[]&amp;lt;/code&amp;gt; later on its own. CEGUI owns the buffer that you loaded in this case.&lt;br /&gt;
However, if you implemented &amp;lt;code&amp;gt;open_file&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;malloc&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;new[]&amp;lt;/code&amp;gt;, you will get undefined behavior. Or even, if you compiled your project with one compiler and CEGUI with a different compiler, you may have problems if their memory allocation implementations are not compatible.&lt;br /&gt;
&lt;br /&gt;
If YOU want to own the buffer and not have CEGUI take ownership of it, you might do it like this instead:&lt;br /&gt;
&lt;br /&gt;
    typedef unsigned char uchar;&lt;br /&gt;
    &lt;br /&gt;
    std::vector&amp;lt;uchar&amp;gt; open_file(const std::string &amp;amp; file) {&lt;br /&gt;
      if (FILE * source = fopen(file.str().c_str(), &amp;quot;rb&amp;quot;)) {&lt;br /&gt;
        std::vector&amp;lt;uchar&amp;gt; buffer;&lt;br /&gt;
    &lt;br /&gt;
        fseek(source, 0, SEEK_END);&lt;br /&gt;
        int size = ftell(source);&lt;br /&gt;
        fseek(source, 0, SEEK_SET);&lt;br /&gt;
    &lt;br /&gt;
        buffer.resize(size);&lt;br /&gt;
        size_t num_read = fread(&amp;amp;buffer[0], size, 1, source);&lt;br /&gt;
        (void)num_read;&lt;br /&gt;
        fclose(source);&lt;br /&gt;
    &lt;br /&gt;
        return buffer;&lt;br /&gt;
      }&lt;br /&gt;
      throw file_not_found_exception(file);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
I'll assume, for sake of exposition, that as a member of the resource provider, or somewhere else available to you, you have a variable &amp;lt;code&amp;gt;std::map&amp;lt;std::string, std::vector&amp;lt;uchar&amp;gt;&amp;gt; cache_&amp;lt;/code&amp;gt; that keeps track of loaded files for the resource provider. Then your resource provider implementation might look like this:&lt;br /&gt;
&lt;br /&gt;
    typedef std::map&amp;lt;std::string, std::vector&amp;lt;uchar&amp;gt;&amp;gt; file_map;&lt;br /&gt;
    &lt;br /&gt;
    std::vector&amp;lt;uchar&amp;gt; &amp;amp; myResourceProvider::load_helper(const std::string &amp;amp; filename) {&lt;br /&gt;
      file_map::iterator it = cache_.find(filename);&lt;br /&gt;
      if (it != cache_.end()) {&lt;br /&gt;
        return it-&amp;gt;second;&lt;br /&gt;
      }&lt;br /&gt;
      cache_[filename] = open_file(filename);&lt;br /&gt;
      return cache_[filename];&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    void myResourceProvider::loadRawDataContainer(const String&amp;amp; filename, RawDataContainer&amp;amp; output, const String&amp;amp; resourceGroup) {&lt;br /&gt;
      std::vector&amp;lt;uchar&amp;gt; &amp;amp; data = load_helper(filename);&lt;br /&gt;
      output.setData(&amp;amp;data[0]);&lt;br /&gt;
      output.setSize(data.size());&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    void myResourceProvider::unloadRawDataContainer(RawDataContainer &amp;amp; output) {&lt;br /&gt;
      // Make sure cegui doesn't try to delete a buffer owned by our vector!&lt;br /&gt;
      output.setData(0);&lt;br /&gt;
      output.setSize(0);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
[[Category:HowTo | ]]&lt;/div&gt;</summary>
		<author><name>Iceiceice</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=5751</id>
		<title>CEED</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=5751"/>
				<updated>2015-11-24T18:07:12Z</updated>
		
		<summary type="html">&lt;p&gt;Iceiceice: /* Ubuntu Trusty */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CEGUI unified editor. Includes project management and multi-file/multi-tab editing.&lt;br /&gt;
&lt;br /&gt;
== Building CEED on Windows ==&lt;br /&gt;
Follow these instructions for building and installing CEED on Windows OS: http://cegui.org.uk/wiki/Building_CEED_for_Windows&lt;br /&gt;
&lt;br /&gt;
Or, if you don't want to build it yourself, you can use the precompiled binaries: http://sourceforge.net/projects/crayzedsgui/files/CEED/0.8/&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
CEED from the v0-8 branch (and all snapshots) depend on CEGUI 0.8. Even though it may work with CEGUI &amp;quot;default&amp;quot; it is not tested with it so don't expect any help if you try to make it work that way.&lt;br /&gt;
&lt;br /&gt;
[http://www.cegui.org.uk/phpBB2/viewtopic.php?f=15&amp;amp;t=5566 Original post at the forums] (very old, don't use!)&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You need CMake, Python &amp;gt;= 2.6 (preferably Python 2.7), PyOpenGL, PySide (+ utils/tools), Boost.Python.&lt;br /&gt;
&lt;br /&gt;
==== Debian Wheezy ====&lt;br /&gt;
&lt;br /&gt;
PySide is part of Sid at the moment, so you have to add its repository address to your /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
 apt-get install cmake python-opengl pyside-tools boost-python&lt;br /&gt;
&lt;br /&gt;
==== Ubuntu Trusty ====&lt;br /&gt;
&lt;br /&gt;
In ubuntu, you must install the python-pyside package as well as pyside-tools, pyside-tools does not pull it in.&lt;br /&gt;
&lt;br /&gt;
  apt-get install python python-pyside pyside-tools python-opengl libboost-python-dev&lt;br /&gt;
&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
&lt;br /&gt;
You need at least python2, boost, python2-opengl, python2-pyside (AUR), python2-pyside-tools (AUR). PySide will bring in several other packages and will probably take a few hours to compile.&lt;br /&gt;
&lt;br /&gt;
'''Important Note''': You probably need to add &amp;quot;-DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7&amp;quot; (without the quotes) to the cmake command line below because Arch Linux defaults to python 3 but the python modules CMake script expects python2. Also different GLFW version might get mixed up causing the compilation to fail. So if you are just interested in compiling CEGUI for CEED, you might also want to add &amp;quot;-DCEGUI_SAMPLES_ENABLED=OFF&amp;quot; to the cmake command below.&lt;br /&gt;
&lt;br /&gt;
Arch Linux has the entire ceed packaged, see the AUR repo and save yourself all this trouble.&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools&lt;br /&gt;
&lt;br /&gt;
=== Build CEGUI and PyCEGUI ===&lt;br /&gt;
&lt;br /&gt;
(Or get it from distribution repo and skip this)&lt;br /&gt;
&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/cegui&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/ceed&lt;br /&gt;
 cd ceed&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 cd cegui&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 mkdir cegui/build&lt;br /&gt;
 cd cegui/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ &lt;br /&gt;
&lt;br /&gt;
==== Renderers ====&lt;br /&gt;
&lt;br /&gt;
CEED requires the OpenGL2 renderer to be enabled. This is what it uses to function. However in CEGUI 0.8 you have to enable both OpenGL2 and OpenGL3 renderers for the bindings to work correctly.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;CEGUI_BUILD_RENDERER_OPENGL&amp;quot; and &amp;quot;CEGUI_BUILD_RENDERER_OPENGL3&amp;quot; are both enabled before you build CEGUI.&lt;br /&gt;
&lt;br /&gt;
== Launch ==&lt;br /&gt;
&lt;br /&gt;
 cd ../ceed&lt;br /&gt;
 cd bin&lt;br /&gt;
 ./runwrapper.sh&lt;br /&gt;
 ./ceed-gui &lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 $ cd ../ceed/bin&lt;br /&gt;
 $ PYTHONPATH=../../cegui/build/lib:../:$PYTHONPATH python2 ./ceed-gui&lt;br /&gt;
&lt;br /&gt;
You will see a window like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_main_window.png]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
* If it fails to import ceed.ui.* then you need to compile UI files, call&lt;br /&gt;
 [ceed] ./maintenance compile-ui-files&lt;br /&gt;
Or alternatively edit ceed/version.py and set CEED_developerMode to True.&lt;br /&gt;
* If the data files are missing you need to run the 'maintenance' script like this:&lt;br /&gt;
 [ceed/bin]$ cd ..&lt;br /&gt;
 [ceed]$ ./maintenance fetch-datafiles&lt;br /&gt;
&lt;br /&gt;
== Project ==&lt;br /&gt;
&lt;br /&gt;
Unlike old editors (CELayoutEditor and CEImagesetEditor), CEED has a notion of a project. Each project has its own combination of resources and runs its own CEGUI version to render your CEGUI resources. This allows you to have more that one scheme loaded at a time.&lt;br /&gt;
&lt;br /&gt;
To create a new project, you should go to '''File -&amp;gt; New project'''.&lt;br /&gt;
&lt;br /&gt;
The dialog appears. You should input project name and location of the &amp;quot;.project&amp;quot; file. '''Note''': parent directory of the &amp;quot;.project&amp;quot; file must exist.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project.png]]&lt;br /&gt;
&lt;br /&gt;
After you press '''OK''', Project settings window appears.&lt;br /&gt;
&lt;br /&gt;
=== Project settings ===&lt;br /&gt;
&lt;br /&gt;
(The window is also accessible from '''Edit -&amp;gt; Project settings''')&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_settings.png]]&lt;br /&gt;
&lt;br /&gt;
CEED can create assets for CEGUI versions: 0.6 to 0.8. 0.7 is the latest stable, so select it.&lt;br /&gt;
&lt;br /&gt;
Point &amp;quot;Resource directory&amp;quot; to the place where &amp;quot;fonts&amp;quot;, &amp;quot;schemes&amp;quot; and the rest directories are located, then press '''Apply'''. It will change the paths below.&lt;br /&gt;
&lt;br /&gt;
Press '''OK''' and will load your resources. If it fails to, it will show you a warning dialog:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project_warning.png]]&lt;br /&gt;
&lt;br /&gt;
In our case, the resource directory does not have &amp;quot;schemes&amp;quot; subdirectory, as noted on the last line. Correct the paths and retry.&lt;br /&gt;
&lt;br /&gt;
=== Project resources ===&lt;br /&gt;
&lt;br /&gt;
Currently CEED can only work with imagesets and layouts. Add them to your project by clicking with the right mouse button on '''Project manager''' and selecting '''Add existing file(s)''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_add_existing.png]]&lt;br /&gt;
&lt;br /&gt;
Select the necessary imagesets and layouts, and save the project.&lt;br /&gt;
&lt;br /&gt;
=== Layouts ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_layout.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new widget, drag it from the left bottom panel.&lt;br /&gt;
&lt;br /&gt;
If you just created a new layout using CEED, you will notice that both the Visual and the Code views are empty. The created file is indeed entirely empty so far. In order to start working, we recommend to add a DefaultWindow as root, and add everything else to this root. In CEGUI it is always recommended to have a root window that covers the entire screen (you can do this by simply setting a window's size to {1.0, 1.0} relative sizes and the position to 0, which is both the default for DefaultWindow's). You can simply drag a DefaultWindow into the Widget Hierarchy or into the Visual window to add a new DefaultWindow as root for your empty layout. If you switch to the code window you will see that the basic XML structure of your layout has been set up for you.&lt;br /&gt;
&lt;br /&gt;
To edit it, you can either do it visually, or switch to &amp;quot;Code&amp;quot; tab seen below, and edit it manually. There's also &amp;quot;Preview&amp;quot; tab, where you can test your layout in real time.&lt;br /&gt;
&lt;br /&gt;
=== Imagesets ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new image, press tool bar button second from the right, or click with the right mouse button on the image itself and select '''Create image''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset_create_image.png]]&lt;br /&gt;
&lt;br /&gt;
It creates a 50 x 50 rectangle centered at where mouse cursor is. Move and resize it as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
Go to '''Edit -&amp;gt; Application settings'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_application_settings.png]]&lt;br /&gt;
&lt;br /&gt;
There are many settings you can tweak. One of the most important might be '''Shortcuts'''. It allows you to assign shortcuts to zoom, image creation, opening a project, and so on.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You can now use the ceed-migrate tool for converting between old and new CEGUI datafiles. Here is a quick guide for that: http://cegui.org.uk/wiki/Using_CEED-Migrate&lt;br /&gt;
&lt;br /&gt;
Currently you may have problems with Imagesets that use TGA, since some versions of Qt may be built without TGA support. CEGUI 0.8 has all imagery as PNG (CEGUI 0.7 used TGA), and we advise you to use PNG instead of TGA.&lt;br /&gt;
&lt;br /&gt;
== Complete Install Notes for Ubuntu ==&lt;br /&gt;
&lt;br /&gt;
This script was tested Nov 24 2015 with a fresh install of Ubuntu 15.10 Wily, and successfully installed working ceed in home directory. Build took approximately 1 hour with 3 cores.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 set -e&lt;br /&gt;
 set -u &lt;br /&gt;
 &lt;br /&gt;
 # Install dependencies&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get -y upgrade&lt;br /&gt;
 &lt;br /&gt;
 # Build tools&lt;br /&gt;
 sudo apt-get -y install gcc g++&lt;br /&gt;
 sudo apt-get -y install mercurial cmake-data cmake scons make ccache&lt;br /&gt;
 &lt;br /&gt;
 # Cegui deps&lt;br /&gt;
 sudo apt-get -y install libfreetype6-dev libsilly-dev libxml2-dev libexpat1-dev libgles2-mesa-dev libglfw-dev libglew-dev libglm-dev&lt;br /&gt;
 &lt;br /&gt;
 # Ceed deps&lt;br /&gt;
 sudo apt-get -y install python python-pyside pyside-tools python-opengl libboost-python-dev&lt;br /&gt;
 &lt;br /&gt;
 # Clone Repositories&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/cegui&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/ceed&lt;br /&gt;
 cd ceed&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 cd cegui&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 &lt;br /&gt;
 # Build cegui with python bindings&lt;br /&gt;
 mkdir cegui/build&lt;br /&gt;
 cd cegui/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ &lt;br /&gt;
 make -j3&lt;br /&gt;
 cd ../..&lt;br /&gt;
 &lt;br /&gt;
 # Adjust ceed &amp;quot;runwrapper.sh&amp;quot; path&lt;br /&gt;
 cd ceed/bin&lt;br /&gt;
 sed -i &amp;quot;s|/../../cegui-v0-8|/../../cegui|g&amp;quot; runwrapper.sh&lt;br /&gt;
 &lt;br /&gt;
 # Now run from ceed/bin with commands:&lt;br /&gt;
 #  ./runwrapper.sh&lt;br /&gt;
 #  ./ceed-gui&lt;/div&gt;</summary>
		<author><name>Iceiceice</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=5750</id>
		<title>CEED</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=5750"/>
				<updated>2015-11-24T18:03:01Z</updated>
		
		<summary type="html">&lt;p&gt;Iceiceice: /* Complete Install Notes for Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CEGUI unified editor. Includes project management and multi-file/multi-tab editing.&lt;br /&gt;
&lt;br /&gt;
== Building CEED on Windows ==&lt;br /&gt;
Follow these instructions for building and installing CEED on Windows OS: http://cegui.org.uk/wiki/Building_CEED_for_Windows&lt;br /&gt;
&lt;br /&gt;
Or, if you don't want to build it yourself, you can use the precompiled binaries: http://sourceforge.net/projects/crayzedsgui/files/CEED/0.8/&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
CEED from the v0-8 branch (and all snapshots) depend on CEGUI 0.8. Even though it may work with CEGUI &amp;quot;default&amp;quot; it is not tested with it so don't expect any help if you try to make it work that way.&lt;br /&gt;
&lt;br /&gt;
[http://www.cegui.org.uk/phpBB2/viewtopic.php?f=15&amp;amp;t=5566 Original post at the forums] (very old, don't use!)&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You need CMake, Python &amp;gt;= 2.6 (preferably Python 2.7), PyOpenGL, PySide (+ utils/tools), Boost.Python.&lt;br /&gt;
&lt;br /&gt;
==== Debian Wheezy ====&lt;br /&gt;
&lt;br /&gt;
PySide is part of Sid at the moment, so you have to add its repository address to your /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
 apt-get install cmake python-opengl pyside-tools boost-python&lt;br /&gt;
&lt;br /&gt;
==== Ubuntu Trusty ====&lt;br /&gt;
&lt;br /&gt;
In ubuntu, you must install the python-pyside package as well as pyside-tools, pyside-tools does not pull it in.&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install python python-pyside pyside-tools python-opengl libboost-python-dev&lt;br /&gt;
&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
&lt;br /&gt;
You need at least python2, boost, python2-opengl, python2-pyside (AUR), python2-pyside-tools (AUR). PySide will bring in several other packages and will probably take a few hours to compile.&lt;br /&gt;
&lt;br /&gt;
'''Important Note''': You probably need to add &amp;quot;-DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7&amp;quot; (without the quotes) to the cmake command line below because Arch Linux defaults to python 3 but the python modules CMake script expects python2. Also different GLFW version might get mixed up causing the compilation to fail. So if you are just interested in compiling CEGUI for CEED, you might also want to add &amp;quot;-DCEGUI_SAMPLES_ENABLED=OFF&amp;quot; to the cmake command below.&lt;br /&gt;
&lt;br /&gt;
Arch Linux has the entire ceed packaged, see the AUR repo and save yourself all this trouble.&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools&lt;br /&gt;
&lt;br /&gt;
=== Build CEGUI and PyCEGUI ===&lt;br /&gt;
&lt;br /&gt;
(Or get it from distribution repo and skip this)&lt;br /&gt;
&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/cegui&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/ceed&lt;br /&gt;
 cd ceed&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 cd cegui&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 mkdir cegui/build&lt;br /&gt;
 cd cegui/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ &lt;br /&gt;
&lt;br /&gt;
==== Renderers ====&lt;br /&gt;
&lt;br /&gt;
CEED requires the OpenGL2 renderer to be enabled. This is what it uses to function. However in CEGUI 0.8 you have to enable both OpenGL2 and OpenGL3 renderers for the bindings to work correctly.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;CEGUI_BUILD_RENDERER_OPENGL&amp;quot; and &amp;quot;CEGUI_BUILD_RENDERER_OPENGL3&amp;quot; are both enabled before you build CEGUI.&lt;br /&gt;
&lt;br /&gt;
== Launch ==&lt;br /&gt;
&lt;br /&gt;
 cd ../ceed&lt;br /&gt;
 cd bin&lt;br /&gt;
 ./runwrapper.sh&lt;br /&gt;
 ./ceed-gui &lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 $ cd ../ceed/bin&lt;br /&gt;
 $ PYTHONPATH=../../cegui/build/lib:../:$PYTHONPATH python2 ./ceed-gui&lt;br /&gt;
&lt;br /&gt;
You will see a window like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_main_window.png]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
* If it fails to import ceed.ui.* then you need to compile UI files, call&lt;br /&gt;
 [ceed] ./maintenance compile-ui-files&lt;br /&gt;
Or alternatively edit ceed/version.py and set CEED_developerMode to True.&lt;br /&gt;
* If the data files are missing you need to run the 'maintenance' script like this:&lt;br /&gt;
 [ceed/bin]$ cd ..&lt;br /&gt;
 [ceed]$ ./maintenance fetch-datafiles&lt;br /&gt;
&lt;br /&gt;
== Project ==&lt;br /&gt;
&lt;br /&gt;
Unlike old editors (CELayoutEditor and CEImagesetEditor), CEED has a notion of a project. Each project has its own combination of resources and runs its own CEGUI version to render your CEGUI resources. This allows you to have more that one scheme loaded at a time.&lt;br /&gt;
&lt;br /&gt;
To create a new project, you should go to '''File -&amp;gt; New project'''.&lt;br /&gt;
&lt;br /&gt;
The dialog appears. You should input project name and location of the &amp;quot;.project&amp;quot; file. '''Note''': parent directory of the &amp;quot;.project&amp;quot; file must exist.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project.png]]&lt;br /&gt;
&lt;br /&gt;
After you press '''OK''', Project settings window appears.&lt;br /&gt;
&lt;br /&gt;
=== Project settings ===&lt;br /&gt;
&lt;br /&gt;
(The window is also accessible from '''Edit -&amp;gt; Project settings''')&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_settings.png]]&lt;br /&gt;
&lt;br /&gt;
CEED can create assets for CEGUI versions: 0.6 to 0.8. 0.7 is the latest stable, so select it.&lt;br /&gt;
&lt;br /&gt;
Point &amp;quot;Resource directory&amp;quot; to the place where &amp;quot;fonts&amp;quot;, &amp;quot;schemes&amp;quot; and the rest directories are located, then press '''Apply'''. It will change the paths below.&lt;br /&gt;
&lt;br /&gt;
Press '''OK''' and will load your resources. If it fails to, it will show you a warning dialog:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project_warning.png]]&lt;br /&gt;
&lt;br /&gt;
In our case, the resource directory does not have &amp;quot;schemes&amp;quot; subdirectory, as noted on the last line. Correct the paths and retry.&lt;br /&gt;
&lt;br /&gt;
=== Project resources ===&lt;br /&gt;
&lt;br /&gt;
Currently CEED can only work with imagesets and layouts. Add them to your project by clicking with the right mouse button on '''Project manager''' and selecting '''Add existing file(s)''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_add_existing.png]]&lt;br /&gt;
&lt;br /&gt;
Select the necessary imagesets and layouts, and save the project.&lt;br /&gt;
&lt;br /&gt;
=== Layouts ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_layout.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new widget, drag it from the left bottom panel.&lt;br /&gt;
&lt;br /&gt;
If you just created a new layout using CEED, you will notice that both the Visual and the Code views are empty. The created file is indeed entirely empty so far. In order to start working, we recommend to add a DefaultWindow as root, and add everything else to this root. In CEGUI it is always recommended to have a root window that covers the entire screen (you can do this by simply setting a window's size to {1.0, 1.0} relative sizes and the position to 0, which is both the default for DefaultWindow's). You can simply drag a DefaultWindow into the Widget Hierarchy or into the Visual window to add a new DefaultWindow as root for your empty layout. If you switch to the code window you will see that the basic XML structure of your layout has been set up for you.&lt;br /&gt;
&lt;br /&gt;
To edit it, you can either do it visually, or switch to &amp;quot;Code&amp;quot; tab seen below, and edit it manually. There's also &amp;quot;Preview&amp;quot; tab, where you can test your layout in real time.&lt;br /&gt;
&lt;br /&gt;
=== Imagesets ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new image, press tool bar button second from the right, or click with the right mouse button on the image itself and select '''Create image''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset_create_image.png]]&lt;br /&gt;
&lt;br /&gt;
It creates a 50 x 50 rectangle centered at where mouse cursor is. Move and resize it as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
Go to '''Edit -&amp;gt; Application settings'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_application_settings.png]]&lt;br /&gt;
&lt;br /&gt;
There are many settings you can tweak. One of the most important might be '''Shortcuts'''. It allows you to assign shortcuts to zoom, image creation, opening a project, and so on.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You can now use the ceed-migrate tool for converting between old and new CEGUI datafiles. Here is a quick guide for that: http://cegui.org.uk/wiki/Using_CEED-Migrate&lt;br /&gt;
&lt;br /&gt;
Currently you may have problems with Imagesets that use TGA, since some versions of Qt may be built without TGA support. CEGUI 0.8 has all imagery as PNG (CEGUI 0.7 used TGA), and we advise you to use PNG instead of TGA.&lt;br /&gt;
&lt;br /&gt;
== Complete Install Notes for Ubuntu ==&lt;br /&gt;
&lt;br /&gt;
This script was tested Nov 24 2015 with a fresh install of Ubuntu 15.10 Wily, and successfully installed working ceed in home directory. Build took approximately 1 hour with 3 cores.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 set -e&lt;br /&gt;
 set -u &lt;br /&gt;
 &lt;br /&gt;
 # Install dependencies&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get -y upgrade&lt;br /&gt;
 &lt;br /&gt;
 # Build tools&lt;br /&gt;
 sudo apt-get -y install gcc g++&lt;br /&gt;
 sudo apt-get -y install mercurial cmake-data cmake scons make ccache&lt;br /&gt;
 &lt;br /&gt;
 # Cegui deps&lt;br /&gt;
 sudo apt-get -y install libfreetype6-dev libsilly-dev libxml2-dev libexpat1-dev libgles2-mesa-dev libglfw-dev libglew-dev libglm-dev&lt;br /&gt;
 &lt;br /&gt;
 # Ceed deps&lt;br /&gt;
 sudo apt-get -y install python python-pyside pyside-tools python-opengl libboost-python-dev&lt;br /&gt;
 &lt;br /&gt;
 # Clone Repositories&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/cegui&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/ceed&lt;br /&gt;
 cd ceed&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 cd cegui&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 &lt;br /&gt;
 # Build cegui with python bindings&lt;br /&gt;
 mkdir cegui/build&lt;br /&gt;
 cd cegui/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ &lt;br /&gt;
 make -j3&lt;br /&gt;
 cd ../..&lt;br /&gt;
 &lt;br /&gt;
 # Adjust ceed &amp;quot;runwrapper.sh&amp;quot; path&lt;br /&gt;
 cd ceed/bin&lt;br /&gt;
 sed -i &amp;quot;s|/../../cegui-v0-8|/../../cegui|g&amp;quot; runwrapper.sh&lt;br /&gt;
 &lt;br /&gt;
 # Now run from ceed/bin with commands:&lt;br /&gt;
 #  ./runwrapper.sh&lt;br /&gt;
 #  ./ceed-gui&lt;/div&gt;</summary>
		<author><name>Iceiceice</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=5749</id>
		<title>CEED</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=5749"/>
				<updated>2015-11-24T18:01:08Z</updated>
		
		<summary type="html">&lt;p&gt;Iceiceice: Add a complete install log for Ubuntu 15.10 Wily&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CEGUI unified editor. Includes project management and multi-file/multi-tab editing.&lt;br /&gt;
&lt;br /&gt;
== Building CEED on Windows ==&lt;br /&gt;
Follow these instructions for building and installing CEED on Windows OS: http://cegui.org.uk/wiki/Building_CEED_for_Windows&lt;br /&gt;
&lt;br /&gt;
Or, if you don't want to build it yourself, you can use the precompiled binaries: http://sourceforge.net/projects/crayzedsgui/files/CEED/0.8/&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
CEED from the v0-8 branch (and all snapshots) depend on CEGUI 0.8. Even though it may work with CEGUI &amp;quot;default&amp;quot; it is not tested with it so don't expect any help if you try to make it work that way.&lt;br /&gt;
&lt;br /&gt;
[http://www.cegui.org.uk/phpBB2/viewtopic.php?f=15&amp;amp;t=5566 Original post at the forums] (very old, don't use!)&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You need CMake, Python &amp;gt;= 2.6 (preferably Python 2.7), PyOpenGL, PySide (+ utils/tools), Boost.Python.&lt;br /&gt;
&lt;br /&gt;
==== Debian Wheezy ====&lt;br /&gt;
&lt;br /&gt;
PySide is part of Sid at the moment, so you have to add its repository address to your /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
 apt-get install cmake python-opengl pyside-tools boost-python&lt;br /&gt;
&lt;br /&gt;
==== Ubuntu Trusty ====&lt;br /&gt;
&lt;br /&gt;
In ubuntu, you must install the python-pyside package as well as pyside-tools, pyside-tools does not pull it in.&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install python python-pyside pyside-tools python-opengl libboost-python-dev&lt;br /&gt;
&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
&lt;br /&gt;
You need at least python2, boost, python2-opengl, python2-pyside (AUR), python2-pyside-tools (AUR). PySide will bring in several other packages and will probably take a few hours to compile.&lt;br /&gt;
&lt;br /&gt;
'''Important Note''': You probably need to add &amp;quot;-DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7&amp;quot; (without the quotes) to the cmake command line below because Arch Linux defaults to python 3 but the python modules CMake script expects python2. Also different GLFW version might get mixed up causing the compilation to fail. So if you are just interested in compiling CEGUI for CEED, you might also want to add &amp;quot;-DCEGUI_SAMPLES_ENABLED=OFF&amp;quot; to the cmake command below.&lt;br /&gt;
&lt;br /&gt;
Arch Linux has the entire ceed packaged, see the AUR repo and save yourself all this trouble.&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools&lt;br /&gt;
&lt;br /&gt;
=== Build CEGUI and PyCEGUI ===&lt;br /&gt;
&lt;br /&gt;
(Or get it from distribution repo and skip this)&lt;br /&gt;
&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/cegui&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/ceed&lt;br /&gt;
 cd ceed&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 cd cegui&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 mkdir cegui/build&lt;br /&gt;
 cd cegui/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ &lt;br /&gt;
&lt;br /&gt;
==== Renderers ====&lt;br /&gt;
&lt;br /&gt;
CEED requires the OpenGL2 renderer to be enabled. This is what it uses to function. However in CEGUI 0.8 you have to enable both OpenGL2 and OpenGL3 renderers for the bindings to work correctly.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;CEGUI_BUILD_RENDERER_OPENGL&amp;quot; and &amp;quot;CEGUI_BUILD_RENDERER_OPENGL3&amp;quot; are both enabled before you build CEGUI.&lt;br /&gt;
&lt;br /&gt;
== Launch ==&lt;br /&gt;
&lt;br /&gt;
 cd ../ceed&lt;br /&gt;
 cd bin&lt;br /&gt;
 ./runwrapper.sh&lt;br /&gt;
 ./ceed-gui &lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 $ cd ../ceed/bin&lt;br /&gt;
 $ PYTHONPATH=../../cegui/build/lib:../:$PYTHONPATH python2 ./ceed-gui&lt;br /&gt;
&lt;br /&gt;
You will see a window like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_main_window.png]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
* If it fails to import ceed.ui.* then you need to compile UI files, call&lt;br /&gt;
 [ceed] ./maintenance compile-ui-files&lt;br /&gt;
Or alternatively edit ceed/version.py and set CEED_developerMode to True.&lt;br /&gt;
* If the data files are missing you need to run the 'maintenance' script like this:&lt;br /&gt;
 [ceed/bin]$ cd ..&lt;br /&gt;
 [ceed]$ ./maintenance fetch-datafiles&lt;br /&gt;
&lt;br /&gt;
== Project ==&lt;br /&gt;
&lt;br /&gt;
Unlike old editors (CELayoutEditor and CEImagesetEditor), CEED has a notion of a project. Each project has its own combination of resources and runs its own CEGUI version to render your CEGUI resources. This allows you to have more that one scheme loaded at a time.&lt;br /&gt;
&lt;br /&gt;
To create a new project, you should go to '''File -&amp;gt; New project'''.&lt;br /&gt;
&lt;br /&gt;
The dialog appears. You should input project name and location of the &amp;quot;.project&amp;quot; file. '''Note''': parent directory of the &amp;quot;.project&amp;quot; file must exist.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project.png]]&lt;br /&gt;
&lt;br /&gt;
After you press '''OK''', Project settings window appears.&lt;br /&gt;
&lt;br /&gt;
=== Project settings ===&lt;br /&gt;
&lt;br /&gt;
(The window is also accessible from '''Edit -&amp;gt; Project settings''')&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_settings.png]]&lt;br /&gt;
&lt;br /&gt;
CEED can create assets for CEGUI versions: 0.6 to 0.8. 0.7 is the latest stable, so select it.&lt;br /&gt;
&lt;br /&gt;
Point &amp;quot;Resource directory&amp;quot; to the place where &amp;quot;fonts&amp;quot;, &amp;quot;schemes&amp;quot; and the rest directories are located, then press '''Apply'''. It will change the paths below.&lt;br /&gt;
&lt;br /&gt;
Press '''OK''' and will load your resources. If it fails to, it will show you a warning dialog:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project_warning.png]]&lt;br /&gt;
&lt;br /&gt;
In our case, the resource directory does not have &amp;quot;schemes&amp;quot; subdirectory, as noted on the last line. Correct the paths and retry.&lt;br /&gt;
&lt;br /&gt;
=== Project resources ===&lt;br /&gt;
&lt;br /&gt;
Currently CEED can only work with imagesets and layouts. Add them to your project by clicking with the right mouse button on '''Project manager''' and selecting '''Add existing file(s)''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_add_existing.png]]&lt;br /&gt;
&lt;br /&gt;
Select the necessary imagesets and layouts, and save the project.&lt;br /&gt;
&lt;br /&gt;
=== Layouts ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_layout.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new widget, drag it from the left bottom panel.&lt;br /&gt;
&lt;br /&gt;
If you just created a new layout using CEED, you will notice that both the Visual and the Code views are empty. The created file is indeed entirely empty so far. In order to start working, we recommend to add a DefaultWindow as root, and add everything else to this root. In CEGUI it is always recommended to have a root window that covers the entire screen (you can do this by simply setting a window's size to {1.0, 1.0} relative sizes and the position to 0, which is both the default for DefaultWindow's). You can simply drag a DefaultWindow into the Widget Hierarchy or into the Visual window to add a new DefaultWindow as root for your empty layout. If you switch to the code window you will see that the basic XML structure of your layout has been set up for you.&lt;br /&gt;
&lt;br /&gt;
To edit it, you can either do it visually, or switch to &amp;quot;Code&amp;quot; tab seen below, and edit it manually. There's also &amp;quot;Preview&amp;quot; tab, where you can test your layout in real time.&lt;br /&gt;
&lt;br /&gt;
=== Imagesets ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new image, press tool bar button second from the right, or click with the right mouse button on the image itself and select '''Create image''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset_create_image.png]]&lt;br /&gt;
&lt;br /&gt;
It creates a 50 x 50 rectangle centered at where mouse cursor is. Move and resize it as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
Go to '''Edit -&amp;gt; Application settings'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_application_settings.png]]&lt;br /&gt;
&lt;br /&gt;
There are many settings you can tweak. One of the most important might be '''Shortcuts'''. It allows you to assign shortcuts to zoom, image creation, opening a project, and so on.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
You can now use the ceed-migrate tool for converting between old and new CEGUI datafiles. Here is a quick guide for that: http://cegui.org.uk/wiki/Using_CEED-Migrate&lt;br /&gt;
&lt;br /&gt;
Currently you may have problems with Imagesets that use TGA, since some versions of Qt may be built without TGA support. CEGUI 0.8 has all imagery as PNG (CEGUI 0.7 used TGA), and we advise you to use PNG instead of TGA.&lt;br /&gt;
&lt;br /&gt;
== Complete Install Notes for Ubuntu ==&lt;br /&gt;
&lt;br /&gt;
This script was tested Nov 24 2015 with a fresh install of Ubuntu 15.10 Wily, and successfully installed working ceed in home directory.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 set -e&lt;br /&gt;
 set -u&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get -y upgrade&lt;br /&gt;
 &lt;br /&gt;
 # Build tools&lt;br /&gt;
 sudo apt-get -y install gcc g++&lt;br /&gt;
 sudo apt-get -y install mercurial cmake-data cmake scons make ccache&lt;br /&gt;
 &lt;br /&gt;
 # Cegui deps&lt;br /&gt;
 sudo apt-get -y install libfreetype6-dev libsilly-dev libxml2-dev libexpat1-dev libgles2-mesa-dev libglfw-dev libglew-dev libglm-dev&lt;br /&gt;
 &lt;br /&gt;
 # Ceed deps&lt;br /&gt;
 sudo apt-get install python python-pyside pyside-tools python-opengl libboost-python-dev&lt;br /&gt;
 &lt;br /&gt;
 # Clone Repositories&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/cegui&lt;br /&gt;
 hg clone https://bitbucket.org/cegui/ceed&lt;br /&gt;
 cd ceed&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 cd cegui&lt;br /&gt;
 hg update v0-8&lt;br /&gt;
 cd ../&lt;br /&gt;
 &lt;br /&gt;
 # Build cegui with python bindings&lt;br /&gt;
 mkdir cegui/build&lt;br /&gt;
 cd cegui/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ &lt;br /&gt;
 make -j3&lt;br /&gt;
 cd ../..&lt;br /&gt;
 &lt;br /&gt;
 # Adjust ceed &amp;quot;runwrapper.sh&amp;quot; path&lt;br /&gt;
 cd ceed/bin&lt;br /&gt;
 sed -i &amp;quot;s|/../../cegui-v0-8|/../../cegui|g&amp;quot; runwrapper.sh&lt;br /&gt;
 &lt;br /&gt;
 # Now run from ceed/bin with commands:&lt;br /&gt;
 #  ./runwrapper.sh&lt;br /&gt;
 #  ./ceed-gui&lt;/div&gt;</summary>
		<author><name>Iceiceice</name></author>	</entry>

	</feed>