26#ifndef _SO_WIN_MATERIAL_PALETTE_
27#define _SO_WIN_MATERIAL_PALETTE_
29#include <Inventor/Win/SoWinBeginStrict.h>
30#include <Inventor/sys/port.h>
31#include <Inventor/SbBasic.h>
32#include <Inventor/misc/SoCallbackList.h>
33#include <Inventor/Win/SoWinComponent.h>
45class SoWinColorSlider;
62typedef void SoWinMaterialPaletteCB(
void *userData,
const SoMaterial *mtl);
76 SoWidget parent = NULL,
77 const char *name = NULL,
78 SbBool buildInsideParent = TRUE);
79 ~SoWinMaterialPalette();
83 void attach(
SoMaterial *material,
int index = 0);
85 SbBool isAttached() {
return (material != NULL); }
92 inline void addMaterialChangedCallback(
93 SoWinMaterialPaletteCB *f,
94 void *userData = NULL);
95 inline void removeMaterialChangedCallback(
96 SoWinMaterialPaletteCB *f,
97 void *userData = NULL);
106 const SoMaterial & getMaterial()
const {
return (*material); }
108 void windowsPalette();
111 static void staticLocation2EventCB(
void *userData,
115 void browsePalletteBaseDir();
116 void setPaletteBaseDir(LPCTSTR newBaseDir);
117 long getMaxDirCount() {
return m_nMaxPathId; };
121 static HKEY tgsRegKey;
123 void makePaletteMenuList(HMENU menuBar);
129 SoWinMaterialPalette(
136 virtual SbString getDefaultWidgetName()
const;
137 virtual SbString getDefaultTitle()
const;
138 virtual SbString getDefaultIconTitle()
const;
141 unsigned long nCurrEditId ;
145 static WBOOL CALLBACK mgrDlgProc( Hwnd hdlg, UINT message,
146 WPARAM wParam, LPARAM lParam );
147 static void onCommand(
153 void handleMenu(SoWinMaterialPalette *p,
156 void initPlacement() ;
176 static void staticSelectionCB(
void *userData,
SoPath *path);
177 void selectionCB(
SoPath * path);
182 LPCTSTR getMaterialDir();
183 void setMaterialDir(LPCTSTR dirPath);
184 SbBool saveMaterial(LPCTSTR fName);
185 char currentMaterialPath[MAX_PATH];
186 char* m_materialPath;
187 void changeMaterialPath(UINT
id);
188 SoWidget m_hScrollBar;
189 SoWidget m_hStatusText;
190 SoWidget m_hPaletteName;
192 void adjustVScrollInfo(
long rows);
193 void scrollCamera(
int nScrollCode,
short int nPos);
201 SoWidget *menuItemsList;
206 void copyMaterial(
SoMaterial *mat1,
int index1,
210 static void pasteDone(
void *userData,
SoPathList *pathList);
213 static void materialListCB(
void *,
const SoMaterial *);
215 void menuPick(SoWidget,
int, XmAnyCallbackStruct *);
216 void menuDisplay(SoWidget, SoWinMaterialPalette *,
XtPointer);
219 SoWidget buildWidget(SoWidget parent);
220 SoWidget buildPulldownMenu(SoWidget parent);
223 void constructorCommon(
SbBool buildNow);
228SoWinMaterialPalette::addMaterialChangedCallback(
229 SoWinMaterialPaletteCB *f,
231{ callbackList->
addCallback((SoCallbackListCB *) f, userData); }
234SoWinMaterialPalette::removeMaterialChangedCallback(
235 SoWinMaterialPaletteCB *f,
237{ callbackList->
removeCallback((SoCallbackListCB *) f, userData); }
240#include <Inventor/Win/SoWinEndStrict.h>
Class for smart character strings.
Node that defines an object's base color.
Base class for all nodes, paths, and engines.
Manages a list of callbacks and associated data.
void addCallback(SoCallbackListCB *f, void *userData=NULL)
Adds a function to the list of callback functions.
void removeCallback(SoCallbackListCB *f, void *userData=NULL)
Removes a function from the list of callback functions.
Node representing a directional light source.
Node which invokes callbacks for events.
Multiple-value field containing any number of RGB colors stored as three floats.
Surface material definition node.
Abstract base class for all database nodes.
Sensor class that can be attached to Open Inventor nodes.
Orthographic camera node.
Path that points to a list of hierarchical nodes.
Maintains a list of pointers to paths.
Manages a list of selected objects.
Abstract base class for Open Inventor sensors.
Group node that saves and restores traversal state.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Supports copy/pa...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component that l...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component which ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Viewer component...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component for re...