stlab.adobe.com Adobe Systems Incorporated

platform_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_UI_CORE_BUTTON_HPP
00010 #define ADOBE_UI_CORE_BUTTON_HPP
00011 
00012 /****************************************************************************************************/
00013 
00014 #include <windows.h>
00015 
00016 #include <adobe/config.hpp>
00017 
00018 #include <adobe/future/widgets/headers/button_helper.hpp>
00019 #include <adobe/future/widgets/headers/widget_utils.hpp>
00020 
00021 #include <boost/noncopyable.hpp>
00022 
00023 /****************************************************************************************************/
00024 
00025 namespace adobe {
00026 
00027 /****************************************************************************************************/
00028 
00029 struct button_t : boost::noncopyable
00030 {
00031     typedef any_regular_t model_type;
00032 
00033     button_t(bool                             is_default,
00034              bool                             is_cancel,
00035              modifiers_t               modifier_mask,
00036              const button_state_descriptor_t* first,
00037              const button_state_descriptor_t* last,
00038              theme_t                          theme);
00039 
00040     void measure(extents_t& result);
00041 
00042     void place(const place_data_t& place_data);
00043 
00044     void enable(bool make_enabled);
00045 
00046     void display(const any_regular_t& item);
00047 
00048     void set(modifiers_t modifiers, const model_type& value);
00049 
00050     void set_contributing(modifiers_t modifiers, const dictionary_t& value);
00051 
00052     any_regular_t underlying_handler() { return any_regular_t(control_m); }
00053 
00054     bool handle_key(key_type key, bool pressed, modifiers_t modifiers);
00055 
00056     HWND               control_m;
00057     theme_t            theme_m;
00058     button_state_set_t state_set_m;
00059     modifiers_t        modifier_mask_m;
00060     modifiers_t        modifiers_m;
00061     bool               is_default_m;
00062     bool               is_cancel_m;
00063     bool               enabled_m;
00064 };
00065 
00066 /****************************************************************************************************/
00067 
00068 } // namespace adobe
00069 
00070 /****************************************************************************************************/
00071 
00072 #endif
00073 
00074 /****************************************************************************************************/

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