NextPrevUpTopContentsIndex

pane-has-focus-p

Function
Summary

Determines whether a pane has the focus.

Package

capi

Signature

pane-has-focus-p pane => focusp

Arguments

pane

A CAPI element.

Values

focusp

A boolean.

Description

The function pane-has-focus-p is the predicate for whether pane currently has the input focus.

Note: On Motif, pane-has-focus-p cannot be used in menu functions such as the enabled-function or popup-callback of a menu item. It will always return nil, because the focus is on the menu button when the user clicks on it.

Example

This function descends down a layout's hierachy to find the child that currently has the focus:

(defun find-pane-with-focus (layout)
  (capi:map-pane-descendant-children 
   layout
   #'(lambda (p)
       (when (capi:pane-has-focus-p p)
         (return-from find-pane-with-focus p)))))
See also

accepts-focus-p


LispWorks CAPI Reference Manual - 17 Mar 2008

NextPrevUpTopContentsIndex