xxx::Update

 

Tool_Brush::Update

Tool_Tag::Update

Tool_Histo::Update

Tool_Propagate::Update

Tool_DB_Class::Update

Tool_DB_File::Update

 

This method is used when an external event may change the tool.

 

 

Syntax

 

void  Update(

          UInt64 flag

) ;

 

 

Parameters

 

flag

          Flag value of the external event.  See flag_update.hpp for a list of all the possible values.

 

The values that are used by the tools are:

 

Tool_Brush

UPDATE_ALL_TOOLS

UPDATE_CUR_TAG          

UPDATE_COLOR_TAG

UPDATE_CUR_BRUSH

 

 

// the current tag has changed

// the color of a tag has changed

// the current brush has changed

 

Tool_Tag

UPDATE_ALL_TOOLS

UPDATE_CUR_TAG

UPDATE_COLOR_TAG

UPDATE_TAG_LABEL

UPDATE_TAG_ENABLE

UPDATE_TAG_LOCK

UPDATE_TAG_SELECT

 

 

// the current tag has changed

// the color of a tag has changed

// the label of a tag has changed

// the enable flag on a tag has changed

// the lock flag on a tag has changed

// the select flag on a tag has changed

 

Tool_Histo

UPDATE_ALL_TOOLS

UPDATE_SELECTION

UPDATE_DATA_GLI

UPDATE_THRESHOLD

UPDATE_COLOR_TAG

UPDATE_CUR_TAG

UPDATE_CURSOR

UPDATE_COLOR_WORK

 

 

// the selected frames have changed

// the GLI data of a frame has changed

 

// the color associated with the TAGs has changed

// the current TAG has changed

// the cursor has moved (needed for the white line)

 

Tool_Propagate

UPDATE_ALL_TOOLS

UPDATE_CUR_FRAME

UPDATE_CUR_BRUSH

 

 

// the current frame has changed

// the current brush has changed

 

Tool_DB_Class

UPDATE_ALL_TOOLS

UPDATE_SELECTION

UPDATE_CUR_WINDOW

UPDATE_DB

 

 

// the selected frames have changed

// the current window has changed

// the database of classes has changed

 

Tool_DB_File

UPDATE_ALL_TOOLS

UPDATE_SELECTION

UPDATE_CUR_WINDOW

UPDATE_FILE

 

 

// the selected frames have changed

// the current window has changed

// the list of opened files has changed

 

 

 

Return value

 

This method does not return a value.

 

 

Remarks

 

The method is usually called from within your Update_Register() function.  Do not forget to register the appropriate update flags with the Update_Register() function

 

 

Requirements

 

Header:

          TomoVision_Util.hpp

          TomoVision_Tools.hpp

          Tool_work.hpp

 

Library:

          TomoVision_Util.lib

          TomoVision_Tools.lib

          SliceO_Tools.lib

 

Example

 

From the Tool_Brush_Update.cpp file

 

// --- in ***_ctrl.cpp ---

int          Ctrl_Update( UInt64 flag = NULL ) ;

 

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

extern "C" __declspec(dllexport) UInt64          Update_Register( void )

{

          return( UPDATE_ALL_TOOLS

                | UPDATE_CUR_TAG                    // the current tag has changed

                | UPDATE_COLOR_TAG           // the color of a tag has changed

                | UPDATE_CUR_BRUSH          // the current brush has changed

                ) ;

}

 

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

extern "C" __declspec(dllexport) int          Update_A( UInt64 flag )

{

          // --- changes to the Control Window ---

          Ctrl_Update( flag ) ;

 

          return( 1 ) ;

}

 

From the Tool_Brush_Ctrl.cpp file

 

...

 

// --- Interface tools ---

static          Boxs          box_box ;

 

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

static          Boxs          box_brush ;

static          Tool_Brush          tool_brush ;

 

...

 

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

int          Ctrl_Update( UInt64 flag )

{

          if ( ! Flag_Ctrl_Wnd_On )

              return( 1 ) ;

 

          // --- Changes that affect both TAGs and Brushes ---

          if ( flag & (UPDATE_CUR_TAG | UPDATE_COLOR_TAG) ) {

              tool_brush.Update( flag ) ;

          }

 

          // --- Changes that affect the Brushes ---

          if ( flag & UPDATE_CUR_BRUSH ) {

              tool_brush.Update( flag ) ;

          }

 

          return( 1 ) ;

}

 

...

 

 

See also