stlab.adobe.com Adobe Systems Incorporated

platform_label.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 #ifndef ADOBE_LABEL_T_HPP
00009 #define ADOBE_LABEL_T_HPP
00010 
00011 
00012 #include <windows.h>
00013 
00014 #include <string>
00015 
00016 #include <boost/noncopyable.hpp>
00017 
00018 #include <adobe/memory.hpp>
00019 #include <adobe/layout_attributes.hpp>
00020 #include <adobe/widget_attributes.hpp>
00021 #include <boost/noncopyable.hpp>
00022 
00023 
00024 
00025 
00026 
00027 namespace adobe {
00028     struct label_t  : boost::noncopyable {
00029 
00030         label_t(const std::string& name, 
00031                 const std::string& alt_text, 
00032                 std::size_t        characters,
00033                 theme_t            theme
00034                 );
00035 
00036         ~label_t();
00037 
00038         HWND        window_m;
00039         theme_t     theme_m;
00040         WNDPROC     default_window_proc_m;
00041         std::string name_m;
00042         std::string alt_text_m;
00043         std::size_t characters_m;
00044     };
00045 
00046     void               initialize(label_t& value, HWND parent);
00047 
00048 
00049     void measure(label_t& value, extents_t& result);
00050     
00051     void measure_vertical(label_t& value, extents_t& calculated_horizontal, 
00052         const place_data_t& placed_horizontal);       
00053 
00054     void place(label_t& value, const place_data_t& place_data);
00055     
00056 
00057     void enable(label_t& value, bool make_enabled);
00058 
00059     void measure_label_text(const label_t& label, extents_t& result, HWND temp_parent);
00060 
00061     extents_t measure_text(const std::string& text, theme_t theme, HWND temp_parent);
00062 
00063     std::string get_control_string(const label_t& widget);
00064 
00065     inline HWND get_display(const label_t& widget)
00066         { return widget.window_m; }
00067 
00068 } // namespace adobe
00069 
00070 
00071 #endif
00072 
00073 /****************************************************************************************************/

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