|
YCLIMP
Yandex Command Line Interface Music Player
|
Utility function list. More...
#include "Primitives.hpp"#include <string>#include <vector>

Go to the source code of this file.
Classes | |
| struct | ProgressBar |
Enumerations | |
| enum class | SWHolderType { None = -1 , TopInfo = 0 , Main , Additional , Central } |
Functions | |
| std::string | getProjectDir () |
| bool | PrintwInLimitedX (const Vector2i &startPos, const std::string &text, int xLimit, int startIndx=0, bool truncIfNotFit=true) |
| Printw line in specified x boundary. if line is larger than x boundary. then truncate the line. | |
| void | printwRectangle (const Recti &rect, bool hasSelection=false, int colorPair=1) |
| void | clearArea (const Recti &rect) |
| clearArea - clears specified rect, rect itself is not included, only area inside rectangle without bounds | |
| void | printwMsgBox (const std::string &msg, const Recti &availableSpace) |
| void | printOptionsInLine (const Vector2i &startPos, int xAvailableSpace, const std::vector< std::string > &options, int selectionIndx=-1, int colorPair=1) |
Utility function list.
| void clearArea | ( | const Recti & | rect | ) |
clearArea - clears specified rect, rect itself is not included,
only area inside rectangle without bounds
| rect | - rect to clear |
| void printOptionsInLine | ( | const Vector2i & | startPos, |
| int | xAvailableSpace, | ||
| const std::vector< std::string > & | options, | ||
| int | selectionIndx = -1, | ||
| int | colorPair = 1 ) |
raw function, HorizontalOptionChoice uses it It's written badly, but it's fine for now
| bool PrintwInLimitedX | ( | const Vector2i & | startPos, |
| const std::string & | text, | ||
| int | xLimit, | ||
| int | startIndx = 0, | ||
| bool | truncIfNotFit = true ) |
Printw line in specified x boundary. if line is larger than x boundary. then truncate the line.
| startPos | cordinates on the screen |
| text | string to print(draw) |
| xLimit | available space in x axis |
| startIndx | start printing from indx |
| truncIfNotFit | truncate text if it cannot be fitted fully |
| void printwMsgBox | ( | const std::string & | msg, |
| const Recti & | availableSpace ) |
uses printwRectangle to draw rectangle and prints in there a message. Note! actual box(bounds) are dynamicly created according to the message size. If message is too big to be fit with bounds, bounds are ignored. If message still to big to be feet, it will be truncated(without "...").
| msg | - message to printw(draw) |
| availableSpace | - max boundaries |
| void printwRectangle | ( | const Recti & | rect, |
| bool | hasSelection = false, | ||
| int | colorPair = 1 ) |
printw(draw) rectangular bounds.
| rect | rectangle to printw(draw) |
| hasSelection | if true uses colorPair(1 by default) to draw rectangle |
| colorPair | if hasSelection true, use specifiedd colorPair |