00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Ondrej Kos 00008 * Side Effects Software Inc 00009 * 123 Front Street West, Suite 1401 00010 * Toronto, Ontario 00011 * Canada M5J 2M2 00012 * 416-504-9876 00013 * 00014 * NAME: GR_OptionTemplate.h ( GR Library, C++) 00015 * 00016 * COMMENTS: 00017 * A GR_OptionTemplate defines a display option type that can be 00018 * used to create the corresponding GR_UserOption. 00019 */ 00020 00021 #ifndef __GR_OptionTemplate__ 00022 #define __GR_OptionTemplate__ 00023 00024 #include "GR_API.h" 00025 00026 #include <UT/UT_String.h> 00027 00028 class GR_UserOption; 00029 00030 class GR_API GR_OptionTemplate 00031 { 00032 public: 00033 typedef GR_UserOption *(*GR_OptionConstructor) 00034 (const char *, GR_OptionTemplate *); 00035 00036 GR_OptionTemplate(const char *name, const char *label, 00037 GR_OptionConstructor construct); 00038 00039 virtual ~GR_OptionTemplate(); 00040 00041 const char *getName() const { return (const char *) myName; } 00042 const char *getLabel() const { return (const char *) myLabel; } 00043 00044 GR_UserOption *constructOption(const char *name); 00045 00046 private: 00047 UT_String myName; 00048 UT_String myLabel; 00049 GR_OptionConstructor myConstructor; 00050 }; 00051 00052 #endif
1.5.9