From: Foster B. <fos...@us...> - 2006-02-27 20:42:13
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/modal_dialog_interface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667/adobe/test/modal_dialog_interface Modified Files: main.cpp Log Message: image_t (icons and pictures) support for Mac and Win32, along with a GIL image factory and a (sample) Targa file format importing module for that factory. Also added alert.adm/eve as a sample for the icon support. Added the notion of a working directory to the modal dialog interface to reference external resources. Also added an alert API that leverages modal_dialog_interface. Other misc. bug fixes and changes. Index: main.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/modal_dialog_interface/main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.cpp 3 Feb 2006 18:33:39 -0000 1.2 --- main.cpp 27 Feb 2006 20:42:00 -0000 1.3 *************** *** 8,12 **** #include <adobe/future/modal_dialog_interface.hpp> - #include <adobe/xstring.hpp> #if ADOBE_PLATFORM_MAC --- 8,11 ---- *************** *** 123,207 **** /****************************************************************************************************/ ! #if ADOBE_PLATFORM_MAC ! const char* mac_metrics_g = ! "<xstr id='metric:global'>{ gap: 4 }</xstr>" ! "" ! "<xstr id='metric:checkbox' theme='normal'>" ! " { size: [ 16, 14 ], adjust_size: [ 2, 0 ], spacing: 5, adjust_position: [ -2, 0 ], outset: [ 1, 2, 0, 1 ], adjust_baseline: -1 }</xstr>" ! "<xstr id='metric:checkbox' theme='small'>" ! " { size: [ 13, 12 ], adjust_size: [ 1, 0 ], spacing: 7, adjust_position: [ -1, 0 ], outset: [ 1, 2, 0, 1 ], adjust_baseline: -1 }</xstr>" ! "<xstr id='metric:checkbox' theme='mini'>" ! " { size: [ 10, 10 ], spacing: 4, outset: [ 0, 1, 0, 0 ], adjust_baseline: -1 }</xstr>" ! "" ! "<xstr id='metric:radio_button' theme='normal'>" ! " { size: [ 19, 16 ], adjust_size: [ 5, 1 ], spacing: 4, adjust_position: [ -2, -1 ], outset: [ 1, 0, 1, 1 ], adjust_baseline: -1 }</xstr>" ! "<xstr id='metric:radio_button' theme='small'>" ! " { size: [ 14, 13 ], spacing: 4, outset: [ 0, 0, 0, 1 ] }</xstr>" ! "<xstr id='metric:radio_button' theme='mini'>" ! " { size: [ 10, 10 ], spacing: 4, adjust_position: [ 0, 1 ], outset: [ 0, 0, 0, 1 ] }</xstr>" ! "" ! "<xstr id='metric:button' theme='normal'>" ! " { size: [ 20, 21 ], adjust_baseline: 2, outset: [ 1, 0, 1, 2 ] }</xstr>" ! "<xstr id='metric:button' theme='small'>" ! " { size: [ 20, 18 ], adjust_size: [ -2, 0 ], adjust_position: [ 1, -1 ], outset: [ 0, 0, 0, 1 ], adjust_baseline: 2 }</xstr>" ! "<xstr id='metric:button' theme='mini'>" ! " { size: [ 20, 15 ], adjust_size: [ 2, 0 ], adjust_position: [ -1, 0 ], outset: [ 1, 0, 1, 1 ], adjust_baseline: 2 }</xstr>" ! "" ! "<xstr id='metric:group' label='true' theme='normal'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 14, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='true' theme='small'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 14, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='true' theme='mini'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 12, 1, 1 ] }</xstr>" ! "" ! "<xstr id='metric:group' label='false' theme='normal'>" ! " { size: [ 0, 0 ], frame: [ 1, 1, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='false' theme='small'>" ! " { size: [ 0, 0 ], frame: [ 1, 1, 1, 1 ] }</xstr>" ! "<xstr id='metric:group' label='false' theme='mini'>" ! " { size: [ 0, 0 ], frame: [ 1, 1, 1, 1 ] }</xstr>" ! "" ! "<xstr id='metric:tab_group' theme='normal'>" ! " { size: [ 0, 0 ], adjust_size: [ 0 , 8 ], adjust_position: [ 0, -7 ], frame: [ 1, 21, 1, 1 ] }</xstr>" ! "<xstr id='metric:tab_group' theme='small'>" ! " { size: [ 0, 0 ], adjust_size: [ 0 , 5 ], adjust_position: [ 0, -4 ], frame: [ 1, 18, 1, 1 ] }</xstr>" ! "<xstr id='metric:tab_group' theme='mini'>" ! " { size: [ 0, 0 ], adjust_size: [ 0 , 3 ], adjust_position: [ 0, -2 ], frame: [ 1, 15, 1, 1 ] }</xstr>" ! "" ! "<xstr id='metric:static_text' theme='normal'>" ! " { size: [ 0, 16 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -3 ], adjust_baseline: -3 }</xstr>" ! "<xstr id='metric:static_text' theme='small'>" ! " { size: [ 0, 15 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], adjust_baseline: -2 }</xstr>" ! "<xstr id='metric:static_text' theme='mini'>" ! " { size: [ 0, 12 ], adjust_size: [ 0, 3 ], adjust_position: [ 0, -2 ], adjust_baseline: -2 }</xstr>" ! "" ! "<xstr id='metric:edit_text' scroll='false' theme='normal'>" ! " { size: [ 3, 16 ], adjust_size: [ -6, -6 ], adjust_position: [ 3, 3 ], outset: [ 3, 3, 3, 3 ], adjust_baseline: 3 }</xstr>" ! "<xstr id='metric:edit_text' scroll='false' theme='small'>" ! " { size: [ 3, 14 ], adjust_size: [ -6, -6 ], adjust_position: [ 3, 3 ], outset: [ 3, 3, 3, 3 ], adjust_baseline: 3 }</xstr>" ! "<xstr id='metric:edit_text' scroll='false' theme='mini'>" ! " { size: [ 3, 12 ], adjust_size: [ -6, -6 ], adjust_position: [ 3, 3 ], outset: [ 3, 3, 3, 3 ], adjust_baseline: 3 }</xstr>" ! "" ! "<xstr id='metric:edit_text' scroll='true' theme='normal'>" ! " { size: [ 16, 16 ] }</xstr>" ! "<xstr id='metric:edit_text' scroll='true' theme='small'>" ! " { size: [ 16, 16 ] }</xstr>" ! "<xstr id='metric:edit_text' scroll='true' theme='mini'>" ! " { size: [ 16, 16 ] }</xstr>" ! "" ! "<xstr id='metric:popup' label='false' theme='normal'>" ! " { adjust_size: [ 1, -1 ], adjust_position: [ -1, 0 ], outset: [ 1, 0, 1, 1 ] }</xstr>" ! "<xstr id='metric:popup' label='false' theme='small'>" ! " { adjust_size: [ 1, -1 ], adjust_position: [ 1, 0 ], outset: [ 1, 0, 1, 1 ], adjust_baseline: 1 }</xstr>" ! "<xstr id='metric:popup' label='false' theme='mini'>" ! " { adjust_size: [ 2, 0 ], adjust_position: [ -1, 0 ] }</xstr>" ! "" ! "<xstr id='metric:popup' label='true' theme='normal'>" ! " { adjust_size: [ 0, -1 ], outset: [ 0, 0, 1, 1 ] }</xstr>" ! "<xstr id='metric:popup' label='true' theme='small'>" ! " { adjust_size: [ 1, -1 ], adjust_position: [ 0, 0 ], outset: [ 0, 0, 1, 1 ], adjust_baseline: 1 }</xstr>" ! "<xstr id='metric:popup' label='true' theme='mini'>" ! " { adjust_size: [ 1, 0 ] }</xstr>"; ! #endif /****************************************************************************************************/ --- 122,129 ---- /****************************************************************************************************/ ! bool always_true(adobe::name_t name, const adobe::value_t& value) ! { ! return true; ! } /****************************************************************************************************/ *************** *** 219,223 **** adobe::dialog_display_s, eve_stream, ! adam_stream); return result; --- 141,146 ---- adobe::dialog_display_s, eve_stream, ! adam_stream, ! &always_true); return result; *************** *** 288,301 **** try { - #if ADOBE_PLATFORM_MAC - std::size_t metrics_len(std::strlen(mac_metrics_g)); - char* metrics_data(new char[metrics_len] + 1); - - std::copy(&mac_metrics_g[0], &mac_metrics_g[0] + metrics_len, &metrics_data[0]); - - adobe::xstring_context_t mac_metrics_context( &metrics_data[0], &metrics_data[metrics_len], - adobe::line_position_t( "mac metrics" ) ); - #endif - if (!os_init()) throw std::runtime_error("OS initialization failed"); --- 211,214 ---- |