stlab.adobe.com Adobe Systems Incorporated

platform_checkbox.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_CHECKBOX_HPP
00010 #define ADOBE_WIDGET_CHECKBOX_HPP
00011 
00012 /****************************************************************************************************/
00013 
00014 #include <adobe/config.hpp>
00015 
00016 #define WINDOWS_LEAN_AND_MEAN 1
00017 #include <windows.h>
00018 
00019 #include <adobe/any_regular.hpp>
00020 #include <adobe/extents.hpp>
00021 #include <adobe/layout_attributes.hpp>
00022 #include <adobe/widget_attributes.hpp>
00023 
00024 #include <boost/function.hpp>
00025 
00026 #include <string>
00027 
00028 /****************************************************************************************************/
00029 
00030 namespace adobe {
00031 
00032 /****************************************************************************************************/
00033 
00034 /*
00035     \omit from the doxygen documentation (for now)
00036 
00037     \ingroup asl_widgets_win32
00038 
00039     \brief UI core checkbox widget
00040 
00041     Further documentation can be found in the \ref asl_widgets_carbon.
00042 */
00043 
00044 struct checkbox_t
00045 {
00046     typedef any_regular_t                      model_type;
00047     typedef boost::function<void (const model_type&)> setter_type;
00048 
00049     checkbox_t(const std::string&          name,
00050                const any_regular_t& true_value,
00051                const any_regular_t& false_value,
00052                theme_t              theme,
00053                const std::string&          alt_text);
00054 
00055     void measure(extents_t& result);
00056 
00057     void place(const place_data_t& place_data);
00058 
00059     void enable(bool make_enabled);
00060 
00061     void display(const any_regular_t& value);
00062 
00063     void monitor(const setter_type& proc);
00064 
00065     friend bool operator == (const checkbox_t& x, const checkbox_t& y);
00066 
00067     HWND                 control_m;
00068     theme_t       theme_m;
00069     setter_type          hit_proc_m;
00070     any_regular_t true_value_m;
00071     any_regular_t false_value_m;
00072     any_regular_t current_value_m;
00073     std::string          name_m;
00074     std::string          alt_text_m;
00075 };
00076 
00077 /****************************************************************************************************/
00078 
00079 } // namespace adobe
00080 
00081 /****************************************************************************************************/
00082 
00083 #endif
00084 
00085 /****************************************************************************************************/

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