Mercurial > emacs
comparison src/xdisp.c @ 2189:cb92d253a599
(display_menu_bar): Assume FRAME_MENU_BAR_ITEMS already set.
Fill out line with spaces.
Put explicit spaces between items.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 15 Mar 1993 05:50:02 +0000 |
parents | cb8205e30dda |
children | 9793d8654e23 |
comparison
equal
deleted
inserted
replaced
2188:f74e9c948380 | 2189:cb92d253a599 |
---|---|
1846 if (FRAME_MENU_BAR_LINES (f) <= 0) | 1846 if (FRAME_MENU_BAR_LINES (f) <= 0) |
1847 return; | 1847 return; |
1848 | 1848 |
1849 get_display_line (f, vpos, 0); | 1849 get_display_line (f, vpos, 0); |
1850 | 1850 |
1851 items = menu_bar_items (); | 1851 for (tail = FRAME_MENU_BAR_ITEMS (f); CONSP (tail); tail = XCONS (tail)->cdr) |
1852 FRAME_MENU_BAR_ITEMS (f) = items; | |
1853 | |
1854 for (tail = items; CONSP (tail); tail = XCONS (tail)->cdr) | |
1855 { | 1852 { |
1856 Lisp_Object string; | 1853 Lisp_Object string; |
1854 | |
1857 string = XCONS (XCONS (XCONS (tail)->car)->cdr)->car; | 1855 string = XCONS (XCONS (XCONS (tail)->car)->cdr)->car; |
1858 | 1856 |
1859 /* Record in each item its hpos. */ | 1857 /* Record in each item its hpos. */ |
1860 XFASTINT (XCONS (XCONS (XCONS (tail)->car)->cdr)->cdr) = hpos; | 1858 XFASTINT (XCONS (XCONS (XCONS (tail)->car)->cdr)->cdr) = hpos; |
1861 | 1859 |
1862 if (hpos < maxendcol) | 1860 if (hpos < maxendcol) |
1863 hpos = display_string (XWINDOW (FRAME_ROOT_WINDOW (f)), vpos, | 1861 hpos = display_string (XWINDOW (FRAME_ROOT_WINDOW (f)), vpos, |
1864 XSTRING (string)->data, | 1862 XSTRING (string)->data, |
1865 hpos, 0, hpos, maxendcol) + 3; | 1863 hpos, 0, hpos, maxendcol); |
1864 /* Put a gap of 3 spaces between items. */ | |
1865 if (hpos < maxendcol) | |
1866 { | |
1867 int hpos1 = hpos + 3; | |
1868 hpos = display_string (w, vpos, "", hpos, 0, | |
1869 min (hpos1, maxendcol), maxendcol); | |
1870 } | |
1866 } | 1871 } |
1867 | 1872 |
1868 FRAME_DESIRED_GLYPHS (f)->bufp[vpos] = 0; | 1873 FRAME_DESIRED_GLYPHS (f)->bufp[vpos] = 0; |
1869 FRAME_DESIRED_GLYPHS (f)->highlight[vpos] = mode_line_inverse_video; | 1874 FRAME_DESIRED_GLYPHS (f)->highlight[vpos] = mode_line_inverse_video; |
1875 | |
1876 /* Fill out the line with spaces. */ | |
1877 if (maxendcol > hpos) | |
1878 hpos = display_string (w, vpos, "", hpos, 0, maxendcol, -1); | |
1870 } | 1879 } |
1871 | 1880 |
1872 /* Display the mode line for window w */ | 1881 /* Display the mode line for window w */ |
1873 | 1882 |
1874 static void | 1883 static void |