The COM virtual tables must use the
[wine.git] / include / monthcal.h
blob794f4cf871bca0bc574f9f07e49524a37313a4dc
1 /*
2 * Month calendar class extra info
4 * Copyright 1998 Eric Kohl
5 * Copyright 1999 Alex Priem
6 */
8 #ifndef __WINE_MONTHCAL_H
9 #define __WINE_MONTHCAL_H
11 #include "commctrl.h"
12 #include "windef.h"
13 #include "wingdi.h"
16 #define MC_SEL_LBUTUP 1 /* Left button released */
17 #define MC_SEL_LBUTDOWN 2 /* Left button pressed in calendar */
18 #define MC_PREVPRESSED 4 /* Prev month button pressed */
19 #define MC_NEXTPRESSED 8 /* Next month button pressed */
20 #define MC_NEXTMONTHDELAY 350 /* when continuously pressing `next */
21 /* month', wait 500 ms before going */
22 /* to the next month */
23 #define MC_NEXTMONTHTIMER 1 /* Timer ID's */
24 #define MC_PREVMONTHTIMER 2
26 typedef struct tagMONTHCAL_INFO
28 COLORREF bk;
29 COLORREF txt;
30 COLORREF titlebk;
31 COLORREF titletxt;
32 COLORREF monthbk;
33 COLORREF trailingtxt;
34 HFONT hFont;
35 HFONT hBoldFont;
36 int textHeight;
37 int textWidth;
38 int height_increment;
39 int width_increment;
40 int left_offset;
41 int top_offset;
42 int firstDayplace; /* place of the first day of the current month */
43 int delta; /* scroll rate; # of months that the */
44 /* control moves when user clicks a scroll button */
45 int visible; /* # of months visible */
46 int firstDay; /* Start month calendar with firstDay's day */
47 int monthRange;
48 MONTHDAYSTATE *monthdayState;
49 SYSTEMTIME todaysDate;
50 DWORD currentMonth;
51 DWORD currentYear;
52 int status; /* See MC_SEL flags */
53 int curSelDay; /* current selected day */
54 int firstSelDay; /* first selected day */
55 int maxSelCount;
56 SYSTEMTIME minSel;
57 SYSTEMTIME maxSel;
58 DWORD rangeValid;
59 SYSTEMTIME minDate;
60 SYSTEMTIME maxDate;
62 RECT rcClient; /* rect for whole client area */
63 RECT rcDraw; /* rect for drawable portion of client area */
64 RECT title; /* rect for the header above the calendar */
65 RECT titlebtnnext; /* the `next month' button in the header */
66 RECT titlebtnprev; /* the `prev month' button in the header */
67 RECT titlemonth; /* the `month name' txt in the header */
68 RECT titleyear; /* the `year number' txt in the header */
69 RECT prevmonth; /* day numbers of the previous month */
70 RECT nextmonth; /* day numbers of the next month */
71 RECT days; /* week numbers at left side */
72 RECT weeknums; /* week numbers at left side */
73 RECT today; /* `today: xx/xx/xx' text rect */
74 } MONTHCAL_INFO, *LPMONTHCAL_INFO;
77 extern void MONTHCAL_CopyTime (const SYSTEMTIME *from, SYSTEMTIME *to);
78 extern int MONTHCAL_CalculateDayOfWeek (DWORD day, DWORD month, DWORD year);
79 extern const char * const daytxt[];
80 extern const char * const monthtxt[];
81 extern void MONTHCAL_Register (void);
82 extern void MONTHCAL_Unregister (void);
84 #endif /* __WINE_MONTHCAL_H */