changeset 594:af25ea2dc5b3

Add dummy calendar widget. Need to simulate one.4?\002?\007
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 25 Sep 2006 22:16:42 +0000
parents d3871f747160
children 8b152d268bd4
files os2/dw.c
diffstat 1 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Mon Sep 25 22:13:53 2006 +0000
+++ b/os2/dw.c	Mon Sep 25 22:16:42 2006 +0000
@@ -9543,3 +9543,39 @@
 }
 
 
+
+/*
+ * Create a new static text window (widget) to be packed.
+ * **** temporary calendar *****
+ * Parameters:
+ *       text: The text to be display by the static text widget.
+ *       id: An ID to be used with dw_window_from_id() or 0L.
+ */
+HWND API dw_calendar_new(ULONG id)
+{
+char *text = "a calendar";
+	WindowData *blah = calloc(sizeof(WindowData), 1);
+	HWND tmp = WinCreateWindow(HWND_OBJECT,
+							   WC_STATIC,
+							   text,
+							   WS_VISIBLE | SS_TEXT,
+							   0,0,2000,1000,
+							   NULLHANDLE,
+							   HWND_TOP,
+							   id,
+							   NULL,
+							   NULL);
+	blah->oldproc = WinSubclassWindow(tmp, _textproc);
+	WinSetWindowPtr(tmp, QWP_USER, blah);
+	dw_window_set_font(tmp, DefaultFont);
+	dw_window_set_color(tmp, DW_CLR_BLACK, DW_CLR_PALEGRAY);
+	return tmp;
+}
+
+void API dw_calendar_set_date( HWND window, int year, int month, int day )
+{
+}
+void API dw_calendar_get_date( HWND window, int *year, int *month, int *day )
+{
+*year = *month = *day = 0;
+}