stlab.adobe.com Adobe Systems Incorporated

presets_common.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003     Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004     or a copy at http://stlab.adobe.com/licenses.html)
00005 */
00006 
00007 /****************************************************************************************************/
00008 
00009 #ifndef ADOBE_WIDGET_PRESETS_COMMON_HPP
00010 #define ADOBE_WIDGET_PRESETS_COMMON_HPP
00011 
00012 /****************************************************************************************************/
00013 
00014 namespace adobe {
00015 
00016 /****************************************************************************************************/
00017 
00018 namespace implementation {
00019 
00020 /****************************************************************************************************/
00021 
00022 void reload_preset_widget(presets_t& control);
00023 
00024 void append_user_preset(presets_t& control, const dictionary_t& snapshot);
00025 void delete_user_preset(presets_t& control);
00026 
00027 void save_user_preset_set(presets_t& control);
00028 void append_user_preset_set(presets_t& control);
00029 
00030 // found in the os-specific '.../preferences/top_level_folder/domain/name.presets" file
00031 array_t load_user_preset_set(presets_t& control);
00032 
00033 // found in the same location that the other resources for the preset widget are found
00034 array_t load_default_preset_set(presets_t& control);
00035 
00036 // actual implementation of this should be in platform-specific space. It is the path
00037 // to the platform-designated preferences folder, then into the folder specified by
00038 // the domain of the preset.
00039 boost::filesystem::path preset_directory(const presets_t& control);
00040 
00041 // fetches strings out of the localization set (if available)
00042 // this is *different* than the global localization function. It is used to fetch *keys*
00043 // to be sent to the global localization proc at runtime so the proc can get the correct
00044 // localized value back. This should only be used for private, static strings that the
00045 // client could not otherwise modify (e.g., the button names in the subdialogs for the
00046 // preset widget)
00047 std::string localization_value(const dictionary_t& set, name_t key, const std::string& default_string);
00048 
00049 inline std::string localization_value(const presets_t& control, name_t key, const std::string& default_string)
00050 { return localization_value(control.localization_set_m, key, default_string); }
00051 
00052 /****************************************************************************************************/
00053 
00054 } // namespace implementation
00055 
00056 /****************************************************************************************************/
00057 
00058 // The following list are for the dictionary containing the localized strings for the built-in
00059 // dialogs withing the preset widget.
00060 extern aggregate_name_t key_preset_add_dialog_group_name;
00061 extern aggregate_name_t key_preset_add_dialog_message;
00062 extern aggregate_name_t key_preset_add_dialog_name;
00063 extern aggregate_name_t key_preset_add_subdialog_cancel_button_alt_text;
00064 extern aggregate_name_t key_preset_add_subdialog_default_preset_name;
00065 extern aggregate_name_t key_preset_add_subdialog_ok_button_alt_text;
00066 extern aggregate_name_t key_preset_category_popup_alt_text;
00067 extern aggregate_name_t key_preset_category_popup_name;
00068 extern aggregate_name_t key_preset_custom_category_name;
00069 extern aggregate_name_t key_preset_delete_dialog_message;
00070 extern aggregate_name_t key_preset_delete_dialog_name;
00071 extern aggregate_name_t key_preset_delete_subdialog_cancel_button_alt_text;
00072 extern aggregate_name_t key_preset_delete_subdialog_ok_button_alt_text;
00073 extern aggregate_name_t key_preset_file_extension;
00074 extern aggregate_name_t key_preset_menu_item_add_preset;
00075 extern aggregate_name_t key_preset_menu_item_append_preset;
00076 extern aggregate_name_t key_preset_menu_item_delete_preset;
00077 extern aggregate_name_t key_preset_preset_popup_alt_text;
00078 extern aggregate_name_t key_preset_preset_popup_name;
00079 extern aggregate_name_t key_preset_subdialog_cancel_button_name;
00080 extern aggregate_name_t key_preset_subdialog_ok_button_name;
00081 extern aggregate_name_t key_preset_top_folder_name;
00082 extern aggregate_name_t key_preset_user_preset_list_empty_warning;
00083 extern aggregate_name_t key_preset_user_presets_category_name;
00084 
00085 // The following are the names given to the structural components of the presets in memory.
00086 extern aggregate_name_t key_preset_value; // The dictionary of property values for a single preset
00087 extern aggregate_name_t key_preset_name;  // The names of the categories and the presets themselves
00088 extern aggregate_name_t key_preset_items; // The set of presets listed for a single category
00089 
00090 /****************************************************************************************************/
00091 
00092 } // namespace adobe
00093 
00094 /****************************************************************************************************/
00095 
00096 #endif
00097 
00098 /****************************************************************************************************/

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google