comparison src/toolbar-msw.c @ 406:b8cc9ab3f761 r21-2-33

Import from CVS: tag r21-2-33
author cvs
date Mon, 13 Aug 2007 11:17:09 +0200
parents a86b2b5e0111
children 501cfd01ee6d
comparison
equal deleted inserted replaced
405:0e08f63c74d2 406:b8cc9ab3f761
52 #define TB_SETDISABLEDIMAGELIST (WM_USER + 54) 52 #define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
53 #define TB_GETDISABLEDIMAGELIST (WM_USER + 55) 53 #define TB_GETDISABLEDIMAGELIST (WM_USER + 55)
54 #endif 54 #endif
55 #ifndef TB_SETPADDING 55 #ifndef TB_SETPADDING
56 #define TB_SETPADDING (WM_USER + 87) 56 #define TB_SETPADDING (WM_USER + 87)
57 #endif
58 #ifndef TBSTYLE_FLAT
59 #define TBSTYLE_FLAT 0x800
57 #endif 60 #endif
58 #define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2 61 #define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2
59 #define MSWINDOWS_BLANK_SIZE 5 62 #define MSWINDOWS_BLANK_SIZE 5
60 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8 63 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8
61 64
129 SendMessage (toolbarwnd, TB_SETIMAGELIST, 0, (LPARAM)NULL); 132 SendMessage (toolbarwnd, TB_SETIMAGELIST, 0, (LPARAM)NULL);
130 133
131 ShowWindow(toolbarwnd, SW_HIDE); 134 ShowWindow(toolbarwnd, SW_HIDE);
132 } 135 }
133 136
134 FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=0; 137 FRAME_MSWINDOWS_TOOLBAR_CHECKSUM (f, pos) = 0;
135 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0); 138 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
136 } 139 }
137 140
138 static void 141 static void
139 mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) 142 mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos)
221 if (!toolbarwnd || FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)!=checksum) 224 if (!toolbarwnd || FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)!=checksum)
222 { 225 {
223 /* remove the old one */ 226 /* remove the old one */
224 mswindows_clear_toolbar (f, pos, 0); 227 mswindows_clear_toolbar (f, pos, 0);
225 228
226 FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=checksum; 229 FRAME_MSWINDOWS_TOOLBAR_CHECKSUM (f, pos)=checksum;
227 230
228 /* build up the data required by win32 fns. */ 231 /* build up the data required by win32 fns. */
229 button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons); 232 button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons);
230 button = FRAME_TOOLBAR_BUTTONS (f, pos); 233 button = FRAME_TOOLBAR_BUTTONS (f, pos);
231 tbbutton = button_tbl; 234 tbbutton = button_tbl;
382 && 385 &&
383 (toolbarwnd = 386 (toolbarwnd =
384 CreateWindowEx ( WS_EX_WINDOWEDGE, 387 CreateWindowEx ( WS_EX_WINDOWEDGE,
385 TOOLBARCLASSNAME, 388 TOOLBARCLASSNAME,
386 NULL, 389 NULL,
387 WS_CHILD | WS_VISIBLE 390 WS_CHILD
388 | (style_3d ? WS_DLGFRAME : 0) 391 | (style_3d ? WS_DLGFRAME : 0)
389 | TBSTYLE_TOOLTIPS | CCS_NORESIZE 392 | TBSTYLE_TOOLTIPS
390 | CCS_NOPARENTALIGN | CCS_NODIVIDER, 393 | CCS_NORESIZE
394 | CCS_NOPARENTALIGN | CCS_NODIVIDER
395 | CCS_ADJUSTABLE,
391 x, y, bar_width, bar_height, 396 x, y, bar_width, bar_height,
392 FRAME_MSWINDOWS_HANDLE (f), 397 FRAME_MSWINDOWS_HANDLE (f),
393 (HMENU)(TOOLBAR_ID_BIAS + pos), 398 (HMENU)(TOOLBAR_ID_BIAS + pos),
394 NULL, 399 NULL,
395 NULL))==NULL) 400 NULL))==NULL)