annotate src/toolbar-msw.c @ 283:fa3d41851a08

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