annotate lwlib/lwlib-Xolmb.c @ 88868:0fafee1d7770

(fancy-splash-head): Warn about status. (fancy-splash-tail): Copyright up-date.
author Dave Love <fx@gnu.org>
date Thu, 18 Jul 2002 11:09:22 +0000
parents 7fb1caba0f51
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5628
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 /* An OLIT menubar widget, by Chuck Thompson <cthomp@cs.uiuc.edu>
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 Copyright (C) 1993 Lucid, Inc.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 This file is part of the Lucid Widget Library.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 The Lucid Widget Library is free software; you can redistribute it and/or
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 modify it under the terms of the GNU General Public License as published by
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 the Free Software Foundation; either version 1, or (at your option)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 any later version.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 The Lucid Widget Library is distributed in the hope that it will be useful,
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 GNU General Public License for more details.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
14186
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 5628
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 5628
diff changeset
19 Boston, MA 02111-1307, USA. */
5628
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
41767
7fb1caba0f51 Include ../src/lisp.h.
Richard M. Stallman <rms@gnu.org>
parents: 14186
diff changeset
21
7fb1caba0f51 Include ../src/lisp.h.
Richard M. Stallman <rms@gnu.org>
parents: 14186
diff changeset
22 #include "../src/lisp.h"
7fb1caba0f51 Include ../src/lisp.h.
Richard M. Stallman <rms@gnu.org>
parents: 14186
diff changeset
23
5628
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 #include <X11/IntrinsicP.h>
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 #include <X11/Intrinsic.h>
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 #include <X11/CompositeP.h>
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 #include <X11/Composite.h>
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 #include "lwlib-Xol-mbP.h"
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 #include "lwlib-Xol-mb.h"
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 #define HORIZ_SPACING 4
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 #define VERT_SPACING 4
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 static void Initialize();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 static void Resize();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 static void ChangeManaged();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 static Boolean SetValues();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 static XtGeometryResult GeometryManager();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 static XtGeometryResult PreferredSize();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 static void do_layout();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 static XtGeometryResult try_layout();
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 lwMenuBarClassRec lwMenubarClassRec =
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 /* core_class members */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 (WidgetClass) &compositeClassRec, /* superclass */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 "Menubar", /* class_name */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 sizeof(lwMenuBarRec), /* widget_size */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 NULL, /* class_initialize */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 NULL, /* class_part_initialize */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 FALSE, /* class_inited */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 Initialize, /* initialize */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 NULL, /* initialize_hook */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 XtInheritRealize, /* realize */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 NULL, /* actions */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 0, /* num_actions */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 NULL, /* resources */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 0, /* num_resources */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 NULLQUARK, /* xrm_class */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 TRUE, /* compress_motion */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 XtExposeCompressMaximal, /* compress_exposure */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 TRUE, /* compress_enterleave */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 FALSE, /* visible_interest */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 NULL, /* destroy */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 Resize, /* resize */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 NULL, /* expose */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 NULL, /* set_values */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 NULL, /* set_values_hook */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 XtInheritSetValuesAlmost, /* set_values_almost */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 NULL, /* get_values_hook */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 NULL, /* accept_focus */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 XtVersion, /* version */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 NULL, /* callback_private */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 NULL, /* tm_table */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 PreferredSize, /* query_geometry */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 NULL, /* display_accelerator */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 NULL, /* extension */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 },
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 /* composite_class members */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 GeometryManager, /* geometry_manager */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 ChangeManaged, /* change_managed */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 XtInheritInsertChild, /* insert_child */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 XtInheritDeleteChild, /* delete_child */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 NULL, /* extension */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 },
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91 /* Menubar class members */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 0, /* empty */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 };
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 WidgetClass lwMenubarWidgetClass = (WidgetClass) &lwMenubarClassRec;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 static void Initialize (request, new)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 lwMenuBarWidget request, new;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 if (request->core.width <= 0)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 new->core.width = 1;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 if (request->core.height <= 0)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 new->core.height = 23;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 static void
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 Resize (w)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 lwMenuBarWidget w;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 do_layout(w);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 static void
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 do_layout (parent)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 lwMenuBarWidget parent;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 Widget child;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 int cnt;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 int managed_children = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 int managed_width = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 int new_pos = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 * Determine number of children which will fit on one line.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 * For now we ignore the rest, making sure they are unmanaged.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 cnt = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 while ((cnt < (int) parent->composite.num_children) &&
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 (managed_width < (int) parent->core.width))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 child = parent->composite.children[cnt++];
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 managed_children++;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 managed_width += child->core.width + child->core.border_width * 2 +
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 HORIZ_SPACING;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 if (managed_width > (int) parent->core.width)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 managed_children--;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 * Correct positioning of children.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 cnt = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 while (managed_children)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 child = parent->composite.children[cnt++];
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 if (!child->core.managed)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 XtManageChild (child);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 if ((child->core.x != new_pos) || (child->core.y != 0))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 XtMoveWidget (child, new_pos, 0);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 new_pos += child->core.width + child->core.border_width * 2 +
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 HORIZ_SPACING;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 managed_children--;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 * Make sure all remaining children are unmanaged.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 while (cnt < parent->composite.num_children)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 child = parent->composite.children[cnt];
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 if (child->core.managed)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 XtUnmanageChild (child);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 if ((child->core.x != parent->core.width) ||
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 (child->core.y != parent->core.height))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 XtMoveWidget (child, parent->core.width, parent->core.height);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 cnt++;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183 static XtGeometryResult
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184 PreferredSize (w, request, preferred)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 lwMenuBarWidget w;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186 XtWidgetGeometry *request, *preferred;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188 Widget child;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 int cnt;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
192 * If no changes are being made to the width or height, just agree.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 if (!(request->request_mode & CWWidth) &&
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 !(request->request_mode & CWHeight))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
197 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 * Right now assume everything goes in one row. Calculate the
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 * minimum required width and height.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 preferred->width = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 preferred->height = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207 for (cnt = 0; cnt < w->composite.num_children; cnt++)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
209 child = w->composite.children[cnt];
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
210 if (child->core.managed)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 preferred->width += child->core.width + child->core.border_width*2 +
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 HORIZ_SPACING;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 if (preferred->height < (Dimension) (child->core.height +
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215 child->core.border_width * 2))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 preferred->height = child->core.height +
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 child->core.border_width * 2;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221 preferred->request_mode = CWWidth | CWHeight;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 * Case: both height and width requested
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227 if ((request->request_mode & CWWidth) &&
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 (request->request_mode & CWHeight))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 * Ok if same or bigger.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 if (preferred->width <= request->width &&
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 preferred->height <= request->height)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237 preferred->width = request->width;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 * If both dimensions are too small, say no.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 else
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 if (preferred->width > request->width &&
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 preferred->height > request->height)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 return (XtGeometryNo);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
250 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 * Otherwise one must be right, so say almost.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 else
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 return (XtGeometryAlmost);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 * If only one dimension is requested, either its OK or it isn't.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
261
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 else
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 if (request->request_mode & CWWidth)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 if (preferred->width <= request->width)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 preferred->width = request->width;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 else
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 return (XtGeometryNo);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 else if (request->request_mode & CWHeight)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 if (preferred->height <= request->height)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 else
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281 return (XtGeometryNo);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 static XtGeometryResult
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 GeometryManager (w, request, reply)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291 Widget w;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 XtWidgetGeometry *request;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 XtWidgetGeometry *reply;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296 lwMenuBarWidget parent = (lwMenuBarWidget) w->core.parent;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
298 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 * If the widget wants to move, just say no.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302 if ((request->request_mode & CWX && request->x != w->core.x) ||
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 (request->request_mode & CWY && request->y != w->core.y))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304 return (XtGeometryNo);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
306 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307 * Since everything "fits" for now, grant all requests.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310 if (request->request_mode & CWWidth)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 w->core.width = request->width;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 if (request->request_mode & CWHeight)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 w->core.height = request->height;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 if (request->request_mode & CWBorderWidth)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
315 w->core.border_width = request->border_width;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
317 do_layout (parent);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
318 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 static XtGeometryResult
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323 try_layout (parent)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324 lwMenuBarWidget parent;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
325 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 Widget child;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 int cnt;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328 int managed_children = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
329 int managed_width = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 int new_pos = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332 /*
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
333 * Determine number of children which will fit on one line.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
334 * For now we ignore the rest, making sure they are unmanaged.
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
335 */
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
336
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 cnt = 0;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
338 while ((cnt < (int) parent->composite.num_children) &&
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
339 (managed_width < (int) parent->core.width))
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
341 child = parent->composite.children[cnt++];
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342 if (child->core.managed)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
344 managed_children++;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
345 managed_width += child->core.width + child->core.border_width * 2 +
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346 HORIZ_SPACING;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350 if (managed_width > (int) parent->core.width)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351 return (XtGeometryNo);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 else
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 return (XtGeometryYes);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
354 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
355
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
356
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
358 static void
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
359 ChangeManaged (w)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
360 lwMenuBarWidget w;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 XtGeometryResult result;
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364 result = try_layout (w);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
365
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
366 if (result != XtGeometryYes)
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367 {
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 XtUnmanageChild (w->composite.children[w->composite.num_children - 1]);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
369 XtMoveWidget (w->composite.children[w->composite.num_children-1],
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 w->core.width, w->core.height);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 }
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
372
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373 do_layout (w);
f999ebca00da entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 }