comparison src/toolbar-msw.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents da8ed4261e83
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
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 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8
61
62 static void
63 mswindows_move_toolbar (struct frame *f, enum toolbar_pos pos);
61 64
62 #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \ 65 #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \
63 do { \ 66 do { \
64 switch (pos) \ 67 switch (pos) \
65 { \ 68 { \
458 error ("couldn't add image list to toolbar"); 461 error ("couldn't add image list to toolbar");
459 } 462 }
460 463
461 /* now display the window */ 464 /* now display the window */
462 ShowWindow (toolbarwnd, SW_SHOW); 465 ShowWindow (toolbarwnd, SW_SHOW);
466 /* no idea why this is necessary but initial display will not
467 happen otherwise. */
468 mswindows_move_toolbar (f, pos);
463 469
464 if (button_tbl) xfree (button_tbl); 470 if (button_tbl) xfree (button_tbl);
465 471
466 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1); 472 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1);
467 } 473 }
523 if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) 529 if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
524 mswindows_move_toolbar (f, RIGHT_TOOLBAR); 530 mswindows_move_toolbar (f, RIGHT_TOOLBAR);
525 } 531 }
526 532
527 static void 533 static void
534 mswindows_redraw_frame_toolbars (struct frame *f)
535 {
536 mswindows_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f),
537 FRAME_PIXHEIGHT (f));
538 }
539
540 static void
528 mswindows_initialize_frame_toolbars (struct frame *f) 541 mswindows_initialize_frame_toolbars (struct frame *f)
529 { 542 {
530 543
531 } 544 }
532 545
634 { 647 {
635 CONSOLE_HAS_METHOD (mswindows, output_frame_toolbars); 648 CONSOLE_HAS_METHOD (mswindows, output_frame_toolbars);
636 CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars); 649 CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars);
637 CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars); 650 CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars);
638 CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars); 651 CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars);
639 } 652 CONSOLE_HAS_METHOD (mswindows, redraw_frame_toolbars);
640 653 }
654