The "Ctrl_Leave()" function is called whenever the cursor leave your interface window.
Syntax
extern "C" __declspec(dllexport) int Ctrl_Leave(
void
)
Parameters
This function does not have a parameter.
Return value
The function returns "0" if an error occurred, "1" otherwise.
Remarks
The following template provide the necessary code for:
·The function will exit if "Flag_Ctrl_Wnd_On" variable is '0".
·The function will exit if "Flag_Ctrl_Visible" variable is '0".
·The function will exit if "Flag_Ctrl_In_Out" variable is '0".
|
extern "C" __declspec(dllexport) int Ctrl_Leave( void )
{
if ( ! Flag_Ctrl_Wnd_On )
return( 1 ) ;
if ( ! Flag_Ctrl_Visible )
return( 1 ) ;
// --- we use this variable to limit the work we do here ---
if ( ! Flag_Ctrl_In_Out )
return( 1 ) ;
...
return( 1 ) ;
}
|
|
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
Sample "Ctrl_Leave" function from the "Edit mode" module.
|
...
// ----------------------------------------------------------------------------
//
// Function: Ctrl_Leave
//
// Parameters: (void)
// Returns: (int) 0 if error
//
// This is called each time the cursor leave your menu
//
// ----------------------------------------------------------------------------
extern "C" __declspec(dllexport) int Ctrl_Leave( void )
{
if ( ! Flag_Ctrl_Wnd_On )
return( 1 ) ;
if ( ! Flag_Ctrl_Visible )
return( 1 ) ;
// --- we use this variable to limit the work we do here ---
if ( ! Flag_Ctrl_In_Out )
return( 1 ) ;
Flag_Ctrl_In_Out = 0 ;
but_load.Deselect() ;
but_undo.Deselect() ;
but_erose.Deselect() ;
but_dilat.Deselect() ;
but_open1.Deselect() ;
but_open2.Deselect() ;
but_close1.Deselect() ;
but_close2.Deselect() ;
tool_tag.Leave() ;
tool_brush.Leave() ;
return( 1 ) ;
}
...
|
|
See also