You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(67) |
Apr
(455) |
May
(202) |
Jun
(136) |
Jul
(203) |
Aug
(60) |
Sep
(88) |
Oct
(64) |
Nov
(56) |
Dec
(78) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(271) |
Feb
(207) |
Mar
|
Apr
|
May
(167) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Foster B. <fos...@us...> - 2005-04-02 05:38:33
|
Update of /cvsroot/adobe-source/adobe-source/adobe/test/eve_smoke/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12305/bin Log Message: Directory /cvsroot/adobe-source/adobe-source/adobe/test/eve_smoke/bin added to the repository |
From: Ralph T. <ra...@us...> - 2005-04-02 01:04:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27491/adobe-source/adobe/test/visual/sources/win Modified Files: metrics.cpp Log Message: Basic set of default values for Windows systems with visual styles disabled, or without UxTheme.dll. Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win/metrics.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** metrics.cpp 2 Apr 2005 00:45:22 -0000 1.2 --- metrics.cpp 2 Apr 2005 01:04:03 -0000 1.3 *************** *** 125,128 **** --- 125,133 ---- bool get_integer(int widget_type, int measurement, int& out_val) const { + if ((widget_type == CP_DROPDOWNBUTTON) && (measurement == TMT_BORDERSIZE) && (class_name_m == L"ComboBox")) + { + out_val = 1; + return true; + } out_val = 0; return false; *************** *** 130,133 **** --- 135,157 ---- bool get_size(int widget_type, THEMESIZE measurement, SIZE& out_size) const { + if (class_name_m == L"Button") + { + if ((widget_type == BP_CHECKBOX) || (widget_type == BP_RADIOBUTTON)) + { + // + // Strictly the width of the checkbox widget is 13 pixels. + // This adds some padding so that letters don't get clipped. + // + out_size.cx = 23; out_size.cy = 13; + return true; + } + if (widget_type == BP_GROUPBOX) + { + out_size.cx = 8; out_size.cy = 8; + return true; + } + out_size.cx = 0; out_size.cy = 0; + return true; + } out_size.cx = 0; out_size.cy = 0; return false; *************** *** 135,140 **** bool get_margins(int widget_type, MARGINS& out_margins) const { ! out_margins.cxLeftWidth = 0; out_margins.cxRightWidth = 0; ! out_margins.cyTopHeight = 0; out_margins.cyBottomHeight = 0; return false; } --- 159,168 ---- bool get_margins(int widget_type, MARGINS& out_margins) const { ! if ((class_name_m == L"Button") && (widget_type == BP_PUSHBUTTON)) ! { ! out_margins.cxLeftWidth = 3; out_margins.cxRightWidth = 3; ! out_margins.cyTopHeight = 3; out_margins.cyBottomHeight = 3; ! return true; ! } return false; } |
From: Ralph T. <ra...@us...> - 2005-04-02 00:45:47
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18001/adobe-source/adobe/test/visual/headers/win Modified Files: metrics.hpp Log Message: metrics_t now has a default windows implementation (which currently only supports fonts). It also dynamically loads UxTheme.dll, so that everything runs fine on old windows. Index: metrics.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/win/metrics.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** metrics.hpp 1 Apr 2005 19:11:49 -0000 1.1 --- metrics.hpp 2 Apr 2005 00:45:21 -0000 1.2 *************** *** 47,58 **** // class metrics_t { - struct implementation_t; - implementation_t* object_m; - // - /// All constructors are private to enforce singleton nature - /// of metrics_t. - // - metrics_t(); - ~metrics_t(); public: // --- 47,50 ---- *************** *** 72,76 **** /// the font could not be returned. // ! bool get_font(int widget_type, LOGFONTW& out_font); // /// Get the metrics for the font which should be used in the given widget. --- 64,68 ---- /// the font could not be returned. // ! virtual bool get_font(int widget_type, LOGFONTW& out_font) const = 0; // /// Get the metrics for the font which should be used in the given widget. *************** *** 82,86 **** /// if the metrics could not be returned. // ! bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics); // /// Get the extents for the given text string, to be contained in the --- 74,78 ---- /// if the metrics could not be returned. // ! virtual bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) const = 0; // /// Get the extents for the given text string, to be contained in the *************** *** 94,98 **** /// if the metrics could not be returned. // ! bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents); // /// Get the specified measurement for the given widget when in the --- 86,90 ---- /// if the metrics could not be returned. // ! virtual bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents) const = 0; // /// Get the specified measurement for the given widget when in the *************** *** 106,110 **** /// if the value could not be found. // ! bool get_integer(int widget_type, int measurement, int& out_val); // /// Get the size of the specified widget. --- 98,102 ---- /// if the value could not be found. // ! virtual bool get_integer(int widget_type, int measurement, int& out_val) const = 0; // /// Get the size of the specified widget. *************** *** 117,121 **** /// if the rectangle could not be found. // ! bool get_size(int widget_type, THEMESIZE measurement, SIZE& out_size); // /// Get the margins for the specified widget. Typically the margins --- 109,113 ---- /// if the rectangle could not be found. // ! virtual bool get_size(int widget_type, THEMESIZE measurement, SIZE& out_size) const = 0; // /// Get the margins for the specified widget. Typically the margins *************** *** 129,133 **** /// if the margins could not be found. // ! bool get_margins(int widget_type, MARGINS& out_margins); // /// Before any of the other functions can be called, the theme data must be --- 121,125 ---- /// if the margins could not be found. // ! virtual bool get_margins(int widget_type, MARGINS& out_margins) const = 0; // /// Before any of the other functions can be called, the theme data must be *************** *** 142,146 **** /// theme could not be obtained from the window. // ! bool set_window(HWND window); }; --- 134,138 ---- /// theme could not be obtained from the window. // ! virtual bool set_window(HWND window) = 0; }; |
From: Ralph T. <ra...@us...> - 2005-04-02 00:45:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18001/adobe-source/adobe/test/visual/sources/win Modified Files: metrics.cpp Log Message: metrics_t now has a default windows implementation (which currently only supports fonts). It also dynamically loads UxTheme.dll, so that everything runs fine on old windows. Index: metrics.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win/metrics.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** metrics.cpp 1 Apr 2005 19:11:50 -0000 1.1 --- metrics.cpp 2 Apr 2005 00:45:22 -0000 1.2 *************** *** 8,14 **** // // This is the implementation of the class which looks up widget metrics on ! // Windows systems. Currently it only works on Windows XP, but will be fixed ! // up to work on all Windows once a little program which can generate the ! // header containing default values. // /****************************************************************************************************/ --- 8,14 ---- // // This is the implementation of the class which looks up widget metrics on ! // Windows systems. It has two implementations, one uses UxTheme to look up ! // widget metrics, and the other uses constant values (and is used on systems ! // where UxTheme is unavailable or Visual Styles are disabled). // /****************************************************************************************************/ *************** *** 21,261 **** { /****************************************************************************************************/ - - // - // Technically all of these calls are supposed to use a state parameter. We are - // only obtaining metrics, rather than drawing, so we don't actually need to - // specify any particular state (as metrics should be invariant over all states). // ! // According to the tmschema.h (in the Platform SDK) a state of 1 should always ! // work. // ! const int kState = 1; ! ! /****************************************************************************************************/ ! ! struct metrics_t::implementation_t { ! implementation_t() : theme(0) { } ! ~implementation_t() { ! if(theme) CloseThemeData(theme); } - HTHEME theme; - std::wstring window_class; }; /****************************************************************************************************/ ! ! metrics_t::metrics_t() : object_m(new implementation_t) ! { ! } ! ! /****************************************************************************************************/ ! ! metrics_t::~metrics_t() ! { ! delete object_m; ! } ! ! /****************************************************************************************************/ ! ! metrics_t& metrics_t::get_instance() ! { ! static metrics_t instance; ! return instance; ! } ! ! /****************************************************************************************************/ ! ! bool metrics_t::get_font(int widget_type, LOGFONTW& out_font) { // ! // We need ensure that we have a handle to the theme before ! // continuing. ! // ! if(!object_m->theme) return false; ! if (widget_type != -1) ! { ! HRESULT hr = GetThemeFont(object_m->theme, 0, widget_type, kState, TMT_FONT, (LOGFONT*)&out_font); ! if (hr == S_OK) return true; ! } ! // ! // REVISIT (ralpht): The header file says that this function ! // takes a LOGFONT pointer -- this is a lie! It actually ! // requires a LOGFONTW pointer. The stack gets trashed ! // if you pass a LOGFONT pointer. // ! if (S_OK == GetThemeSysFont(object_m->theme, TMT_MSGBOXFONT, (LOGFONT*)&out_font)) ! return true; ! return false; ! } ! ! /****************************************************************************************************/ ! ! bool metrics_t::get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) ! { // ! // Try to use GetThemeTextMetrics if we can. // ! if ((widget_type != -1) && object_m->theme) ! { ! HRESULT hr = GetThemeTextMetrics(object_m->theme, 0, widget_type, kState, &out_metrics); ! if (hr == S_OK) return true; ! } // ! // REVISIT (ralpht): Oddly enough GetThemeTextMetrics does work, ! // but because we always want the metrics of whatever get_font ! // returned we must create the font and use the Win32 text ! // metrics call. // // ! LOGFONTW font_desc; ! HFONT the_font = 0; ! if (get_font(widget_type, font_desc)) the_font = CreateFontIndirectW(&font_desc); ! if (!the_font) the_font = reinterpret_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)); ! if (!the_font) return false; // ! // Select the font into a temporary device context. // ! HDC tmpDC = GetDC(0); ! HGDIOBJ original_font = SelectObject(tmpDC, the_font); ! bool r = GetTextMetrics(tmpDC, &out_metrics); // ! // Delete the font which we selected into the DC. // ! DeleteObject(SelectObject(tmpDC, original_font)); ! ReleaseDC(0, tmpDC); ! return r; ! } ! ! /****************************************************************************************************/ ! ! bool metrics_t::get_text_extents(int widget_type, std::wstring text, RECT& out_extents) ! { // ! // Ensure that we have a handle to the theme. // ! HDC tmpDC = GetDC(0); // ! // If we can, then we should try to use GetThemeTextExtent. // ! if((widget_type != -1) && object_m->theme) { ! HRESULT hr = GetThemeTextExtent(object_m->theme, tmpDC, widget_type, kState, text.c_str(), text.size(), 0, 0, &out_extents); ! if (hr == S_OK) { ! // ! // Alright! We got the extents from the Theme API. ! // ! ReleaseDC(0, tmpDC); return true; } } ! // ! // Try to obtain the font to get the metrics for. If we can't ! // get a LOGFONTW then just use DEFAULT_GUI_FONT. ! // ! LOGFONTW font_desc; ! HFONT the_font = 0; ! if (get_font(widget_type, font_desc)) the_font = CreateFontIndirectW(&font_desc); ! if (!the_font) the_font = reinterpret_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)); ! if (!the_font) return false; ! // ! // Now create the font and select it into a temporary device ! // context. ! // ! HGDIOBJ original_font = SelectObject(tmpDC, the_font); ! SIZE out_size = {0, 0}; ! bool r = GetTextExtentPoint32W(tmpDC, text.c_str(), text.size(), &out_size); ! // ! // The original GetThemeTextExtent used a RECT -- the plan is to ! // eventually use GetThemeTextExtent again, so we leave the type ! // of out_extents as a RECT. ! // ! out_extents.left = 0; out_extents.top = 0; ! out_extents.right = out_size.cx; out_extents.bottom = out_size.cy; ! // ! // Release the font and our temporary DC. ! // ! DeleteObject(SelectObject(tmpDC, original_font)); ! ReleaseDC(0, tmpDC); ! return r; ! } ! ! /****************************************************************************************************/ ! ! bool metrics_t::get_integer(int widget_type, int measurement, int& out_val) ! { ! // ! // Ensure that we have a handle to the theme. ! // ! if(!object_m->theme || widget_type == -1) return false; ! // ! // Use the GetThemeInt call to return the metric. ! // ! if(S_OK == GetThemeInt(object_m->theme, widget_type, kState, measurement, &out_val)) ! return true; ! return false; ! } ! ! /****************************************************************************************************/ ! ! bool metrics_t::get_size(int widget_type, THEMESIZE measurement, SIZE& out_size) ! { ! // ! // Ensure that we have a handle to the theme. ! // ! if(!object_m->theme || widget_type == -1) return false; ! HDC optionalDC = GetDC(0); ! // ! // GetTHemePartSize gives the size of the part (if it has one). ! // ! HRESULT hr = GetThemePartSize(object_m->theme, optionalDC, widget_type, kState, 0, measurement, &out_size); ! ReleaseDC(0, optionalDC); ! ! return (hr == S_OK); ! } ! ! /****************************************************************************************************/ ! ! bool metrics_t::get_margins(int widget_type, MARGINS& out_margins) ! { ! // ! // Ensure that we have a handle to the theme. ! // ! if(!object_m->theme || widget_type == -1) return false; ! // ! // Use the GetThemeMargins call to get the margins for this ! // widget. ! // ! HRESULT hr = GetThemeMargins(object_m->theme, 0, widget_type, kState, TMT_CONTENTMARGINS, 0, &out_margins); ! return (hr == S_OK); ! } ! /****************************************************************************************************/ ! bool metrics_t::set_window(HWND window) { ! // ! // Release any allocated theme before trying to get a new ! // one. ! // ! if(object_m->theme) CloseThemeData(object_m->theme); ! // ! // For whatever reason, UxTheme gives it's data based on ! // the class name it's given here (rather than any of ! // the widget_type values we give it). So we need to ! // obtain the class name of the window. ! // ! WCHAR class_name_buf[50]; ! if (!GetClassNameW(window, class_name_buf, 50)) return false; ! object_m->window_class = std::wstring(class_name_buf); ! // ! // Load the theme data for this window class. ! // ! object_m->theme = OpenThemeData(window, object_m->window_class.c_str()); ! return (object_m->theme != 0); } --- 21,353 ---- { /****************************************************************************************************/ // ! /// This implementation of metrics_t uses the Win32 library to lookup font attributes. ! /// It returns constant values for other metrics. // ! class metrics_win32_t : public metrics_t { ! // ! /// Store the class name of the window which we're currently examining. ! // ! std::wstring class_name_m; ! protected: ! // ! /// Return the window class which we are currently returing metrics for. ! /// ! /// \return the current window class. ! // ! std::wstring get_window_class() const { ! return class_name_m; ! } ! public: ! // ! // from metrics_t ! // ! bool set_window(HWND window) { + WCHAR class_name_buf[50]; + if (!GetClassNameW(window, class_name_buf, 50)) return false; + class_name_m = class_name_buf; + return true; } ! bool get_font(int widget_type, LOGFONTW& out_font) const { ! // ! // On plain windows everything uses DEFAULT_GUI_FONT. ! // ! HGDIOBJ font = GetStockObject(DEFAULT_GUI_FONT); ! if (!font) return false; ! // ! // Extract a LOGFONTW from the HFONT. ! // ! int rv = GetObject(font, sizeof(out_font), reinterpret_cast<LPVOID>(&out_font)); ! DeleteObject(font); ! return (rv != 0); ! } ! bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) const ! { ! // ! // Try to use the font from get_font before we fall back to DEFAULT_GUI_FONT. ! // ! LOGFONTW logical_font = { 0 }; ! HGDIOBJ font = 0; ! HDC tmp_dc = GetDC(0); ! if (get_font(widget_type, logical_font)) ! { ! font = (HGDIOBJ)CreateFontIndirectW(&logical_font); ! } ! if (!font) font = GetStockObject(DEFAULT_GUI_FONT); ! // ! // Get the metrics. ! // ! HGDIOBJ oldFont = SelectObject(tmp_dc, font); ! BOOL have_metrics = GetTextMetrics(tmp_dc, &out_metrics); ! // ! // Clean up. ! // ! DeleteObject(SelectObject(tmp_dc, oldFont)); ! ReleaseDC(0, tmp_dc); ! return have_metrics; ! } ! bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents) const ! { ! // ! // Create the font and select it into a temporary device context. ! // ! HDC tmp_dc = GetDC(0); ! LOGFONTW logical_font = {0}; ! HGDIOBJ font = 0; ! // ! // Try to use get_font, in case there is another font we're meant ! // to use. Then fallback on DEFAULT_GUI_FONT. ! // ! if (get_font(widget_type, logical_font)) ! { ! font = (HGDIOBJ)CreateFontIndirectW(&logical_font); ! } ! if (!font) font = GetStockObject(DEFAULT_GUI_FONT); ! // ! // Extract the extents. ! // ! HGDIOBJ original_font = SelectObject(tmp_dc, font); ! SIZE out_size = {0, 0}; ! bool have_extents = GetTextExtentPoint32W(tmp_dc, text.c_str(), text.size(), &out_size); ! // ! // Clean up, and convert the size to a rect. ! // ! DeleteObject(SelectObject(tmp_dc, original_font)); ! ReleaseDC(0, tmp_dc); ! out_extents.left = 0; out_extents.top = 0; ! out_extents.right = out_size.cx; ! out_extents.bottom = out_size.cy; ! return have_extents; ! } ! bool get_integer(int widget_type, int measurement, int& out_val) const ! { ! out_val = 0; ! return false; ! } ! bool get_size(int widget_type, THEMESIZE measurement, SIZE& out_size) const ! { ! out_size.cx = 0; out_size.cy = 0; ! return false; ! } ! bool get_margins(int widget_type, MARGINS& out_margins) const ! { ! out_margins.cxLeftWidth = 0; out_margins.cxRightWidth = 0; ! out_margins.cyTopHeight = 0; out_margins.cyBottomHeight = 0; ! return false; } }; /****************************************************************************************************/ ! const int kState = 1; ! // ! /// This implementation of metrics_t uses the UxTheme library to obtain widget metrics. ! /// It inherits from the plain Win32 implementation because it occasionally falls back ! /// on the font functions. ! // ! class metrics_uxtheme_t : public metrics_win32_t { + typedef metrics_win32_t _super; // ! // Handle to the UxTheme.DLL. // ! HMODULE theme_dll_m; // ! // Handle to the theme which we are currently using. // ! HTHEME theme_m; // ! // Technically all of these calls are supposed to use a state parameter. We are ! // only obtaining metrics, rather than drawing, so we don't actually need to ! // specify any particular state (as metrics should be invariant over all states). // + // According to the tmschema.h (in the Platform SDK) a state of 1 should always + // work. // ! // const int kState; // ! // Because we open UxTheme.DLL dynamically we need to keep function pointers into ! // the library. These are those. // ! typedef HTHEME (__stdcall *OpenThemeData_t)(HWND hwnd, LPCWSTR pszClassList); ! typedef HRESULT (__stdcall *CloseThemeData_t)(HTHEME hTheme); ! typedef HRESULT (__stdcall *GetThemeMargins_t)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT* prc, MARGINS* pMargins); ! typedef HRESULT (__stdcall *GetThemePartSize_t)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT* pRect, enum THEMESIZE eSize, SIZE* psz); ! typedef HRESULT (__stdcall *GetThemeInt_t)(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int* piVal); ! typedef HRESULT (__stdcall *GetThemeTextExtent_t)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, const RECT* pBoundingRect, RECT* pExtentRect); ! typedef HRESULT (__stdcall *GetThemeTextMetrics_t)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, TEXTMETRIC* ptm); ! typedef HRESULT (__stdcall *GetThemeFont_t)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, LOGFONTW* pFont); ! typedef HRESULT (__stdcall *GetThemeSysFont_t)(HTHEME hTheme, int iFontId, LOGFONTW* pFont); ! typedef BOOL (__stdcall *IsThemeActive_t)(void); ! OpenThemeData_t OpenThemeDataPtr; ! CloseThemeData_t CloseThemeDataPtr; ! GetThemeMargins_t GetThemeMarginsPtr; ! GetThemePartSize_t GetThemePartSizePtr; ! GetThemeInt_t GetThemeIntPtr; ! GetThemeTextExtent_t GetThemeTextExtentPtr; ! GetThemeTextMetrics_t GetThemeTextMetricsPtr; ! GetThemeFont_t GetThemeFontPtr; ! GetThemeSysFont_t GetThemeSysFontPtr; ! IsThemeActive_t IsThemeActivePtr; // ! // We only ever try to load UxTheme.DLL once, this boolean tells us if we were ! // successful. // ! bool loaded_m; ! public: ! metrics_uxtheme_t() : theme_dll_m(0), theme_m(0), OpenThemeDataPtr(0), CloseThemeDataPtr(0), ! GetThemeMarginsPtr(0), GetThemePartSizePtr(0), GetThemeIntPtr(0), ! GetThemeTextExtentPtr(0), GetThemeTextMetricsPtr(0), GetThemeFontPtr(0), ! GetThemeSysFontPtr(0), IsThemeActivePtr(0), loaded_m(false) ! { ! // ! // Try to load the UxTheme library, if we can. ! // ! theme_dll_m = LoadLibrary("UxTheme.dll"); ! if (!theme_dll_m) return; ! // ! // Load the addresses of the UxTheme functions. ! // ! if (!(OpenThemeDataPtr = (OpenThemeData_t)GetProcAddress(theme_dll_m, "OpenThemeData"))) return; ! if (!(CloseThemeDataPtr = (CloseThemeData_t)GetProcAddress(theme_dll_m, "CloseThemeData"))) return; ! if (!(GetThemeMarginsPtr = (GetThemeMargins_t)GetProcAddress(theme_dll_m, "GetThemeMargins"))) return; ! if (!(GetThemePartSizePtr = (GetThemePartSize_t)GetProcAddress(theme_dll_m, "GetThemePartSize"))) return; ! if (!(GetThemeIntPtr = (GetThemeInt_t)GetProcAddress(theme_dll_m, "GetThemeInt"))) return; ! if (!(GetThemeTextExtentPtr = (GetThemeTextExtent_t)GetProcAddress(theme_dll_m, "GetThemeTextExtent"))) return; ! if (!(GetThemeTextMetricsPtr = (GetThemeTextMetrics_t)GetProcAddress(theme_dll_m, "GetThemeTextMetrics"))) return; ! if (!(GetThemeFontPtr = (GetThemeFont_t)GetProcAddress(theme_dll_m, "GetThemeFont"))) return; ! if (!(GetThemeSysFontPtr = (GetThemeSysFont_t)GetProcAddress(theme_dll_m, "GetThemeSysFont"))) return; ! if (!(IsThemeActivePtr = (IsThemeActive_t)GetProcAddress(theme_dll_m, "IsThemeActive"))) return; ! // ! // All loaded! ! // ! loaded_m = true; ! } ! ~metrics_uxtheme_t() ! { ! if (theme_dll_m) FreeLibrary(theme_dll_m); ! } // ! /// This function returns true if the theme is active. If the theme ! /// is not active then the plain win32 metrics object should be used. // ! bool theme_active() const ! { ! if (!loaded_m) return false; ! return (*IsThemeActivePtr)(); ! } // ! // from metrics_t // ! bool set_window(HWND win) { ! if (!_super::set_window(win)) return false; ! // ! // Close any already open theme data, and load up the new ! // data. ! // ! if (theme_m) (*CloseThemeDataPtr)(theme_m); ! theme_m = (*OpenThemeDataPtr)(win, get_window_class().c_str()); ! return (theme_m != 0); ! } ! bool get_font(int widget_type, LOGFONTW& out_font) const ! { ! // ! // We need ensure that we have a handle to the theme before ! // continuing. ! // ! if (!theme_m) return false; ! if (widget_type != -1) { ! HRESULT hr = (*GetThemeFontPtr)(theme_m, 0, widget_type, kState, TMT_FONT, &out_font); ! if (hr == S_OK) return true; ! } ! // ! // This widget is a text label, most likely. Give it the ! // standard message box font. ! // ! if (S_OK == (*GetThemeSysFontPtr)(theme_m, TMT_MSGBOXFONT, &out_font)) return true; + return false; + } + bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) const + { + // + // Use GetThemeMetrics for anything which isn't a text label. + // + if ((widget_type != -1) && theme_m) + { + HRESULT hr = (*GetThemeTextMetricsPtr)(theme_m, 0, widget_type, kState, &out_metrics); + if (hr == S_OK) return true; } + // + // Let the Win32 code handle it. When the Win32 code tries to + // call get_font it will call the UxTheme implementation, so + // we will always use the correct font here. + // + return _super::get_font_metrics(widget_type, out_metrics); } ! bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents) const ! { ! // ! // We can only work if we have a non-label widget type and ! // valid theme handle. ! // ! if ((widget_type != -1) && theme_m) ! { ! HDC tmp_dc = GetDC(0); ! HRESULT hr = (*GetThemeTextExtentPtr)(theme_m, tmp_dc, widget_type, kState, text.c_str(), text.size(), 0, 0, &out_extents); ! ReleaseDC(0, tmp_dc); ! if (hr == S_OK) return true; ! } ! // ! // That seemed to go wrong. ! // ! return _super::get_text_extents(widget_type, text, out_extents); ! } ! bool get_integer(int widget_type, int measurement, int& out_val) const ! { ! // ! // We don't fallback from this function. ! // ! if ((!theme_m) || (widget_type == -1)) return false; ! return (S_OK == (*GetThemeIntPtr)(theme_m, widget_type, kState, measurement, &out_val)); ! } ! bool get_size(int widget_type, THEMESIZE measurement, SIZE& out_size) const ! { ! // ! // We don't fallback from this function. ! // ! if ((!theme_m) || (widget_type == -1)) return false; ! // ! // Create a temporary device context and call GetThemePartSize. ! // ! HDC tmp_dc = GetDC(0); ! HRESULT hr = (*GetThemePartSizePtr)(theme_m, tmp_dc, widget_type, kState, 0, measurement, &out_size); ! ReleaseDC(0, tmp_dc); ! return (hr == S_OK); ! } ! bool get_margins(int widget_type, MARGINS& out_margins) const ! { ! // ! // We don't fall back from this function. ! // ! if ((!theme_m) || (widget_type == -1)) return false; ! // ! // Use GetThemeMargins call to get the margins for this widget. ! // ! return (S_OK == (*GetThemeMarginsPtr)(theme_m, 0, widget_type, kState, TMT_CONTENTMARGINS, 0, &out_margins)); ! } ! }; /****************************************************************************************************/ ! metrics_t& metrics_t::get_instance() { ! static metrics_win32_t win32_instance; ! static metrics_uxtheme_t uxtheme_instance; ! if (uxtheme_instance.theme_active()) return uxtheme_instance; ! return win32_instance; } |
From: Ralph T. <ra...@us...> - 2005-04-01 20:52:31
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14308/adobe-source/adobe/test/visual/sources/win Modified Files: ui_core_implementation.cpp Log Message: Using real UTF-16 <-> UTF-8 conversion now. Popup menus work again. Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win/ui_core_implementation.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ui_core_implementation.cpp 1 Apr 2005 19:11:49 -0000 1.6 --- ui_core_implementation.cpp 1 Apr 2005 20:52:20 -0000 1.7 *************** *** 102,115 **** std::string convert_utf(const WCHAR* buffer, std::size_t size) { ! std::string result; ! ! // REVISIT (fbrereto) : use real utf16->utf8, please! ! for(std::size_t i(0); i < size; ++i) ! { ! std::string::value_type new_char(buffer[i]); ! result.append(std::string(&new_char, 1)); ! } ! ! return result; } --- 102,113 ---- std::string convert_utf(const WCHAR* buffer, std::size_t size) { ! typedef std::vector<char> buftype; ! int length = WideCharToMultiByte(CP_UTF8, 0, buffer, size, 0, 0, 0, 0); ! buftype tmpbuf(length + 1); ! // ! // Convert characters. ! // ! WideCharToMultiByte(CP_UTF8, 0, buffer, size, &(tmpbuf[0]), length, 0, 0); ! return std::string(&(tmpbuf[0])); } *************** *** 129,142 **** std::wstring convert_utf(const CHAR* buffer, std::size_t size) { ! std::wstring result; ! ! // REVISIT (fbrereto) : use real utf16->utf8, please! ! for(std::size_t i(0); i < size; ++i) ! { ! std::wstring::value_type new_char(buffer[i]); ! result.append(std::wstring(&new_char, 1)); ! } ! ! return result; } --- 127,138 ---- std::wstring convert_utf(const CHAR* buffer, std::size_t size) { ! typedef std::vector<WCHAR> buftype; ! int length = MultiByteToWideChar(CP_UTF8, 0, buffer, size, 0, 0); ! buftype tmpbuf(length + 1); ! // ! // Convert characters. ! // ! MultiByteToWideChar(CP_UTF8, 0, buffer, size, &(tmpbuf[0]), length); ! return std::wstring(&(tmpbuf[0])); } *************** *** 3404,3408 **** --- 3400,3407 ---- geometry_m.width() -= width; } + long old_height = geometry_m.height(); + geometry_m.height() += (menu_items_m.size() + 1) * geometry_m.height(); _super::set_bounds(position, geometry_m); + geometry_m.height() = old_height; } |
From: Ralph T. <ra...@us...> - 2005-04-01 19:12:16
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17226/adobe-source/adobe/test/visual/headers/win Modified Files: ui_core_implementation.hpp Added Files: metrics.hpp Log Message: Checking in initial support for getting most metrics from Windows. This work isn't yet complete, and there may be a few regressions. The new files, metrics.hpp and metrics.cpp define a new "metrics_t" type which can return metrics for widgets from the OS. win/ui_core_implementation.* have been modified to use the new metrics_t type, as well as use measurements from plain Win32 (in the case of edit and comboboxes). The baseline alignment for "compound widgets" (with labels and the main widget) has changed to cover the case that a static label is larger than the actual widget (a possible occurance when using custom themes). --- NEW FILE: metrics.hpp --- /* Copyright 2005 Ralph Thomas Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ // // This header defines a class which can return various widget metrics // on Windows systems. When available the UXTHEME library is used to // discover metrics. When UXTHEME is not available some reasonable // defaults (precalculated on a system with UXTHEME) are returned. // /****************************************************************************************************/ #ifndef ADOBE_METRICS_HPP #define ADOBE_METRICS_HPP /****************************************************************************************************/ #include <windows.h> #include <uxtheme.h> #include <tmschema.h> #include <string> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ // /// The metrics_t class is a singleton which can fetch information /// on ideal widget sizes. There are two possible designs here: /// <ol> /// <li>Provide simple metric and text information.</li> /// <li>Provide ideal sizes for specific widgets.</li> /// </ol> /// It has been chosen to take design (1), the calculation of /// individual widget ideal sizes belongs in the ui_core_implementation /// code. This class is a singleton, a reference to it has to be /// obtained using metrics_t::getInstance . /// /// All of the functions which return metrics require the widget type /// and state of the widget. A table of all the part and state names /// is available here: /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/userex/topics/partsandstates.asp // class metrics_t { struct implementation_t; implementation_t* object_m; // /// All constructors are private to enforce singleton nature /// of metrics_t. // metrics_t(); ~metrics_t(); public: // /// Return a reference to the single instance of metrics_t. /// /// \return a reference to the single instance of metrics_t. // static metrics_t& get_instance(); // /// Get the correct font to use for the given widget. This font must /// be used for the font metrics to be correct. /// /// \param widget_type the type of the widget. /// \param out_font a reference filled with the requested font. /// /// \return true if the font was returned successfully, false if /// the font could not be returned. // bool get_font(int widget_type, LOGFONTW& out_font); // /// Get the metrics for the font which should be used in the given widget. /// /// \param widget_type the type of the widget. /// \param out_metrics a reference filled with the text metrics. /// /// \return true if the font metrics were returned successfully, false /// if the metrics could not be returned. // bool get_font_metrics(int widget_type, TEXTMETRIC& out_metrics); // /// Get the extents for the given text string, to be contained in the /// specified widget. /// /// \param widget_type the type of the widget. /// \param text the string to return the extents for. /// \param out_extents a reference filled with the text extents. /// /// \return true if the text extents were returned successfully, false /// if the metrics could not be returned. // bool get_text_extents(int widget_type, std::wstring text, RECT& out_extents); // /// Get the specified measurement for the given widget when in the /// given state. /// /// \param widget_type the type of the widget. /// \param measurement the required measurement. /// \param out_val a reference filled with the requested value. /// /// \return true if the value was returned successfully, false /// if the value could not be found. // bool get_integer(int widget_type, int measurement, int& out_val); // /// Get the size of the specified widget. /// /// \param widget_type the type of the widget. /// \param measurement the size to get: TS_MIN, TS_TRUE, or TS_DRAW. /// \param out_size a reference filled with the requested rectangle. /// /// \return true if the rectangle was returned successfully, false /// if the rectangle could not be found. // bool get_size(int widget_type, THEMESIZE measurement, SIZE& out_size); // /// Get the margins for the specified widget. Typically the margins /// describe space which must be added around the text rectangle for /// controls with a caption. /// /// \param widget_type the type of the widget. /// \param out_margins a reference filled with the margins of the widget. /// /// \return true if the margins were returned successfully, false /// if the margins could not be found. // bool get_margins(int widget_type, MARGINS& out_margins); // /// Before any of the other functions can be called, the theme data must be /// loaded from the window. This function should also be called any time the /// window recieves a WM_THEMECHANGED message. /// /// \param window the window to get the theme from. Note that it is not /// important which window is used, it does not have to /// be the same window every time. /// /// \return true if the theme was obtained from the window, false if the /// theme could not be obtained from the window. // bool set_window(HWND window); }; /****************************************************************************************************/ } // namespace adobe /****************************************************************************************************/ #endif Index: ui_core_implementation.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/win/ui_core_implementation.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core_implementation.hpp 29 Mar 2005 23:29:39 -0000 1.5 --- ui_core_implementation.hpp 1 Apr 2005 19:11:49 -0000 1.6 *************** *** 45,80 **** /****************************************************************************************************/ - // 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; } - }; - - /****************************************************************************************************/ #ifndef NDEBUG --- 45,48 ---- *************** *** 141,145 **** rectangle_t geometry_m; // saving set_bounds param for essentials point_t position_m; // saving set_bounds param for widget framing ! fudge_t fudges_m; // added in best_bounds (apply_fudges); subtracted in set_bounds (shed_fudges) #ifndef NDEBUG bool placed_m; // used in the framing rect code to make sure the widget is placed first --- 109,113 ---- rectangle_t geometry_m; // saving set_bounds param for essentials point_t position_m; // saving set_bounds param for widget framing ! int uxtheme_type_m; #ifndef NDEBUG bool placed_m; // used in the framing rect code to make sure the widget is placed first *************** *** 215,220 **** virtual dictionary_t essentials() const; - - virtual rectangle_t best_bounds(); }; --- 183,186 ---- *************** *** 276,281 **** const button_t::state_descriptor_t* first, const button_t::state_descriptor_t* last); - virtual rectangle_t best_bounds(); - void set_bounds(const point_t& position, const rectangle_t& geometry); void set_default(bool is_default); void set_cancel(bool is_cancel); --- 242,245 ---- *************** *** 303,307 **** void initialize(const RECT& bounds, const std::string& name); - virtual rectangle_t best_bounds(); virtual void set_value(std::size_t is_checked); void signal_hit(const implementation::radio_button_hit_proc_t& proc); --- 267,270 ---- *************** *** 327,331 **** void initialize(const RECT& bounds, const std::string& name); - virtual rectangle_t best_bounds(); virtual void set_value(std::size_t is_checked); void signal_hit(const implementation::checkbox_hit_proc_t& proc); --- 290,293 ---- *************** *** 419,424 **** void initialize(const RECT& bounds, const std::string& name); - virtual rectangle_t best_bounds(); - void set_bounds(const point_t& position, const rectangle_t& geometry); long best_height_given_width(long width); void set_name(const std::string& name); --- 381,384 ---- *************** *** 473,479 **** long rows_m; long cols_m; ! long static_width_m; long static_height_m; - long static_adjust_m; implementation::edit_text_pre_edit_proc_t pre_edit_proc_m; implementation::edit_text_post_edit_proc_t post_edit_proc_m; --- 433,440 ---- long rows_m; long cols_m; ! long edit_baseline_m; ! long edit_height_m; ! long static_baseline_m; long static_height_m; implementation::edit_text_pre_edit_proc_t pre_edit_proc_m; implementation::edit_text_post_edit_proc_t post_edit_proc_m; *************** *** 513,519 **** static_text_t static_disabled_text_m; bool static_disabled_m; ! long static_width_m; long static_height_m; ! long static_adjust_m; bool using_label_m; implementation::popup_value_proc_t value_proc_m; --- 474,481 ---- static_text_t static_disabled_text_m; bool static_disabled_m; ! long static_baseline_m; long static_height_m; ! long popup_baseline_m; ! long popup_height_m; bool using_label_m; implementation::popup_value_proc_t value_proc_m; *************** *** 553,560 **** popup_t popup_m; bool using_popup_m; - long popup_width_m; long popup_height_m; ! long popup_adjust_m; ! long edit_width_m; }; --- 515,522 ---- popup_t popup_m; bool using_popup_m; long popup_height_m; ! long popup_baseline_m; ! long edit_height_m; ! long edit_baseline_m; }; |
From: Ralph T. <ra...@us...> - 2005-04-01 19:12:16
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17226/adobe-source/adobe/test/visual Modified Files: Jamfile Log Message: Checking in initial support for getting most metrics from Windows. This work isn't yet complete, and there may be a few regressions. The new files, metrics.hpp and metrics.cpp define a new "metrics_t" type which can return metrics for widgets from the OS. win/ui_core_implementation.* have been modified to use the new metrics_t type, as well as use measurements from plain Win32 (in the case of edit and comboboxes). The baseline alignment for "compound widgets" (with labels and the main widget) has changed to cover the case that a static label is larger than the actual widget (a possible occurance when using custom themes). Index: Jamfile =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/Jamfile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Jamfile 30 Mar 2005 22:34:37 -0000 1.3 --- Jamfile 1 Apr 2005 19:11:48 -0000 1.4 *************** *** 10,20 **** PLATFORM_HEADERS = headers/win ; PLATFORM_SOURCE_DIR = sources/win ; } else { PLATFORM_HEADERS = headers/mac ; PLATFORM_SOURCE_DIR = sources/mac ; } project adobe/visual ! : requirements <toolset>msvc:<linkflags>"gdi32.lib user32.lib comctl32.lib /subsystem:windows" : requirements <include>headers <link>static ; --- 10,22 ---- PLATFORM_HEADERS = headers/win ; PLATFORM_SOURCE_DIR = sources/win ; + PLATFORM_SOURCES = sources/win/metrics.cpp ; } else { PLATFORM_HEADERS = headers/mac ; PLATFORM_SOURCE_DIR = sources/mac ; + PLATFORM_SOURCES = ; } project adobe/visual ! : requirements <toolset>msvc:<linkflags>"uxtheme.lib gdi32.lib user32.lib comctl32.lib /subsystem:windows" : requirements <include>headers <link>static ; *************** *** 24,27 **** --- 26,30 ---- sources/client_assembler.cpp sources/ui_core.cpp + $(PLATFORM_SOURCES) $(PLATFORM_SOURCE_DIR)/main.cpp $(PLATFORM_SOURCE_DIR)/display.cpp *************** *** 29,32 **** /adobe//asl_lib_dev /boost/filesystem//boost_filesystem ! : <include>$(PLATFORM_HEADERS) ; # <variant>release:<define>NDEBUG ; --- 32,35 ---- /adobe//asl_lib_dev /boost/filesystem//boost_filesystem ! : <include>$(PLATFORM_HEADERS) <link>static ; # <variant>release:<define>NDEBUG ; |
From: Ralph T. <ra...@us...> - 2005-04-01 19:12:01
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17226/adobe-source/adobe/test/visual/sources/win Modified Files: ui_core_implementation.cpp Added Files: metrics.cpp Log Message: Checking in initial support for getting most metrics from Windows. This work isn't yet complete, and there may be a few regressions. The new files, metrics.hpp and metrics.cpp define a new "metrics_t" type which can return metrics for widgets from the OS. win/ui_core_implementation.* have been modified to use the new metrics_t type, as well as use measurements from plain Win32 (in the case of edit and comboboxes). The baseline alignment for "compound widgets" (with labels and the main widget) has changed to cover the case that a static label is larger than the actual widget (a possible occurance when using custom themes). --- NEW FILE: metrics.cpp --- /* Copyright 2005 Ralph Thomas Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ // // This is the implementation of the class which looks up widget metrics on // Windows systems. Currently it only works on Windows XP, but will be fixed // up to work on all Windows once a little program which can generate the // header containing default values. // /****************************************************************************************************/ #include "metrics.hpp" #include <sstream> /****************************************************************************************************/ namespace adobe { /****************************************************************************************************/ // // Technically all of these calls are supposed to use a state parameter. We are // only obtaining metrics, rather than drawing, so we don't actually need to // specify any particular state (as metrics should be invariant over all states). // // According to the tmschema.h (in the Platform SDK) a state of 1 should always // work. // const int kState = 1; /****************************************************************************************************/ struct metrics_t::implementation_t { implementation_t() : theme(0) { } ~implementation_t() { if(theme) CloseThemeData(theme); } HTHEME theme; std::wstring window_class; }; /****************************************************************************************************/ metrics_t::metrics_t() : object_m(new implementation_t) { } /****************************************************************************************************/ metrics_t::~metrics_t() { delete object_m; } /****************************************************************************************************/ metrics_t& metrics_t::get_instance() { static metrics_t instance; return instance; } /****************************************************************************************************/ bool metrics_t::get_font(int widget_type, LOGFONTW& out_font) { // // We need ensure that we have a handle to the theme before // continuing. // if(!object_m->theme) return false; if (widget_type != -1) { HRESULT hr = GetThemeFont(object_m->theme, 0, widget_type, kState, TMT_FONT, (LOGFONT*)&out_font); if (hr == S_OK) return true; } // // REVISIT (ralpht): The header file says that this function // takes a LOGFONT pointer -- this is a lie! It actually // requires a LOGFONTW pointer. The stack gets trashed // if you pass a LOGFONT pointer. // if (S_OK == GetThemeSysFont(object_m->theme, TMT_MSGBOXFONT, (LOGFONT*)&out_font)) return true; return false; } /****************************************************************************************************/ bool metrics_t::get_font_metrics(int widget_type, TEXTMETRIC& out_metrics) { // // Try to use GetThemeTextMetrics if we can. // if ((widget_type != -1) && object_m->theme) { HRESULT hr = GetThemeTextMetrics(object_m->theme, 0, widget_type, kState, &out_metrics); if (hr == S_OK) return true; } // // REVISIT (ralpht): Oddly enough GetThemeTextMetrics does work, // but because we always want the metrics of whatever get_font // returned we must create the font and use the Win32 text // metrics call. // // LOGFONTW font_desc; HFONT the_font = 0; if (get_font(widget_type, font_desc)) the_font = CreateFontIndirectW(&font_desc); if (!the_font) the_font = reinterpret_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)); if (!the_font) return false; // // Select the font into a temporary device context. // HDC tmpDC = GetDC(0); HGDIOBJ original_font = SelectObject(tmpDC, the_font); bool r = GetTextMetrics(tmpDC, &out_metrics); // // Delete the font which we selected into the DC. // DeleteObject(SelectObject(tmpDC, original_font)); ReleaseDC(0, tmpDC); return r; } /****************************************************************************************************/ bool metrics_t::get_text_extents(int widget_type, std::wstring text, RECT& out_extents) { // // Ensure that we have a handle to the theme. // HDC tmpDC = GetDC(0); // // If we can, then we should try to use GetThemeTextExtent. // if((widget_type != -1) && object_m->theme) { HRESULT hr = GetThemeTextExtent(object_m->theme, tmpDC, widget_type, kState, text.c_str(), text.size(), 0, 0, &out_extents); if (hr == S_OK) { // // Alright! We got the extents from the Theme API. // ReleaseDC(0, tmpDC); return true; } } // // Try to obtain the font to get the metrics for. If we can't // get a LOGFONTW then just use DEFAULT_GUI_FONT. // LOGFONTW font_desc; HFONT the_font = 0; if (get_font(widget_type, font_desc)) the_font = CreateFontIndirectW(&font_desc); if (!the_font) the_font = reinterpret_cast<HFONT>(GetStockObject(DEFAULT_GUI_FONT)); if (!the_font) return false; // // Now create the font and select it into a temporary device // context. // HGDIOBJ original_font = SelectObject(tmpDC, the_font); SIZE out_size = {0, 0}; bool r = GetTextExtentPoint32W(tmpDC, text.c_str(), text.size(), &out_size); // // The original GetThemeTextExtent used a RECT -- the plan is to // eventually use GetThemeTextExtent again, so we leave the type // of out_extents as a RECT. // out_extents.left = 0; out_extents.top = 0; out_extents.right = out_size.cx; out_extents.bottom = out_size.cy; // // Release the font and our temporary DC. // DeleteObject(SelectObject(tmpDC, original_font)); ReleaseDC(0, tmpDC); return r; } /****************************************************************************************************/ bool metrics_t::get_integer(int widget_type, int measurement, int& out_val) { // // Ensure that we have a handle to the theme. // if(!object_m->theme || widget_type == -1) return false; // // Use the GetThemeInt call to return the metric. // if(S_OK == GetThemeInt(object_m->theme, widget_type, kState, measurement, &out_val)) return true; return false; } /****************************************************************************************************/ bool metrics_t::get_size(int widget_type, THEMESIZE measurement, SIZE& out_size) { // // Ensure that we have a handle to the theme. // if(!object_m->theme || widget_type == -1) return false; HDC optionalDC = GetDC(0); // // GetTHemePartSize gives the size of the part (if it has one). // HRESULT hr = GetThemePartSize(object_m->theme, optionalDC, widget_type, kState, 0, measurement, &out_size); ReleaseDC(0, optionalDC); return (hr == S_OK); } /****************************************************************************************************/ bool metrics_t::get_margins(int widget_type, MARGINS& out_margins) { // // Ensure that we have a handle to the theme. // if(!object_m->theme || widget_type == -1) return false; // // Use the GetThemeMargins call to get the margins for this // widget. // HRESULT hr = GetThemeMargins(object_m->theme, 0, widget_type, kState, TMT_CONTENTMARGINS, 0, &out_margins); return (hr == S_OK); } /****************************************************************************************************/ bool metrics_t::set_window(HWND window) { // // Release any allocated theme before trying to get a new // one. // if(object_m->theme) CloseThemeData(object_m->theme); // // For whatever reason, UxTheme gives it's data based on // the class name it's given here (rather than any of // the widget_type values we give it). So we need to // obtain the class name of the window. // WCHAR class_name_buf[50]; if (!GetClassNameW(window, class_name_buf, 50)) return false; object_m->window_class = std::wstring(class_name_buf); // // Load the theme data for this window class. // object_m->theme = OpenThemeData(window, object_m->window_class.c_str()); return (object_m->theme != 0); } /****************************************************************************************************/ } /****************************************************************************************************/ Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/win/ui_core_implementation.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core_implementation.cpp 29 Mar 2005 23:29:39 -0000 1.5 --- ui_core_implementation.cpp 1 Apr 2005 19:11:49 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- #include "report_exception.hpp" #include "display.hpp" + #include "metrics.hpp" #include <adobe/value.hpp> *************** *** 220,278 **** /****************************************************************************************************/ [...1528 lines suppressed...] ! // ! edit_geometry.width() -= popup_geometry.width() + gap; ! popup_position.first += edit_geometry.width() + gap; ! // ! // Apply any required vertical offset to the popup ! // position. ! // ! popup_position.second += baseline - popup_baseline_m; ! get_popup().set_bounds(popup_position, popup_geometry); } ! // ! // Now that the edit geometry has been adjusted we can set ! // it. The position might have been shifted vertically. ! // ! edit_position.second += baseline - edit_baseline_m; ! _super::set_bounds(edit_position, edit_geometry); geometry_m = geometry; } |
From: David C. <unc...@us...> - 2005-04-01 17:26:32
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke/eve_smoke.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23483/sandbox/adobe-source/adobe/test/eve_smoke/eve_smoke.xcode Added Files: project.pbxproj Log Message: *** empty log message *** --- NEW FILE: project.pbxproj --- // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 39; objects = { 014CEA460018CE2711CA2923 = { buildSettings = { COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; ZERO_LINK = NO; }; isa = PBXBuildStyle; name = Development; }; 014CEA470018CE2711CA2923 = { buildSettings = { COPY_PHASE_STRIP = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; ZERO_LINK = NO; }; isa = PBXBuildStyle; name = Deployment; }; //010 //011 //012 //013 //014 //020 //021 //022 //023 //024 0249A662FF388D9811CA2CEA = { children = ( 0249A663FF388D9811CA2CEA, 89B8AB2107FD0EED00E27588, 89B8AB2507FD0F0900E27588, ); isa = PBXGroup; name = "External Frameworks and Libraries"; refType = 4; sourceTree = "<group>"; }; 0249A663FF388D9811CA2CEA = { isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libstdc++.a"; path = "/usr/lib/libstdc++.a"; refType = 0; sourceTree = "<absolute>"; }; //020 //021 //022 //023 //024 //080 //081 //082 //083 //084 08FB7793FE84155DC02AAC07 = { buildSettings = { }; buildStyles = ( 014CEA460018CE2711CA2923, 014CEA470018CE2711CA2923, ); hasScannedForEncodings = 1; isa = PBXProject; mainGroup = 08FB7794FE84155DC02AAC07; projectDirPath = ""; targets = ( 8DD76F620486A84900D96B5E, ); }; 08FB7794FE84155DC02AAC07 = { children = ( 08FB7795FE84155DC02AAC07, C6859E8C029090F304C91782, 0249A662FF388D9811CA2CEA, 1AB674ADFE9D54B511CA2CBB, ); isa = PBXGroup; name = eve_smoke; refType = 4; sourceTree = "<group>"; }; 08FB7795FE84155DC02AAC07 = { children = ( 08FB7796FE84155DC02AAC07, ); isa = PBXGroup; name = Source; refType = 4; sourceTree = "<group>"; }; 08FB7796FE84155DC02AAC07 = { fileEncoding = 4; isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; refType = 4; sourceTree = "<group>"; }; //080 //081 //082 //083 //084 //1A0 //1A1 //1A2 //1A3 //1A4 1AB674ADFE9D54B511CA2CBB = { children = ( 8DD76F6C0486A84900D96B5E, ); isa = PBXGroup; name = Products; refType = 4; sourceTree = "<group>"; }; //1A0 //1A1 //1A2 //1A3 //1A4 //890 //891 //892 //893 //894 89B8AB2107FD0EED00E27588 = { isa = PBXFileReference; lastKnownFileType = archive.ar; name = libasl_dev.a; path = ../../build/asl_lib/build/libasl_dev.a; refType = 2; sourceTree = SOURCE_ROOT; }; 89B8AB2207FD0EED00E27588 = { fileRef = 89B8AB2107FD0EED00E27588; isa = PBXBuildFile; settings = { }; }; 89B8AB2507FD0F0900E27588 = { isa = PBXFileReference; lastKnownFileType = archive.ar; name = libboost.a; path = ../../build/boost_lib/build/libboost.a; refType = 2; sourceTree = SOURCE_ROOT; }; 89B8AB2607FD0F0900E27588 = { fileRef = 89B8AB2507FD0F0900E27588; isa = PBXBuildFile; settings = { }; }; //890 //891 //892 //893 //894 //8D0 //8D1 //8D2 //8D3 //8D4 8DD76F620486A84900D96B5E = { buildPhases = ( 8DD76F640486A84900D96B5E, 8DD76F660486A84900D96B5E, 8DD76F690486A84900D96B5E, ); buildRules = ( ); buildSettings = { GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PREPROCESSOR_DEFINITIONS = ADOBE_SERIALIZATION; HEADER_SEARCH_PATHS = "../../../ ../../../third_party/boost_tp/boost/"; INSTALL_PATH = "$(HOME)/bin"; LIBRARY_SEARCH_PATHS = "/Users/uncommon/Developer/ASL/sandbox/adobe-source/adobe/build/asl_lib/build /Users/uncommon/Developer/ASL/sandbox/adobe-source/adobe/build/boost_lib/build"; PRODUCT_NAME = eve_smoke; WARNING_CFLAGS = "-Wno-long-double"; }; dependencies = ( ); isa = PBXNativeTarget; name = eve_smoke; productInstallPath = "$(HOME)/bin"; productName = eve_smoke; productReference = 8DD76F6C0486A84900D96B5E; productType = "com.apple.product-type.tool"; }; 8DD76F640486A84900D96B5E = { buildActionMask = 2147483647; files = ( 8DD76F650486A84900D96B5E, ); isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; 8DD76F650486A84900D96B5E = { fileRef = 08FB7796FE84155DC02AAC07; isa = PBXBuildFile; settings = { ATTRIBUTES = ( ); }; }; 8DD76F660486A84900D96B5E = { buildActionMask = 2147483647; files = ( 8DD76F670486A84900D96B5E, 89B8AB2207FD0EED00E27588, 89B8AB2607FD0F0900E27588, ); isa = PBXFrameworksBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; 8DD76F670486A84900D96B5E = { fileRef = 0249A663FF388D9811CA2CEA; isa = PBXBuildFile; settings = { }; }; 8DD76F690486A84900D96B5E = { buildActionMask = 8; dstPath = /usr/share/man/man1/; dstSubfolderSpec = 0; files = ( 8DD76F6A0486A84900D96B5E, ); isa = PBXCopyFilesBuildPhase; runOnlyForDeploymentPostprocessing = 1; }; 8DD76F6A0486A84900D96B5E = { fileRef = C6859E8B029090EE04C91782; isa = PBXBuildFile; settings = { }; }; 8DD76F6C0486A84900D96B5E = { explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; isa = PBXFileReference; path = eve_smoke; refType = 3; sourceTree = BUILT_PRODUCTS_DIR; }; //8D0 //8D1 //8D2 //8D3 //8D4 //C60 //C61 //C62 //C63 //C64 C6859E8B029090EE04C91782 = { isa = PBXFileReference; lastKnownFileType = text.man; path = eve_smoke.1; refType = 4; sourceTree = "<group>"; }; C6859E8C029090F304C91782 = { children = ( C6859E8B029090EE04C91782, ); isa = PBXGroup; name = Documentation; refType = 4; sourceTree = "<group>"; }; }; rootObject = 08FB7793FE84155DC02AAC07; } |
From: David C. <unc...@us...> - 2005-04-01 17:26:05
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke/eve_smoke.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23363/eve_smoke.xcode Log Message: Directory /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/eve_smoke/eve_smoke.xcode added to the repository |
From: David C. <unc...@us...> - 2005-04-01 17:23:51
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/build/asl_lib/asl_lib.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22396/sandbox/adobe-source/adobe/build/asl_lib/asl_lib.xcode Modified Files: project.pbxproj Log Message: moved future source from visual Index: project.pbxproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/build/asl_lib/asl_lib.xcode/project.pbxproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** project.pbxproj 30 Mar 2005 01:50:22 -0000 1.1 --- project.pbxproj 1 Apr 2005 17:23:42 -0000 1.2 *************** *** 57,60 **** --- 57,61 ---- 89323C2E07FA2BA500AB4B9B, 08FB7795FE84155DC02AAC07, + 89B8AB5C07FD120400E27588, 1AB674ADFE9D54B511CA2CBB, ); *************** *** 382,391 **** }; }; - 89323C1C07FA2B9500AB4B9B = { - fileRef = 89323C0307FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C1D07FA2B9500AB4B9B = { fileRef = 89323C0407FA2B9500AB4B9B; --- 383,386 ---- *************** *** 400,409 **** }; }; - 89323C1F07FA2B9500AB4B9B = { - fileRef = 89323C0607FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C2007FA2B9500AB4B9B = { fileRef = 89323C0707FA2B9500AB4B9B; --- 395,398 ---- *************** *** 418,427 **** }; }; - 89323C2207FA2B9500AB4B9B = { - fileRef = 89323C0907FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C2307FA2B9500AB4B9B = { fileRef = 89323C0A07FA2B9500AB4B9B; --- 407,410 ---- *************** *** 436,445 **** }; }; - 89323C2507FA2B9500AB4B9B = { - fileRef = 89323C0C07FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C2607FA2B9500AB4B9B = { fileRef = 89323C0D07FA2B9500AB4B9B; --- 419,422 ---- *************** *** 454,463 **** }; }; - 89323C2807FA2B9500AB4B9B = { - fileRef = 89323C0F07FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C2907FA2B9500AB4B9B = { fileRef = 89323C1007FA2B9500AB4B9B; --- 431,434 ---- *************** *** 613,700 **** sourceTree = "<group>"; }; - 89323C3F07FA2C1800AB4B9B = { - fileRef = 89323C3107FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4007FA2C1800AB4B9B = { - fileRef = 89323C3207FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4107FA2C1800AB4B9B = { - fileRef = 89323C3307FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4207FA2C1800AB4B9B = { - fileRef = 89323C3407FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4307FA2C1800AB4B9B = { - fileRef = 89323C3507FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4407FA2C1800AB4B9B = { - fileRef = 89323C3607FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4507FA2C1800AB4B9B = { - fileRef = 89323C3707FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4607FA2C1800AB4B9B = { - fileRef = 89323C3807FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4707FA2C1800AB4B9B = { - fileRef = 89323C3907FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4807FA2C1800AB4B9B = { - fileRef = 89323C3A07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4907FA2C1800AB4B9B = { - fileRef = 89323C3B07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4A07FA2C1800AB4B9B = { - fileRef = 89323C3C07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4B07FA2C1800AB4B9B = { - fileRef = 89323C3D07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C4C07FA2C1800AB4B9B = { - fileRef = 89323C3E07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C8807FA321700AB4B9B = { buildPhases = ( --- 584,587 ---- *************** *** 724,864 **** buildActionMask = 2147483647; files = ( - 89323C8A07FA321700AB4B9B, - 89323C8B07FA321700AB4B9B, - 89323C8C07FA321700AB4B9B, - 89323C8D07FA321700AB4B9B, - 89323C8E07FA321700AB4B9B, - 89323C8F07FA321700AB4B9B, - 89323C9007FA321700AB4B9B, - 89323C9107FA321700AB4B9B, - 89323C9207FA321700AB4B9B, - 89323C9307FA321700AB4B9B, - 89323C9407FA321700AB4B9B, - 89323C9507FA321700AB4B9B, - 89323C9607FA321700AB4B9B, - 89323C9707FA321700AB4B9B, - 89323C9807FA321700AB4B9B, - 89323C9907FA321700AB4B9B, - 89323C9A07FA321700AB4B9B, - 89323C9B07FA321700AB4B9B, - 89323C9C07FA321700AB4B9B, ); isa = PBXHeadersBuildPhase; runOnlyForDeploymentPostprocessing = 0; }; - 89323C8A07FA321700AB4B9B = { - fileRef = 89323C0307FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C8B07FA321700AB4B9B = { - fileRef = 89323C0607FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C8C07FA321700AB4B9B = { - fileRef = 89323C0907FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C8D07FA321700AB4B9B = { - fileRef = 89323C0C07FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C8E07FA321700AB4B9B = { - fileRef = 89323C0F07FA2B9500AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C8F07FA321700AB4B9B = { - fileRef = 89323C3107FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9007FA321700AB4B9B = { - fileRef = 89323C3207FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9107FA321700AB4B9B = { - fileRef = 89323C3307FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9207FA321700AB4B9B = { - fileRef = 89323C3407FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9307FA321700AB4B9B = { - fileRef = 89323C3507FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9407FA321700AB4B9B = { - fileRef = 89323C3607FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9507FA321700AB4B9B = { - fileRef = 89323C3707FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9607FA321700AB4B9B = { - fileRef = 89323C3807FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9707FA321700AB4B9B = { - fileRef = 89323C3907FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9807FA321700AB4B9B = { - fileRef = 89323C3A07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9907FA321700AB4B9B = { - fileRef = 89323C3B07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9A07FA321700AB4B9B = { - fileRef = 89323C3C07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9B07FA321700AB4B9B = { - fileRef = 89323C3D07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 89323C9C07FA321700AB4B9B = { - fileRef = 89323C3E07FA2C1800AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; 89323C9D07FA321700AB4B9B = { buildActionMask = 2147483647; --- 611,618 ---- *************** *** 884,887 **** --- 638,644 ---- 89323CB007FA321700AB4B9B, 89323CB107FA321700AB4B9B, + 89B8AB7507FD120400E27588, + 89B8AB7607FD120400E27588, + 89B8AB7707FD120400E27588, ); isa = PBXSourcesBuildPhase; *************** *** 1023,1026 **** --- 780,945 ---- sourceTree = BUILT_PRODUCTS_DIR; }; + 89B8AB5C07FD120400E27588 = { + children = ( + 89B8AB6607FD120400E27588, + 89B8AB5D07FD120400E27588, + 89B8AB5E07FD120400E27588, + 89B8AB5F07FD120400E27588, + 89B8AB6007FD120400E27588, + 89B8AB6107FD120400E27588, + 89B8AB6207FD120400E27588, + 89B8AB6307FD120400E27588, + 89B8AB6407FD120400E27588, + 89B8AB6507FD120400E27588, + 89B8AB6B07FD120400E27588, + ); + isa = PBXGroup; + name = future; + path = ../../future; + refType = 2; + sourceTree = SOURCE_ROOT; + }; + 89B8AB5D07FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = assemblage.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB5E07FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = enum_ops.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB5F07FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = find_closest.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6007FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = iomanip.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6107FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = iomanip_fwd.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6207FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = iomanip_pdf.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6307FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = iomanip_xml.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6407FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = manip.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6507FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = memory.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6607FD120400E27588 = { + children = ( + 89B8AB6707FD120400E27588, + 89B8AB6807FD120400E27588, + 89B8AB6907FD120400E27588, + 89B8AB6A07FD120400E27588, + ); + isa = PBXGroup; + path = source; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6707FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + path = assemblage.cpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6807FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + path = iomanip.cpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6907FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + path = iomanip_pdf.cpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6A07FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + path = iomanip_xml.cpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB6B07FD120400E27588 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.h; + path = ternary_function.hpp; + refType = 4; + sourceTree = "<group>"; + }; + 89B8AB7507FD120400E27588 = { + fileRef = 89B8AB6707FD120400E27588; + isa = PBXBuildFile; + settings = { + }; + }; + 89B8AB7607FD120400E27588 = { + fileRef = 89B8AB6807FD120400E27588; + isa = PBXBuildFile; + settings = { + }; + }; + 89B8AB7707FD120400E27588 = { + fileRef = 89B8AB6907FD120400E27588; + isa = PBXBuildFile; + settings = { + }; + }; //890 //891 *************** *** 1043,1065 **** buildActionMask = 2147483647; files = ( - 89323C1C07FA2B9500AB4B9B, - 89323C1F07FA2B9500AB4B9B, - 89323C2207FA2B9500AB4B9B, - 89323C2507FA2B9500AB4B9B, - 89323C2807FA2B9500AB4B9B, - 89323C3F07FA2C1800AB4B9B, - 89323C4007FA2C1800AB4B9B, - 89323C4107FA2C1800AB4B9B, - 89323C4207FA2C1800AB4B9B, - 89323C4307FA2C1800AB4B9B, - 89323C4407FA2C1800AB4B9B, - 89323C4507FA2C1800AB4B9B, - 89323C4607FA2C1800AB4B9B, - 89323C4707FA2C1800AB4B9B, - 89323C4807FA2C1800AB4B9B, - 89323C4907FA2C1800AB4B9B, - 89323C4A07FA2C1800AB4B9B, - 89323C4B07FA2C1800AB4B9B, - 89323C4C07FA2C1800AB4B9B, ); isa = PBXHeadersBuildPhase; --- 962,965 ---- |
From: David C. <unc...@us...> - 2005-04-01 17:23:05
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/visual.xcode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21767/sandbox/adobe-source/adobe/test/visual/visual.xcode Modified Files: project.pbxproj Log Message: moved future files to asl_lib Index: project.pbxproj =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/visual.xcode/project.pbxproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.pbxproj 30 Mar 2005 17:14:04 -0000 1.2 --- project.pbxproj 1 Apr 2005 17:22:56 -0000 1.3 *************** *** 90,94 **** 32DBCF6D0370B57F00C91783, 894E67BC07F8593B00C05327, - 89C4839707F06E96007FD3D0, 20286C2AFDCF999611CA2CEA, 894E675D07F5C0BC00C05327, --- 90,93 ---- *************** *** 281,312 **** }; }; - 89323D9A07FA74D900AB4B9B = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - path = iomanip_pdf.cpp; - refType = 4; - sourceTree = "<group>"; - }; - 89323D9B07FA74D900AB4B9B = { - fileRef = 89323D9A07FA74D900AB4B9B; - isa = PBXBuildFile; - settings = { - }; - }; - 894E674307F5BB0500C05327 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - path = assemblage.cpp; - refType = 4; - sourceTree = "<group>"; - }; - 894E674407F5BB0500C05327 = { - fileRef = 894E674307F5BB0500C05327; - isa = PBXBuildFile; - settings = { - }; - }; 894E675D07F5C0BC00C05327 = { children = ( --- 280,283 ---- *************** *** 365,379 **** sourceTree = "<group>"; }; - 894E677A07F5C23600C05327 = { - children = ( - 894E674307F5BB0500C05327, - 89C483A007F07194007FD3D0, - 89323D9A07FA74D900AB4B9B, - ); - isa = PBXGroup; - path = source; - refType = 4; - sourceTree = "<group>"; - }; 894E678407F5C31C00C05327 = { fileEncoding = 30; --- 336,339 ---- *************** *** 392,411 **** sourceTree = "<group>"; }; - 894E679407F5C35D00C05327 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.h; - path = assemblage.hpp; - refType = 4; - sourceTree = "<group>"; - }; - 894E679907F5C36E00C05327 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.h; - path = iomanip.hpp; - refType = 4; - sourceTree = "<group>"; - }; 894E67B007F5C7B000C05327 = { fileRef = 89C4838E07F06DB5007FD3D0; --- 352,355 ---- *************** *** 444,453 **** }; }; - 894E67CE07F85CF800C05327 = { - fileRef = 89C483A007F07194007FD3D0; - isa = PBXBuildFile; - settings = { - }; - }; 894E67CF07F85CFB00C05327 = { fileRef = 89C4839007F06DB5007FD3D0; --- 388,391 ---- *************** *** 486,509 **** sourceTree = "<group>"; }; - 89C4839707F06E96007FD3D0 = { - children = ( - 894E677A07F5C23600C05327, - 894E679407F5C35D00C05327, - 894E679907F5C36E00C05327, - ); - isa = PBXGroup; - name = future; - path = ../../future; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 89C483A007F07194007FD3D0 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - path = iomanip.cpp; - refType = 4; - sourceTree = "<group>"; - }; 89C483A907F072F6007FD3D0 = { isa = PBXFileReference; --- 424,427 ---- *************** *** 682,694 **** buildActionMask = 2147483647; files = ( - 894E674407F5BB0500C05327, 894E67B007F5C7B000C05327, 894E67CC07F85CEC00C05327, 894E67CD07F85CF500C05327, - 894E67CE07F85CF800C05327, 894E67CF07F85CFB00C05327, 894E67D007F85CFD00C05327, 89323CF507FA39F300AB4B9B, - 89323D9B07FA74D900AB4B9B, ); isa = PBXSourcesBuildPhase; --- 600,609 ---- |
From: David C. <unc...@us...> - 2005-03-31 23:32:52
|
Update of /cvsroot/adobe-source/sandbox/adobe-source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2040/sandbox/adobe-source Modified Files: read_me.txt Log Message: XCode note Index: read_me.txt =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/read_me.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** read_me.txt 30 Mar 2005 22:38:57 -0000 1.3 --- read_me.txt 31 Mar 2005 23:32:44 -0000 1.4 *************** *** 15,18 **** --- 15,19 ---- Added boost patch file to the distro (thanks to Nick Kraft for pointing out the omission) Multiple documentation tweaks and enhancements + Added XCode projects for asl_lib, boost_lib, and Adobe Begin 2005/02/28 First public release! Lots of kinks to work out still, though. 2005/01/24 Many content-related documentation tweaks |
From: Foster B. <fos...@us...> - 2005-03-31 22:50:58
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10117/sources/mac Modified Files: main.cpp ui_core_implementation.cpp Log Message: began new mac metrics work Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac/main.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.cpp 30 Mar 2005 17:14:56 -0000 1.5 --- main.cpp 31 Mar 2005 22:50:43 -0000 1.6 *************** *** 345,348 **** --- 345,353 ---- InitCursor(); + // + // Register this app as an Appearance Client + // + RegisterAppearanceClient(); + return true; } Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac/ui_core_implementation.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ui_core_implementation.cpp 31 Mar 2005 18:51:01 -0000 1.5 --- ui_core_implementation.cpp 31 Mar 2005 22:50:44 -0000 1.6 *************** *** 27,30 **** --- 27,34 ---- /****************************************************************************************************/ + namespace adobe { + + /****************************************************************************************************/ + /* REVIST (sparent) : Need to file a bug report on this with Apple. Our default bounds is large *************** *** 33,42 **** are effected even if they are outside the group. */ - namespace adobe { - const Rect initial_bounds_g = { 0, 0, 2048, 2048 }; const CGRect cg_initial_bounds_g = ::CGRectMake(0, 0, 2048, 2048); ! } /****************************************************************************************************/ --- 37,46 ---- are effected even if they are outside the group. */ const Rect initial_bounds_g = { 0, 0, 2048, 2048 }; const CGRect cg_initial_bounds_g = ::CGRectMake(0, 0, 2048, 2048); ! /****************************************************************************************************/ ! ! } // namespace adobe /****************************************************************************************************/ *************** *** 52,55 **** --- 56,144 ---- /****************************************************************************************************/ + #if 0 + #pragma mark - + #endif + + /****************************************************************************************************/ + + inline long theme_metric(ThemeMetric metric) + { + SInt32 value(0); + + ::GetThemeMetric(metric, &value); + + return value; + } + + /****************************************************************************************************/ + + template <typename T> + adobe::rectangle_t widget_metrics(adobe::theme_t /*theme*/) + { return adobe::rectangle_t(); } + + /****************************************************************************************************/ + + template <> + adobe::rectangle_t widget_metrics<adobe::checkbox_t::implementation_t>(adobe::theme_t theme) + { + adobe::rectangle_t result; + + theme &= adobe::theme_mask_s; + + if (theme == adobe::theme_mini_s) + { + result.width() += theme_metric(kThemeMetricMiniCheckBoxWidth); + + result.height() += theme_metric(kThemeMetricMiniCheckBoxHeight); + } + else if (theme == adobe::theme_small_s) + { + result.width() += theme_metric(kThemeMetricSmallCheckBoxWidth); + + result.height() += theme_metric(kThemeMetricSmallCheckBoxHeight); + } + else // if (theme == adobe::theme_normal_s) + { + result.width() += theme_metric(kThemeMetricCheckBoxWidth); + + result.height() += theme_metric(kThemeMetricCheckBoxHeight); + } + + return result; + } + + /****************************************************************************************************/ + + std::string get_control_title(ControlRef control); + adobe::rectangle_t get_text_dimensions(const std::string& text, adobe::theme_t theme); + + /****************************************************************************************************/ + + template <typename T> + adobe::rectangle_t widget_measurement(const T& widget) + { + std::string name(get_control_title(widget.control_m)); + adobe::rectangle_t result(widget_metrics<T>(widget.theme_m)); + adobe::rectangle_t text(get_text_dimensions(name, widget.theme_m)); + + result.width() += text.width(); + + if (name.size()) + result.width() += gap; + + adobe::copy( text.slice_m[adobe::rectangle_slices_t::vertical].poi_m, + std::back_inserter(result.slice_m[adobe::rectangle_slices_t::vertical].poi_m)); + + return result; + } + + /****************************************************************************************************/ + + #if 0 + #pragma mark - + #endif + + /****************************************************************************************************/ + std::string cfstring_to_string(CFStringRef x) { *************** *** 316,324 **** geometry.slice_m[adobe::rectangle_slices_t::horizontal].length_m += fudges.left() + fudges.right(); ! // why did we do this? ! //geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.first += fudges.top(); ! //geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.second -= fudges.bottom() + fudges.top(); ! //geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.first += fudges.left(); ! //geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.second -= fudges.right() + fudges.left(); adobe::points_of_interest_t& poi(geometry.slice_m[adobe::rectangle_slices_t::vertical].poi_m); --- 405,414 ---- geometry.slice_m[adobe::rectangle_slices_t::horizontal].length_m += fudges.left() + fudges.right(); ! #if 0 ! geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.first += fudges.top(); ! geometry.slice_m[adobe::rectangle_slices_t::vertical].outset_m.second -= fudges.bottom() + fudges.top(); ! geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.first += fudges.left(); ! geometry.slice_m[adobe::rectangle_slices_t::horizontal].outset_m.second -= fudges.right() + fudges.left(); ! #endif adobe::points_of_interest_t& poi(geometry.slice_m[adobe::rectangle_slices_t::vertical].poi_m); *************** *** 333,337 **** position.second -= fudges.top(); position.first -= fudges.left(); ! geometry.height() -= fudges.bottom(); geometry.width() -= fudges.right(); --- 423,427 ---- position.second -= fudges.top(); position.first -= fudges.left(); ! geometry.height() -= fudges.bottom(); geometry.width() -= fudges.right(); *************** *** 2308,2313 **** assert(control_m); ! point_t position(pos); ! rectangle_t geometry(geo); shed_fudges(position, geometry, fudges_m); --- 2398,2403 ---- assert(control_m); ! point_t position(pos); ! rectangle_t geometry(geo); shed_fudges(position, geometry, fudges_m); *************** *** 2348,2351 **** --- 2438,2461 ---- set_widget_data(control_m, kControlEntireControl, kControlFontStyleTag, new_style, false); + + #if 0 + try + { + ControlSize control_size(kControlSizeNormal); + + switch ( theme & theme_mask_s ) + { + case theme_large_s: control_size = kControlSizeLarge; break; + //case theme_normal_s: control_size = kControlSizeNormal; break; + case theme_small_s: control_size = kControlSizeSmall; break; + case theme_mini_s: control_size = kControlSizeMini; break; + } + + // could throw -- we don't care + set_widget_data(control_m, kControlEntireControl, kControlSizeTag, control_size); + } + catch (...) + { } + #endif } *************** *** 3083,3088 **** { assert(control_m); ! ! rectangle_t result(_super::best_bounds()); if (get_control_title(control_m).empty()) --- 3193,3200 ---- { assert(control_m); ! #if 0 ! return widget_measurement(*this); ! #else ! rectangle_t result(_super::best_bounds()); if (get_control_title(control_m).empty()) *************** *** 3097,3101 **** temp.set_theme(theme_m); ! rectangle_t result2(temp.best_bounds()); points_of_interest_t& dst_poi(result.slice_m[rectangle_slices_t::vertical].poi_m); --- 3209,3213 ---- temp.set_theme(theme_m); ! rectangle_t result2(temp.best_bounds()); points_of_interest_t& dst_poi(result.slice_m[rectangle_slices_t::vertical].poi_m); *************** *** 3109,3112 **** --- 3221,3225 ---- return result; + #endif } |
From: Foster B. <fos...@us...> - 2005-03-31 22:15:30
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21693 Modified Files: image_size.eve Log Message: image_size got messed up; fixed Index: image_size.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/examples/image_size.eve,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** image_size.eve 31 Mar 2005 18:51:01 -0000 1.2 --- image_size.eve 31 Mar 2005 22:15:18 -0000 1.3 *************** *** 3,97 **** */ ! dialog(name: "Image Size", placement: place_row) { ! column() { ! size_group(bind: @byte_count, name: "Pixel Dimensions: ^", horizontal: align_fill, placement: place_row) { ! column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) { ! edit_number(name: "Height:", digits: 9, display_disable: true, ! touch: [ @doc_resolution ], ! units: [ { name: "pixels", bind: @dim_height_pixels, format: "#" }, ! { name: "percent", bind: @dim_height_percent, format: "#.00" } ]); ! } ! ! link(bind: @constrain, count: 2, value_on: true, value_off: false); ! } ! ! group(name: "Document Size:", horizontal: align_fill, placement: place_row) ! { ! column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) ! { ! edit_number(name: "Width:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_width_percent, format: "#.00" }, ! { name: "inches", bind: @doc_width_inches, format: "#.000" }, ! { name: "cm", bind: @doc_width_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_width_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_width_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_width_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_width_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Height:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_height_percent, format: "#.00" }, ! { name: "inches", bind: @doc_height_inches, format: "#.000" }, ! { name: "cm", bind: @doc_height_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_height_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_height_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_height_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_height_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Resolution:", digits: 9, ! format: "#.000", ! touch: [ @dim_width_pixels, @dim_height_pixels ], ! units: [ { name: "pixels/inch", bind: @doc_resolution }, ! { name: "pixels/cm", bind: @doc_resolution, scale: [0.393700787, 0.0 ] } ! ]); } ! ! overlay(vertical: align_fill) { ! link(bind: @resample, count: 3, value_on: false, value_off: true); ! link(bind: @constrain, count: 2, value_on: true, value_off: false); } ! } ! ! column(guide_balance: [@guide_baseline]) ! { ! checkbox(bind: @scale_styles, name: "Scale Styles"); ! checkbox(bind: @constrain, name: "Constrain Proportions"); ! row(spacing: 5) { ! checkbox(bind: @resample, name: "Resample Image:"); ! popup( bind: @resample_method, ! items: [ { name: "Nearest Neighbor", value: @nearest }, ! { name: "Bilinear", value: @bilinear }, ! { name: "Bicubic", value: @bicubic }, ! { name: "Bicubic Smoother", value: @bicubic_smoother }, ! { name: "Bicubic Sharper", value: @bicubic_sharper } ]); } } - } ! /* ! ! REVISIT (sparent) : Need to add variables to Eve2 for space_normal, space_small, space_large. ! ! */ ! column(child_horizontal: align_fill) ! { ! button(name: "OK", action: @ok, bind: @result, default: true); ! button( items: [ ! { name: "Cancel", action: @cancel }, ! { name: "Reset", action: @reset, modifiers: @opt } ! ]); ! ! button(name: "Auto...", action: @dialog, value: "image_size_auto.eve"); } } --- 3,110 ---- */ ! dialog(name: "Image Size", placement: place_column) { ! row() { ! column() { ! size_group(bind: @byte_count, name: "Pixel Dimensions: ^", horizontal: align_fill) { + row(horizontal: align_fill) + { + column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) + { + edit_number(name: "Width:", digits: 9, display_disable: true, + touch: [ @doc_resolution ], + units: [ { name: "pixels", bind: @dim_width_pixels, format: "#" }, + { name: "percent", bind: @dim_width_percent, format: "#.00" } ]); + + edit_number(name: "Height:", digits: 9, display_disable: true, + touch: [ @doc_resolution ], + units: [ { name: "pixels", bind: @dim_height_pixels, format: "#" }, + { name: "percent", bind: @dim_height_percent, format: "#.00" } ]); + } ! link(bind: @constrain, count: 2, value_on: true, value_off: false); ! } } ! ! group(name: "Document Size:", horizontal: align_fill) { ! row(horizontal: align_fill) ! { ! column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) ! { ! edit_number(name: "Width:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_width_percent, format: "#.00" }, ! { name: "inches", bind: @doc_width_inches, format: "#.000" }, ! { name: "cm", bind: @doc_width_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_width_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_width_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_width_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_width_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Height:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_height_percent, format: "#.00" }, ! { name: "inches", bind: @doc_height_inches, format: "#.000" }, ! { name: "cm", bind: @doc_height_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_height_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_height_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_height_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_height_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Resolution:", digits: 9, ! format: "#.000", ! touch: [ @dim_width_pixels, @dim_height_pixels ], ! units: [ { name: "pixels/inch", bind: @doc_resolution }, ! { name: "pixels/cm", bind: @doc_resolution, scale: [0.393700787, 0.0 ] } ! ]); ! } ! ! overlay(vertical: align_fill) ! { ! link(bind: @resample, count: 3, value_on: false, value_off: true); ! link(bind: @constrain, count: 2, value_on: true, value_off: false); ! } ! } } ! ! column(guide_balance: [@guide_baseline]) { ! checkbox(bind: @scale_styles, name: "Scale Styles"); ! checkbox(bind: @constrain, name: "Constrain Proportions"); ! row(spacing: 5) ! { ! checkbox(bind: @resample, name: "Resample Image:"); ! popup( bind: @resample_method, ! items: [ { name: "Nearest Neighbor", value: @nearest }, ! { name: "Bilinear", value: @bilinear }, ! { name: "Bicubic", value: @bicubic }, ! { name: "Bicubic Smoother", value: @bicubic_smoother }, ! { name: "Bicubic Sharper", value: @bicubic_sharper } ]); ! } } } ! /* ! ! REVISIT (sparent) : Need to add variables to Eve2 for space_normal, space_small, space_large. ! ! */ ! ! column(child_horizontal: align_fill) ! { ! button(name: "OK", action: @ok, bind: @result, default: true); ! button( items: [ ! { name: "Cancel", action: @cancel }, ! { name: "Reset", action: @reset, modifiers: @opt } ! ]); ! button(name: "Auto...", action: @dialog, value: "image_size_auto.eve"); ! } } } |
From: Foster B. <fos...@us...> - 2005-03-31 19:33:44
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/build/boost_lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27594/boost_lib Removed Files: Jamfile Log Message: removing outdated Jamfiles --- Jamfile DELETED --- |
From: Foster B. <fos...@us...> - 2005-03-31 19:33:44
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/build/asl_lib_dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27594/asl_lib_dev Removed Files: Jamfile Log Message: removing outdated Jamfiles --- Jamfile DELETED --- |
From: Foster B. <fos...@us...> - 2005-03-31 19:33:36
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/build/asl_lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27594/asl_lib Removed Files: Jamfile Log Message: removing outdated Jamfiles --- Jamfile DELETED --- |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:26
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe Modified Files: array.hpp Log Message: bug fixes, additions to array_t, documentation update Index: array.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/array.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** array.hpp 19 Mar 2005 00:16:38 -0000 1.1 --- array.hpp 31 Mar 2005 18:51:00 -0000 1.2 *************** *** 12,15 **** --- 12,25 ---- /*************************************************************************************************/ + // REVISIT (fbrereto) : GCC has a compiler bug when it comes to befriending a function inside + // another namespace. Herb Sutter has written an article about it: + // http://gcc.gnu.org/ml/gcc-prs/2002-10/msg01010.html -- This flag moves + // the array_get/array_set code out of the implementation namespace so it + // can compile under GCC. + + #define ADOBE_NAMESPACE_FRIEND_GCC_BUG 0 + + /*************************************************************************************************/ + #include <cstddef> #include <iterator> *************** *** 53,61 **** */ template <typename T> struct array_get; - /*************************************************************************************************/ - template <class T> array_t& array_set(array_t& object, std::size_t index, const T& value); --- 63,77 ---- */ + /*************************************************************************************************/ + + #if !defined(ADOBE_NO_DOCUMENTATION) + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + namespace implementation { + #endif + /*************************************************************************************************/ + template <typename T> struct array_get; template <class T> array_t& array_set(array_t& object, std::size_t index, const T& value); *************** *** 64,69 **** array_t& array_push_back(array_t& object, const T& value); ! template <class InputIterator> ! array_t array_ctor(InputIterator first, InputIterator last); /*************************************************************************************************/ --- 80,88 ---- array_t& array_push_back(array_t& object, const T& value); ! /*************************************************************************************************/ ! #if ADOBE_NAMESPACE_FRIEND_GCC_BUG ! } // namespace implementation ! #endif ! #endif /*************************************************************************************************/ *************** *** 74,78 **** class array_t : boost::equality_comparable<array_t> ! { public: #if !defined(ADOBE_NO_DOCUMENTATION) --- 93,97 ---- class array_t : boost::equality_comparable<array_t> ! { public: #if !defined(ADOBE_NO_DOCUMENTATION) *************** *** 91,100 **** typedef std::vector<value_t>::const_iterator const_iterator; ! #if defined(__GNUC__) || defined(BOOST_MSVC) ! // GCC won't compile without this: typedef const_iterator iterator; - // ../../third_party/boost_tp/boost/boost/range/iterator.hpp:37: error: no type - // named `iterator' in `const class adobe::array_t' - #endif #if !defined(ADOBE_NO_DOCUMENTATION) --- 110,119 ---- typedef std::vector<value_t>::const_iterator const_iterator; ! /* ! NOTE (sparent) : All iterators are const - an iterator typedef, however, is needed to meet ! the container requirements. ! */ ! typedef const_iterator iterator; #if !defined(ADOBE_NO_DOCUMENTATION) *************** *** 102,106 **** #endif ! typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // basic methods --- 121,126 ---- #endif ! typedef std::reverse_iterator<const_iterator> const_reverse_iterator; ! typedef const_reverse_iterator reverse_iterator; // basic methods *************** *** 115,126 **** explicit array_t(size_type n, const value_t& item = value_empty()); template <class InputIterator> ! array_t(InputIterator first, InputIterator last) ! { ! while (first != last) ! { ! push_back(value_t(*first++)); ! } ! } // read interface --- 135,145 ---- explicit array_t(size_type n, const value_t& item = value_empty()); + #if 0 + // REVISIT (sparent) : This constructor requires access to implementation - + // so we use a function form (copy) instead. + template <class InputIterator> ! array_t(InputIterator first, InputIterator last); ! #endif // read interface *************** *** 142,149 **** template <class T> array_t& set(size_type index, const T& value) ! { return array_set(*this, index, value); } template <class T> array_t& push_back(const T& value) ! { return array_push_back(*this, value); } class back_insert_iterator : public boost::output_iterator_helper<back_insert_iterator> --- 161,180 ---- template <class T> array_t& set(size_type index, const T& value) ! { ! #if ADOBE_NAMESPACE_FRIEND_GCC_BUG ! return implementation::array_set(*this, index, value); ! #else ! return array_set(*this, index, value); ! #endif ! } template <class T> array_t& push_back(const T& value) ! { ! #if ADOBE_NAMESPACE_FRIEND_GCC_BUG ! return implementation::array_push_back(*this, value); ! #else ! return array_push_back(*this, value); ! #endif ! } class back_insert_iterator : public boost::output_iterator_helper<back_insert_iterator> *************** *** 152,155 **** --- 183,190 ---- typedef value_t value_type; + template <typename T> + back_insert_iterator& operator = (const T& value) + { return operator = (value_type(value)); } + back_insert_iterator& operator = (const value_type& value); private: *************** *** 189,195 **** --- 224,236 ---- #if !defined(ADOBE_NO_DOCUMENTATION) private: + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + friend struct implementation::array_get<value_t>; + friend array_t& implementation::array_set<>(array_t& object, size_type index, const value_t& value); + friend array_t& implementation::array_push_back<>(array_t& object, const value_t& value); + #else friend struct array_get<value_t>; friend array_t& array_set<>(array_t& object, size_type index, const value_t& value); friend array_t& array_push_back<>(array_t& object, const value_t& value); + #endif friend class write_reference; *************** *** 198,218 **** adobe::copy_on_write<implementation_t> object_m; #endif ! }; /*************************************************************************************************/ class array_t::write_reference ! { public: value_t& operator[] (size_type index); ! protected: friend class array_t; write_reference(array_t& x) : ! fArray(x) { } ! private: ! array_t& fArray; ! }; /*************************************************************************************************/ --- 239,260 ---- adobe::copy_on_write<implementation_t> object_m; #endif ! }; /*************************************************************************************************/ class array_t::write_reference ! { public: value_t& operator[] (size_type index); ! ! private: friend class array_t; write_reference(array_t& x) : ! array_m(x) { } ! ! array_t& array_m; ! }; /*************************************************************************************************/ *************** *** 222,226 **** --- 264,273 ---- /*************************************************************************************************/ + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + namespace implementation { + #endif + /*************************************************************************************************/ + #if !defined(ADOBE_NO_DOCUMENTATION) template <> struct array_get<value_t> *************** *** 250,277 **** /*************************************************************************************************/ - template <class T> - inline const typename promote<T>::type& array_t::get(size_type index) const - { - return array_get<T>()(*this, index, select<T>()); - } - - template <class T> - inline void array_t::get(size_type index, T& value) const - { - array_get<T>()(*this, index, value); - } - - /*************************************************************************************************/ - - template <class InputIterator> - array_t array_ctor(InputIterator first, InputIterator last) - { - array_t result; - std::copy(first, last, result.back_inserter()); - return result; - } - - /*************************************************************************************************/ - template <> array_t& array_set(array_t&, array_t::size_type, const value_t&); --- 297,300 ---- *************** *** 289,292 **** --- 312,342 ---- array_t& array_push_back(array_t& object, const T& x) { return array_push_back(object, value_t(x)); } + #endif + + /*************************************************************************************************/ + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + } // namespace implementation + #endif + /*************************************************************************************************/ + + template <class T> + inline const typename promote<T>::type& array_t::get(size_type index) const + { + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + return implementation::array_get<T>()(*this, index, select<T>()); + #else + return array_get<T>()(*this, index, select<T>()); + #endif + } + + template <class T> + inline void array_t::get(size_type index, T& value) const + { + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + implementation::array_get<T>()(*this, index, value); + #else + array_get<T>()(*this, index, value); + #endif + } /*************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:22
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe/source Modified Files: array.cpp Log Message: bug fixes, additions to array_t, documentation update Index: array.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/array.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** array.cpp 19 Mar 2005 00:16:42 -0000 1.1 --- array.cpp 31 Mar 2005 18:51:01 -0000 1.2 *************** *** 53,56 **** --- 53,58 ---- /*************************************************************************************************/ + #if !defined(ADOBE_NO_DOCUMENTATION) + struct array_t::implementation_t { *************** *** 101,104 **** --- 103,108 ---- }; + #endif + /*************************************************************************************************/ *************** *** 108,112 **** --- 112,121 ---- /*************************************************************************************************/ + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + namespace implementation { + #endif + /*************************************************************************************************/ + #if !defined(ADOBE_NO_DOCUMENTATION) template <> array_t& array_set(array_t& object, array_t::size_type index, const value_t& x) *************** *** 132,137 **** --- 141,151 ---- object.object_m->get(index, x); } + #endif /*************************************************************************************************/ + #if ADOBE_NAMESPACE_FRIEND_GCC_BUG + } // namespace implementation + #endif + /*************************************************************************************************/ #ifdef __MWERKS__ *************** *** 234,238 **** value_t& array_t::write_reference::operator[](size_type index) ! { return fArray.get_value_reference(index); } /*************************************************************************************************/ --- 248,252 ---- value_t& array_t::write_reference::operator[](size_type index) ! { return array_m.get_value_reference(index); } /*************************************************************************************************/ |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:22
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe/test/visual/sources/mac Modified Files: ui_core_implementation.cpp Log Message: bug fixes, additions to array_t, documentation update Index: ui_core_implementation.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/sources/mac/ui_core_implementation.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ui_core_implementation.cpp 30 Mar 2005 17:17:11 -0000 1.4 --- ui_core_implementation.cpp 31 Mar 2005 18:51:01 -0000 1.5 *************** *** 13,21 **** #include "display.hpp" - #include <adobe/value.hpp> - #include <adobe/future/memory.hpp> - #include <adobe/future/enum_ops.hpp> #include <adobe/algorithm.hpp> #include <adobe/dictionary.hpp> #include <boost/type_traits.hpp> --- 13,23 ---- #include "display.hpp" #include <adobe/algorithm.hpp> + #include <adobe/array.hpp> #include <adobe/dictionary.hpp> + #include <adobe/value.hpp> + + #include <adobe/future/enum_ops.hpp> + #include <adobe/future/memory.hpp> #include <boost/type_traits.hpp> *************** *** 202,205 **** --- 204,221 ---- /****************************************************************************************************/ + + // REVISIT (sparent) : This seems useful enough that we might want to move it into array.hpp + + template <typename T1, typename T2> + inline adobe::array_t make_array(std::pair<T1, T2> p) + { + adobe::array_t a; + a.push_back(p.first); + a.push_back(p.second); + return a; + } + + /****************************************************************************************************/ + adobe::dictionary_t rectangle_slice_to_dictionary(const adobe::rectangle_t::slice_t& s) { *************** *** 214,217 **** --- 230,234 ---- if (s.poi_m.size()) { + #if 0 adobe::points_of_interest_t::const_iterator first(s.poi_m.begin()); adobe::points_of_interest_t::const_iterator last(s.poi_m.end()); *************** *** 219,223 **** for (; first != last; ++first) ! poi_array = adobe::array_push_back(poi_array, adobe::value_t(*first)); result.set(adobe::static_name_t("poi_set"), poi_array); --- 236,245 ---- for (; first != last; ++first) ! poi_array.push_back(*first); ! #endif ! ! adobe::array_t poi_array; ! ! adobe::copy(s.poi_m, poi_array.back_inserter()); result.set(adobe::static_name_t("poi_set"), poi_array); *************** *** 226,237 **** if (s.outset_m.first || s.outset_m.second) { ! adobe::array_t empty; ! result.set(adobe::static_name_t("outset"), adobe::array_push_back(adobe::array_push_back(empty, s.outset_m.first), s.outset_m.second)); } if (s.frame_m.first || s.outset_m.second) { ! adobe::array_t empty; ! result.set(adobe::static_name_t("frame"), adobe::array_push_back(adobe::array_push_back(empty, s.frame_m.first), s.frame_m.second)); } --- 248,257 ---- if (s.outset_m.first || s.outset_m.second) { ! result.set(adobe::static_name_t("outset"), make_array(s.outset_m)); } if (s.frame_m.first || s.outset_m.second) { ! result.set(adobe::static_name_t("frame"), make_array(s.frame_m)); } *************** *** 239,243 **** { adobe::array_t empty; ! result.set(adobe::static_name_t("inset"), adobe::array_push_back(adobe::array_push_back(empty, s.inset_m.first), s.inset_m.second)); } --- 259,263 ---- { adobe::array_t empty; ! result.set(adobe::static_name_t("inset"), make_array(s.inset_m)); } *************** *** 2684,2689 **** dict.set(static_name_t("name"), first->name_m); dict.set(static_name_t("value"), first->value_m); ! ! tab_array = array_push_back(tab_array, adobe::value_t(dict)); } --- 2704,2709 ---- dict.set(static_name_t("name"), first->name_m); dict.set(static_name_t("value"), first->value_m); ! ! tab_array.push_back(dict); } *************** *** 2902,2907 **** dict.set(static_name_t("modifiers"), first->modifiers_m); dict.set(static_name_t("value"), first->value_m); ! ! state_array = array_push_back(state_array, adobe::value_t(dict)); } --- 2922,2927 ---- dict.set(static_name_t("modifiers"), first->modifiers_m); dict.set(static_name_t("value"), first->value_m); ! ! state_array.push_back(dict); } *************** *** 4182,4186 **** dict.set(static_name_t("value"), first->second); ! popup_array = array_push_back(popup_array, adobe::value_t(dict)); } --- 4202,4206 ---- dict.set(static_name_t("value"), first->second); ! popup_array.push_back(dict); } |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:15
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/structure In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe/documentation/sources/structure Modified Files: contributing.dox Log Message: bug fixes, additions to array_t, documentation update Index: contributing.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/structure/contributing.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** contributing.dox 19 Mar 2005 00:16:42 -0000 1.1 --- contributing.dox 31 Mar 2005 18:51:01 -0000 1.2 *************** *** 2,21 **** We are very excited to allow other developers the opportunity to work on the Adobe Source Libraries with us. Here we will discuss the general guidelines we will use to manage the development and release of the Adobe Source Libraries. ! \section asl_contrib_guidelines Development Guidelines The fundamental philosophy by which we will manage development and contributions to the ASL is by a mainline/sandbox method. ! \subsection asl_contrib_guidelines_mainline The Mainline <code>./adobe-source</code> is the mainline trunk and is the latest official state of the Adobe Source Libraries. Currently Sean Parent and Foster Brereton will manage all the code changes that are made into this trunk. ! \subsection asl_contrib_guidelines_sandbox The Sandbox ! <code>./sandbox</code> is a sibling directory to <code>./adobe-source</code> and is the main location for hacking. The main sandbox branch will be in <code>./sandbox/adobe-source</code>. Developers are encouraged to collaborate with other developers on code, but branching of the sandboxes is also acceptable. Sub-branches should reside in the sandbox folder. ! \subsection asl_contrib_guidelines_review The Review Process In order to have code merged from a sandbox to the mainline, the code must undergo a formal review process. Basically all this means is that you notify Sean or Foster of a change you would like to have propagated to the mainline trunk. They will examine your changes, review them, and provide necessary changes or comments. If the suggestion is ultimately accepted, they will merge the change back to the mainline branch. Hopefully this results in an environment in which people are comfortable working, ultimately resulting in the best code we can produce as a community. Please let us know if you have any questions or comments- we would love to hear them. Thank you again for the interest you have expressed in the Adobe Source Libraries and the contributions you have made thus far! */ --- 2,31 ---- We are very excited to allow other developers the opportunity to work on the Adobe Source Libraries with us. Here we will discuss the general guidelines we will use to manage the development and release of the Adobe Source Libraries. ! \section asl_contrib_license_guidelines License Guidelines ! ! All code contributions must be under the MIT license and copyright of the Adobe opensource project. By contributing code you agree that we can distribute the contribution under the terms of the MIT license, that it can be distributed without any royalties, copyright, trademark, patent or other legal lock ups. Open source means no discrimination against any group or individual that may wish to use the code. ! ! \section asl_contrib_submit_guidelines Submission Guidelines The fundamental philosophy by which we will manage development and contributions to the ASL is by a mainline/sandbox method. ! \subsection asl_contrib_submit_mainline The Mainline <code>./adobe-source</code> is the mainline trunk and is the latest official state of the Adobe Source Libraries. Currently Sean Parent and Foster Brereton will manage all the code changes that are made into this trunk. ! \subsection asl_contrib_submit_sandbox The Sandbox ! <code>./sandbox</code> is a sibling directory to <code>./adobe-source</code> and is the main location for hacking. The main sandbox branch will be in <code>./sandbox/adobe-source</code>. Developers are encouraged to collaborate with other developers on code, but branching of the sandboxes is also acceptable. Sub-branches should reside in the sandbox folder. ! \subsection asl_contrib_submit_review The Review Process In order to have code merged from a sandbox to the mainline, the code must undergo a formal review process. Basically all this means is that you notify Sean or Foster of a change you would like to have propagated to the mainline trunk. They will examine your changes, review them, and provide necessary changes or comments. If the suggestion is ultimately accepted, they will merge the change back to the mainline branch. + \section asl_contrib_coding_guidelines When in Rome... + + Please try to keep the format of the code in line with the rest of the project. Code formatting is a highly-debated issue between programmers (even internally Adobe has many seasoned developers with widely differing formatting styles). We request code submissions to have as close to the same format as what is already present in the code base. Granted there are inconsistencies in the code base already- we are trying to keep it to a minimum going forward. + + \section asl_contrib_conclusion Conclusion + Hopefully this results in an environment in which people are comfortable working, ultimately resulting in the best code we can produce as a community. Please let us know if you have any questions or comments- we would love to hear them. Thank you again for the interest you have expressed in the Adobe Source Libraries and the contributions you have made thus far! */ |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:15
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe/test/visual/examples Modified Files: image_size.eve Log Message: bug fixes, additions to array_t, documentation update Index: image_size.eve =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/examples/image_size.eve,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** image_size.eve 19 Mar 2005 00:16:43 -0000 1.1 --- image_size.eve 31 Mar 2005 18:51:01 -0000 1.2 *************** *** 3,110 **** */ ! dialog(name: "Image Size", placement: place_column) { ! row() { ! column() { ! size_group(bind: @byte_count, name: "Pixel Dimensions: ^", horizontal: align_fill) { - row(horizontal: align_fill) - { - column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) - { - edit_number(name: "Width:", digits: 9, display_disable: true, - touch: [ @doc_resolution ], - units: [ { name: "pixels", bind: @dim_width_pixels, format: "#" }, - { name: "percent", bind: @dim_width_percent, format: "#.00" } ]); - - edit_number(name: "Height:", digits: 9, display_disable: true, - touch: [ @doc_resolution ], - units: [ { name: "pixels", bind: @dim_height_pixels, format: "#" }, - { name: "percent", bind: @dim_height_percent, format: "#.00" } ]); - } ! link(bind: @constrain, count: 2, value_on: true, value_off: false); ! } } ! ! group(name: "Document Size:", horizontal: align_fill) { ! row(horizontal: align_fill) ! { ! column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) ! { ! edit_number(name: "Width:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_width_percent, format: "#.00" }, ! { name: "inches", bind: @doc_width_inches, format: "#.000" }, ! { name: "cm", bind: @doc_width_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_width_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_width_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_width_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_width_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Height:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_height_percent, format: "#.00" }, ! { name: "inches", bind: @doc_height_inches, format: "#.000" }, ! { name: "cm", bind: @doc_height_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_height_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_height_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_height_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_height_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Resolution:", digits: 9, ! format: "#.000", ! touch: [ @dim_width_pixels, @dim_height_pixels ], ! units: [ { name: "pixels/inch", bind: @doc_resolution }, ! { name: "pixels/cm", bind: @doc_resolution, scale: [0.393700787, 0.0 ] } ! ]); ! } ! ! overlay(vertical: align_fill) ! { ! link(bind: @resample, count: 3, value_on: false, value_off: true); ! link(bind: @constrain, count: 2, value_on: true, value_off: false); ! } ! } } ! ! column(guide_balance: [@guide_baseline]) { ! checkbox(bind: @scale_styles, name: "Scale Styles"); ! checkbox(bind: @constrain, name: "Constrain Proportions"); ! row(spacing: 5) ! { ! checkbox(bind: @resample, name: "Resample Image:"); ! popup( bind: @resample_method, ! items: [ { name: "Nearest Neighbor", value: @nearest }, ! { name: "Bilinear", value: @bilinear }, ! { name: "Bicubic", value: @bicubic }, ! { name: "Bicubic Smoother", value: @bicubic_smoother }, ! { name: "Bicubic Sharper", value: @bicubic_sharper } ]); ! } } } ! ! /* ! ! REVISIT (sparent) : Need to add variables to Eve2 for space_normal, space_small, space_large. ! ! */ ! ! column(child_horizontal: align_fill) { ! button(name: "OK", action: @ok, bind: @result, default: true); ! button( items: [ ! { name: "Cancel", action: @cancel }, ! { name: "Reset", action: @reset, modifiers: @opt } ! ]); ! ! button(name: "Auto...", action: @dialog, value: "image_size_auto.eve"); } } } --- 3,97 ---- */ ! dialog(name: "Image Size", placement: place_row) { ! column() { ! size_group(bind: @byte_count, name: "Pixel Dimensions: ^", horizontal: align_fill, placement: place_row) { ! column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) { ! edit_number(name: "Height:", digits: 9, display_disable: true, ! touch: [ @doc_resolution ], ! units: [ { name: "pixels", bind: @dim_height_pixels, format: "#" }, ! { name: "percent", bind: @dim_height_percent, format: "#.00" } ]); } ! ! link(bind: @constrain, count: 2, value_on: true, value_off: false); ! } ! ! group(name: "Document Size:", horizontal: align_fill, placement: place_row) ! { ! column(guide_mask: [ ], horizontal: align_fill, child_horizontal: align_fill) { ! edit_number(name: "Width:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_width_percent, format: "#.00" }, ! { name: "inches", bind: @doc_width_inches, format: "#.000" }, ! { name: "cm", bind: @doc_width_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_width_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_width_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_width_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_width_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Height:", digits: 9, ! touch: [ @doc_resolution ], ! units: [ { name: "percent", bind: @doc_height_percent, format: "#.00" }, ! { name: "inches", bind: @doc_height_inches, format: "#.000" }, ! { name: "cm", bind: @doc_height_inches, scale: [2.54, 0.0 ], format: "#.00" }, ! { name: "mm", bind: @doc_height_inches, scale: [ 25.4, 0.0 ], format: "#.0" }, ! { name: "points", bind: @doc_height_inches, scale: [ 72, 0 ], format: "#.0" }, ! { name: "picas", bind: @doc_height_inches, scale: [ 6, 0.0 ], format: "#.00" }, ! { name: "columns", bind: @doc_height_inches, scale: [ 1, 0.0 ], format: "#.000" } ! ]); ! ! edit_number(name: "Resolution:", digits: 9, ! format: "#.000", ! touch: [ @dim_width_pixels, @dim_height_pixels ], ! units: [ { name: "pixels/inch", bind: @doc_resolution }, ! { name: "pixels/cm", bind: @doc_resolution, scale: [0.393700787, 0.0 ] } ! ]); } ! ! overlay(vertical: align_fill) { ! link(bind: @resample, count: 3, value_on: false, value_off: true); ! link(bind: @constrain, count: 2, value_on: true, value_off: false); } } ! ! column(guide_balance: [@guide_baseline]) { ! checkbox(bind: @scale_styles, name: "Scale Styles"); ! checkbox(bind: @constrain, name: "Constrain Proportions"); ! row(spacing: 5) ! { ! checkbox(bind: @resample, name: "Resample Image:"); ! popup( bind: @resample_method, ! items: [ { name: "Nearest Neighbor", value: @nearest }, ! { name: "Bilinear", value: @bilinear }, ! { name: "Bicubic", value: @bicubic }, ! { name: "Bicubic Smoother", value: @bicubic_smoother }, ! { name: "Bicubic Sharper", value: @bicubic_sharper } ]); ! } } } + + /* + + REVISIT (sparent) : Need to add variables to Eve2 for space_normal, space_small, space_large. + + */ + + column(child_horizontal: align_fill) + { + button(name: "OK", action: @ok, bind: @result, default: true); + button( items: [ + { name: "Cancel", action: @cancel }, + { name: "Reset", action: @reset, modifiers: @opt } + ]); + + button(name: "Auto...", action: @dialog, value: "image_size_auto.eve"); + } } |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:14
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/related In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe/documentation/sources/asl/related Modified Files: adam_language_reference.dox Log Message: bug fixes, additions to array_t, documentation update Index: adam_language_reference.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/related/adam_language_reference.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** adam_language_reference.dox 19 Mar 2005 00:16:41 -0000 1.1 --- adam_language_reference.dox 31 Mar 2005 18:51:01 -0000 1.2 *************** *** 49,53 **** \endverbatim ! \subsection cell_qualifiers Cell Qualifiers \subsection initialization Initialization --- 49,54 ---- \endverbatim ! \subsection cell_qualifiers Cell Access Specifiers ! \subsection initialization Initialization |
From: Foster B. <fos...@us...> - 2005-03-31 18:51:14
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4121/adobe/documentation/sources/asl Modified Files: array_t.dox Log Message: bug fixes, additions to array_t, documentation update Index: array_t.dox =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/documentation/sources/asl/array_t.dox,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** array_t.dox 19 Mar 2005 00:16:41 -0000 1.1 --- array_t.dox 31 Mar 2005 18:51:00 -0000 1.2 *************** *** 3,7 **** \ingroup asl_libraries ! \brief A copy-on-write array of <code>adobe::value_t</code>s. array_t is an array of heterogeneous types. array_t is copy-on-write, intended for usage where copies are frequent, but writing is infrequent. Constructing an empty array will never throw an exception - no allocations are required until something is stored into it. Likewise, copying with assignment or copy constructor will not throw. --- 3,7 ---- \ingroup asl_libraries ! \brief A copy-on-write array of <code>adobe::value_t</code>. array_t is an array of heterogeneous types. array_t is copy-on-write, intended for usage where copies are frequent, but writing is infrequent. Constructing an empty array will never throw an exception - no allocations are required until something is stored into it. Likewise, copying with assignment or copy constructor will not throw. *************** *** 13,17 **** When copy-on-write semantics are not important, it is advised to use <code>std::vector<adobe::value_t></code> or another container type instead of array_t. ! \todo (sparent) We don't have all the random access iterator requirements met yet. \tutorial --- 13,18 ---- When copy-on-write semantics are not important, it is advised to use <code>std::vector<adobe::value_t></code> or another container type instead of array_t. ! \note ! \anchor _1 [1] Because an array_t is copy-on-write, modifications through an iterator are not supported except via back_insert_iterator. \tutorial *************** *** 31,72 **** /*! \typedef adobe::array_t::value_type ! The type of object, <code>T</code>, stored in the <code>array_t</code>. */ /*! \typedef adobe::array_t::reference ! Reference to <code>T</code>. */ /*! \typedef adobe::array_t::const_reference ! Const reference to <code>T</code>. */ /*! \typedef adobe::array_t::pointer ! Pointer to <code>T</code>. */ /*! \typedef adobe::array_t::const_pointer ! Const pointer to <code>T</code>. */ /*! ! \typedef adobe::array_t::const_reverse_iterator ! Const reverse_iterator into elements in the array. */ /*! ! \fn adobe::array_t::array_t(size_type n, const value_t& item) ! Initializes the array_t with <code>n</code> items of value <code>item</code>. */ /*! ! \fn adobe::array_t::array_t(InputIterator first, InputIterator last) ! Copies the elements within <code>(first, last]</code> into the array. */ --- 32,82 ---- /*! \typedef adobe::array_t::value_type ! The type of object, <code>adobe::value_t</code>, stored in the <code>array_t</code>. */ /*! \typedef adobe::array_t::reference ! Reference to <code>adobe::value_t</code>. */ /*! \typedef adobe::array_t::const_reference ! Const reference to <code>adobe::value_t</code>. */ /*! \typedef adobe::array_t::pointer ! Pointer to <code>adobe::value_t</code>. */ /*! \typedef adobe::array_t::const_pointer ! Const pointer to <code>adobe::value_t</code>. */ /*! ! \typedef adobe::array_t::iterator ! A random access iterator for the array \ref _1 "[1]". */ /*! ! \typedef adobe::array_t::const_iterator ! Equivalent to <code>array_t::iterator</code>. ! */ ! /*! ! \typedef adobe::array_t::reverse_iterator ! A reverse iterator into the array \ref _1 "[1]". */ /*! ! \typedef adobe::array_t::const_reverse_iterator ! Equivalent to <code>array_t:: reverse_iterator</code>. ! */ ! /*! ! \fn adobe::array_t::array_t(size_type n, const value_t& item) ! ! Initializes the array_t with <code>n</code> items of value <code>item</code>. */ *************** *** 270,271 **** --- 280,293 ---- <code>true</code> if this array is the only one referrring to its implementation instance (i.e., the implementation instance is currently not being shared). <code>false</code> otherwise. */ + + /*! + \class adobe::array_t::back_insert_iterator array.hpp <adobe/array.hpp> + \ingroup asl_libraries + + \brief a back insert iterator for appending to array_t. + + Assignment through a <code>back_insert_iterator</code> will insert an object after the last element of an <code>array_t</code>. + + \model_of + - \ref output_iterator + */ |