From 399b4639fee23d376691fc1e0123f414f4498fcd Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 7 Dec 2014 18:43:05 -0500 Subject: [PATCH] More header support code, including header notification scaffolding. --- wintable/new/children.h | 18 ++++++++++++++++++ wintable/new/header.h | 5 +++++ wintable/new/main.c | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 wintable/new/children.h diff --git a/wintable/new/children.h b/wintable/new/children.h new file mode 100644 index 0000000..ba58939 --- /dev/null +++ b/wintable/new/children.h @@ -0,0 +1,18 @@ +// 7 december 2014 + +static const handlerfunc commandHandlers[] = { + NULL, +}; + +static const handlerfunc notifyHandlers[] = { + NULL, +}; + +HANDLER(childrenHandlers) +{ + if (uMsg == WM_COMMAND) + return runHandlers(commandHandlers, t, uMsg, wParam, lParam, lResult); + if (uMsg == WM_NOTIFY) + return runHandlers(notifyHandlers, t, uMsg, wParam, lParam, lResult); + return FALSE; +} diff --git a/wintable/new/header.h b/wintable/new/header.h index e06188a..213516a 100644 --- a/wintable/new/header.h +++ b/wintable/new/header.h @@ -18,3 +18,8 @@ static void destroyHeader(struct table *t) if (DestroyWindow(t->header) == 0) panic("error destroying Table header"); } + +static void repositionHeader(struct table *t) +{ + // TODO http://msdn.microsoft.com/en-us/library/windows/desktop/hh298357%28v=vs.85%29.aspx +} diff --git a/wintable/new/main.c b/wintable/new/main.c index 35f37b0..496af07 100644 --- a/wintable/new/main.c +++ b/wintable/new/main.c @@ -55,9 +55,11 @@ struct table { #include "coord.h" #include "events.h" #include "header.h" +#include "children.h" static const handlerfunc handlers[] = { eventHandlers, + childrenHandlers, NULL, };