FocusLost
TheFocusLostmethod is called to notify this part that one of its display frames has lost the specified focus.
void FocusLost (in ODTypeToken focus, in ODFrame ownerFrame);
focus- A tokenized string representing the focus type that was lost, expressed as a 32-bit value.
ownerFrame- A reference to a display frame that has lost the focus.
DISCUSSION
Thefocusparameter must be the tokenized form of one of the focus constants (kODClipboardFocus,kODKeyFocus,kODMenuFocus,kODModalFocus,kODMouseFocus,kODScrollingFocus, orkODSelectionFocus) or the tokenized form of a part-specific focus type. You can call the session object'sTokenizemethod to obtain a token corresponding to one of these constants.OpenDoc calls this method to notify this part that the ownership of a focus has been unilaterally removed. For example, a focus module might detect that some physical hardware connection has been broken. Or if a containing part uses the arbitrator's
TransferFocusmethod to transfer a focus directly from one embedded part to another, the focus module calls the source part'sFocusLostmethod.Your part's
FocusLostmethod is not called when this part loses a focus because another part has requested it (that is, using the arbitrator'sRequestFocusandRequestFocusSetmethods). In this case, the part'sCommitRelinquishFocusmethod is called if the part agrees to relinquish the focus.Your part's
FocusLostmethod should perform any actions necessary to indicate that it has lost the focus (for example, closing connections and removing highlighting). Your part should avoid inappropriate behavior after it has lost the focus. For example, your part should not attempt to adjust menus or display a menu bar when your part does not have the menu focus.OVERRIDING
When you subclassODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrInvalidFrame- The specified frame is not a display frame of this part.
SEE ALSO
TheODFocusTypetype (page 889).
TheODTypeTokentype (page 877).
TheODPart::AbortRelinquishFocusmethod (page 475).
TheODPart::BeginRelinquishFocusmethod (page 482).
TheODPart::CommitRelinquishFocusmethod (page 488).
TheODPart::FocusAcquiredmethod (page 517).
TheODSession::Tokenizemethod (page 622).
"The FocusLost Method" on page 92 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Transferring Focus Without Negotiation" on page 209 in OpenDoc Programmer's Guide.
"On Frame Activation" on page 211 in OpenDoc Programmer's Guide.