up down select and focus

This commit is contained in:
vrd
2023-01-02 17:31:29 +02:00
parent 1c91d7b775
commit 6cbe64f927
7 changed files with 154 additions and 50 deletions
+10 -8
View File
@@ -7,10 +7,10 @@
struct EventTime
{
//enum { UNKNOWN_DATE=0, UNKNOWN_TIME=1};
static const I16 UNKNOWN_DATE = 0;
static const I8 UNKNOWN_TIME = -1;
/*explicit*/ EventTime(I16 Year=UNKNOWN_DATE, U8 Month=UNKNOWN_DATE, U16 Day=UNKNOWN_DATE, I8 Hour=UNKNOWN_TIME, I8 Minute=UNKNOWN_TIME);
enum: I16 { UNKNOWN_DATE=0 };
enum: I8 { UNKNOWN_TIME=-1 };
EventTime(I16 Year=UNKNOWN_DATE, U8 Month=UNKNOWN_DATE, U16 Day=UNKNOWN_DATE, I8 Hour=UNKNOWN_TIME, I8 Minute=UNKNOWN_TIME);
void print() const;
I16 year; //The year in relation to Chritst's birth - 1 (AD) is the year He was born, -1 (BC) is the previous year. There is no year 0
@@ -20,12 +20,13 @@ struct EventTime
I8 minute; //0-59
};
enum {
enum: U8 {
COLOR_MALE = 1,
COLOR_FEMALE
COLOR_FEMALE,
COLOR_SELECTED
};
enum {
enum: U8 {
BOX_HEIGHT = 5,
LINK_HEIGHT = 3
};
@@ -47,12 +48,13 @@ public:
void print() const;
bool isMale() const;
U16 boxWidth() const;
/* Draw a Person's box on the terminal
drawY,drawX - the coordinates where to draw
returns the width of the box*/
void draw(I16 drawY, I16 drawX, bool hasSpouse, bool isSpouse, bool hasChildren=false) const;
void draw(I16 drawY, I16 drawX, bool selected, bool hasSpouse, bool isSpouse, bool hasChildren=false) const;
/* WINDOW* createPad()const; */