stlab.adobe.com Adobe Systems Incorporated

platform_toggle.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_WIDGET_TOGGLE_HPP
00010 #define ADOBE_WIDGET_TOGGLE_HPP
00011 
00012 /****************************************************************************************************/
00013 
00014 #include <adobe/config.hpp>
00015 
00016 #include <windows.h>
00017 
00018 #include <adobe/any_regular.hpp>
00019 #include <adobe/layout_attributes.hpp>
00020 #include <adobe/widget_attributes.hpp>
00021 
00022 #include <boost/function.hpp>
00023 #include <boost/gil/gil_all.hpp>
00024 
00025 /****************************************************************************************************/
00026 
00027 namespace adobe {
00028 
00029 /****************************************************************************************************/
00030 
00031 struct toggle_t
00032 {
00033     typedef any_regular_t model_type;
00034 
00035     typedef boost::function<void (const model_type&)> setter_type;
00036 
00037     typedef boost::gil::rgba8_image_t image_type;
00038 
00039     toggle_t(const std::string&  alt_text,
00040              const any_regular_t value_on,
00041              const image_type&   image_on,
00042              const image_type&   image_off,
00043              const image_type&   image_disabled,
00044              theme_t             theme);
00045 
00046     void measure(extents_t& result);
00047 
00048     void place(const place_data_t& place_data);
00049 
00050     void monitor(const setter_type& proc);
00051 
00052     void enable(bool make_enabled);
00053 
00054     void display(const any_regular_t& to_value);
00055 
00056 #ifndef ADOBE_NO_DOCUMENTATION
00057     HWND                       control_m;
00058     theme_t                    theme_m;
00059     std::string                alt_text_m;
00060     image_type                 image_on_m;
00061     image_type                 image_off_m;
00062     image_type                 image_disabled_m;
00063     setter_type                setter_proc_m;
00064     any_regular_t              value_on_m;
00065     any_regular_t              last_m;
00066     HBITMAP                    bitmap_on_m;
00067     HBITMAP                    bitmap_off_m;
00068     HBITMAP                    bitmap_disabled_m;
00069 #endif
00070 };
00071 
00072 /****************************************************************************************************/
00073 
00074 } // namespace adobe
00075 
00076 /****************************************************************************************************/
00077 
00078 #endif
00079 
00080 /****************************************************************************************************/

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