| 1 | /* $Id: combo.h,v 1.6 2001-04-26 16:59:55 sandervl Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * Combo box definitions
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #ifndef __WINE_COMBO_H
|
|---|
| 8 | #define __WINE_COMBO_H
|
|---|
| 9 |
|
|---|
| 10 | #define LISTBOXCLASSNAME "LISTBOX"
|
|---|
| 11 | #define COMBOLBOXCLASSNAME "COMBOLBOX"
|
|---|
| 12 | #define COMBOBOXCLASSNAME "COMBOBOX"
|
|---|
| 13 | #define EDITCLASSNAME "EDIT"
|
|---|
| 14 |
|
|---|
| 15 | #define ID_CB_LISTBOX 1000
|
|---|
| 16 | #define ID_CB_EDIT 1001
|
|---|
| 17 |
|
|---|
| 18 | /* Internal flags */
|
|---|
| 19 |
|
|---|
| 20 | #define CBF_DROPPED 0x0001
|
|---|
| 21 | #define CBF_BUTTONDOWN 0x0002
|
|---|
| 22 | #define CBF_NOROLLUP 0x0004
|
|---|
| 23 | #define CBF_MEASUREITEM 0x0008
|
|---|
| 24 | #define CBF_FOCUSED 0x0010
|
|---|
| 25 | #define CBF_CAPTURE 0x0020
|
|---|
| 26 | #define CBF_EDIT 0x0040
|
|---|
| 27 | #define CBF_NORESIZE 0x0080
|
|---|
| 28 | #define CBF_NOTIFY 0x0100
|
|---|
| 29 | #define CBF_NOREDRAW 0x0200
|
|---|
| 30 | #define CBF_SELCHANGE 0x0400
|
|---|
| 31 | #define CBF_NOEDITNOTIFY 0x1000
|
|---|
| 32 | #define CBF_NOLBSELECT 0x2000 /* do not change current selection */
|
|---|
| 33 | #define CBF_EUI 0x8000
|
|---|
| 34 |
|
|---|
| 35 | /* Combo state struct */
|
|---|
| 36 |
|
|---|
| 37 | typedef struct
|
|---|
| 38 | {
|
|---|
| 39 | HWND hwndself;
|
|---|
| 40 | HWND owner;
|
|---|
| 41 | UINT dwStyle;
|
|---|
| 42 | HWND hWndEdit;
|
|---|
| 43 | HWND hWndLBox;
|
|---|
| 44 | UINT wState;
|
|---|
| 45 | HFONT hFont;
|
|---|
| 46 | RECT textRect;
|
|---|
| 47 | RECT buttonRect;
|
|---|
| 48 | RECT droppedRect;
|
|---|
| 49 | INT droppedIndex;
|
|---|
| 50 | INT fixedOwnerDrawHeight;
|
|---|
| 51 | INT droppedWidth; /* last two are not used unless set */
|
|---|
| 52 | INT editHeight; /* explicitly */
|
|---|
| 53 | } HEADCOMBO,*LPHEADCOMBO;
|
|---|
| 54 |
|
|---|
| 55 | /*
|
|---|
| 56 | * Note, that CBS_DROPDOWNLIST style is actually (CBS_SIMPLE | CBS_DROPDOWN)!
|
|---|
| 57 | */
|
|---|
| 58 |
|
|---|
| 59 | #define CB_GETTYPE( lphc ) ((lphc)->dwStyle & (CBS_DROPDOWNLIST))
|
|---|
| 60 | #define CB_DISABLED( lphc ) (GetWindowLongA((lphc)->hwndself,GWL_STYLE) & WS_DISABLED)
|
|---|
| 61 | #define CB_OWNERDRAWN( lphc ) ((lphc)->dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE))
|
|---|
| 62 | #define CB_HASSTRINGS( lphc ) ((lphc)->dwStyle & CBS_HASSTRINGS)
|
|---|
| 63 | #define CB_HWND( lphc ) ((lphc)->hwndself)
|
|---|
| 64 |
|
|---|
| 65 | BOOL COMBO_FlipListbox( LPHEADCOMBO, BOOL, BOOL );
|
|---|
| 66 | LRESULT COMBO_Directory( LPHEADCOMBO, UINT, LPSTR, BOOL );
|
|---|
| 67 |
|
|---|
| 68 | #ifdef __cplusplus
|
|---|
| 69 | extern "C" {
|
|---|
| 70 | #endif
|
|---|
| 71 |
|
|---|
| 72 | BOOL LISTBOX_Register();
|
|---|
| 73 | BOOL LISTBOX_Unregister();
|
|---|
| 74 | BOOL COMBOLBOX_Register();
|
|---|
| 75 | BOOL COMBOLBOX_Unregister();
|
|---|
| 76 |
|
|---|
| 77 | BOOL COMBOBOX_Register();
|
|---|
| 78 | BOOL COMBOBOX_Unregister();
|
|---|
| 79 |
|
|---|
| 80 | BOOL EDIT_Register();
|
|---|
| 81 | BOOL EDIT_Unregister();
|
|---|
| 82 |
|
|---|
| 83 | #ifdef __cplusplus
|
|---|
| 84 | }
|
|---|
| 85 | #endif
|
|---|
| 86 |
|
|---|
| 87 | #endif /* __WINE_COMBO_H */
|
|---|
| 88 |
|
|---|