aboutsummaryrefslogtreecommitdiffstats
path: root/src/calcurse.h
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2019-03-16 08:27:45 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-05-22 01:56:59 -0400
commit4284ca91bc0fd04851a34c67dae1068f3c1defc9 (patch)
tree09dbb5bd0722d4043ea7d5cba274183d714a7d29 /src/calcurse.h
parent1ccfe128cce8d670d12c350326bb13fbc0276d0a (diff)
downloadcalcurse-4284ca91bc0fd04851a34c67dae1068f3c1defc9.tar.gz
calcurse-4284ca91bc0fd04851a34c67dae1068f3c1defc9.zip
Implement scrolling in the appointments panel
With multiple days in the APP panel, up/down movements should change behaviour at the top and bottom of the list displayed, and load the previous/next lot of days. This requires that the move function returns the result of the operation. Furthermore, the ability to move the selection to the beginning of a day is needed when moving down (in order to move from the first day to the last day). For this reason a DAY_SEPARATOR has been inserted also after the last day of a lot. Appointments have a listbox height of three to separate them clearly when there is more than one in a day. This leaves a spurious empty line at the end of a day with appointments. The DAY_SEPARATOR height is reduced from two to one, and a new EMPTY_SEPARATOR of height one is inserted in any day with only events. When scrolling up the DAY_HEADING becomes visible when the selection reaches the first item of the day. The length of the separator (between events and appointments) is adjusted to leave a space to the window border at both ends, thereby making it a part of the day, not a separation between days. The dummy event must also be recognisable when not the selected item and is only inserted in interactive mode. The test for a saved selection must also recognise caption items which have item pointer NULL. The function day_get_nb() has been renamed day_get_days(). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 333e1b9..e4cfe79 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -421,6 +421,7 @@ enum day_item_type {
EVNT_SEPARATOR,
RECUR_APPT,
APPT,
+ EMPTY_SEPARATOR,
DAY_SEPARATOR
};
@@ -764,7 +765,7 @@ int parse_args(int, char **);
/* calendar.c */
extern struct day_item empty_day;
-/* ui_calendar.c */
+/* ui-calendar.c */
void ui_calendar_view_next(void);
void ui_calendar_view_prev(void);
void ui_calendar_set_view(int);
@@ -803,10 +804,10 @@ void custom_keys_config(void);
void custom_config_main(void);
/* day.c */
-int day_get_nb(void);
int day_set_sel_data(struct day_item *);
int day_check_sel_data(void);
int day_sel_index(void);
+int day_get_days(void);
void day_free_vector(void);
char *day_item_get_mesg(struct day_item *);
char *day_item_get_note(struct day_item *);
@@ -1115,7 +1116,9 @@ struct day_item *ui_day_get_sel(void);
time_t ui_day_sel_date(void);
void ui_day_sel_reset(void);
void ui_day_set_sel(struct day_item *);
-void ui_day_sel_move(int);
+int ui_day_sel_move(int);
+void ui_day_sel_daybegin(int);
+void ui_day_sel_dayend(void);
void ui_day_draw(int, WINDOW *, int, int, void *);
enum listbox_row_type ui_day_row_type(int, void *);
int ui_day_height(int, void *);