Tool_Brush::Click
Tool_Tag::Click
Tool_Histo::Click
Tool_Propagate::Click
Tool_DB_Class::Click
Tool_DB_File::Click
This method is used to update the tool to reflect a mouse click.
Syntax
int Click(
int up_down
) ;
Parameters
click
You must provide an integer that gives the value of the mouse buttons.
Return value
This method returns 1 if one of the brushes is selected, 0 otherwise.
Remarks
The method is usually called from within your Ctrl_Click() function. The parameter "up_down" is the one received as argument by the function.
Requirements
Header:
TomoVision_Util.hpp
TomoVision_Tools.hpp
Tool_work.hpp
Library:
TomoVision_Util.lib
TomoVision_Tools.lib
SliceO_Tools.lib
Example
|
// --- for Brush Selection Tool ---
static Boxs box_brush ;
static Tool_Brush tool_brush ;
...
extern "C" __declspec(dllexport) int Ctrl_Click( HWND wnd, int up_down, short x, short y )
{
// --- We only refresh the image when we release the button ---
if ( ! up_down ) {
return( 0 ) ;
}
// ------------------------------------------------
// --- Brush Selection Tool ---
// ------------------------------------------------
if ( tool_brush.Click( up_down ) >= 0 ) {
unsigned short *Brush_Cur = (unsigned short *) Fct_Variable_Get( "$BRUSH_CUR" ) ;
if ( ! Brush_Cur )
return( 0 ) ;
if ( *Brush_Cur != tool_brush.Read() ) {
// --- we changed the current tag ---
*Brush_Cur = tool_brush.Read() ;
Fct_Update( UPDATE_CUR_BRUSH ) ;
}
return( 1 ) ;
}
// ------------------------------------------------
return( 0 ) ;
}
|
|
See also