stlab.adobe.com Adobe Systems Incorporated

platform_slider.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_SLIDER_HPP
00010 #define ADOBE_SLIDER_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/extents.hpp>
00020 #include <adobe/future/widgets/headers/slider_helper.hpp>
00021 #include <adobe/layout_attributes.hpp>
00022 #include <adobe/widget_attributes.hpp>
00023 
00024 #include <boost/function.hpp>
00025 #include <boost/noncopyable.hpp>
00026 
00027 #include <string>
00028 
00029 /****************************************************************************************************/
00030 
00031 namespace adobe {
00032 
00033 /****************************************************************************************************/
00034 
00035 struct slider_t : boost::noncopyable
00036 {
00037     typedef double                                    model_type;
00038     typedef boost::function<void (const model_type&)> setter_type;
00039 
00040     slider_t(const std::string&          alt_text,
00041              bool                        is_vertical,
00042              slider_style_t              style,
00043              std::size_t                 num_ticks,
00044              const value_range_format_t& format,
00045              theme_t                     theme);
00046 
00047     void measure(extents_t& result);
00048 
00049     void place(const place_data_t& place_data);
00050 
00051     void display(const model_type& item);
00052 
00053     void enable(bool make_enabled);
00054 
00055     void monitor(const setter_type& proc)
00056         { value_proc_m = proc; }
00057 
00058     HWND                 control_m;
00059     std::string          alt_text_m;
00060     bool                 is_vertical_m;
00061     slider_style_t       style_m;
00062     std::size_t          num_ticks_m;
00063     value_range_format_t format_m;
00064     theme_t       theme_m;
00065     setter_type          value_proc_m;
00066     long                 last_m; // Used to debounce
00067     model_type           value_m;
00068 };
00069 
00070 /****************************************************************************************************/
00071 
00072 } // namespace adobe
00073 
00074 /****************************************************************************************************/
00075 
00076 #endif
00077 
00078 /****************************************************************************************************/

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