Mercurial > emacs
comparison src/frame.h @ 8948:5f79babaa7d2
(FRAME_SCROLL_BAR_PIXEL_WIDTH): New macro, supersedes
VERTICAL_SCROLL_BAR_PIXEL_WIDTH; no longer device-dependent.
All callers changed.
(FRAME_SCROLL_BAR_COLS): New macro, supersedes VERTICAL_SCROLL_BAR_WIDTH; no
longer constant. All callers changed.
(scroll_bar_pixel_width, scroll_bar_cols): New members of struct frame.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 20 Sep 1994 05:20:16 +0000 |
parents | 3c6b5ba4d559 |
children | fbdd7a2e62f4 |
comparison
equal
deleted
inserted
replaced
8947:a6254c24d670 | 8948:5f79babaa7d2 |
---|---|
238 For the format of the data, see extensive comments in xmenu.c. | 238 For the format of the data, see extensive comments in xmenu.c. |
239 Only the X toolkit version uses this. */ | 239 Only the X toolkit version uses this. */ |
240 Lisp_Object menu_bar_vector; | 240 Lisp_Object menu_bar_vector; |
241 /* Number of elements in the vector that have meaningful data. */ | 241 /* Number of elements in the vector that have meaningful data. */ |
242 int menu_bar_items_used; | 242 int menu_bar_items_used; |
243 | |
244 /* Width of the scroll bar, in pixels and in characters. */ | |
245 int scroll_bar_pixel_width; | |
246 int scroll_bar_cols; | |
243 }; | 247 }; |
244 | 248 |
245 #ifdef MULTI_FRAME | 249 #ifdef MULTI_FRAME |
246 | 250 |
247 typedef struct frame *FRAME_PTR; | 251 typedef struct frame *FRAME_PTR; |
291 #define FRAME_MESSAGE_BUF(f) (f)->message_buf | 295 #define FRAME_MESSAGE_BUF(f) (f)->message_buf |
292 #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos | 296 #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos |
293 #define FRAME_FOCUS_FRAME(f) (f)->focus_frame | 297 #define FRAME_FOCUS_FRAME(f) (f)->focus_frame |
294 #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) | 298 #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) |
295 #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((f)->has_vertical_scroll_bars) | 299 #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((f)->has_vertical_scroll_bars) |
300 #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) ((f)->scroll_bar_pixel_width) | |
301 #define FRAME_SCROLL_BAR_COLS(f) ((f)->scroll_bar_cols) | |
296 #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) | 302 #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) |
297 #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) | 303 #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) |
298 #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) | 304 #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) |
299 | 305 |
300 /* Emacs's redisplay code could become confused if a frame's | 306 /* Emacs's redisplay code could become confused if a frame's |
421 #define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) | 427 #define FRAME_SCROLL_BOTTOM_VPOS(f) (the_only_frame.scroll_bottom_vpos) |
422 #define FRAME_FOCUS_FRAME(f) (Qnil) | 428 #define FRAME_FOCUS_FRAME(f) (Qnil) |
423 #define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) | 429 #define FRAME_CAN_HAVE_SCROLL_BARS(f) (the_only_frame.can_have_scroll_bars) |
424 #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ | 430 #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ |
425 (the_only_frame.has_vertical_scroll_bars) | 431 (the_only_frame.has_vertical_scroll_bars) |
432 #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) (the_only_frame.scroll_bar_pixel_width) | |
433 #define FRAME_SCROLL_BAR_COLS(f) (the_only_frame.scroll_bar_cols) | |
426 #define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) | 434 #define FRAME_SCROLL_BARS(f) (the_only_frame.scroll_bars) |
427 #define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) | 435 #define FRAME_CONDEMNED_SCROLL_BARS(f) (the_only_frame.condemned_scroll_bars) |
428 #define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) | 436 #define FRAME_MENU_BAR_ITEMS(f) (the_only_frame.menu_bar_items) |
429 | 437 |
430 /* See comments in definition above. */ | 438 /* See comments in definition above. */ |
448 | 456 |
449 #endif /* not MULTI_FRAME */ | 457 #endif /* not MULTI_FRAME */ |
450 | 458 |
451 | 459 |
452 /* Device- and MULTI_FRAME-independent scroll bar stuff. */ | 460 /* Device- and MULTI_FRAME-independent scroll bar stuff. */ |
453 | |
454 /* The number of columns a vertical scroll bar occupies. */ | |
455 #define VERTICAL_SCROLL_BAR_WIDTH (2) | |
456 | 461 |
457 /* Return the starting column (zero-based) of the vertical scroll bar | 462 /* Return the starting column (zero-based) of the vertical scroll bar |
458 for window W. The column before this one is the last column we can | 463 for window W. The column before this one is the last column we can |
459 use for text. If the window touches the right edge of the frame, | 464 use for text. If the window touches the right edge of the frame, |
460 we have extra space allocated for it. Otherwise, the scroll bar | 465 we have extra space allocated for it. Otherwise, the scroll bar |
461 takes over the window's rightmost columns. */ | 466 takes over the window's rightmost columns. */ |
462 #define WINDOW_VERTICAL_SCROLL_BAR_COLUMN(w) \ | 467 #define WINDOW_VERTICAL_SCROLL_BAR_COLUMN(w) \ |
463 (((XINT ((w)->left) + XINT ((w)->width)) \ | 468 (((XINT ((w)->left) + XINT ((w)->width)) \ |
464 < FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) \ | 469 < FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) \ |
465 ? XINT ((w)->left) + XINT ((w)->width) - VERTICAL_SCROLL_BAR_WIDTH \ | 470 ? (XINT ((w)->left) + XINT ((w)->width) \ |
471 - FRAME_SCROLL_BAR_COLS (XFRAME (WINDOW_FRAME (w)))) \ | |
466 : FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) | 472 : FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) |
467 | 473 |
468 /* Return the height in lines of the vertical scroll bar in w. If the | 474 /* Return the height in lines of the vertical scroll bar in w. If the |
469 window has a mode line, don't make the scroll bar extend that far. */ | 475 window has a mode line, don't make the scroll bar extend that far. */ |
470 #define WINDOW_VERTICAL_SCROLL_BAR_HEIGHT(w) (window_internal_height (w)) | 476 #define WINDOW_VERTICAL_SCROLL_BAR_HEIGHT(w) (window_internal_height (w)) |