1#ifndef COIN_SOGUIMATERIALEDITOR_H 2#define COIN_SOGUIMATERIALEDITOR_H 3 4// @configure_input@ 5 6/**************************************************************************\ 7 * Copyright (c) Kongsberg Oil & Gas Technologies AS 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions are 12 * met: 13 * 14 * Redistributions of source code must retain the above copyright notice, 15 * this list of conditions and the following disclaimer. 16 * 17 * Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. 20 * 21 * Neither the name of the copyright holder nor the names of its 22 * contributors may be used to endorse or promote products derived from 23 * this software without specific prior written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36\**************************************************************************/ 37 38#include <Inventor/fields/SoSFEnum.h> 39#include <Inventor/fields/SoSFShort.h> 40#include <Inventor/fields/SoSFNode.h> 41#include <Inventor/nodekits/SoBaseKit.h> 42 43class SoMaterial; 44class SoGuiColorEditor; 45 46typedef SoGuiColorEditor * SoGuiColorEditorOpenCB(void * closure); 47typedef void SoGuiColorEditorCloseCB(void * closure, SoGuiColorEditor * editor); 48 49class SoGuiMaterialEditor : public SoBaseKit { 50 typedef SoBaseKit inherited; 51 SO_KIT_HEADER(SoGuiMaterialEditor); 52 SO_KIT_CATALOG_ENTRY_HEADER(root); 53 54public: 55 static void initClass(void); 56 SoGuiMaterialEditor(void); 57 58 enum UpdateFrequency { 59 CONTINUOUS, 60 AFTER_ACCEPT 61 }; 62 63 SoSFNode material; 64 SoSFShort index; 65 SoSFEnum update; 66 67 void setColorEditorCallbacks(SoGuiColorEditorOpenCB * open, SoGuiColorEditorCloseCB * close, void * closure); 68 SoMaterial * getSphereMaterialNode(void) const; 69 70protected: 71 ~SoGuiMaterialEditor(void); 72 73private: 74 void * internals; 75 76}; 77 78#endif // !COIN_SOGUIMATERIALEDITOR_H 79