The Ctrl Fct

 

If you want the users to interact with your module, you must provide an interface.  These function enable you to create your interface and to control the user's interaction with it.

 

Thee functions fall in 3 categories:

 

 

Basic

These functions are used to create and manage the interface "globally".  They include the function to create and delete the interface, open and close the interface window

 

 

Mouse Interface

These functions are called by sliceO as direct result of the mouse interaction with your interface. They include such functions as "Ctrl_Motion" that is called when the mouse is moved inside the interface window and "Ctrl_Click" that is called when a mouse button is activated inside the interface window.

 

 

Updates

This function is not called by sliceO, it is a local function of your module.  But it is found in all "xxx_ctrl.cpp" files and its role is crucial, so we have added it here.

 

 

Pre-defined variables

 

You have also access to some pre-defined variables to help you:

 

Flag_Ctrl_Wnd_On (unsigned int) is "0" when the interface window is not active, "1" (for tools) or the index of the current module (for modes) if it is active.  The interface can be active and not visible if, for example, it is the current mode of a window other than the current window.

 

Flag_Ctrl_Visible (char) is "1" when the interface window is visible.

 

 

Flag_Ctrl_In_Out (char) is "1" if the cursor is inside the interface window

 

Flag_Ctrl_Id (unsigned short) give the instance number of this module's interface if the module can have multiple instances (only valid for Class Modules)

 

The code to set/reset these variables is already include in the function templates and it should not be removed.

 

 

Interface tools

 

SliceOmatic use the TomoVision's interface tools for its control window. These tools are described in details in: "TomoVision Tools".  These tools include boxes, buttons, sliders and different selector tools

 

Some higher level tools are also provided in "sliceOmatic Tools".  These tools include Brush selection, TAG selection, Histogram, Propagate interface, Class selection, and File selection.