Changes between Version 4 and Version 5 of documentation/C++Manual/Interfaces

Show
Ignore:
Author:
lloydw (IP: 24.82.134.185)
Timestamp:
09/17/10 04:43:17 (7 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • documentation/C++Manual/Interfaces

    v4 v5  
    2121{{{ 
    2222// Opens a file. 
    23 virtual Rocket::Core::FileHandle Open(const EMP::Core::String& path) = 0; 
     23virtual Rocket::Core::FileHandle Open(const Rocket::Core::String& path) = 0; 
    2424 
    2525// Closes a previously opened file. 
    6363{{{ 
    6464// Translate the input string into the translated string. 
    65 virtual int TranslateString(EMP::Core::String& translated, const EMP::Core::String& input); 
     65virtual int TranslateString(Rocket::Core::String& translated, const Rocket::Core::String& input); 
    6666 
    6767// Log the specified message. 
    68 virtual bool LogMessage(EMP::Core::Log::Type type, const EMP::Core::String& message); 
     68virtual bool LogMessage(Rocket::Core::Log::Type type, const Rocket::Core::String& message); 
    6969}}} 
    7070 
    7777Note that the translated text can include RML tags and they will be processed as if they were in the original stream; this can be used, for example, to substitute images for certain tokens. 
    7878 
    79 The LogMessage() function is called whenever Rocket generates a message. ''type'' is one of the logging type, ''EMP::Core::Log::ERROR'' for error messages, ''EMP::Core::Log::ASSERT'' for failed internal assertions (debug library only), ''EMP::Core::Log::WARNING'' for non-fatal warnings, or ''EMP::Core::Log::INFO'' for generic information messages. The ''message'' parameter is the actual message itself. The function should return true if program execution should continue, or false to generate an interrupt to break execution. This can be useful if you are running inside a debugger to see exactly what an application is doing to trigger a certain message. 
     79The LogMessage() function is called whenever Rocket generates a message. ''type'' is one of the logging type, ''Rocket::Core::Log::ERROR'' for error messages, ''Rocket::Core::Log::ASSERT'' for failed internal assertions (debug library only), ''Rocket::Core::Log::WARNING'' for non-fatal warnings, or ''Rocket::Core::Log::INFO'' for generic information messages. The ''message'' parameter is the actual message itself. The function should return true if program execution should continue, or false to generate an interrupt to break execution. This can be useful if you are running inside a debugger to see exactly what an application is doing to trigger a certain message. 
    8080 
    8181== The render interface == 
    8383The render interface is how Rocket sends its generated geometry through to the application to render. It also uses the interface to load textures from external sources and from internally generated pixel data (for font textures). Applications must install a render interface before initialising Rocket. 
    8484 
    85 The render interface is given in <EMP/Core/RenderInterface.h>. To develop a custom render interface, create a class derived from ''EMP::Core::RenderInterface'' and provide function definitions for the pure virtual functions, and any of the others that you wish to provide functionality for. 
     85The render interface is given in <EMP/Core/RenderInterface.h>. To develop a custom render interface, create a class derived from ''Rocket::Core::RenderInterface'' and provide function definitions for the pure virtual functions, and any of the others that you wish to provide functionality for. 
    8686 
    8787=== Rendering simple geometry === 
    9191{{{ 
    9292// Called by Rocket when it wants to render geometry that the application does not wish to optimise. 
    93 virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture, const EMP::Core::Vector2f& translation) = 0; 
     93virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f& translation) = 0; 
    9494}}} 
    9595 
    109109 
    110110// Called by Rocket when it wants to render application-compiled geometry. 
    111 virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Core::EMP::Vector2f& translation); 
     111virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Core::Rocket::Vector2f& translation); 
    112112 
    113113// Called by Rocket when it wants to release application-compiled geometry. 
    148148// Called by Rocket when a texture is required by the library. 
    149149virtual bool LoadTexture(Rocket::Core::TextureHandle& texture_handle, 
    150                          EMP::Core::Vector2i& texture_dimensions, 
    151                          const EMP::Core::String& source, 
    152                          const EMP::Core::String& source_path) = 0; 
     150                         Rocket::Core::Vector2i& texture_dimensions, 
     151                         const Rocket::Core::String& source) = 0; 
    153152 
    154153// Called by Rocket when a texture is required to be built from an internally-generated sequence of pixels. 
    155154virtual bool GenerateTexture(Rocket::Core::TextureHandle& texture_handle, 
    156                              const EMP::Core::byte* source, 
    157                              const EMP::Core::Vector2i& source_dimensions) = 0; 
     155                             const Rocket::Core::byte* source, 
     156                             const Rocket::Core::Vector2i& source_dimensions) = 0; 
    158157 
    159158// Called by Rocket when a loaded texture is no longer required.