2615 |
fringe (on a graphic display) to indicate truncated or continued |
fringe (on a graphic display) to indicate truncated or continued |
2616 |
lines, buffer boundaries, overlay arrow, etc. The fringe bitmaps are |
lines, buffer boundaries, overlay arrow, etc. The fringe bitmaps are |
2617 |
shared by all frames and windows. You can redefine the built-in |
shared by all frames and windows. You can redefine the built-in |
2618 |
fringe bitmaps, and you can define new fringe bitmaps. However, Emacs |
fringe bitmaps, and you can define new fringe bitmaps. |
|
can handle only 255 different fringe bitmaps. |
|
2619 |
|
|
2620 |
The way to display a bitmap in the left or right fringes for a given |
The way to display a bitmap in the left or right fringes for a given |
2621 |
line in a window is by specifying the @code{display} property for one |
line in a window is by specifying the @code{display} property for one |
2622 |
of the characters that appears in it. Use a display specification of |
of the characters that appears in it. Use a display specification of |
2623 |
the form @code{(left-fringe @var{bitmap} [@var{face}])} or |
the form @code{(left-fringe @var{bitmap} [@var{face}])} or |
2624 |
@code{(right-fringe @var{bitmap} [@var{face}])} (@pxref{Display |
@code{(right-fringe @var{bitmap} [@var{face}])} (@pxref{Display |
2625 |
Property}). Here, @var{bitmap} is an integer identifying the bitmap |
Property}). Here, @var{bitmap} is a symbol identifying the bitmap |
2626 |
you want, and @var{face} (which is optional) is the name of the face |
you want, and @var{face} (which is optional) is the name of the face |
2627 |
whose colors should be used for displaying the bitmap. |
whose colors should be used for displaying the bitmap. |
|
@c ??? Shouldn't the symbol name be used? |
|
2628 |
|
|
2629 |
These are the symbols identify the standard fringe bitmaps. |
These are the symbols identify the standard fringe bitmaps. |
2630 |
Evaluate @code{(require 'fringe)} to define them. Each symbol's |
Evaluate @code{(require 'fringe)} to define them. Fringe bitmap |
2631 |
value is an integer that identifies the corresponding bitmap. |
symbols have their own name space. |
2632 |
|
|
2633 |
@table @asis |
@table @asis |
2634 |
@item Truncation and continuation line bitmaps: |
@item Truncation and continuation line bitmaps: |
2635 |
@code{left-truncation-fringe-bitmap}, |
@code{left-truncation}, @code{right-truncation}, |
2636 |
@code{right-truncation-fringe-bitmap}, |
@code{continued-line}, @code{continuation-line}. |
|
@code{continued-line-fringe-bitmap}, |
|
|
@code{continuation-line-fringe-bitmap}. |
|
2637 |
|
|
2638 |
@item Buffer indication bitmaps: |
@item Buffer indication bitmaps: |
2639 |
@code{up-arrow-fringe-bitmap}, |
@code{up-arrow}, @code{down-arrow}, |
2640 |
@code{down-arrow-fringe-bitmap}, |
@code{top-left-angle}, @code{top-right-angle}, |
2641 |
@code{top-left-angle-fringe-bitmap}, |
@code{bottom-left-angle}, @code{bottom-right-angle}, |
2642 |
@code{top-right-angle-fringe-bitmap}, |
@code{left-bracket}, @code{right-bracket}. |
|
@code{bottom-left-angle-fringe-bitmap}, |
|
|
@code{bottom-right-angle-fringe-bitmap}, |
|
|
@code{left-bracket-fringe-bitmap}, |
|
|
@code{right-bracket-fringe-bitmap}. |
|
2643 |
|
|
2644 |
@item Empty line indication bitmap: |
@item Empty line indication bitmap: |
2645 |
@code{empty-line-fringe-bitmap}. |
@code{empty-line}. |
2646 |
|
|
2647 |
@item Overlay arrow bitmap: |
@item Overlay arrow bitmap: |
2648 |
@code{overlay-arrow-fringe-bitmap}. |
@code{overlay-arrow}. |
2649 |
|
|
2650 |
@item Bitmaps for displaying the cursor in right fringe: |
@item Bitmaps for displaying the cursor in right fringe: |
2651 |
@code{filled-box-cursor-fringe-bitmap}, |
@code{filled-box-cursor}, @code{hollow-box-cursor}, @code{hollow-square}, |
2652 |
@code{hollow-box-cursor-fringe-bitmap}, |
@code{bar-cursor}, @code{hbar-cursor}. |
|
@code{hollow-square-fringe-bitmap}, @code{bar-cursor-fringe-bitmap}, |
|
|
@code{hbar-cursor-fringe-bitmap}. |
|
|
|
|
|
@item Value indicating that no fringe bitmap is present: |
|
|
@code{no-fringe-bitmap}. |
|
|
@c ??? I don't understand what that means. |
|
|
@c ??? Where would you find that value? |
|
|
|
|
|
@item Value indicating a reference to an undefined bitmap: |
|
|
@code{undef-fringe-bitmap}. |
|
|
@c ??? I don't understand what that means. |
|
|
@c ??? Where would you find that value? |
|
2653 |
@end table |
@end table |
2654 |
|
|
2655 |
@defun fringe-bitmaps-at-pos &optional pos window |
@defun fringe-bitmaps-at-pos &optional pos window |
2656 |
This function returns the fringe bitmaps of the display line |
This function returns the fringe bitmaps of the display line |
2657 |
containing position @var{pos} in window @var{window}. The return |
containing position @var{pos} in window @var{window}. The return |
2658 |
value has the form @code{(@var{left} . @var{right})}, where @var{left} |
value has the form @code{(@var{left} . @var{right})}, where @var{left} |
2659 |
is a list of fringe bitmap numbers for left fringe, and @var{right} is |
is the symbol for the fringe bitmap in the left fringe (or @code{nil} |
2660 |
similar for the right fringe. These bitmap numbers are usually values |
if no bitmap), and @var{right} is similar for the right fringe. |
|
of symbols such as the ones listed above. |
|
|
|
|
|
@c ??? Why not return a list of symbols that identify the bitmaps? |
|
|
@c ??? This is Lisp, not C. |
|
2661 |
|
|
2662 |
The value is @code{nil} if @var{pos} is not visible in @var{window}. |
The value is @code{nil} if @var{pos} is not visible in @var{window}. |
2663 |
If @var{window} is @code{nil}, that stands for the selected window. |
If @var{window} is @code{nil}, that stands for the selected window. |
2668 |
@node Customizing Bitmaps |
@node Customizing Bitmaps |
2669 |
@section Customizing Fringe Bitmaps |
@section Customizing Fringe Bitmaps |
2670 |
|
|
2671 |
@c ??? Why not pass a symbol as the first argument |
@defun define-fringe-bitmap bitmap bits &optional height width align |
2672 |
@c ??? and define that symbol. It would be cleaner. |
This function defines the symbol @var{bitmap} as a new fringe bitmap, |
2673 |
|
or replaces an existing bitmap with that name. |
|
@defun define-fringe-bitmap bits &optional height width align bitmap |
|
|
This function defines a new fringe bitmap, or replaces an existing |
|
|
bitmap. |
|
2674 |
|
|
2675 |
The argument @var{bits} specifies the image to use. It should be |
The argument @var{bits} specifies the image to use. It should be |
2676 |
either a string or a vector of integers, where each element (an |
either a string or a vector of integers, where each element (an |
2677 |
integer) corresponds to one row of the bitmap. Each bit of an integer |
integer) corresponds to one row of the bitmap. Each bit of an integer |
2678 |
corresponds to one pixel of the bitmap. |
corresponds to one pixel of the bitmap, where the low bit corresponds |
2679 |
@c ??? Is the low bit the leftmost or the rightmost bit? |
to the rightmost pixel of the bitmap. |
2680 |
|
|
2681 |
The height is normally the length of @var{bits}. However, you |
The height is normally the length of @var{bits}. However, you |
2682 |
can specify a different height with non-@code{nil} @var{height}. The width |
can specify a different height with non-@code{nil} @var{height}. The width |
2694 |
@code{bits} should be repeated enough times to reach the specified |
@code{bits} should be repeated enough times to reach the specified |
2695 |
height. |
height. |
2696 |
|
|
|
The argument @var{bitmap} specifies an existing bitmap to redefine. |
|
|
You should pass the value of the symbol that identifies the bitmap. |
|
|
|
|
2697 |
The return value on success is an integer identifying the new bitmap. |
The return value on success is an integer identifying the new bitmap. |
2698 |
You should save that integer in a variable so it can be used to select |
You should save that integer in a variable so it can be used to select |
2699 |
this bitmap. The value can also be @code{nil} of there are no more |
this bitmap. |
2700 |
free bitmap slots. |
|
2701 |
@c ??? Why not signal an error? That would be cleaner. |
This function signals an error if there are no more free bitmap slots. |
2702 |
@end defun |
@end defun |
2703 |
|
|
2704 |
@defun destroy-fringe-bitmap bitmap |
@defun destroy-fringe-bitmap bitmap |
2924 |
|
|
2925 |
@example |
@example |
2926 |
@group |
@group |
2927 |
@var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | IMAGE | @var{form} |
@var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | @var{image} | @var{form} |
2928 |
@var{num} ::= @var{integer} | @var{float} | @var{symbol} |
@var{num} ::= @var{integer} | @var{float} | @var{symbol} |
2929 |
@var{unit} ::= in | mm | cm | width | height |
@var{unit} ::= in | mm | cm | width | height |
2930 |
@var{elem} ::= left-fringe | right-fringe | left-margin | right-margin |
@var{elem} ::= left-fringe | right-fringe | left-margin | right-margin |
2943 |
The @code{in}, @code{mm}, and @code{cm} units specify the number of |
The @code{in}, @code{mm}, and @code{cm} units specify the number of |
2944 |
pixels per inch, millimeter, and centimeter, respectively. The |
pixels per inch, millimeter, and centimeter, respectively. The |
2945 |
@code{width} and @code{height} units correspond to the default width |
@code{width} and @code{height} units correspond to the default width |
2946 |
and height of the current face. An image specification @code{IMAGE} |
and height of the current face. An image specification @code{image} |
2947 |
corresponds to the width or height of the image. |
corresponds to the width or height of the image. |
2948 |
|
|
2949 |
The @code{left-fringe}, @code{right-fringe}, @code{left-margin}, |
The @code{left-fringe}, @code{right-fringe}, @code{left-margin}, |
2973 |
A value of the form @code{(@var{num} . @var{expr})} stands |
A value of the form @code{(@var{num} . @var{expr})} stands |
2974 |
multiplying the values of @var{num} and @var{expr}. For example, |
multiplying the values of @var{num} and @var{expr}. For example, |
2975 |
@code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 . |
@code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 . |
2976 |
IMAGE)} specifies half the width (or height) of the specified image. |
@var{image})} specifies half the width (or height) of the specified image. |
2977 |
|
|
2978 |
The form @code{(+ @var{expr} ...)} adds up the value of the |
The form @code{(+ @var{expr} ...)} adds up the value of the |
2979 |
expressions. The form @code{(- @var{expr} ...)} negates or subtracts |
expressions. The form @code{(- @var{expr} ...)} negates or subtracts |