Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7ce2c095
Commit
7ce2c095
authored
Mar 12, 1993
by
Richard M. Stallman
Browse files
(display_menu_bar): New function.
(redisplay_window): Call display_menu_bar.
parent
5ec75a55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
src/xdisp.c
src/xdisp.c
+45
-0
No files found.
src/xdisp.c
View file @
7ce2c095
...
...
@@ -128,6 +128,7 @@ static int display_mode_element ();
static
char
*
fmodetrunc
();
static
char
*
decode_mode_spec
();
static
int
display_string
();
static
void
display_menu_bar
();
/* Prompt to display in front of the minibuffer contents */
char
*
minibuf_prompt
;
...
...
@@ -979,6 +980,12 @@ redisplay_window (window, just_this_one)
&&
height
!=
XFASTINT
(
w
->
height
))
display_mode_line
(
w
);
/* When we reach a frame's selected window, redo the frame's menu bar. */
if
(
!
NILP
(
w
->
update_mode_line
)
&&
FRAME_MENU_BAR_LINES
(
f
)
>
0
&&
EQ
(
FRAME_SELECTED_WINDOW
(
f
),
window
))
display_menu_bar
(
w
);
finish_scroll_bars:
if
(
FRAME_HAS_VERTICAL_SCROLL_BARS
(
f
))
{
...
...
@@ -1824,6 +1831,44 @@ display_text_line (w, start, vpos, hpos, taboffset)
return
&
val_display_text_line
;
}
/* Redisplay the menu bar in the frame for window W. */
static
void
display_menu_bar
(
w
)
struct
window
*
w
;
{
Lisp_Object
items
,
tail
;
register
int
vpos
=
0
;
register
FRAME_PTR
f
=
XFRAME
(
WINDOW_FRAME
(
w
));
int
maxendcol
=
FRAME_WIDTH
(
f
);
int
hpos
=
0
;
if
(
FRAME_MENU_BAR_LINES
(
f
)
<=
0
)
return
;
get_display_line
(
f
,
vpos
,
0
);
items
=
menu_bar_items
();
FRAME_MENU_BAR_ITEMS
(
f
)
=
items
;
for
(
tail
=
items
;
CONSP
(
tail
);
tail
=
XCONS
(
tail
)
->
cdr
)
{
Lisp_Object
string
;
string
=
XCONS
(
XCONS
(
XCONS
(
tail
)
->
car
)
->
cdr
)
->
car
;
/* Record in each item its hpos. */
XFASTINT
(
XCONS
(
XCONS
(
XCONS
(
tail
)
->
car
)
->
cdr
)
->
cdr
)
=
hpos
;
if
(
hpos
<
maxendcol
)
hpos
=
display_string
(
XWINDOW
(
FRAME_ROOT_WINDOW
(
f
)),
vpos
,
XSTRING
(
string
)
->
data
,
hpos
,
0
,
hpos
,
maxendcol
)
+
3
;
}
FRAME_DESIRED_GLYPHS
(
f
)
->
bufp
[
vpos
]
=
0
;
FRAME_DESIRED_GLYPHS
(
f
)
->
highlight
[
vpos
]
=
mode_line_inverse_video
;
}
/* Display the mode line for window w */
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment