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