home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / include / k3d / k3dsdk / options.h < prev    next >
C/C++ Source or Header  |  2008-03-17  |  3KB  |  90 lines

  1. #ifndef K3DSDK_OPTIONS_H
  2. #define K3DSDK_OPTIONS_H
  3.  
  4. // K-3D
  5. // Copyright (c) 1995-2008, Timothy M. Shead
  6. //
  7. // Contact: tshead@k-3d.com
  8. //
  9. // This program is free software; you can redistribute it and/or
  10. // modify it under the terms of the GNU General Public
  11. // License as published by the Free Software Foundation; either
  12. // version 2 of the License, or (at your option) any later version.
  13. //
  14. // This program is distributed in the hope that it will be useful,
  15. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. // General Public License for more details.
  18. //
  19. // You should have received a copy of the GNU General Public
  20. // License along with this program; if not, write to the Free Software
  21. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  22.  
  23. /** \file
  24.     \author Tim Shead (tshead@k-3d.com)
  25. */
  26.  
  27. #include "types.h"
  28.  
  29. namespace k3d
  30. {
  31.  
  32. namespace filesystem { class path; }
  33. namespace xml { class element; }
  34.  
  35. namespace options
  36. {
  37.  
  38. /// Returns the default file path for the given data type (e.g. bitmap, document, script, etc)
  39. const filesystem::path get_path(const string_t& PathType);
  40. /// Sets the default file path for the given data type (e.g. bitmap, document, script, etc)
  41. void set_path(const string_t& PathType, const filesystem::path& Path);
  42.  
  43. /// Predefined path types for use with get_path() and set_path()
  44. namespace path
  45. {
  46.  
  47. inline const string_t render_farm() { return "render_farm"; }
  48. inline const string_t scripts() { return "scripts"; }
  49. inline const string_t documents() { return "documents"; }
  50. inline const string_t bitmaps() { return "bitmaps"; }
  51. inline const string_t tutorials() { return "tutorials"; }
  52. inline const string_t test_cases() { return "test_cases"; }
  53. inline const string_t render_frame() { return "render_frame"; }
  54. inline const string_t render_animation() { return "render_animation"; }
  55. inline const string_t fonts() { return "fonts"; }
  56. inline const string_t displacement_shaders() { return "displacement_shaders"; }
  57. inline const string_t imager_shaders() { return "imager_shaders"; }
  58. inline const string_t light_shaders() { return "light_shaders"; }
  59. inline const string_t surface_shaders() { return "surface_shaders"; }
  60. inline const string_t transformation_shaders() { return "transformation_shaders"; }
  61. inline const string_t volume_shaders() { return "volume_shaders"; }
  62.  
  63. } // namespace path
  64.  
  65. /// Returns the external command-line for the given action (e.g. bitmap, document, script, etc)
  66. const string_t get_command(const string_t& CommandType);
  67. /// Sets the default file path for the given data type (e.g. bitmap, document, script, etc)
  68. void set_command(const string_t& CommandType, const string_t& Command);
  69.  
  70. /// Predefined command types for use with get_command() and set_command()
  71. namespace command
  72. {
  73.  
  74. inline const string_t bitmap_viewer() { return "bitmap_viewer"; }
  75. inline const string_t text_editor() { return "text_editor"; }
  76.  
  77. } // namespace command
  78.  
  79. /// Returns the hierarchical tree of user options (so you can store your own data)
  80. xml::element& tree();
  81. /// Stores any modifications to the tree to persistent storage
  82. void commit();
  83.  
  84. } // namespace options
  85.  
  86. } // namespace k3d
  87.  
  88. #endif // !K3DSDK_OPTIONS_H
  89.  
  90.