annotate src/toolbar-msw.c @ 278:90d73dddcdc4 r21-0b37

Import from CVS: tag r21-0b37
author cvs
date Mon, 13 Aug 2007 10:31:29 +0200
parents 6330739388db
children 7df0dd720c89
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
1 /* toolbar implementation -- mswindows interface.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
2 Copyright (C) 1998 Free Software Foundation.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
3
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
4 This file is part of XEmacs.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
5
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
9 later version.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
10
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
14 for more details.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
15
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
20
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
21 /* This implementation by Andy Piper <andyp@parallax.co.uk>, with bits
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
22 borrowed from toolbar-x.c */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
23
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
24 /* Synched up with: Not in FSF. */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
25
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
26 #include <config.h>
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
27 #include "lisp.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
28
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
29 #include "faces.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
30 #include "frame.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
31 #include "toolbar.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
32 #include "window.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
33 #include "gui.h"
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
34 #include "elhash.h"
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
35 #include "console-msw.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
36 #include "glyphs-msw.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
37 #include "objects-msw.h"
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
38
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
39 /* Why did Kirill choose this range ? */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
40 #define TOOLBAR_ITEM_ID_MIN 0x4000
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
41 #define TOOLBAR_ITEM_ID_MAX 0x7FFF
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
42 #define TOOLBAR_ITEM_ID_BITS(x) (((x) & 0x3FFF) | 0x4000)
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
43 #define TOOLBAR_ID_BIAS 16
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
44 #define TOOLBAR_HANDLE(f,p) \
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
45 GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + p)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
46 #ifndef TB_SETIMAGELIST
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
47 #define TB_SETIMAGELIST (WM_USER + 48)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
48 #define TB_GETIMAGELIST (WM_USER + 49)
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
49 #define TB_SETPADDING (WM_USER + 87)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
50 #endif
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
51
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
52 #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
53 do { \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
54 switch (pos) \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
55 { \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
56 case TOP_TOOLBAR: \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
57 (frame)->top_toolbar_was_visible = flag; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
58 break; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
59 case BOTTOM_TOOLBAR: \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
60 (frame)->bottom_toolbar_was_visible = flag; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
61 break; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
62 case LEFT_TOOLBAR: \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
63 (frame)->left_toolbar_was_visible = flag; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
64 break; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
65 case RIGHT_TOOLBAR: \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
66 (frame)->right_toolbar_was_visible = flag; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
67 break; \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
68 default: \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
69 abort (); \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
70 } \
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
71 } while (0)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
72
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
73 static int
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
74 allocate_toolbar_item_id (struct frame* f, struct toolbar_button* button,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
75 enum toolbar_pos pos)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
76 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
77 /* hmm what do we generate an id based on */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
78 int id = TOOLBAR_ITEM_ID_BITS (internal_hash (button->callback, 0));
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
79 while (!NILP (Fgethash (make_int (id),
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
80 FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f), Qnil)))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
81 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
82 id = TOOLBAR_ITEM_ID_BITS (id + 1);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
83 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
84 return id;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
85 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
86
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
87 static void
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
88 mswindows_clear_toolbar (struct frame *f, enum toolbar_pos pos,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
89 int thickness_change)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
90 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
91 HIMAGELIST ilist=NULL;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
92 int i;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
93 HWND toolbarwnd = TOOLBAR_HANDLE(f, pos);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
94 if (toolbarwnd)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
95 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
96 TBBUTTON info;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
97
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
98 /* delete the buttons and remove the command from the hashtable*/
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
99 i = SendMessage (toolbarwnd, TB_BUTTONCOUNT, 0, 0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
100 for (i--; i >= 0; i--)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
101 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
102 SendMessage (toolbarwnd, TB_GETBUTTON, (WPARAM)i,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
103 (LPARAM)&info);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
104 Fremhash(make_int(info.idCommand),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
105 FRAME_MSWINDOWS_TOOLBAR_HASHTABLE(f));
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
106 SendMessage (toolbarwnd, TB_DELETEBUTTON, (WPARAM)i, 0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
107 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
108
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
109 /* finally get rid of the image list assuming it clears up its
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
110 bitmaps */
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
111 SendMessage (toolbarwnd, TB_GETIMAGELIST, 0, (LONG) &ilist);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
112 if (ilist)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
113 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
114 ImageList_Destroy(ilist);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
115 }
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
116 SendMessage (toolbarwnd, TB_SETIMAGELIST, 0, (LPARAM)NULL);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
117
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
118 ShowWindow(toolbarwnd, SW_HIDE);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
119 }
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
120
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
121 FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=0;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
122 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
123 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
124
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
125 static void
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
126 mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
127 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
128 int x, y, bar_width, bar_height, vert;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
129 int width=-1, height=-1, bmwidth=-1, bmheight=-1;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
130 int border_width = FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
131 Lisp_Object button, window, glyph, instance;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
132 int nbuttons=0;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
133 int shadow_thickness = 2; /* get this from somewhere else? */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
134 int window_frame_width = 3;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
135 unsigned int checksum=0;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
136 struct window *w;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
137 TBBUTTON* button_tbl, *tbbutton;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
138 HIMAGELIST ilist=NULL;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
139 HWND toolbarwnd=NULL;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
140
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
141 get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 0);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
142
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
143 if (x==1)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
144 x=0;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
145
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
146 window = FRAME_LAST_NONMINIBUF_WINDOW (f);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
147 w = XWINDOW (window);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
148
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
149 toolbarwnd = TOOLBAR_HANDLE(f,pos);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
150
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
151 /* set button sizes based on bar size */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
152 if (vert)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
153 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
154 width = height = bar_width;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
155 bmwidth = bmheight = width - (border_width + shadow_thickness) * 2;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
156 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
157 else
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
158 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
159 height = width = bar_height - window_frame_width * 2;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
160 bmwidth = bmheight = width - (border_width + shadow_thickness) * 2;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
161 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
162
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
163 button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
164
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
165 /* First loop over all of the buttons to determine how many there
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
166 are. This loop will also make sure that all instances are
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
167 instantiated so when we actually output them they will come up
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
168 immediately. */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
169 while (!NILP (button))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
170 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
171 struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
172 checksum = HASH3 (checksum,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
173 internal_hash (get_toolbar_button_glyph(w, tb), 0),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
174 internal_hash (tb->callback, 0));
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
175 button = tb->next;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
176 nbuttons++;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
177 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
178
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
179 /* only rebuild if something has changed */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
180 if (!toolbarwnd || FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)!=checksum)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
181 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
182 /* remove the old one */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
183 mswindows_clear_toolbar (f, pos, 0);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
184
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
185 FRAME_MSWINDOWS_TOOLBAR_CHECKSUM(f,pos)=checksum;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
186
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
187 /* build up the data required by win32 fns. */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
188 button_tbl = xnew_array_and_zero (TBBUTTON, nbuttons);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
189 button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
190 tbbutton = button_tbl;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
191
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
192 while (!NILP (button))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
193 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
194 struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
195
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
196 tbbutton->idCommand = allocate_toolbar_item_id (f, tb, pos);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
197 tbbutton->fsState=tb->enabled ? TBSTATE_ENABLED
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
198 : TBSTATE_INDETERMINATE;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
199 tbbutton->fsStyle=tb->blank ? TBSTYLE_SEP : TBSTYLE_BUTTON;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
200 tbbutton->dwData=0;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
201 tbbutton->iString=0;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
202
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
203 /* note that I am not doing the button size here. This is
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
204 because it is slightly out of my control and the main
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
205 place they are used is in redisplay for getting events
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
206 over toolbar buttons. Since the right way to do help echo
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
207 is with tooltips I'm not going to bother with the extra
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
208 work involved. */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
209
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
210 /* mess with the button image */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
211 glyph = get_toolbar_button_glyph (w, tb);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
212
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
213 if (GLYPHP (glyph))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
214 instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
215 else
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
216 instance = Qnil;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
217
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
218 if (IMAGE_INSTANCEP (instance))
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
219 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
220 struct Lisp_Image_Instance* p = XIMAGE_INSTANCE (instance);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
221
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
222 if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p))
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
223 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
224 /* we are going to honour the toolbar settings and
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
225 resize the bitmaps accordingly */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
226
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
227 if (IMAGE_INSTANCE_PIXMAP_WIDTH (p) > bmwidth
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
228 ||
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
229 IMAGE_INSTANCE_PIXMAP_HEIGHT (p) > bmheight)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
230 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
231 if (!mswindows_resize_dibitmap_instance
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
232 (p, f, bmwidth, bmheight))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
233 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
234 xfree (button_tbl);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
235 if (ilist) ImageList_Destroy (ilist);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
236 signal_simple_error ("couldn't resize pixmap",
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
237 instance);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
238 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
239 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
240 else
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
241 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
242 bmwidth = IMAGE_INSTANCE_PIXMAP_WIDTH (p);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
243 bmheight = IMAGE_INSTANCE_PIXMAP_HEIGHT (p);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
244 }
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
245
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
246 /* need to build an image list for the bitmaps */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
247 if (!ilist)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
248 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
249 if (!(ilist = ImageList_Create
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
250 ( IMAGE_INSTANCE_PIXMAP_WIDTH (p),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
251 IMAGE_INSTANCE_PIXMAP_HEIGHT (p),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
252 ILC_COLOR24,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
253 nbuttons,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
254 nbuttons * 2 )))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
255 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
256 xfree (button_tbl);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
257 signal_simple_error ("couldn't create image list",
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
258 instance);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
259 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
260 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
261
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
262 /* add a bitmap to the list */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
263 if ((tbbutton->iBitmap =
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
264 ImageList_Add (ilist,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
265 IMAGE_INSTANCE_MSWINDOWS_BITMAP (p),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
266 IMAGE_INSTANCE_MSWINDOWS_MASK (p))) < 0)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
267 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
268 xfree (button_tbl);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
269 if (ilist) ImageList_Destroy (ilist);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
270 signal_simple_error ("image list creation failed",
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
271 instance);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
272 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
273 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
274 }
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
275
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
276 Fputhash (make_int (tbbutton->idCommand),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
277 button, FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f));
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
279 tbbutton++;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
280 button = tb->next;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
281 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
282
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
283 button = FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
284
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
285 /* create the toolbar window? */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
286 if (!toolbarwnd
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
287 &&
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
288 (toolbarwnd =
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
289 CreateWindowEx ( WS_EX_WINDOWEDGE,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
290 TOOLBARCLASSNAME,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
291 NULL,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
292 WS_CHILD | WS_VISIBLE | WS_DLGFRAME | TBSTYLE_TOOLTIPS
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
293 | CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NODIVIDER,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
294 x, y, bar_width, bar_height,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
295 FRAME_MSWINDOWS_HANDLE (f),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
296 (HMENU)(TOOLBAR_ID_BIAS + pos),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
297 NULL,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
298 NULL))==NULL)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
299 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
300 xfree (button_tbl);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
301 ImageList_Destroy (ilist);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
302 error ("couldn't create toolbar");
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
303 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
304 #if 0
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
305 SendMessage (toolbarwnd, TB_SETPADDING,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
306 0, MAKELPARAM(border_width, border_width));
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
307 #endif
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
308 /* finally populate with images */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
309 if (SendMessage (toolbarwnd, TB_BUTTONSTRUCTSIZE,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
310 (WPARAM)sizeof(TBBUTTON), (LPARAM)0) == -1)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
311 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
312 mswindows_clear_toolbar (f, pos, 0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
313 error ("couldn't set button structure size");
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
314 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
315
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
316 /* set the size of buttons */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
317 SendMessage (toolbarwnd, TB_SETBUTTONSIZE, 0,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
318 (LPARAM)MAKELONG (width, height));
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
319
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
320 /* set the size of bitmaps */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
321 SendMessage (toolbarwnd, TB_SETBITMAPSIZE, 0,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
322 (LPARAM)MAKELONG (bmwidth, bmheight));
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
323
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
324 /* finally populate with images */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
325 if (!SendMessage (toolbarwnd, TB_ADDBUTTONS,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
326 (WPARAM)nbuttons, (LPARAM)button_tbl))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
327 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
328 mswindows_clear_toolbar (f, pos, 0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
329 error ("couldn't add button list to toolbar");
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
330 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
331
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
332 /* vertical toolbars need more rows */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
333 if (vert)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
334 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
335 SendMessage (toolbarwnd, TB_SETROWS,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
336 MAKEWPARAM(nbuttons, FALSE), 0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
337 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
338
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
339 else
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
340 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
341 SendMessage (toolbarwnd, TB_SETROWS, MAKEWPARAM(1, FALSE), 0);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
342 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
343
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
344 /* finally populate with images */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
345 if (SendMessage (toolbarwnd, TB_SETIMAGELIST, 0,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
346 (LPARAM)ilist) == -1)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
347 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
348 mswindows_clear_toolbar (f, pos, 0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
349 error ("couldn't add image list to toolbar");
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
350 }
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
351
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
352 /* now display the window */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
353 ShowWindow (toolbarwnd, SW_SHOW);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
354
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
355 if (button_tbl) xfree (button_tbl);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
356
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
357 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
358 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
359 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
360
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
361 static void
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
362 mswindows_move_toolbar (struct frame *f, enum toolbar_pos pos)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
363 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
364 int bar_x, bar_y, bar_width, bar_height, vert;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
365 HWND toolbarwnd = TOOLBAR_HANDLE(f,pos);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
366
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
367 if (toolbarwnd)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
368 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
369 get_toolbar_coords (f, pos, &bar_x, &bar_y, &bar_width, &bar_height,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
370 &vert, 1);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
371
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
372 /* #### This terrible mangling with coordinates perhaps
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
373 arises from different treatment of toolbar positions
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
374 by Windows and by XEmacs. */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
375 switch (pos)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
376 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
377 case TOP_TOOLBAR:
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
378 bar_x -= 2; bar_y--;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
379 bar_width += 2; bar_height++;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
380 break;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
381 case LEFT_TOOLBAR:
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
382 bar_x -= 2; bar_y--;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
383 bar_width++; bar_height++;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
384 break;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
385 case BOTTOM_TOOLBAR:
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
386 bar_x--;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
387 bar_width++;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
388 break;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
389 case RIGHT_TOOLBAR:
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
390 bar_y--;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
391 break;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
392 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
393 SetWindowPos (toolbarwnd, NULL, bar_x, bar_y,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
394 bar_width + 1, bar_height + 1, SWP_NOZORDER);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
395 }
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
396 }
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
397
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
398 static void
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
399 mswindows_redraw_exposed_toolbars (struct frame *f, int x, int y, int width,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
400 int height)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
401 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
402 assert (FRAME_MSWINDOWS_P (f));
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
403
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
404 if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
405 mswindows_move_toolbar (f, TOP_TOOLBAR);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
406
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
407 if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
408 mswindows_move_toolbar (f, BOTTOM_TOOLBAR);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
409
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
410 if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
411 mswindows_move_toolbar (f, LEFT_TOOLBAR);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
412
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
413 if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
414 mswindows_move_toolbar (f, RIGHT_TOOLBAR);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
415 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
416
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
417 static void
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
418 mswindows_initialize_frame_toolbars (struct frame *f)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
419 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
420
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
421 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
422
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
423 static void
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
424 mswindows_output_frame_toolbars (struct frame *f)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
425 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
426 assert (FRAME_MSWINDOWS_P (f));
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
427
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
428 if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
429 mswindows_output_toolbar (f, TOP_TOOLBAR);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
430 else if (f->top_toolbar_was_visible)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
431 mswindows_clear_toolbar (f, TOP_TOOLBAR, 0);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
432
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
433 if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
434 mswindows_output_toolbar (f, BOTTOM_TOOLBAR);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
435 else if (f->bottom_toolbar_was_visible)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
436 mswindows_clear_toolbar (f, BOTTOM_TOOLBAR, 0);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
437
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
438 if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
439 mswindows_output_toolbar (f, LEFT_TOOLBAR);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
440 else if (f->left_toolbar_was_visible)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
441 mswindows_clear_toolbar (f, LEFT_TOOLBAR, 0);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
442
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
443 if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
444 mswindows_output_toolbar (f, RIGHT_TOOLBAR);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
445 else if (f->right_toolbar_was_visible)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
446 mswindows_clear_toolbar (f, RIGHT_TOOLBAR, 0);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
447 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
448
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
449 static void
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
450 mswindows_free_frame_toolbars (struct frame *f)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
451 {
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
452 HWND twnd=NULL;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
453 #define DELETE_TOOLBAR(pos) \
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
454 mswindows_clear_toolbar(f, 0, pos); \
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
455 if ((twnd=GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + pos))) \
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
456 DestroyWindow(twnd)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
457
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
458 DELETE_TOOLBAR(TOP_TOOLBAR);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
459 DELETE_TOOLBAR(BOTTOM_TOOLBAR);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
460 DELETE_TOOLBAR(LEFT_TOOLBAR);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
461 DELETE_TOOLBAR(RIGHT_TOOLBAR);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
462 #undef DELETE_TOOLBAR
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
463 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
464
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
465 /* map toolbar hwnd to pos*/
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
466 int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
467 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
468 #if 1
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
469 int id = GetDlgCtrlID(ctrl);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
470 return id ? id - TOOLBAR_ID_BIAS : -1;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
471 #else
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
472 if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS) == ctrl)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
473 return 0;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
474 else if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS +1) == ctrl)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
475 return 1;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
476 else if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS +2) == ctrl)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
477 return 2;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
478 else if (GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS +3) == ctrl)
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
479 return 3;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
480 else
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
481 assert(0);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
482 #endif
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
483 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
484
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
485 Lisp_Object
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
486 mswindows_get_toolbar_button_text ( struct frame* f, int command_id )
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
487 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
488 Lisp_Object button = Fgethash (make_int (command_id),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
489 FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f), Qnil);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
490
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
491 if (!NILP (button))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
492 {
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
493 struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
494 return tb->help_string;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
495 }
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
496 return Qnil;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
497 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
498
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
499 /*
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
500 * Return value is Qt if we have dispatched the command,
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
501 * or Qnil if id has not been mapped to a callback.
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
502 * Window procedure may try other targets to route the
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
503 * command if we return nil
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
504 */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
505 Lisp_Object
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
506 mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id)
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
507 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
508 /* Try to map the command id through the proper hash table */
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
509 Lisp_Object button, command, funcsym, frame;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
510 struct gcpro gcpro1;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
511
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
512 button = Fgethash (make_int (id),
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
513 FRAME_MSWINDOWS_TOOLBAR_HASHTABLE (f), Qnil);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
514
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
515 if (NILP (button))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
516 return Qnil;
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
517
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
518 command = XTOOLBAR_BUTTON(button)->callback;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
519
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
520 if (UNBOUNDP(command))
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
521 return Qnil;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
522
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
523 /* Need to gcpro because the hashtable may get destroyed
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
524 by menu_cleanup(), and will not gcpro the command
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
525 any more */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
526 GCPRO1 (command);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
527
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
528 /* Ok, this is our one. Enqueue it. */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
529 if (SYMBOLP (command))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
530 funcsym = Qcall_interactively;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
531 else if (CONSP (command))
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
532 funcsym = Qeval;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
533 else
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
534 signal_simple_error ("Callback must be either evallable form or a symbol",
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
535 command);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
536
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
537 XSETFRAME (frame, f);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
538 enqueue_misc_user_event (frame, funcsym, command);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
539
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
540 /* Needs good bump also, for WM_COMMAND may have been dispatched from
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
541 mswindows_need_event, which will block again despite new command
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
542 event has arrived */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
543 mswindows_bump_queue ();
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
544
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
545 UNGCPRO; /* command */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
546 return Qt;
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
547 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
548
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
549
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
550 /************************************************************************/
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
551 /* initialization */
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
552 /************************************************************************/
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
553
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
554 void
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
555 console_type_create_toolbar_mswindows (void)
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
556 {
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
557 CONSOLE_HAS_METHOD (mswindows, output_frame_toolbars);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
558 CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars);
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
559 CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 276
diff changeset
560 CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars);
276
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
561 }
6330739388db Import from CVS: tag r21-0b36
cvs
parents:
diff changeset
562