stlab.adobe.com Adobe Systems Incorporated

keyboard.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003     Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004     or a copy at http://stlab.adobe.com/licenses.html)
00005 */
00006 
00007 /****************************************************************************************************/
00008 
00009 #ifndef ADOBE_KEYBOARD_HPP
00010 #define ADOBE_KEYBOARD_HPP
00011 
00012 /****************************************************************************************************/
00013 
00014 #include <adobe/config.hpp>
00015 
00016 #include <adobe/poly_key_handler.hpp>
00017 #include <adobe/any_regular.hpp>
00018 #include <adobe/forest.hpp>
00019 #include <adobe/widget_attributes.hpp>
00020 
00021 /****************************************************************************************************/
00022 
00023 namespace adobe {
00024 
00025 /****************************************************************************************************/
00026 
00027 struct keyboard_t
00028 {
00029     typedef forest<poly_key_handler_t> keyboard_forest_t;
00030     typedef keyboard_forest_t::iterator      iterator;
00031 
00032     static keyboard_t& get();
00033 
00034     iterator insert(iterator parent, const poly_key_handler_t& element);
00035 
00036     void erase(iterator position);
00037 
00038     bool dispatch(key_type                    virtual_key,
00039                   bool                        pressed,
00040                   modifiers_t          modifiers,
00041                   const any_regular_t& base_handler);
00042 
00043 private:
00044     iterator handler_to_iterator(const any_regular_t& handler);
00045 
00046     keyboard_forest_t forest_m;
00047 };
00048 
00049 /****************************************************************************************************/
00050 
00051 } // namespace adobe
00052 
00053 /****************************************************************************************************/
00054 // ADOBE_KEYBOARD_HPP
00055 #endif
00056 
00057 /****************************************************************************************************/

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google