290 |
(push (cons key value) alist)) |
(push (cons key value) alist)) |
291 |
alist)) |
alist)) |
292 |
|
|
293 |
(defun tooltip-show (text gud-tip) |
(defun tooltip-show (text &optional use-echo-area) |
294 |
"Show a tooltip window displaying TEXT. |
"Show a tooltip window displaying TEXT. |
295 |
|
|
296 |
Text larger than `x-max-tooltip-size' is clipped. |
Text larger than `x-max-tooltip-size' is clipped. |
301 |
`tooltip-x-offset' and `tooltip-y-offset' from the current mouse |
`tooltip-x-offset' and `tooltip-y-offset' from the current mouse |
302 |
position. |
position. |
303 |
|
|
304 |
GUD-TIP is t if the tooltip is from a GUD session and nil otherwise." |
Optional second arg USE-ECHO-AREA non-nil means to show tooltip |
305 |
(if (and gud-tip tooltip-gud-echo-area) |
in echo area." |
306 |
|
(if use-echo-area |
307 |
(message "%s" text) |
(message "%s" text) |
308 |
(condition-case error |
(condition-case error |
309 |
(let ((params (copy-sequence tooltip-frame-parameters)) |
(let ((params (copy-sequence tooltip-frame-parameters)) |
419 |
(defun tooltip-gud-process-output (process output) |
(defun tooltip-gud-process-output (process output) |
420 |
"Process debugger output and show it in a tooltip window." |
"Process debugger output and show it in a tooltip window." |
421 |
(set-process-filter process tooltip-gud-original-filter) |
(set-process-filter process tooltip-gud-original-filter) |
422 |
(tooltip-show (tooltip-strip-prompt process output) t)) |
(tooltip-show (tooltip-strip-prompt process output) |
423 |
|
tooltip-gud-echo-area)) |
424 |
|
|
425 |
(defun tooltip-gud-print-command (expr) |
(defun tooltip-gud-print-command (expr) |
426 |
"Return a suitable command to print the expression EXPR. |
"Return a suitable command to print the expression EXPR. |
467 |
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) |
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) |
468 |
(let ((string (buffer-string))) |
(let ((string (buffer-string))) |
469 |
;; remove newline for tooltip-gud-echo-area |
;; remove newline for tooltip-gud-echo-area |
470 |
(substring string 0 (- (length string) 1)))) t)) |
(substring string 0 (- (length string) 1)))) |
471 |
|
tooltip-gud-echo-area)) |
472 |
|
|
473 |
|
|
474 |
;;; Tooltip help. |
;;; Tooltip help. |
501 |
the timer with ID `tooltip-timeout-id' fires. |
the timer with ID `tooltip-timeout-id' fires. |
502 |
Value is non-nil if this function handled the tip." |
Value is non-nil if this function handled the tip." |
503 |
(when (stringp tooltip-help-message) |
(when (stringp tooltip-help-message) |
504 |
(tooltip-show tooltip-help-message nil) |
(tooltip-show tooltip-help-message) |
505 |
t)) |
t)) |
506 |
|
|
507 |
(provide 'tooltip) |
(provide 'tooltip) |