Mercurial > hg > xemacs-beta
comparison src/toolbar-msw.c @ 298:70ad99077275 r21-0b47
Import from CVS: tag r21-0b47
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:39:40 +0200 |
parents | 4b85ae5eabfb |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
297:deca3c1083ac | 298:70ad99077275 |
---|---|
55 #ifndef TB_SETPADDING | 55 #ifndef TB_SETPADDING |
56 #define TB_SETPADDING (WM_USER + 87) | 56 #define TB_SETPADDING (WM_USER + 87) |
57 #endif | 57 #endif |
58 #define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2 | 58 #define MSWINDOWS_BUTTON_SHADOW_THICKNESS 2 |
59 #define MSWINDOWS_BLANK_SIZE 5 | 59 #define MSWINDOWS_BLANK_SIZE 5 |
60 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8 | |
60 | 61 |
61 #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \ | 62 #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \ |
62 do { \ | 63 do { \ |
63 switch (pos) \ | 64 switch (pos) \ |
64 { \ | 65 { \ |
150 TBBUTTON* button_tbl, *tbbutton; | 151 TBBUTTON* button_tbl, *tbbutton; |
151 HIMAGELIST ilist=NULL; | 152 HIMAGELIST ilist=NULL; |
152 HWND toolbarwnd=NULL; | 153 HWND toolbarwnd=NULL; |
153 | 154 |
154 get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 0); | 155 get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 0); |
156 | |
157 /* ediff bogusly sets the height to 2 for some obscure X-specific | |
158 reason. This ensures that we only try and output a toolbar for | |
159 sensible sizes */ | |
160 if (bar_width < MSWINDOWS_MINIMUM_TOOLBAR_SIZE | |
161 || | |
162 bar_height < MSWINDOWS_MINIMUM_TOOLBAR_SIZE) | |
163 { | |
164 return; | |
165 } | |
155 | 166 |
156 if (x==1) | 167 if (x==1) |
157 x=0; | 168 x=0; |
158 | 169 |
159 toolbarwnd = TOOLBAR_HANDLE (f,pos); | 170 toolbarwnd = TOOLBAR_HANDLE (f,pos); |
298 } | 309 } |
299 | 310 |
300 /* need to build an image list for the bitmaps */ | 311 /* need to build an image list for the bitmaps */ |
301 if (!ilist && !(ilist = ImageList_Create | 312 if (!ilist && !(ilist = ImageList_Create |
302 ( bmwidth, bmheight, | 313 ( bmwidth, bmheight, |
303 ILC_MASK | ILC_COLOR24, | 314 (IMAGE_INSTANCE_MSWINDOWS_MASK (p) |
315 ? ILC_MASK : 0) | ILC_COLOR24, | |
304 nbuttons, nbuttons * 2 ))) | 316 nbuttons, nbuttons * 2 ))) |
305 { | 317 { |
306 xfree (button_tbl); | 318 xfree (button_tbl); |
307 signal_simple_error ("couldn't create image list", | 319 signal_simple_error ("couldn't create image list", |
308 instance); | 320 instance); |