stlab.adobe.com Adobe Systems Incorporated

control_button.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_CONTROL_BUTTON_HPP
00010 #define ADOBE_CONTROL_BUTTON_HPP
00011 
00012 #include <adobe/array.hpp>
00013 #include <adobe/dictionary.hpp>
00014 #include <adobe/any_regular.hpp>
00015 #include <adobe/future/widgets/headers/platform_button.hpp>
00016 
00017 /****************************************************************************************************/
00018 
00019 namespace adobe {
00020 
00021 /****************************************************************************************************/
00022 
00023 struct control_button_t
00024 {
00025     typedef any_regular_t                                              model_type;
00026     typedef boost::function<void (const model_type&)>                  setter_proc_type;
00027     typedef boost::function<any_regular_t (const array_t& expression)> expression_eval_proc;
00028 
00029     control_button_t(const std::string&          name,
00030                      const std::string&          alt_text,
00031                      const expression_eval_proc& eval_proc,
00032                      const array_t&              expression,
00033                      theme_t                     theme);
00034 
00042     void measure(extents_t& result);
00043 
00044     void place(const place_data_t& place_data);
00045 
00047 
00055     void monitor(const setter_proc_type& proc);
00056 
00057     void enable(bool make_enabled);
00058 
00060 
00061     adobe::auto_ptr<button_t> button_m;
00062 
00063 private:
00064     void button_fire(const any_regular_t&, const dictionary_t&);
00065 
00066     setter_proc_type          proc_m;
00067     expression_eval_proc      eval_proc_m;
00068     array_t                   expression_m;
00069 };
00070 
00071 /****************************************************************************************************/
00072 
00073 } // namespace adobe
00074 
00075 /****************************************************************************************************/
00076 
00077 #endif
00078 
00079 /****************************************************************************************************/

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