Class ShaderParamDlg
See Also: Class ParamDlg, Class StdMat2, Class Shader.
class ShaderParamDlg : public ParamDlg
Description:
This class is available in release 3.0 and later only.
A pointer to an instance of this class is returned by a Shader when it is asked to put up its rollup page.
Methods:
public:
Prototype:
virtual Class_ID ClassID()=0;
Remarks:
Implemented by the Plug-In.
Returns the unique Class_ID of this object.
Prototype:
virtual void SetThing(ReferenceTarget *m)=0;
Remarks:
Implemented by the Plug-In.
This method sets the current shader being edited to the shader passed.
Parameters:
ReferenceTarget *m
The Shader to set as current.
Prototype:
virtual void SetThings(StdMat2* pMtl, Shader* pShader)=0;
Remarks:
Implemented by the Plug-In.
This method sets the current Standard material (and its shader) being edited to the ones passed.
Parameters:
StdMtl2* pMtl
The Standard material to set as current.
Shader* pShader
The Shader to set as current.
Prototype:
virtual ReferenceTarget* GetThing()=0;
Remarks:
Returns the a pointer to the current material being edited. Note that in most of the Get/SetThing() methods in the SDK the 'Thing' is the actual plug-in. In this case it's not. It the material which is using this Shader.
Prototype:
virtual Shader* GetShader()=0;
Remarks:
This method returns a pointer to the current Shader.
Prototype:
virtual void SetTime(TimeValue t);
Remarks:
This method is called when the current time has changed. This gives the developer an opportunity to update any user interface data that may need adjusting due to the change in time.
Parameters:
TimeValue t
The new current time.
Default Implementation:
{}
Prototype:
virtual void DeleteThis()=0;
Remarks:
This method is called to delete this instance of the class.
For dynamically created global utility plugins, this method has to be implemented and should have a implementation like { delete this; }
Prototype:
virtual BOOL PanelProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)=0;
Remarks:
This is the dialog procedure for the user interface controls of the Shader.
Parameters:
HWND hwndDlg
The window handle of the rollup page.
UINT msg
The message to process.
WPARAM wParam
The first dialog parameter.
LPARAM lParam
The second dialog parameter.
Return Value:
Except in response to the WM_INITDIALOG message, the procedure should return nonzero if it processes the message, and zero if it does not. In response to a WM_INITDIALOG message, the dialog box procedure should return zero if it calls the SetFocus function to set the focus to one of the controls in the dialog. Otherwise, it should return nonzero, in which case the system sets the focus to the first control in the dialog that can be given the focus.
Prototype:
virtual void LoadDialog(int draw)=0;
Remarks:
This method is used to load the user interface controls with their current values.
Parameters:
int draw
This parameter is not currently used.
Prototype:
virtual HWND GetHWnd()=0;
Remarks:
This method returns the window handle of the rollup panel.
Prototype:
virtual int FindSubTexFromHWND(HWND hw)=0;
Remarks:
This method returns the index of the sub-texmap corresponding to the window whose handle is passed. If the handle is not valid return -1.
Parameters:
HWND hw
The window handle to check.
Prototype:
virtual void UpdateOpacity()=0;
Remarks:
This method is called to update the opacity parameter of the plug-in in the user interface.
Prototype:
virtual void UpdateMapButtons()=0;
Remarks:
This method is called to update the map buttons in the user interface. For example it can put a " " or "m" or "M" on the button face based on the state of the map.