196 |
static void Select(); |
static void Select(); |
197 |
static void Key(); |
static void Key(); |
198 |
static void Nothing(); |
static void Nothing(); |
199 |
static int separator_height (); |
static int separator_height __P ((enum menu_separator)); |
200 |
|
|
201 |
static XtActionsRec |
static XtActionsRec |
202 |
xlwMenuActionsList [] = |
xlwMenuActionsList [] = |
316 |
pop_new_stack_if_no_contents (mw) |
pop_new_stack_if_no_contents (mw) |
317 |
XlwMenuWidget mw; |
XlwMenuWidget mw; |
318 |
{ |
{ |
319 |
if (mw->menu.new_depth) |
if (mw->menu.new_depth > 1) |
320 |
{ |
{ |
321 |
if (!mw->menu.new_stack [mw->menu.new_depth - 1]->contents) |
if (!mw->menu.new_stack [mw->menu.new_depth - 1]->contents) |
322 |
mw->menu.new_depth -= 1; |
mw->menu.new_depth -= 1; |
1243 |
{ |
{ |
1244 |
XlwMenuWidget mw = (XlwMenuWidget) w; |
XlwMenuWidget mw = (XlwMenuWidget) w; |
1245 |
int i; |
int i; |
1246 |
|
|
1247 |
for (i = 0; i < mw->menu.windows_length; ++i) |
for (i = 0; i < mw->menu.windows_length; ++i) |
1248 |
if (window == mw->menu.windows[i].window) |
if (window == mw->menu.windows[i].window) |
1249 |
break; |
break; |
1397 |
|
|
1398 |
/* unmap the menus that popped down */ |
/* unmap the menus that popped down */ |
1399 |
for (i = new_depth - 1; i < old_depth; i++) |
for (i = new_depth - 1; i < old_depth; i++) |
1400 |
if (i >= new_depth || !new_stack[i]->contents) |
if (i >= new_depth || (i > 0 && !new_stack[i]->contents)) |
1401 |
XUnmapWindow (XtDisplay (mw), windows[i].window); |
XUnmapWindow (XtDisplay (mw), windows[i].window); |
1402 |
} |
} |
1403 |
|
|
2184 |
the menu-bar. If the current item is the first one, highlight the |
the menu-bar. If the current item is the first one, highlight the |
2185 |
last item in the menubar (probably Help). */ |
last item in the menubar (probably Help). */ |
2186 |
set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1); |
set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1); |
2187 |
|
else if (mw->menu.old_depth == 1 |
2188 |
|
&& selected_item->contents) /* Is this menu item expandable? */ |
2189 |
|
{ |
2190 |
|
set_new_state (mw, selected_item->contents, mw->menu.old_depth); |
2191 |
|
remap_menubar (mw); |
2192 |
|
selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; |
2193 |
|
if (!selected_item->enabled && find_first_selectable (mw, selected_item)) |
2194 |
|
set_new_state (mw, find_first_selectable (mw, selected_item), mw->menu.old_depth - 1); |
2195 |
|
} |
2196 |
|
|
2197 |
else |
else |
2198 |
{ |
{ |
2199 |
pop_new_stack_if_no_contents (mw); |
pop_new_stack_if_no_contents (mw); |