|
From: Foster B. <fos...@us...> - 2005-04-18 21:16:14
|
Update of /cvsroot/adobe-source/sandbox/visual_refactor/adobe/test/visual/headers/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27679/adobe/test/visual/headers/mac Added Files: carbon_safe.hpp metrics.hpp ui_core_implementation.hpp Log Message: SO SORRY for the large qty of emails -- creating a branch for Adobe Begin refactoring. --- NEW FILE: carbon_safe.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_CARBON_SAFE_INCLUDE_HPP #define ADOBE_CARBON_SAFE_INCLUDE_HPP /****************************************************************************************************/ #include <Carbon/Carbon.h> /* REVISIT (sparent) : Apple insists that you include the entire Carbon/Carbon.h framework to use any of Carbon. This header file #defines check which conflicts with boost. The work- around is to undef check here. (In an unbelieveable set of circumstances, I wrote the check macro!) */ #ifdef check #undef check #endif /****************************************************************************************************/ #endif // ADOBE_CARBON_SAFE_INCLUDE_HPP /****************************************************************************************************/ --- NEW FILE: metrics.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_METRICS_MAC_HPP #define ADOBE_METRICS_MAC_HPP /****************************************************************************************************/ #include <adobe/dictionary_fwd.hpp> #include <adobe/name_fwd.hpp> #include <string> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ dictionary_t widget_metrics(const std::string& xstr, const dictionary_t& context); /****************************************************************************************************/ } /****************************************************************************************************/ #endif /****************************************************************************************************/ --- NEW FILE: ui_core_implementation.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_UI_CORE_IMPLEMENTATION_HPP #define ADOBE_UI_CORE_IMPLEMENTATION_HPP /****************************************************************************************************/ #include "ui_core.hpp" #include "carbon_safe.hpp" #include <adobe/future/memory.hpp> #include <adobe/rectangle.hpp> #include <adobe/dictionary.hpp> #include <adobe/array.hpp> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ #define ADOBE_DELETE_PTR_SPECIALIZATION(type, func) \ template <> \ struct adobe::delete_ptr<type> \ { \ void operator()(type x) const \ { if (x) func(x); } \ } /****************************************************************************************************/ ADOBE_DELETE_PTR_SPECIALIZATION(CFStringRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(CFNumberFormatterRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(CFLocaleRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(RgnHandle, ::DisposeRgn); ADOBE_DELETE_PTR_SPECIALIZATION(MouseTrackingRef, ::ReleaseMouseTrackingRegion); ADOBE_DELETE_PTR_SPECIALIZATION(WindowRef, ::ReleaseWindow); ADOBE_DELETE_PTR_SPECIALIZATION(CFBundleRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(CFURLRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(CGDataProviderRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(CGImageRef, ::CFRelease); ADOBE_DELETE_PTR_SPECIALIZATION(ATSUStyle, ::ATSUDisposeStyle); ADOBE_DELETE_PTR_SPECIALIZATION(CGrafPtr, ::DisposePort); ADOBE_DELETE_PTR_SPECIALIZATION(Handle, ::DisposeHandle); ADOBE_DELETE_PTR_SPECIALIZATION(CFMutableDictionaryRef, ::CFRelease); /****************************************************************************************************/ /*! \defgroup widget_metrics_mac Mac Widget Metrics \ingroup widget_lib \section widget_metrics_mac_parameters Parameters The following is a list of metrics one can supply for a widget on the Mac. All values are in unit pixels. All values default to 0. <table width="100%" border="1"> <tr><th width="10%">Name</th><th width="30%">Structure</th><th>Notes</th></tr> <tr> <td><code>size</code></td> <td><code>[ width, height ]</code></td> <td>Base size of the widget</td> </tr> <tr> <td><code>adjust_position</code></td> <td><code>[ left, top ]</code></td> <td>Number of pixels to push the widget. Positive values move the widget away from the origin of the window.</td> </tr> <tr> <td><code>adjust_size</code></td> <td><code>[ width, height ]</code></td> <td>Adjustments made to the base size of the widget. The adjusted size is passed to the OS so the resulting widget is the base size originally intended.</td> </tr> <tr> <td><code>adjust_baseline</code></td> <td><code>value</code></td> <td>Adjustment of the baseline. Positive values move the baseline away from the origin of the window.</td> </tr> <tr> <td><code>outset</code></td> <td><code>[ left, top, right, bottom ]</code></td> <td>Amount of outset for a given edge of the widget. These amounts affect the base size and position of the widget when the bounds of the widget are set. See \ref widget_metrics_mac_pipeline_placement.</td> </tr> <tr> <td><code>frame</code></td> <td><code>[ left, top, right, bottom ]</code></td> <td>Amount of frame for a given edge of the widget.</td> </tr> <tr> <td><code>inset</code></td> <td><code>[ left, top, right, bottom ]</code></td> <td>Amount of inset for a given edge of the widget.</td> </tr> <tr> <td><code>spacing</code></td> <td><code>value</code></td> <td>If there is text in the widget, this is the spacing needed between the widget's visual element and the text for the widget. Example: <code>check_box</code> has a nonzero spacing, but <code>button</code> has a spacing of 0 (because the text overlays the visual element).</td> </tr> </table> \section widget_metrics_mac_pipelines Metrics Pipelines \subsection widget_metrics_mac_pipeline_measurement Measurement Pipeline -# All the possible text strings for the widget are measured. The largest width, height and baseline are preserved on a per-element basis (i.e., it is possible for one piece of text to contribute the max width and another to contribute the max height) -# The base height of the widget is set to <code>size.height - adjust_size.height</code> -# The base width of the widget is set to <code>size.width - adjust_size.width</code> -# If text width is nonzero then <code>text_width + spacing</code> is added to the base width of the widget -# If there is a valid text baseline value the baseline of the result is set to <code>text_baseline + adjust_baseline</code> -# The <code>outset.left</code> is added to the resultant left outset -# The <code>outset.left + outset.right</code> is <i>subtracted</i> from the resultant right outset -# The <code>outset.top</code> is added to the resultant top outset -# The <code>outset.top + outset.bottom</code> is <i>subtracted</i> from the resultant bottom outset -# Resultant frame is set from <code>frame</code> -# Resultant inset is set from <code>inset</code> -# The resultant geometry is returned \subsection widget_metrics_mac_pipeline_placement Placement Pipeline -# <code>adjust_position.left - geometry.outset.left</code> is added to the left position of the widget -# <code>adjust_position.top - geometry.outset.top</code> is added to the top position of the widget -# The height of the widget is increased by <code>adjust_size.height + geometry.outset.top + geometry.outset.bottom</code> -# The width of the widget is increased by <code>adjust_size.width + geometry.outset.left + geometry.outset.right</code> -# The bounds of the widget are set */ /*! \ingroup widget_lib \brief Utility class to access widget metrics for the Macintosh. metric_extractor_t is a struct that allows for easy access to the metrics found in a parsed and evaluated xstr definition from the mac metrics library. See \ref widget_metrics_mac for more information on the dictionary format describing the metrics for a given widget. */ struct metric_extractor_t { /// indices used to access elements for a compound (array-based) metric enum array_index_t { /// first element index_left = 0, /// second element index_top = 1, /// third element index_right = 2, /// fourth element index_bottom = 3, /// same as index_left index_width = index_left, /// same as index_top index_height = index_top }; /// \param dictionary the dictionary containing the widget metrics. /// Internally the dictionary is stored by value. explicit metric_extractor_t(const dictionary_t& dictionary) : dictionary_m(dictionary) { } /// Obtains a singleton metric /// \param tag the name of the metric we are interested in getting /// \return the value of the metric; 0 if the metric does not exist long operator () (const name_t& tag) const { long result(0); dictionary_m.get(tag, result); return result; } /// Obtains a singleton metric from a compound (array-based) metric /// \param tag the name of the metric we are interested in getting /// \param index the index inside the compound metric to fetch /// \return the value of the metric; 0 if the metric does not exist long operator () (const name_t& tag, array_index_t index) const { adobe::array_t array_result; long result(0); dictionary_m.get(tag, array_result); array_result.get(std::size_t(index), result); return result; } #if !defined(ADOBE_NO_DOCUMENTATION) private: dictionary_t dictionary_m; #endif }; /****************************************************************************************************/ extern const Rect initial_bounds_g; extern const CGRect cg_initial_bounds_g; /****************************************************************************************************/ #ifndef NDEBUG struct hitless_t : boost::totally_ordered<hitless_t> { struct implementation_t; hitless_t(); hitless_t(const hitless_t& rhs); ~hitless_t(); void initialize(window_t& window); void set_bounds(const point_t& position, const rectangle_t& geometry); private: ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::hitless_t); friend void frame_geometry(window_t& window, const point_t& position, const rectangle_t& geometry); friend bool clear_geometry_frames(window_t& window); implementation_t* object_m; public: implementation_t& implementation(); const implementation_t& implementation() const; }; #endif // NDEBUG /****************************************************************************************************/ struct control_t : boost::totally_ordered<control_t> { control_t(); control_t(const control_t& rhs); virtual ~control_t(); virtual rectangle_t best_bounds(); void set_bounds(const point_t& position, const rectangle_t& geometry); void set_name(const std::string& name); virtual void set_theme(theme_t theme); void adorn_theme(theme_t theme); void unadorn_theme(theme_t theme); void set_active(bool make_active); void set_visible(bool make_visible); void set_focused(bool make_focused); bool is_focused(); void signal_focus(const implementation::control_focus_proc_t& proc); void set_min_value(long value); void set_max_value(long value); void set_value(long value); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::control_t); virtual dictionary_t essentials() const; // REVISIT (fbrereto) : We need to have EventHandlerRefs for every callback in every // control. Each ref must disconnect the handler before the object // is destroyed to prevent callbacks to nonexistent objects. There // should be a wrapper struct to handle the relationship between // any implementation::*_proc_t and its corresponding EventHandlerRef. // Through the same mechanism we should permit the client to reset // a signal handler at any time (currently they can only set it once.) ControlRef control_m; theme_t theme_m; implementation::control_focus_proc_t focus_proc_m; EventHandlerRef focus_callback_ref_m; rectangle_t geometry_m; // saving set_bounds param for essentials metric_extractor_t metrics_m; }; /****************************************************************************************************/ struct window_t::implementation_t : boost::totally_ordered<window_t::implementation_t> { implementation_t(); implementation_t(const implementation_t& rhs); virtual ~implementation_t(); void initialize( const std::string& name, const Rect& bounds, window_style_t style, window_attributes_t attributes, window_modality_t modality); void initialize( const std::string& name, const Rect& bounds, WindowClass style, WindowAttributes attributes, WindowModality modality); void set_bounds(const point_t& position, const rectangle_t& geometry); void reposition(window_reposition_t position); void set_visible(bool make_visible); void draw_controls(); void signal_resize_complete(const implementation::window_resize_complete_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::window_t::implementation_t); dictionary_t essentials() const; WindowRef window_m; control_t root_control_m; rectangle_t geometry_m; // saving set_bounds param for essentials implementation::window_resize_complete_proc_t resize_complete_proc_m; #ifndef NDEBUG hitless_t framing_control_m; #endif }; /****************************************************************************************************/ struct number_formatter_t::implementation_t { implementation_t(); implementation_t(const implementation_t& rhs); void initialize(); void set_format(const std::string& format); std::string get_format() const; std::string format(const value_t& x); value_t parse(const std::string& str, value_t the_type); auto_resource<CFNumberFormatterRef> formatter_m; }; /****************************************************************************************************/ struct group_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize( const Rect& bounds, const std::string& name); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::group_t::implementation_t); virtual dictionary_t essentials() const; virtual rectangle_t best_bounds(); }; /****************************************************************************************************/ struct tab_group_t::implementation_t : control_t { typedef control_t _super; typedef std::vector<tab_group_t::tab_t> tab_set_t; implementation_t(); implementation_t(const implementation_t& rhs); void initialize( const Rect& bounds, const tab_group_t::tab_t* first, const tab_group_t::tab_t* last); virtual void set_theme(theme_t theme); virtual rectangle_t best_bounds(); void set_value(const value_t& new_value); void signal_value_change(const implementation::tab_group_value_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::tab_group_t::implementation_t); virtual dictionary_t essentials() const; implementation::tab_group_value_proc_t value_proc_m; tab_set_t items_m; }; /****************************************************************************************************/ struct panel_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::panel_t::implementation_t); virtual dictionary_t essentials() const; void initialize(const Rect& bounds); }; /****************************************************************************************************/ struct button_t::implementation_t : control_t { typedef control_t _super; typedef std::vector<state_descriptor_t> state_set_t; implementation_t(); implementation_t(const implementation_t& rhs); ~implementation_t(); void initialize( const Rect& bounds, const button_t::state_descriptor_t* first, const button_t::state_descriptor_t* last); virtual rectangle_t best_bounds(); void set_default(bool is_default); void set_cancel(bool is_cancel); void set_value(modifiers_t modifiers, const value_t& value); void set_contributing(modifiers_t modifiers, const dictionary_t& value); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::button_t::implementation_t); virtual dictionary_t essentials() const; state_set_t state_set_m; EventHandlerRef handler_ref_m; }; /****************************************************************************************************/ struct radio_button_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize(const Rect& bounds, const std::string& name); virtual rectangle_t best_bounds(); void signal_hit(const implementation::radio_button_hit_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::radio_button_t::implementation_t); virtual dictionary_t essentials() const; implementation::radio_button_hit_proc_t hit_proc_m; }; /****************************************************************************************************/ struct checkbox_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize(const Rect& bounds, const std::string& name); virtual rectangle_t best_bounds(); void signal_hit(const implementation::radio_button_hit_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::checkbox_t::implementation_t); virtual dictionary_t essentials() const; implementation::checkbox_hit_proc_t hit_proc_m; }; /****************************************************************************************************/ struct link_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize(const Rect& bounds); void set_bounds(const point_t& position, const rectangle_t& geometry); void set_value(bool value); void set_visible(bool make_visible); void set_active(bool make_active); void signal_hit(const implementation::link_hit_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::link_t::implementation_t); virtual dictionary_t essentials() const; implementation::link_hit_proc_t hit_proc_m; points_of_interest_t prongs_m; bool value_m; bool visible_m; bool active_m; }; /****************************************************************************************************/ struct progress_bar_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize( const Rect& bounds, pb_style_t bar_style, bool is_vertical); virtual rectangle_t best_bounds(); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::progress_bar_t::implementation_t); virtual dictionary_t essentials() const; bool is_vertical_m; pb_style_t bar_style_m; }; /****************************************************************************************************/ struct separator_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::separator_t::implementation_t); virtual dictionary_t essentials() const; void initialize(const Rect& bounds); }; /****************************************************************************************************/ struct static_text_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize(const Rect& bounds, const std::string& name); virtual rectangle_t best_bounds(); long best_height_given_width(long width); void set_name(const std::string& name); void signal_hit(const implementation::static_text_hit_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::static_text_t::implementation_t); virtual dictionary_t essentials() const; implementation::static_text_hit_proc_t hit_proc_m; }; /****************************************************************************************************/ struct edit_text_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); virtual ~implementation_t(); void initialize( const Rect& bounds, const std::string& name, bool scrollable, long cols, long rows); static_text_t& get_label(); virtual rectangle_t best_bounds(); void set_bounds(const point_t& position, const rectangle_t& geometry); void set_active(bool active); virtual void set_theme(theme_t theme); void set_name(const std::string& name); void set_field_text(const std::string& text); void set_static_disabled(bool is_static_disabled); void set_selection(long start_char, long end_char); void signal_pre_edit(const implementation::edit_text_pre_edit_proc_t& proc); void signal_post_edit(const implementation::edit_text_post_edit_proc_t& proc); void signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t); virtual dictionary_t essentials() const; static_text_t name_m; std::string field_text_m; static_text_t static_disabled_text_m; HIViewRef scroll_control_m; bool static_disabled_m; bool using_label_m; bool scrollable_m; long rows_m; long cols_m; long static_width_m; long static_height_m; long static_baseline_m; long edit_height_m; long edit_baseline_m; implementation::edit_text_pre_edit_proc_t pre_edit_proc_m; implementation::edit_text_post_edit_proc_t post_edit_proc_m; implementation::edit_text_label_hit_proc_t label_hit_proc_m; }; /****************************************************************************************************/ struct popup_t::implementation_t : control_t { typedef control_t _super; typedef std::pair<std::string, value_t> menu_item_t; typedef std::vector<menu_item_t> menu_items_t; implementation_t(); implementation_t(const implementation_t& rhs); void initialize(const Rect& bounds, const std::string& name); virtual rectangle_t best_bounds(); void set_active(bool active); virtual void set_theme(theme_t theme); void set_name(const std::string& name); void set_static_disabled(bool is_static_disabled); void add_menu_item(const std::string& name, const value_t& value); void clear_menu_items(); void set_current_menu_item(const value_t& item); void select_with_text(const std::string& text); void signal_value_change(const implementation::popup_value_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t); virtual dictionary_t essentials() const; std::string name_m; static_text_t static_disabled_text_m; bool static_disabled_m; bool using_label_m; implementation::popup_value_proc_t value_proc_m; menu_items_t menu_items_m; }; /****************************************************************************************************/ struct unit_edit_text_t::implementation_t { implementation_t(); implementation_t(const implementation_t& rhs); void initialize( const Rect& bounds, const std::string& name, bool using_popup, long cols, long rows); popup_t& get_popup(); edit_text_t& get_edit_text(); virtual rectangle_t best_bounds(); void set_bounds(const point_t& position, const rectangle_t& geometry); void set_active(bool active); virtual void set_theme(theme_t theme); void adorn_theme(theme_t theme); void unadorn_theme(theme_t theme); void set_visible(bool make_visible); void set_focused(bool make_focused); void set_static_disabled(bool is_static_disabled); void set_name(const std::string& name) { get_edit_text().set_name(name); } void set_field_text(const std::string& text) { get_edit_text().set_field_text(text); } void set_selection(long start_char, long end_char) { get_edit_text().set_selection(start_char, end_char); } void signal_pre_edit(const implementation::edit_text_pre_edit_proc_t& proc) { get_edit_text().signal_pre_edit(proc); } void signal_post_edit(const implementation::edit_text_post_edit_proc_t& proc) { get_edit_text().signal_post_edit(proc); } void signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc) { get_edit_text().signal_label_hit(proc); } void add_popup_menu_item(const std::string& name, const adobe::value_t& value) { get_popup().add_menu_item(name, value); } void select_popup_with_text(const std::string& text) { get_popup().select_with_text(text); } void signal_popup_value_change(implementation::popup_value_proc_t proc) { get_popup().signal_value_change(proc); } void signal_focus(const implementation::control_focus_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::unit_edit_text_t::implementation_t); virtual dictionary_t essentials() const; edit_text_t edit_text_m; popup_t popup_m; bool using_popup_m; long popup_width_m; long popup_height_m; long popup_baseline_m; long edit_height_m; long edit_width_m; long edit_baseline_m; }; /****************************************************************************************************/ struct slider_t::implementation_t : control_t { typedef control_t _super; implementation_t(); implementation_t(const implementation_t& rhs); void initialize( const Rect* bounds, bool is_vertical, slider_style_t style, long num_tick_marks); void signal_value_change(const implementation::slider_value_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::slider_t::implementation_t); virtual dictionary_t essentials() const; implementation::slider_value_proc_t value_proc_m; bool is_vertical_m; slider_style_t style_m; long num_tick_marks_m; }; /****************************************************************************************************/ struct bevel_button_t::implementation_t : control_t { typedef control_t _super; typedef std::pair<std::string, value_t> menu_item_t; typedef std::vector<menu_item_t> menu_items_t; implementation_t(); implementation_t(const implementation_t& rhs); void initialize( const Rect& bounds, const std::string& name, bool offset_contents, bool menu_points_right); void add_menu_item(const std::string& name, const value_t& value); void clear_menu_items(); void set_bevel_amount(bevel_button_bevel_amount_t amount); void set_current_menu_item(const value_t& item); void signal_hit(const implementation::bevel_button_hit_proc_t& proc); void signal_value_change(const implementation::bevel_button_popup_value_proc_t& proc); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::bevel_button_t::implementation_t); virtual dictionary_t essentials() const; implementation::bevel_button_hit_proc_t hit_proc_m; implementation::bevel_button_popup_value_proc_t value_proc_m; menu_items_t menu_items_m; bool offset_contents_m; bool menu_points_right_m; }; /****************************************************************************************************/ #ifndef NDEBUG struct hitless_t::implementation_t : control_t { typedef control_t _super; struct draw_element_t { enum element_type { element_type_top_left, element_type_top_right, element_type_bottom_left, element_type_bottom_right, element_type_horizontal_poi, element_type_vertical_poi, element_type_count // always be last }; draw_element_t(element_type type, const CGRect& rect, const RGBColor& color) : type_m(type), rect_m(rect), color_m(color) { } draw_element_t(const draw_element_t& rhs) : type_m(rhs.type_m), rect_m(rhs.rect_m), color_m(rhs.color_m) { } element_type type_m; CGRect rect_m; RGBColor color_m; }; typedef std::vector<draw_element_t> draw_element_set_t; implementation_t(); implementation_t(const implementation_t& rhs); ~implementation_t(); void initialize(const Rect& bounds, WindowRef window); void overlay_bounds_update(); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::hitless_t::implementation_t); virtual dictionary_t essentials() const; draw_element_set_t draw_elements_m; WindowRef overlay_window_m; // The window we're actually in WindowRef host_window_m; // The window we're hovering over }; #endif // NDEBUG /****************************************************************************************************/ ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::window_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::control_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::group_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::tab_group_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::button_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::panel_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::radio_button_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::checkbox_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::link_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::progress_bar_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::separator_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::static_text_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::edit_text_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::popup_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::unit_edit_text_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::slider_t::implementation_t); ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::bevel_button_t::implementation_t); #ifndef NDEBUG ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_DECLARATION(adobe::hitless_t::implementation_t); #endif // NDEBUG /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif // ADOBE_UI_CORE_IMPLEMENTATION_HPP /****************************************************************************************************/ |