Tool_Tag::Read

 

Return the index of the tag selected in the tool. 

 

 

Syntax

 

int  Read(

          void

) ;

 

 

Parameters

 

This method does not have a parameter.

 

 

Return value

 

The index of the TAG selected in the tool

 

 

Remarks

 

This method is usually called in Ctrl_Register(). The value returned by the method is used to update the CUR_TAG variable.

 

 

Requirements

 

Header:

          TomoVision_Util.hpp

          TomoVision_Tools.hpp

          Tool_work.hpp

 

Library:

          TomoVision_Util.lib

          TomoVision_Tools.lib

          SliceO_Tools.lib

 

 

Example

 

 

// --- Interface tools ---

static          Boxs          box_box ;

 

// --- for Brush Selection Tool ---

static          Boxs          box_brush ;

static          Tool_Brush          tool_brush ;

 

// ----------------------------------------------------------------------------

//

//          Function:          Ctrl_Click

//

// ----------------------------------------------------------------------------

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 ) ;

          }

 

          // ------------------------------------------------

          // ---              TAG Selection Tool                              ---

          // ------------------------------------------------

          if ( tool_tag.Click( up_down ) >= 0  ) {

              unsigned short *TAG_Cur = (unsigned short *) Fct_Variable_Get( "$TAG_CUR" ) ;

              if ( ! TAG_Cur )

                    return( 0 ) ;

              if ( *TAG_Cur != tool_tag.Read() ) {

                    // --- we changed the current tag ---

                    *TAG_Cur = tool_tag.Read() ;

                    Fct_Update( UPDATE_CUR_TAG ) ;

              }

              return( 1 ) ;

          }

          // ------------------------------------------------

 

          return( 0 ) ;

}

 

See also