From b59b93d3943262cb66e3355e0c9ce0ea672ff196 Mon Sep 17 00:00:00 2001 From: jonas Date: Fri, 1 Feb 2019 13:38:52 +0100 Subject: Documentation --- cObjectHandler.h | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'cObjectHandler.h') diff --git a/cObjectHandler.h b/cObjectHandler.h index 47e138c..6dda0a8 100644 --- a/cObjectHandler.h +++ b/cObjectHandler.h @@ -12,27 +12,32 @@ using namespace std; -/** Manages cObjects and writes them to screenbuffer -* forwards input events to cObjects +/** +* Manages cObject and cWiremesh and writes them to a cRender framebuffer. +* forwards input events to corresponding cObject. */ class cObjectHandler { public: - /** *_render: pointer to instance of cRender all objects will be written to + /** + * *_render: pointer to instance of cRender all objects will be written to */ cObjectHandler(cRender *_render); - /** Adds _object to managed objects vector + /** + * Adds _object to managed objects vector * returns Identifier for newly created vector */ int createObject(cObject *_object); - /** Alters position of _object by _pos either relative to old position or Absolute + /** + * Alters position of _object by _pos either relative to old position or Absolute * Depending on selected _mode (_MOVE_RELATIVE / _MOVE_ABSOLUTE). */ int moveObject(int _object, sPos _pos, int _mode); - /** removes _object from vector after deleting it + /** + * removes _object from vector after deleting it */ int destroyObject(int _object); @@ -48,26 +53,31 @@ public: int destroyWiremesh(int _mesh); - /** writes all objects in objects[] to render buffer + /** + * writes all objects in objects[] to render buffer */ int write(); - /** Calls onClick of cObject at _pos, focuses Object + /** + * Calls onClick of cObject at _pos, focuses Object * returns 0 if successfull, 1 if no Object is at _pos */ int clickEvent(sPos _pos, unsigned int _button); - /** Calls onChar of active cObject, default 0 + /** + * Calls onChar of active cObject, default 0 * returns 0 if successfull, 1 if no Object or destroyed Object is empty */ int charEvent(unsigned char _c); - /** Focuses next Object + /** + * Focuses next Object */ void focusNext(); - /**Focuses Object by id. + /** + * Focuses Object by id. * 0 is empty by default and can be used to unfocus */ void focus(unsigned int _id); -- cgit v1.2.3