From: Foster B. <fos...@us...> - 2006-02-03 18:34:24
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6755/adobe/test/begin/headers Modified Files: express_viewer.hpp latch.hpp report_exception.hpp Log Message: asl 1.0.13 Index: latch.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/headers/latch.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** latch.hpp 6 Jan 2006 18:03:01 -0000 1.3 --- latch.hpp 3 Feb 2006 18:33:38 -0000 1.4 *************** *** 1,11 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_LATCH_HPP #define ADOBE_LATCH_HPP --- 1,11 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ /****************************************************************************************************/ ! #ifndef ADOBE_LATCH_HPP #define ADOBE_LATCH_HPP *************** *** 26,81 **** struct latch_t { ! typedef ValueType value_type; ! typedef boost::function<void (const value_type&, bool)> trigger_t; ! typedef boost::function<void (bool)> valid_t; ! template <typename TriggerFunction, typename ValidFunction> ! latch_t(const TriggerFunction& trigger, const ValidFunction& valid) : ! trigger_m(trigger), valid_m(valid), force_m(true) ! { } ! latch_t(const latch_t&) : force_m(true) ! { } ! latch_t& operator = (const latch_t&) ! { ! // Clear connections on copy ! force_m = false; ! trigger_m = trigger_t(); ! valid_m = valid_t(); ! return *this; ! } ! template <typename TriggerFunction, typename ValidFunction> ! void attach(const TriggerFunction& trigger, const ValidFunction& valid) ! { ! trigger_m = trigger; ! valid_m = valid; ! } ! void set_value(const value_t& new_value, bool is_valid) ! { ! if (is_valid != is_valid_m || force_m) valid_m(is_valid); ! value_m = new_value; ! is_valid_m = is_valid; ! force_m = false; ! } ! void trigger() const ! { ! /* REVISIT (sparent) : should this conditional simply be a pre-condition */ ! if (!force_m) trigger_m(value_m, is_valid_m); ! } private: ! value_type value_m; ! bool is_valid_m; ! bool force_m; ! trigger_t trigger_m; ! valid_t valid_m; }; --- 26,81 ---- struct latch_t { ! typedef ValueType value_type; ! typedef boost::function<void (const value_type&, bool)> trigger_t; ! typedef boost::function<void (bool)> valid_t; ! template <typename TriggerFunction, typename ValidFunction> ! latch_t(const TriggerFunction& trigger, const ValidFunction& valid) : ! trigger_m(trigger), valid_m(valid), force_m(true) ! { } ! latch_t(const latch_t&) : force_m(true) ! { } ! latch_t& operator = (const latch_t&) ! { ! // Clear connections on copy ! force_m = false; ! trigger_m = trigger_t(); ! valid_m = valid_t(); ! return *this; ! } ! template <typename TriggerFunction, typename ValidFunction> ! void attach(const TriggerFunction& trigger, const ValidFunction& valid) ! { ! trigger_m = trigger; ! valid_m = valid; ! } ! void set_value(const value_t& new_value, bool is_valid) ! { ! if (is_valid != is_valid_m || force_m) valid_m(is_valid); ! value_m = new_value; ! is_valid_m = is_valid; ! force_m = false; ! } ! void trigger() const ! { ! /* REVISIT (sparent) : should this conditional simply be a pre-condition */ ! if (!force_m) trigger_m(value_m, is_valid_m); ! } private: ! value_type value_m; ! bool is_valid_m; ! bool force_m; ! trigger_t trigger_m; ! valid_t valid_m; }; Index: report_exception.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/headers/report_exception.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** report_exception.hpp 24 Jan 2006 19:38:50 -0000 1.4 --- report_exception.hpp 3 Feb 2006 18:33:38 -0000 1.5 *************** *** 1,6 **** /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ --- 1,6 ---- /* ! Copyright 2005-2006 Adobe Systems Incorporated ! Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt ! or a copy at http://opensource.adobe.com/licenses.html) */ *************** *** 43,63 **** inline void report_exception() { ! std::string err("Exception: "); ! try { throw; } ! catch (const adobe::stream_error_t& error) ! { ! err += format_stream_error(error); ! } ! catch (const std::exception& error) ! { ! err += error.what(); ! } ! catch (...) ! { ! err += "Unknown."; ! } ! adobe::report_ui_element_error(err); } --- 43,63 ---- inline void report_exception() { ! std::string err("Exception: "); ! try { throw; } ! catch (const adobe::stream_error_t& error) ! { ! err += format_stream_error(error); ! } ! catch (const std::exception& error) ! { ! err += error.what(); ! } ! catch (...) ! { ! err += "Unknown."; ! } ! adobe::report_ui_element_error(err); } Index: express_viewer.hpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/begin/headers/express_viewer.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** express_viewer.hpp 24 Jan 2006 19:38:50 -0000 1.7 --- express_viewer.hpp 3 Feb 2006 18:33:38 -0000 1.8 *************** *** 1,6 **** /* ! 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) */ --- 1,6 ---- /* ! 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) */ *************** *** 40,51 **** /// demo application. /// ! /// \param stream the stream to extract data from. ! /// \return all of the data in the stream. // /* ! REVISIT (sparent) : The lf handling should be moved down into where ever this data is going - ! In this case into a UI widget. The general rule should everything should be agnostic about ! line endings on read. And everything should write Unix style (just '\n') line endings. */ --- 40,51 ---- /// demo application. /// ! /// \param stream the stream to extract data from. ! /// \return all of the data in the stream. // /* ! REVISIT (sparent) : The lf handling should be moved down into where ever this data is going - ! In this case into a UI widget. The general rule should everything should be agnostic about ! line endings on read. And everything should write Unix style (just '\n') line endings. */ *************** *** 54,83 **** { #if ADOBE_PLATFORM_MAC ! const char platform_lf('\r'); #else ! const char platform_lf('\n'); // Windows seems to handle this fine #endif ! std::string result; ! if ( stream.is_open() ) ! { ! stream.unsetf(std::ios_base::skipws); ! ! std::istream_iterator<char> first(stream); ! std::istream_iterator<char> last; ! ! while (first != last) { ! if (is_line_end(first, last)) ! { ! result.append(1, platform_lf); ! continue; ! } ! result.append(1, *first); ! ++first; ! } ! } ! return result; } --- 54,83 ---- { #if ADOBE_PLATFORM_MAC ! const char platform_lf('\r'); #else ! const char platform_lf('\n'); // Windows seems to handle this fine #endif ! std::string result; ! if ( stream.is_open() ) ! { ! stream.unsetf(std::ios_base::skipws); ! ! std::istream_iterator<char> first(stream); ! std::istream_iterator<char> last; ! ! while (first != last) { ! if (is_line_end(first, last)) ! { ! result.append(1, platform_lf); ! continue; ! } ! result.append(1, *first); ! ++first; ! } ! } ! return result; } *************** *** 89,260 **** { public: ! enum line_ending_t ! { ! line_ending_unknown_k = 0, ! line_ending_platform_k = 1 << 0L, ! line_ending_unix_k = 1 << 1L, // LF ! line_ending_windows_k = 1 << 2L, // CR+LF ! line_ending_mac_os_classic_k = 1 << 3L, // CR ! line_ending_mac_os_x_k = line_ending_unix_k // LF ! }; ! typedef boost::function<void (bool)> dirty_proc_t; ! file_buffer_t() : ! le_m(line_ending_unknown_k) ! { } ! void set_path(const boost::filesystem::path& path) ! { ! path_m = path; ! adobe::file_slurp<char> slurp(path_m); ! contents_m.assign(slurp.begin(), slurp.end()); ! set_line_endings_impl(le_m, true); ! set_dirty(false); ! } ! // NOTE (fbrereto) : Mat Marcus made me do it! ! const boost::filesystem::path& get_path() const ! { return path_m; } ! template <typename I> ! void set_contents(I first, I last) ! { ! contents_m.assign(first, last); ! set_dirty(true); ! } ! inline void set_line_endings(line_ending_t le, bool force = false) ! { ! set_line_endings_impl(le, force); ! set_dirty(true); ! } ! void save() ! { ! if (!dirty_m) return; ! bfs::ofstream output( path_m, std::ios_base::out | std::ios_base::binary ); ! // ! // Verify that we were able to open the file for writing. ! // ! if ( output.fail() ) ! throw std::runtime_error( "Error opening file for writing: \"" ! + path_m.string() + "\"" ); ! if (le_m == line_ending_unknown_k) ! set_line_endings(le_m); ! output << contents_m; ! set_dirty(false); ! } ! void monitor_dirty(dirty_proc_t proc) ! { dirty_proc_m = proc; } ! bfs::path directory_path() const ! { return path_m.branch_path(); } ! const char* file_name() const ! { ! return path_m.string().c_str(); ! } ! bool valid() const ! { return bfs::exists(path_m); } ! inline const std::string& as_string() const ! { return contents_m; } private: ! void set_dirty(bool to) ! { ! if (dirty_m == to) return; ! dirty_m = to; ! if (dirty_proc_m) ! dirty_proc_m(dirty_m); ! } ! void replace_all(const char* src, const char* dst) ! { ! // replaces all instances of src with dst ! std::string::size_type result(0); ! std::size_t src_n(std::strlen(src)); ! std::size_t dst_n(std::strlen(dst)); ! while (true) ! { ! result = contents_m.find(src, result); ! if (result == std::string::npos) break; ! contents_m.replace(result, src_n, dst, dst_n); ! result += dst_n; ! } ! } ! void set_line_endings_impl(line_ending_t le, bool force = false) ! { ! if (le_m == le && !force && ! le_m != line_ending_unknown_k) return; ! if (le == line_ending_platform_k || le == line_ending_unknown_k) ! { #if ADOBE_PLATFORM_WIN ! le_m = line_ending_windows_k; #else ! le_m = line_ending_unix_k; #endif ! } ! else ! { ! le_m = le; ! } ! // REVISIT (fbrereto) : Not as optimal as it could be. ! if (le_m == line_ending_unix_k) ! { ! replace_all("\r\n", "\n"); ! replace_all("\r", "\n"); ! } ! else if (le_m == line_ending_windows_k) ! { ! replace_all("\r\n", "\n"); ! replace_all("\r", "\n"); ! replace_all("\n", "\r\n"); ! } ! else if (le_m == line_ending_mac_os_classic_k) ! { ! replace_all("\r\n", "\r"); ! replace_all("\n", "\r"); ! } ! else ! throw std::runtime_error("unknown line ending type"); ! // set line endings back to 'unknown' if ! // that's what they were originally ! if (le == line_ending_unknown_k) le_m = line_ending_unknown_k; ! } ! bfs::path path_m; ///< Path to the current file ! std::string contents_m; ///< Contents of the file (not necessarily same as that in file) ! bool dirty_m; ///< Dirty bit ! dirty_proc_t dirty_proc_m; ///< Dirty bit modification notifier ! line_ending_t le_m; ///< Line ending flags }; --- 89,260 ---- { public: ! enum line_ending_t ! { ! line_ending_unknown_k = 0, ! line_ending_platform_k = 1 << 0L, ! line_ending_unix_k = 1 << 1L, // LF ! line_ending_windows_k = 1 << 2L, // CR+LF ! line_ending_mac_os_classic_k = 1 << 3L, // CR ! line_ending_mac_os_x_k = line_ending_unix_k // LF ! }; ! typedef boost::function<void (bool)> dirty_proc_t; ! file_buffer_t() : ! le_m(line_ending_unknown_k) ! { } ! void set_path(const boost::filesystem::path& path) ! { ! path_m = path; ! adobe::file_slurp<char> slurp(path_m); ! contents_m.assign(slurp.begin(), slurp.end()); ! set_line_endings_impl(le_m, true); ! set_dirty(false); ! } ! // NOTE (fbrereto) : Mat Marcus made me do it! ! const boost::filesystem::path& get_path() const ! { return path_m; } ! template <typename I> ! void set_contents(I first, I last) ! { ! contents_m.assign(first, last); ! set_dirty(true); ! } ! inline void set_line_endings(line_ending_t le, bool force = false) ! { ! set_line_endings_impl(le, force); ! set_dirty(true); ! } ! void save() ! { ! if (!dirty_m) return; ! bfs::ofstream output( path_m, std::ios_base::out | std::ios_base::binary ); ! // ! // Verify that we were able to open the file for writing. ! // ! if ( output.fail() ) ! throw std::runtime_error( "Error opening file for writing: \"" ! + path_m.string() + "\"" ); ! if (le_m == line_ending_unknown_k) ! set_line_endings(le_m); ! output << contents_m; ! set_dirty(false); ! } ! void monitor_dirty(dirty_proc_t proc) ! { dirty_proc_m = proc; } ! bfs::path directory_path() const ! { return path_m.branch_path(); } ! const char* file_name() const ! { ! return path_m.string().c_str(); ! } ! bool valid() const ! { return bfs::exists(path_m); } ! inline const std::string& as_string() const ! { return contents_m; } private: ! void set_dirty(bool to) ! { ! if (dirty_m == to) return; ! dirty_m = to; ! if (dirty_proc_m) ! dirty_proc_m(dirty_m); ! } ! void replace_all(const char* src, const char* dst) ! { ! // replaces all instances of src with dst ! std::string::size_type result(0); ! std::size_t src_n(std::strlen(src)); ! std::size_t dst_n(std::strlen(dst)); ! while (true) ! { ! result = contents_m.find(src, result); ! if (result == std::string::npos) break; ! contents_m.replace(result, src_n, dst, dst_n); ! result += dst_n; ! } ! } ! void set_line_endings_impl(line_ending_t le, bool force = false) ! { ! if (le_m == le && !force && ! le_m != line_ending_unknown_k) return; ! if (le == line_ending_platform_k || le == line_ending_unknown_k) ! { #if ADOBE_PLATFORM_WIN ! le_m = line_ending_windows_k; #else ! le_m = line_ending_unix_k; #endif ! } ! else ! { ! le_m = le; ! } ! // REVISIT (fbrereto) : Not as optimal as it could be. ! if (le_m == line_ending_unix_k) ! { ! replace_all("\r\n", "\n"); ! replace_all("\r", "\n"); ! } ! else if (le_m == line_ending_windows_k) ! { ! replace_all("\r\n", "\n"); ! replace_all("\r", "\n"); ! replace_all("\n", "\r\n"); ! } ! else if (le_m == line_ending_mac_os_classic_k) ! { ! replace_all("\r\n", "\r"); ! replace_all("\n", "\r"); ! } ! else ! throw std::runtime_error("unknown line ending type"); ! // set line endings back to 'unknown' if ! // that's what they were originally ! if (le == line_ending_unknown_k) le_m = line_ending_unknown_k; ! } ! bfs::path path_m; ///< Path to the current file ! std::string contents_m; ///< Contents of the file (not necessarily same as that in file) ! bool dirty_m; ///< Dirty bit ! dirty_proc_t dirty_proc_m; ///< Dirty bit modification notifier ! line_ending_t le_m; ///< Line ending flags }; *************** *** 272,435 **** class application_t { ! bfs::path _resource_dir_m; ///< The directory containing this applications resource files (i.e.: editor.adm, editor.eve). ! file_buffer_t _eve_file_m; ///< The file buffer for manipulating the current Eve definition. ! file_buffer_t _adam_file_m; ///< The file buffer for manipulating the current Adam definition. ! adobe::sheet_t* _sheet_m; ///< The sheet we are viewing. ! eve_client::window_server_t* _holder_m; ///< Contains Eve instance, and all instanciated widgets. ! adobe::sheet_t* _editor_sheet_m; ///< The sheet for this editor program. ! size_enum_t _dialog_size_m; ///< The size of dialog to create. ! bool _initialized; ///< Are we initialized yet? ! // ! /// This constructor is private to ensure that the getInstance ! /// method is used to return a reference to this class. ! // ! application_t(); ! // ! /// This destructor releases any allocated sheets and Eve bits. ! // ! ~application_t(); ! // ! /// Initialize the application_t by attempting to load resources from ! /// disk. This also calls os_initialize, to perform any OS-specific ! /// initialization which may be required. ! /// ! /// \return true if the initialization is successful, false otherwise. ! /// \sa os_initialize ! // ! bool _initialize(); ! // ! /// This function gets invoked whenever an action (e.g.: a button with ! /// "action: @ok" defined) is unhandled by Adam. It is registered with ! /// _holder_m by initialize(). Currently this function simply writes the ! /// given value into the output text area. ! /// ! /// \param name the name of the action (e.g.: "ok", "cancel"). ! /// \param value any parameter associated with the value. ! /// ! /// \sa _holder_m ! // ! void _button_notifier( const adobe::name_t& name, const adobe::value_t& value ); ! // ! /// This function handles most editor operations, as defined in the ! /// editor's Eve file. ! /// ! /// \param name the name of the operation to perform. ! /// \param value a dictionary containing the value specific to the operation. ! // ! void _editor_op( adobe::name_t name, const adobe::value_t& value ); ! // ! /// This function handles file manipulation dirty status by sending ! /// it to the editor window to toggle the "save" button(s). ! /// ! /// \param dirty_cell_name the name of the celll to set ! /// \param dirty whether or not the file is dirty ! // ! void _monitor_file_dirty( adobe::name_t dirty_cell_name, bool dirty ); ! // ! /// Looks up the filebuffer_t for the path specified ! /// ! /// \param file_path the name of the celll to set ! // ! const adobe::file_buffer_t& _file_lookup( adobe::name_t file_path ); public: - // - /// The getInstance method returns a pointer to the single application_t - /// instance. If the application_t cannot be initialized then NULL is - /// returned. Initialization will fail if: - /// <ul> - /// <li>The editor.adm and editor.eve files cannot be found</li> - /// <li>The editor.adm and editor.eve files do not parse</li> - /// <li>OS-specific initialization fails</li> - /// </ul> - /// - /// \return a pointer to the single application_t instance. - /// \sa os_initialize - // - static application_t* getInstance(); - // - /// Load the main editor GUI and enter the main-loop. This function - /// will not return until it's time to quit. - // - void run(); - // - /// Load the dialog from disk, and tell the _holder_m to show it. This - /// function also updates the contents of the Eve text area to match what - /// was loaded from disk. The window loaded is specified by set_eve_file. - /// - /// \sa set_eve_file - // - void display_window(); - // - /// Forget about the existing sheet and load one from disk. This also - /// (re)opens the dialog. The sheet loaded is specified by set_adam_file. - /// - /// \sa set_adam_file - // - void load_sheet(); - // - /// Remove any frames which have been drawn around the widgets. - // - void clear_window_frames(); - // - /// Draw frames around all widgets. - // - void frame_window(); - // - /// Serialize all of the widgets and connections into text and show the - /// text in the Results text area. - // - void serialize_connections(); - // - /// Runs the currently selected Adam/Eve pair as a modal dialog - /// using the modal dialog interface API suite. - // - void run_current_as_modal(); - // - /// Set the file name of the Eve file to load. This does not actually - /// load the file or display the window, call display_window to make - /// that happen. - /// - /// \param file_name the name of the Eve file to load. - /// \sa display_window - // - void set_eve_file( const boost::filesystem::path& file_name ); - // - /// Set the file name of the Adam file to load. This does not actually - /// load the file or update the sheet, call load_sheet to make that - /// happen. - /// - /// \param file_name the name of the Adam file to load. - /// \sa load_sheet - // - void set_adam_file( const boost::filesystem::path& file_name ); - // - /// Set the directory which is used to load application resources - /// (such as the editor.adm and editor.eve files). - /// - /// \param res_path the directory to load application - /// resources from. - // - void set_resource_directory( const boost::filesystem::path& res_path ); - // - /// Set the size of any dialogs which are going to be created after - /// this call. - /// - /// \param s the new size to make dialogs. - // - void set_dialog_size( size_enum_t s ); - // - /// Display an error message in the error tab of the editor palette - /// - /// \param msg the message to post. - // - void display_error( const std::string& msg ); // ! /// Get the line at the given offset on the given file ! /// ! /// \param file_name the file ! /// \param line_start_position the position ! std::string application_t::format_stream_error(adobe::name_t file_name, std::streampos line_start_position); }; --- 272,435 ---- class application_t { ! bfs::path _resource_dir_m; ///< The directory containing this applications resource files (i.e.: editor.adm, editor.eve). ! file_buffer_t _eve_file_m; ///< The file buffer for manipulating the current Eve definition. ! file_buffer_t _adam_file_m; ///< The file buffer for manipulating the current Adam definition. ! adobe::sheet_t* _sheet_m; ///< The sheet we are viewing. ! eve_client::window_server_t* _holder_m; ///< Contains Eve instance, and all instanciated widgets. ! adobe::sheet_t* _editor_sheet_m; ///< The sheet for this editor program. ! size_enum_t _dialog_size_m; ///< The size of dialog to create. ! bool _initialized; ///< Are we initialized yet? ! // ! /// This constructor is private to ensure that the getInstance ! /// method is used to return a reference to this class. ! // ! application_t(); ! // ! /// This destructor releases any allocated sheets and Eve bits. ! // ! ~application_t(); ! // ! /// Initialize the application_t by attempting to load resources from ! /// disk. This also calls os_initialize, to perform any OS-specific ! /// initialization which may be required. ! /// ! /// \return true if the initialization is successful, false otherwise. ! /// \sa os_initialize ! // ! bool _initialize(); ! // ! /// This function gets invoked whenever an action (e.g.: a button with ! /// "action: @ok" defined) is unhandled by Adam. It is registered with ! /// _holder_m by initialize(). Currently this function simply writes the ! /// given value into the output text area. ! /// ! /// \param name the name of the action (e.g.: "ok", "cancel"). ! /// \param value any parameter associated with the value. ! /// ! /// \sa _holder_m ! // ! void _button_notifier( const adobe::name_t& name, const adobe::value_t& value ); ! // ! /// This function handles most editor operations, as defined in the ! /// editor's Eve file. ! /// ! /// \param name the name of the operation to perform. ! /// \param value a dictionary containing the value specific to the operation. ! // ! void _editor_op( adobe::name_t name, const adobe::value_t& value ); ! // ! /// This function handles file manipulation dirty status by sending ! /// it to the editor window to toggle the "save" button(s). ! /// ! /// \param dirty_cell_name the name of the celll to set ! /// \param dirty whether or not the file is dirty ! // ! void _monitor_file_dirty( adobe::name_t dirty_cell_name, bool dirty ); ! // ! /// Looks up the filebuffer_t for the path specified ! /// ! /// \param file_path the name of the celll to set ! // ! const adobe::file_buffer_t& _file_lookup( adobe::name_t file_path ); public: // ! /// The getInstance method returns a pointer to the single application_t ! /// instance. If the application_t cannot be initialized then NULL is ! /// returned. Initialization will fail if: ! /// <ul> ! /// <li>The editor.adm and editor.eve files cannot be found</li> ! /// <li>The editor.adm and editor.eve files do not parse</li> ! /// <li>OS-specific initialization fails</li> ! /// </ul> ! /// ! /// \return a pointer to the single application_t instance. ! /// \sa os_initialize ! // ! static application_t* getInstance(); ! // ! /// Load the main editor GUI and enter the main-loop. This function ! /// will not return until it's time to quit. ! // ! void run(); ! // ! /// Load the dialog from disk, and tell the _holder_m to show it. This ! /// function also updates the contents of the Eve text area to match what ! /// was loaded from disk. The window loaded is specified by set_eve_file. ! /// ! /// \sa set_eve_file ! // ! void display_window(); ! // ! /// Forget about the existing sheet and load one from disk. This also ! /// (re)opens the dialog. The sheet loaded is specified by set_adam_file. ! /// ! /// \sa set_adam_file ! // ! void load_sheet(); ! // ! /// Remove any frames which have been drawn around the widgets. ! // ! void clear_window_frames(); ! // ! /// Draw frames around all widgets. ! // ! void frame_window(); ! // ! /// Serialize all of the widgets and connections into text and show the ! /// text in the Results text area. ! // ! void serialize_connections(); ! // ! /// Runs the currently selected Adam/Eve pair as a modal dialog ! /// using the modal dialog interface API suite. ! // ! void run_current_as_modal(); ! // ! /// Set the file name of the Eve file to load. This does not actually ! /// load the file or display the window, call display_window to make ! /// that happen. ! /// ! /// \param file_name the name of the Eve file to load. ! /// \sa display_window ! // ! void set_eve_file( const boost::filesystem::path& file_name ); ! // ! /// Set the file name of the Adam file to load. This does not actually ! /// load the file or update the sheet, call load_sheet to make that ! /// happen. ! /// ! /// \param file_name the name of the Adam file to load. ! /// \sa load_sheet ! // ! void set_adam_file( const boost::filesystem::path& file_name ); ! // ! /// Set the directory which is used to load application resources ! /// (such as the editor.adm and editor.eve files). ! /// ! /// \param res_path the directory to load application ! /// resources from. ! // ! void set_resource_directory( const boost::filesystem::path& res_path ); ! // ! /// Set the size of any dialogs which are going to be created after ! /// this call. ! /// ! /// \param s the new size to make dialogs. ! // ! void set_dialog_size( size_enum_t s ); ! // ! /// Display an error message in the error tab of the editor palette ! /// ! /// \param msg the message to post. ! // ! void display_error( const std::string& msg ); ! // ! /// Get the line at the given offset on the given file ! /// ! /// \param file_name the file ! /// \param line_start_position the position ! std::string application_t::format_stream_error(adobe::name_t file_name, std::streampos line_start_position); }; *************** *** 448,454 **** /// function should also set the resource directory used by application_t. /// ! /// \param theApp the instance of application_t to call into when a menu item is ! /// selected, or a system event is received. ! /// \return true if initialization was successful, false otherwise. // bool os_initialize( application_t* theApp ); --- 448,454 ---- /// function should also set the resource directory used by application_t. /// ! /// \param theApp the instance of application_t to call into when a menu item is ! /// selected, or a system event is received. ! /// \return true if initialization was successful, false otherwise. // bool os_initialize( application_t* theApp ); |