Skip to content

Commit

Permalink
Enhance docu
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanJakobo committed Sep 7, 2022
1 parent 46f0850 commit 885d943
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
35 changes: 33 additions & 2 deletions src/ui/textView/textView.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class TextView final : public View
~TextView();

/**
* Checkes if the listview has been clicked and either changes the page or returns item ID
* Checkes if the buttons on the bottom have been clicked, if they have been, executes function
*
* @param x x-coordinate
* @param y y-coordinate
* @return true if was clicked
* @return always false as changing cursor is currently not supported
*/
bool checkIfEntryClicked(int x, int y) override;

Expand Down Expand Up @@ -65,10 +65,41 @@ class TextView final : public View
int _textHeight;
ifont *_textFont;

//TODO documention and different methods in one

/**
* Draws a Char to the screen, if there is no more space, either calls addPage or jumps to next line
*
* @param char that shall be drawn
* @return width of the char
*/
int drawChar(const char &c);

/**
* loads a Keymap into the application to replicate keys
*
* @return true on sucess, false on error
*/
bool loadKeyMaps();

/**
* handles the keyevents that pop up
*
* @param eventID of the input device
* @param path of the file that shall be written
*/
void handleKeyEvents(int eventID, const std::string &path);

/**
* adds a new, empty Page
*
*/
void addPage();

/**
* removes a page
*
*/
void removePage();

};
Expand Down
6 changes: 5 additions & 1 deletion src/ui/view.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ class View
virtual bool checkIfEntryClicked(int x, int y) = 0;

/**
* Clears the screen and draws entries and footer
* Clears the screen, rereads in the arguments and draws entries and footer
*
*/
virtual void draw() = 0;

/**
* Clears the screen and draws entries and footer for _shownPage
*
*/
virtual void drawPage() = 0;


Expand Down

0 comments on commit 885d943

Please sign in to comment.