# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. #
import uno import unohelper from com.sun.star.awt import XKeyHandler from com.sun.star.awt import XKeyListener from com.sun.star.awt import XMouseClickHandler from com.sun.star.awt import XMouseMotionHandler from com.sun.star.awt import XMouseListener from com.sun.star.awt import XMouseMotionListener
"""
This example illustrates how to register to keyboard or mouse events.
There are two families of interfaces for this, called Listeners and Handlers. In many cases the Handlers are easier to use and provide more flexibility. But
sometimes it's necessary to use the Listeners, as being shown below.
The Listeners usually need to be added exactly to the correct widget. So this
example adds them recursively them to all widgets below the given one. """
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.