add indication for people with subtrees

This commit is contained in:
Venelin
2024-06-19 22:50:29 +03:00
parent c96bbdbecf
commit 5aaeaf3247
4 changed files with 56 additions and 67 deletions
+14 -3
View File
@@ -51,15 +51,26 @@ public:
void displayInfo() const;
/* Draw a Person's box on the terminal
/* Draw a Person's box on the terminal, as a part of the focused tree
drawY,drawX - top left coordinates where to draw (negative if outside the screen)
partOfMain - is the person a decendant of the current root
hasSpouse, hasSpouse, hasChildren - wheather the person has them on display
returns the width of the box*/
U16 draw(I16 drawY, I16 drawX, bool selected, bool hasSpouse,
bool hasParents, bool hasChildren=false, bool wholeName=true) const;
U16 drawAsFocused(I16 drawY, I16 drawX, bool selected, bool hasSpouse,
bool hasChildren=false, bool wholeName=true) const;
/* Draw a Person's box on the terminal, as a spouse of someone in the focused tree
drawY,drawX - top left coordinates where to draw (negative if outside the screen)
hasTree - weather the spouse has a tree that can be displayed
returns the width of the box*/
U16 drawAsSpouse(I16 drawY, I16 drawX, bool selected, bool hasTree, bool wholeName=true) const;
std::string name;
EventTime birth;
Sex sex;
EventTime death;
private:
U16 draw(I16 drawY, I16 drawX, bool selected, bool wholeName,
U32 topleft, U32 topright, U32 botleft, U32 botright) const;
};