AAOGlimpse
Other Links

AAOGlimpse Interfaces


AAOGlimpse has a thin system-dependent layer and a much more substantial system-independent layer. The system-independent layer is portable C++ that makes standard OpenGL calls to draw into an OpenGL context set up by the system-dependent layer. The system-dependent layer interface to the system-dependent layer is all handled by a single DisplaySupervisor C++ object. This object provides a number of methods for the system-dependent layer to call under various circumstances (menu item selected, mouse moved in the OpenGL display, etc). One of these calls sets up a callback routine that the DisplaySupervisor can use to make specific requests of the system-dependent layer (please redraw the display, please change the state of this check box, etc.) The DisplaySupervisor contains all the routines that the system-dependent layer needs to call.

The system-dependent layer is responsible for:


The following lists need to be fleshed out in much greater detail, but they may give some sort of idea of the details of the interface to the DisplaySupervisor.

DisplaySupervisor routines to be called by the system-dependent layer.

void Animate (bool On)
bool BasicSigmaFilter (void)
void ClearSelectionDisplay (void)
bool Display (void)
void DisplayAllData (void)
void DisplayAxes (bool On)
void DisplayContours (bool On)
void DisplayHistogram (bool On)
void DisplaySelectedSubset (void)
void DisplaySurfaces (bool On)
void DisplayWires (bool On)
void EnableCameraInfo (bool On)
void EnableHighlitBox (bool On)
void EnableHighlitCross (bool On)
void EnableHighlitEllipse (bool On)
void EnablePlotDisplay (bool On)
void EnableSelectionBox (bool On)
void EnableZPlot (bool On)
void GoInvisible (void)
const char* HandleCommand (void* Details, const char* MessagePtr)
bool HandleKeyDown (int Flags, float LocationX, float LocationY, char KeyCharacter)
bool HandleTimer (float DeltaSecs)
bool Initialise (void)
void InitGL (void)
void MouseDown (int Flags, float LocationX, float LocationY)
void MouseDragged (int Flags, float LocationX, float LocationY)
bool MouseMoved (int Flags, float LocationX, float LocationY)
void MouseUp (void)
bool NewFromSelection (void)
bool NewFromXCollapse (void)
bool NewFromYCollapse (void)
bool NewFromZCollapse (void)
bool OpenFile (const char* FileName)
bool OpenLutFile (const char* FileName)
bool OpenSecondaryFile (const char* FileName)
void OtherMouseDown (int Flags, float LocationX, float LocationY)
void RequestHighlightData (void)
void ResetOrientation (void)
void ResizeGL (int Height, int Width)
void RightMouseDown (int Flags, float LocationX, float LocationY)
void ScrollWheel (int Flags, float WheelDelta, float LocationX, float LocationY)
void SetColoursNegative (void)
void SetDisplayMax (float DisplayMax)
void SetDisplayMin (float DisplayMin)
void SetFigaroDefaultColours (void)
void SetHighlitArea (float Xc,float Yc,float Height,float Width,float Theta)
void SetLowClipping (bool On)
void SetRequestFunctionCallback (DSCallbackRoutine CallBackRoutine,void* ClientData)
void SetScalingPercentile (float Percentile)
bool SetScalingType (const char* Type)
void SetSkycatDefaultColours (void)
void SetSquarePixels (bool On)
void SetSurfaceByCubes (bool ByCubes)
void SnapToFaceOn (void)
void UseGrayScale (void)
void UsePixelCoordinates (bool On)

The structure passed to the routine specified in a call to SetRequestFunctionCallback():

typedef struct DSCallbackDetails {
   DSCallbackCode Request;
   HighlitAreaType HighlitAreaInPixels;
   HighlitOptionType HighlitOption;
   GUIFeedbackType GUIFeedback;
   const char* StringValue;
   void* CommandDetails;
   bool BooleanValue;
   int FirstInteger;
   int SecondInteger;
} DSCallbackDetails;

The possible codes that can be specified as the callback code - in the Request field of a DSCallbackDetails structure:

typedef enum {
   DS_REDISPLAY,
   DS_SHOW_HIGHLIT_GUI,
   DS_SET_CURRENT_CONTEXT,
   DS_HIGHLIT_AREA_CHANGED,
   DS_HIGHLIT_OPTION_CHANGED,
   DS_GUI_UPDATE,
   DS_UPDATE_DATA_STRING,
   DS_SET_ERROR_STRING,
   DS_SEND_SOCKET_REPLY,
   DS_RESIZE_WINDOW,
   DS_CHANGE_SCALE
} DSCallbackCode;