Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/mac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29764/adobe-source/adobe/test/visual/headers/mac
Modified Files:
ui_core_implementation.hpp
Added Files:
metrics.hpp
Log Message:
Adding error diagnostics to xstr; beginning metrics work on Mac Begin
--- 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>
/****************************************************************************************************/
namespace adobe {
/****************************************************************************************************/
dictionary_t widget_metrics(const dictionary_t& context);
/****************************************************************************************************/
}
/****************************************************************************************************/
#endif
/****************************************************************************************************/
Index: ui_core_implementation.hpp
===================================================================
RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/mac/ui_core_implementation.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ui_core_implementation.hpp 10 Apr 2005 01:24:35 -0000 1.3
--- ui_core_implementation.hpp 12 Apr 2005 17:24:46 -0000 1.4
***************
*** 52,90 ****
/****************************************************************************************************/
! extern const Rect initial_bounds_g;
! extern const CGRect cg_initial_bounds_g;
!
! /****************************************************************************************************/
!
! // REVISIT (fbrereto) : I'd like to be able to set this up 1) so the fudges can be made on a
! // per-OS-version basis, 2) so they can be adjusted without requiring
! // a recompile, and 3) so they are dynamic based on the widget's theme settings.
!
! struct fudge_t : private rectangle_slices_t
{
! struct slice_t
! {
! pair_long_t geometry_m; // affects the position and the length
! };
! boost::array<slice_t, 2> slice_m;
! long baseline_m;
! fudge_t() :
! baseline_m(0)
! { }
! long& top() { return slice_m[vertical].geometry_m.first; }
! const long& top() const { return slice_m[vertical].geometry_m.first; }
! long& left() { return slice_m[horizontal].geometry_m.first; }
! const long& left() const { return slice_m[horizontal].geometry_m.first; }
! long& bottom() { return slice_m[vertical].geometry_m.second; }
! const long& bottom() const { return slice_m[vertical].geometry_m.second; }
! long& right() { return slice_m[horizontal].geometry_m.second; }
! const long& right() const { return slice_m[horizontal].geometry_m.second; }
! };
/****************************************************************************************************/
--- 52,78 ----
/****************************************************************************************************/
! struct metric_extractor_t
{
! explicit metric_extractor_t(const dictionary_t& dictionary) :
! dictionary_m(dictionary)
! { }
! long operator () (const name_t& tag) const
! {
! long result(0);
! dictionary_m.get(tag, result);
! return result;
! }
! private:
! dictionary_t dictionary_m;
! };
! /****************************************************************************************************/
! extern const Rect initial_bounds_g;
! extern const CGRect cg_initial_bounds_g;
/****************************************************************************************************/
***************
*** 160,164 ****
EventHandlerRef focus_callback_ref_m;
rectangle_t geometry_m; // saving set_bounds param for essentials
! fudge_t fudges_m; // added in best_bounds (apply_fudges); subtracted in set_bounds (shed_fudges)
};
--- 148,152 ----
EventHandlerRef focus_callback_ref_m;
rectangle_t geometry_m; // saving set_bounds param for essentials
! metric_extractor_t metrics_m;
};
|