Started implementing Enhanced MetaFile driver.
[wine] / include / combo.h
1 /*
2  * Combo box definitions
3  */
4
5 #ifndef __WINE_COMBO_H
6 #define __WINE_COMBO_H
7
8 #define ID_CB_LISTBOX           1000
9 #define ID_CB_EDIT              1001
10
11 /* Internal flags */
12
13 #define CBF_DROPPED             0x0001
14 #define CBF_BUTTONDOWN          0x0002
15 #define CBF_NOROLLUP            0x0004
16 #define CBF_MEASUREITEM         0x0008
17 #define CBF_FOCUSED             0x0010
18 #define CBF_CAPTURE             0x0020
19 #define CBF_EDIT                0x0040
20 #define CBF_NORESIZE            0x0080
21 #define CBF_NOTIFY              0x0100
22 #define CBF_NOREDRAW            0x0200
23 #define CBF_SELCHANGE           0x0400
24 #define CBF_EUI                 0x8000
25
26 /* Combo state struct */
27
28 typedef struct
29 {
30    WND*         self;
31    HWND         owner;
32    UINT         dwStyle;
33    HWND         hWndEdit;
34    HWND         hWndLBox;
35    UINT         wState;
36    HFONT        hFont;
37    RECT         textRect;
38    RECT         buttonRect;
39    RECT         droppedRect;
40    INT          fixedOwnerDrawHeight;
41    INT          droppedWidth;           /* last two are not used unless set */
42    INT          editHeight;             /* explicitly */
43 } HEADCOMBO,*LPHEADCOMBO;
44
45 /*
46  * Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN)!
47  */
48
49 #define CB_GETTYPE( lphc )    ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
50 #define CB_DISABLED( lphc )   ((lphc)->self->dwStyle & WS_DISABLED)
51 #define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
52 #define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
53 #define CB_HWND( lphc )       ((lphc)->self->hwndSelf)
54
55 BOOL    COMBO_FlipListbox( LPHEADCOMBO, BOOL );
56 HWND    COMBO_GetLBWindow( WND* );
57 LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL );
58
59 #endif /* __WINE_COMBO_H */
60