#include <vuTransferDialog.h>
Inheritance diagram for vuTransferDialog:
Public Types | |
enum | { idCANVAS = 100, idUPDATE, idLOADTF, idSAVETF, idLAST } |
Public Member Functions | |
vuTransferDialog (wxWindow *parent, vuTFDesign &tf) | |
Constructor for the dialog window. | |
const vuTFDesign & | getTransferFunc () const |
Returns the transfer function as edited by the dialog window. | |
bool | isUpdated () |
true if tfunc (or lights in vuTFDialogSpec) have been updated | |
void | unsetUpdated () |
unsets updated flag | |
Protected Member Functions | |
void | OnSelect (wxCommandEvent &ev) |
Updates the user interface when a control node has been selected. | |
void | OnOpen (wxCommandEvent &ev) |
Pops up a colour dialog when a colour control node has been opened. | |
void | OnUpdate (wxCommandEvent &ev) |
Refreshes the user interface when control nodes have been edited. | |
void | OnOK (wxCommandEvent &ev) |
Sets the proper return codes for the ok button. | |
void | OnLoadTF (wxCommandEvent &ev) |
Loads a transfer function. | |
void | OnSaveTF (wxCommandEvent &ev) |
Saves a transfer function. | |
void | OnSlideLight (wxScrollEvent &event) |
Event handler for changes at the light sliders. | |
bool | TransferDataToWindow () |
Part of the wxWindows architecture -- there is no data to transfer. | |
bool | TransferDataFromWindow () |
Part of the wxWindows architecture -- there is no data to transfer. | |
virtual void | buildCustomSizer () |
void | rebuildCustomSizer () |
virtual void | editSpecColour (dword id) |
void | repaintParent () const |
triggers repaint event in parent window | |
Protected Attributes | |
vuTransferCanvas * | m_Canvas |
The editing canvas for the transfer function. | |
wxBoxSizer * | m_CustomSizer |
This is the sizer for the additional control elements. | |
wxBoxSizer * | m_MainSizer |
This is the sizer for the additional control elements. | |
wxTextCtrl * | tInte |
These are the textboxes for displaying control node properties. | |
wxTextCtrl * | tOpac |
These are the textboxes for displaying control node properties. | |
wxTextCtrl * | tr |
These are the textboxes for displaying control node properties. | |
wxTextCtrl * | tg |
These are the textboxes for displaying control node properties. | |
wxTextCtrl * | tb |
These are the textboxes for displaying control node properties. | |
wxTextCtrl * | tOpacSmooth |
These are the textboxes for displaying control node properties. | |
wxTextCtrl * | tColSmooth |
These are the textboxes for displaying control node properties. | |
bool | m_DoSpectral |
Indicates whether spectral colours are to be designed or RGBa. | |
bool | m_IsUpdated |
Flag is on if tfunc was updated. |
This class is a wxWindows dialog window that lets user edit the vuTFDesign transfer function. It is based on the vuTransferCanvas editor, and actually displays this canvas in edit mode. The difference is that the editor is run in a dialog window which can be displayed like any other dialog window. The dialog window also attaches a user interface to the transfer function.
The user interface for the editor shows users the info for each of the control nodes. When they select a control node, the control node properties are displayed in relevant text boxes. The user can thus see explicitly where the control node is, and can edit it specifically. There are also text boxes for editing the opacity and colour smoothing properties. Finally, if the user double clicks on a colour control node, a standard colour dialogue is popped up which lets the user choose a colour from the colour wheel.
Finally, the dialog has OK and Cancel buttons which work as usual. The dialog sets the proper return codes for these buttons so that the resultant transfer function can be treated appropriately (either accepted or ignored).
Definition at line 36 of file vuTransferDialog.h.
|
Definition at line 40 of file vuTransferDialog.h. |
|
Constructor for the dialog window. This creates the dialog window and it's controls, but doesn't show it. Call the standard ShowModal() method to display it.
|
|
Reimplemented in vuTFDialogSpec. Definition at line 92 of file vuTransferDialog.h. Referenced by rebuildCustomSizer(). |
|
Reimplemented in vuTFDialogSpec. Definition at line 96 of file vuTransferDialog.h. Referenced by OnOpen(). |
|
Returns the transfer function as edited by the dialog window. Call this method after showing the dialog window. It returns the transfer function passed in the constructor as edited by the user. Definition at line 370 of file vuTransferDialog.cpp. References vuTransferCanvas::getTransferFunc(), and m_Canvas. Referenced by vuSlicer::glOnMouse(), vuShearWarp::glOnMouse(), vuBccSplat::glOnMouse(), vuBCCSheetSplatter::glOnMouse(), vuBCCShearWarp::glOnMouse(), vuShearWarp::OnButtonTransferFunction(), vuBCCShearWarp::OnButtonTransferFunction(), and vuTransferCanvas::OnMouse(). |
Here is the call graph for this function:
|
true if tfunc (or lights in vuTFDialogSpec) have been updated
Definition at line 66 of file vuTransferDialog.h. Referenced by vuSpectral::glRender(), and vuSpecFVR::glRender(). |
|
Loads a transfer function.
Definition at line 315 of file vuTransferDialog.cpp. References vuTFDesign::generateFunction(), vuTransferCanvas::getTransferFunc(), vuTFDesign::loadTF(), m_Canvas, m_IsUpdated, rebuildCustomSizer(), and vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
Sets the proper return codes for the ok button.
Definition at line 268 of file vuTransferDialog.cpp. References m_IsUpdated. |
|
Pops up a colour dialog when a colour control node has been opened.
Definition at line 232 of file vuTransferDialog.cpp. References byte, vuTFDesign::ColourNode::col, editSpecColour(), vuTransferCanvas::getActiveColour(), vuTFDesign::getColourNodeIndex(), vuTransferCanvas::getTransferFunc(), vuTFDesign::ColourNode::intensity, m_Canvas, m_IsUpdated, and vuTransferCanvas::setActiveColour(). |
Here is the call graph for this function:
|
Saves a transfer function.
Definition at line 345 of file vuTransferDialog.cpp. References vuTransferCanvas::getTransferFunc(), m_Canvas, and vuTFDesign::saveTF(). |
Here is the call graph for this function:
|
Updates the user interface when a control node has been selected.
Definition at line 163 of file vuTransferDialog.cpp. References vuTFDesign::ColourNode::col, vuTransferCanvas::getActiveColour(), vuTransferCanvas::getActiveOpacity(), vuTFDesign::ColourNode::intensity, vuTFDesign::OpacityNode::intensity, m_Canvas, vuTFDesign::OpacityNode::opacity, tb, tg, tInte, tOpac, and tr. |
Here is the call graph for this function:
|
Event handler for changes at the light sliders. All three sliders m_LightSlide[] map to this function. Reimplemented in vuTFDialogSpec. |
|
Refreshes the user interface when control nodes have been edited.
Definition at line 278 of file vuTransferDialog.cpp. References byte, m_Canvas, m_IsUpdated, vuTransferCanvas::setActiveColour(), vuTransferCanvas::setActiveOpacity(), vuTransferCanvas::setSmoothing(), tb, tColSmooth, tg, tInte, tOpac, tOpacSmooth, and tr. |
Here is the call graph for this function:
|
Definition at line 143 of file vuTransferDialog.cpp. References buildCustomSizer(), m_CustomSizer, and m_MainSizer. Referenced by vuTFDialogSpec::editSpecColour(), and OnLoadTF(). |
Here is the call graph for this function:
|
triggers repaint event in parent window
Definition at line 375 of file vuTransferDialog.cpp. Referenced by vuTFDialogSpec::editSpecColour(), vuTFDialogSpec::OnSetupNodes(), and vuTFDialogSpec::OnSlideLight(). |
|
Part of the wxWindows architecture -- there is no data to transfer.
Definition at line 89 of file vuTransferDialog.h. |
|
Part of the wxWindows architecture -- there is no data to transfer.
Definition at line 87 of file vuTransferDialog.h. |
|
unsets updated flag
Definition at line 68 of file vuTransferDialog.h. References m_IsUpdated. Referenced by vuSpectral::glRender(), and vuSpecFVR::glRender(). |
|
The editing canvas for the transfer function.
Definition at line 103 of file vuTransferDialog.h. Referenced by getTransferFunc(), OnLoadTF(), OnOpen(), OnSaveTF(), OnSelect(), and OnUpdate(). |
|
This is the sizer for the additional control elements. It is rebuilt after a transfer function is loaded and the number of lights might has changed. Definition at line 107 of file vuTransferDialog.h. Referenced by rebuildCustomSizer(). |
|
Indicates whether spectral colours are to be designed or RGBa.
Definition at line 113 of file vuTransferDialog.h. |
|
Flag is on if tfunc was updated.
Definition at line 116 of file vuTransferDialog.h. Referenced by OnLoadTF(), OnOK(), OnOpen(), OnUpdate(), and unsetUpdated(). |
|
This is the sizer for the additional control elements. It is rebuilt after a transfer function is loaded and the number of lights might has changed. Definition at line 107 of file vuTransferDialog.h. Referenced by rebuildCustomSizer(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnSelect(), and OnUpdate(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnUpdate(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnSelect(), and OnUpdate(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnSelect(), and OnUpdate(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnSelect(), and OnUpdate(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnUpdate(). |
|
These are the textboxes for displaying control node properties.
Definition at line 110 of file vuTransferDialog.h. Referenced by OnSelect(), and OnUpdate(). |