From 70bfefce791a385c9c4c770be3b058f2de3f0e95 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 6 Jan 2006 04:18:13 +0000 Subject: [PATCH] New tabbed dialog API. This will be used in something later... --- webcit/ChangeLog | 3 +++ webcit/Makefile.in | 4 +-- webcit/tabs.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ webcit/webcit.h | 4 +++ 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 webcit/tabs.c diff --git a/webcit/ChangeLog b/webcit/ChangeLog index f88b0e718..48f0cd7e3 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,5 +1,8 @@ $Id$ +Thu Jan 5 23:17:17 EST 2006 ajc +* New tabbed dialog API. This will be used in something later... + Tue Jan 3 18:19:53 EST 2006 ajc * More tweaks to instant messenger window diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 917950e2a..ea2d67378 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -48,7 +48,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ calendar.o calendar_tools.o calendar_view.o event.o \ availability.o iconbar.o crypto.o inetconf.o notes.o \ groupdav_main.o groupdav_get.o groupdav_propfind.o fmt_date.o \ - groupdav_options.o autocompletion.o gettext.o\ + groupdav_options.o autocompletion.o gettext.o tabs.o \ groupdav_delete.o groupdav_put.o http_datestring.o setup_wizard.o \ $(LIBOBJS) $(CC) webserver.o context_loop.o tools.o cookie_conversion.o \ @@ -59,7 +59,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ summary.o calendar.o calendar_tools.o calendar_view.o event.o \ availability.o ical_dezonify.o iconbar.o crypto.o inetconf.o notes.o \ groupdav_main.o groupdav_get.o groupdav_propfind.o groupdav_delete.o \ - groupdav_options.o autocompletion.o \ + groupdav_options.o autocompletion.o tabs.o \ groupdav_put.o http_datestring.o setup_wizard.o fmt_date.o \ gettext.o \ $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver diff --git a/webcit/tabs.c b/webcit/tabs.c new file mode 100644 index 000000000..92e88ef56 --- /dev/null +++ b/webcit/tabs.c @@ -0,0 +1,61 @@ +/* + * $Id: $ + * + * Utility functions for creating tabbed dialogs + */ + +#include "webcit.h" + +void tabbed_dialog(int num_tabs, char *tabnames[]) { + int i; + + wprintf(" \n" + ); + + wprintf("" + "" + ); + + for (i=0; i" + "", + i, + ( (i==0) ? "ffffff" : "cccccc" ), + i + ); + wprintf("%s", tabnames[i]); + wprintf(""); + + wprintf("\n"); + } + + wprintf("
  
\n"); + wprintf("
"); +} + +void begin_tab(int tabnum, int num_tabs) { + wprintf("
", + tabnum, + ( (tabnum == 0) ? "block" : "none" ) + ); +} + +void end_tab(int tabnum, int num_tabs) { + wprintf("
\n"); + + if (tabnum == num_tabs-1) { + wprintf("
\n"); + } +} diff --git a/webcit/webcit.h b/webcit/webcit.h index 4ed7997d6..a87133da3 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -654,8 +654,12 @@ void set_selected_language(char *); void go_selected_language(void); void stop_selected_language(void); void httplang_to_locale(char *LocaleString); +void tabbed_dialog(int num_tabs, char *tabnames[]); +void begin_tab(int tabnum, int num_tabs); +void end_tab(int tabnum, int num_tabs); void embed_room_banner(char *, int); + /* navbar types that can be passed to embed_room_banner */ enum { navbar_none, -- 2.30.2