Overture
Version 25
|
#include "GenericDataBase.h"
#include "wdhdefs.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <X11/StringDefs.h>
#include <X11/keysym.h>
#include <X11/IntrinsicP.h>
#include <X11/cursorfont.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <Xm/BulletinB.h>
#include <Xm/CascadeB.h>
#include <Xm/Command.h>
#include <Xm/DialogS.h>
#include <Xm/FileSB.h>
#include <Xm/Form.h>
#include <Xm/Frame.h>
#include <Xm/Label.h>
#include <Xm/LabelG.h>
#include <Xm/List.h>
#include <Xm/MainW.h>
#include <Xm/MessageB.h>
#include <Xm/RowColumn.h>
#include <Xm/PushB.h>
#include <Xm/PushBG.h>
#include <Xm/Scale.h>
#include <Xm/SelectioB.h>
#include <Xm/Separator.h>
#include <Xm/Text.h>
#include <Xm/TextF.h>
#include <Xm/ToggleB.h>
#include <Xm/ToggleBG.h>
#include "aString.H"
#include "mogl.h"
#include "DialogData.h"
#include <X11/GLw/GLwMDrawA.h>
Classes | |
struct | WINDOW_REC |
Macros | |
#define | down_width 16 |
#define | down_height 16 |
#define | up_width 16 |
#define | up_height 16 |
#define | right_width 16 |
#define | right_height 16 |
#define | left_width 16 |
#define | left_height 16 |
#define | zp_width 16 |
#define | zp_height 16 |
#define | zm_width 16 |
#define | zm_height 16 |
#define | yrotp_width 16 |
#define | yrotp_height 16 |
#define | yrotm_width 16 |
#define | yrotm_height 16 |
#define | xrotp_width 16 |
#define | xrotp_height 16 |
#define | xrotm_width 16 |
#define | xrotm_height 16 |
#define | zrotp_width 16 |
#define | zrotp_height 16 |
#define | zrotm_width 16 |
#define | zrotm_height 16 |
#define | zoom_in_width 16 |
#define | zoom_in_height 16 |
#define | zoom_out_width 16 |
#define | zoom_out_height 16 |
#define | reset_width 16 |
#define | reset_height 16 |
#define | rotpnt_width 16 |
#define | rotpnt_height 16 |
#define | SC (char *)(const char *) |
#define | clipPlane(plane, i) |
#define | clipPlaneIsOn(plane) *(clippingPlaneInfo->clippingPlaneIsOn+(plane)) |
Typedefs | |
typedef float | real |
Functions | |
void | showHardcopyDialog (Widget pb, XtPointer client_data, XtPointer call_data) |
int | checkGLError () |
void | toggled (Widget widget, XtPointer client_data, XtPointer call_data) |
void | detectOverlaySupport (Display *dpy, Visual *overlayVisual, int *overlayDepth, Colormap *overlayColormap) |
void | clippingPlanesDialog (Widget pb, XtPointer client_data, XtPointer call_data) |
void | annotateDialog (Widget pb, XtPointer client_data, XtPointer call_data) |
void | viewCharacteristicsDialog (Widget pb, XtPointer client_data, XtPointer call_data) |
void | draw (Widget w) |
void | graphicsInit (Widget w, XtPointer data, XtPointer callData) |
void | exposeOrResize (Widget w, XtPointer data, XtPointer callData) |
void | map_state_changed (Widget w, XtPointer data, XEvent *event, Boolean *cont) |
void | popupCallback (Widget menuItem, XtPointer client_data, XtPointer call_data) |
void | exec_cmd (Widget widget, XtPointer client_data, XtPointer call_data) |
void | inputCommand (Widget cmd_widget, XtPointer client_data, XtPointer call_data) |
void | postIt (Widget cmd_widget, XtPointer client_data, XEvent *event, char *dum) |
void | buttonCallback (Widget widget, XtPointer client_data, XtPointer call_data) |
void | eventLoop () |
void | drawAreaInput (Widget w, XtPointer clientData, XtPointer callData) |
void | graphics_setFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) |
void | graphics_setOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) |
void | graphics_setOrthoKeepAspectRatio (GLdouble aRatio, GLdouble magFactor, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far) |
void | graphics_setPerspective (GLdouble fovy, GLdouble aspect, GLdouble near, GLdouble far) |
void | moglDisplay (int win) |
void | setMenuNameChosen (const char *answer) |
void | setMenuChosen (const int &menuItem, char *answer) |
void | getCursor (real &x, real &y) |
void | moglInit (int &argc, char *argv[], const aString &windowTitle, aString fileMenuItems[], aString helpMenuItems[], WindowProperties &wProp) |
void | moglOpenFileSB (char *extension) |
void | moglCloseFileSB () |
void | moglCreateMessageDialog (aString msg, MessageTypeEnum type) |
int | moglSetTitle (int win_number, const aString &windowTitle) |
int | makeGraphicsWindow (const aString &windowTitle, aString fileMenuItems[], aString helpMenuItems[], ClippingPlaneInfo &clippingPlaneInfo, ViewCharacteristics &viewChar, DialogData &hardCopyDialog, PullDownMenu &optionMenu, WindowProperties &wProp, int directRendering) |
int | destroyGraphicsWindow (int win_number) |
void | moglSetSensitive (int win_number, int trueOrFalse) |
void | moglSetButtonSensitive (int win_number, int btn, int trueOrFalse) |
void | moglBuildUserButtons (const aString buttonCommand[], const aString buttonLabel[], int win_number) |
void | moglBuildUserMenu (const aString menuName[], const aString menuTitle, int win_number) |
void | moglSetViewFunction (MOGL_VIEW_FUNCTION viewFunction_) |
void | moglSetFunctions (GL_GraphicsInterface *giPointer, MOGL_DISPLAY_FUNCTION displayFunc, MOGL_RESIZE_FUNCTION resizeFunc) |
int | moglMakeCurrent (int win) |
int | moglGetInfo (Display *&dpy_, XVisualInfo *&vi, GLXContext &cx) |
int | moglGetNWindows () |
int | moglGetCurrentWindow () |
void | moglResetContext () |
void | moglAppendCommandHistory (const aString &answer) |
void | moglSetPrompt (const aString &prompt) |
void | moglBuildPopup (const aString menu[]) |
int | moglGetAnswer (aString &answer, const aString prompt, PickInfo *pick_, int blocking) |
void | moglGetWindowSize (int &width, int &height, int win) |
void | moglPostDisplay (int win) |
bool | moglRotationKeysPressed (int win_number) |
void | moglPollEvents () |
void | getRubberBandBoxCorners (real &xMin, real &xMax, real &yMin, real &yMax) |
void | clipPlaneOnOff (Widget widget, XtPointer clinet_data, XtPointer call_data) |
void | scaleCallback (Widget widget, XtPointer clinet_data, XtPointer call_data) |
void | changeNormal (Widget widget, XtPointer clinet_data, XtPointer call_data) |
void | positionDialog (Widget dialog, XtPointer client_data, XtPointer call_data) |
void | annotateOnOff (Widget widget, XtPointer clinet_data, XtPointer call_data) |
void | annotateText (Widget widget, XtPointer clinet_data, XtPointer call_data) |
void | moglPrintRotPnt (real x, real y, real z, int win_number) |
void | moglPrintLineWidth (real lw, int win_number) |
void | moglPrintFractionOfScreen (real fraction, int win_number) |
void | backgroundCallback (Widget menuItem, XtPointer client_data, XtPointer call_data) |
void | foregroundCallback (Widget menuItem, XtPointer client_data, XtPointer call_data) |
Variables | |
XGCValues | gcValues |
MOGL_DISPLAY_FUNCTION * | displayFunction = display |
MOGL_RESIZE_FUNCTION * | resizeFunction = resize |
MOGL_VIEW_FUNCTION * | viewFunction = NULL |
#define clipPlane | ( | plane, | |
i | |||
) |
Referenced by clippingPlanesDialog().
#define clipPlaneIsOn | ( | plane | ) | *(clippingPlaneInfo->clippingPlaneIsOn+(plane)) |
Referenced by clippingPlanesDialog().
#define down_height 16 |
Referenced by moglInit().
#define down_width 16 |
Referenced by moglInit().
#define left_height 16 |
Referenced by moglInit().
#define left_width 16 |
Referenced by moglInit().
#define reset_height 16 |
Referenced by moglInit().
#define reset_width 16 |
Referenced by moglInit().
#define right_height 16 |
Referenced by moglInit().
#define right_width 16 |
Referenced by moglInit().
#define rotpnt_height 16 |
Referenced by moglInit().
#define rotpnt_width 16 |
Referenced by moglInit().
#define SC (char *)(const char *) |
#define up_height 16 |
Referenced by moglInit().
#define up_width 16 |
Referenced by moglInit().
#define xrotm_height 16 |
Referenced by moglInit().
#define xrotm_width 16 |
Referenced by moglInit().
#define xrotp_height 16 |
Referenced by moglInit().
#define xrotp_width 16 |
Referenced by moglInit().
#define yrotm_height 16 |
Referenced by moglInit().
#define yrotm_width 16 |
Referenced by moglInit().
#define yrotp_height 16 |
Referenced by moglInit().
#define yrotp_width 16 |
Referenced by moglInit().
#define zm_height 16 |
Referenced by moglInit().
#define zm_width 16 |
Referenced by moglInit().
#define zoom_in_height 16 |
Referenced by moglInit().
#define zoom_in_width 16 |
Referenced by moglInit().
#define zoom_out_height 16 |
Referenced by moglInit().
#define zoom_out_width 16 |
Referenced by moglInit().
#define zp_height 16 |
Referenced by moglInit().
#define zp_width 16 |
Referenced by moglInit().
#define zrotm_height 16 |
Referenced by moglInit().
#define zrotm_width 16 |
Referenced by moglInit().
#define zrotp_height 16 |
Referenced by moglInit().
#define zrotp_width 16 |
Referenced by moglInit().
typedef float real |
void annotateDialog | ( | Widget | pb, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References annotateOnOff(), WINDOW_REC::annotateOpen, annotateText(), FALSE, normal, and NULL.
Referenced by makeGraphicsWindow().
void annotateOnOff | ( | Widget | widget, |
XtPointer | clinet_data, | ||
XtPointer | call_data | ||
) |
References setMenuChosen().
Referenced by annotateDialog().
void annotateText | ( | Widget | widget, |
XtPointer | clinet_data, | ||
XtPointer | call_data | ||
) |
References setMenuChosen().
Referenced by annotateDialog().
void backgroundCallback | ( | Widget | menuItem, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References setMenuNameChosen(), TRUE, and ViewCharacteristics::win_number.
Referenced by viewCharacteristicsDialog().
void buttonCallback | ( | Widget | widget, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References NULL, setMenuNameChosen(), and TRUE.
Referenced by makeGraphicsWindow().
void changeNormal | ( | Widget | widget, |
XtPointer | clinet_data, | ||
XtPointer | call_data | ||
) |
References pow(), setMenuChosen(), and sScanF().
Referenced by clippingPlanesDialog().
int checkGLError | ( | ) |
Referenced by GL_GraphicsInterface::display(), graphicsInit(), and moglMakeCurrent().
void clippingPlanesDialog | ( | Widget | pb, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References changeNormal(), clipPlane, clipPlaneIsOn, clipPlaneOnOff(), WINDOW_REC::clipPlaneOpen, normal, NULL, and scaleCallback().
Referenced by makeGraphicsWindow().
void clipPlaneOnOff | ( | Widget | widget, |
XtPointer | clinet_data, | ||
XtPointer | call_data | ||
) |
References setMenuChosen().
Referenced by clippingPlanesDialog().
int destroyGraphicsWindow | ( | int | win_number | ) |
References WINDOW_REC::cx, ERROR, NULL, OK, and WINDOW_REC::toplevel.
void detectOverlaySupport | ( | Display * | dpy, |
Visual * | overlayVisual, | ||
int * | overlayDepth, | ||
Colormap * | overlayColormap | ||
) |
Referenced by moglInit().
void draw | ( | Widget | w | ) |
References WINDOW_REC::cx, displayFunction, WINDOW_REC::doubleBuffer, moglMakeCurrent(), and NULL.
Referenced by eventLoop(), moglDisplay(), and moglPollEvents().
void drawAreaInput | ( | Widget | w, |
XtPointer | clientData, | ||
XtPointer | callData | ||
) |
References moglMakeCurrent(), NULL, and WINDOW_REC::toplevel.
Referenced by makeGraphicsWindow().
void eventLoop | ( | ) |
References draw(), FALSE, moglMakeCurrent(), WINDOW_REC::plotStuff, WINDOW_REC::postDisplay, and WINDOW_REC::toplevel.
Referenced by getCursor(), getRubberBandBoxCorners(), and moglGetAnswer().
void exec_cmd | ( | Widget | widget, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References NULL, setMenuNameChosen(), and TRUE.
Referenced by moglInit().
void exposeOrResize | ( | Widget | w, |
XtPointer | data, | ||
XtPointer | callData | ||
) |
References WINDOW_REC::height, moglMakeCurrent(), NULL, WINDOW_REC::plotStuff, WINDOW_REC::postDisplay, resizeFunction, WINDOW_REC::toplevel, TRUE, and WINDOW_REC::width.
Referenced by makeGraphicsWindow().
void foregroundCallback | ( | Widget | menuItem, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References setMenuNameChosen(), TRUE, and ViewCharacteristics::win_number.
Referenced by viewCharacteristicsDialog().
References eventLoop().
References eventLoop(), NULL, and viewFunction.
void graphics_setFrustum | ( | GLdouble | left, |
GLdouble | right, | ||
GLdouble | bottom, | ||
GLdouble | top, | ||
GLdouble | near, | ||
GLdouble | far | ||
) |
void graphics_setOrtho | ( | GLdouble | left, |
GLdouble | right, | ||
GLdouble | bottom, | ||
GLdouble | top, | ||
GLdouble | near, | ||
GLdouble | far | ||
) |
void graphics_setOrthoKeepAspectRatio | ( | GLdouble | aRatio, |
GLdouble | magFactor, | ||
GLdouble | left, | ||
GLdouble | right, | ||
GLdouble | bottom, | ||
GLdouble | top, | ||
GLdouble | near, | ||
GLdouble | far | ||
) |
void graphics_setPerspective | ( | GLdouble | fovy, |
GLdouble | aspect, | ||
GLdouble | near, | ||
GLdouble | far | ||
) |
void graphicsInit | ( | Widget | w, |
XtPointer | data, | ||
XtPointer | callData | ||
) |
References checkGLError(), WINDOW_REC::cx, GLwNvisualInfo, NULL, and WINDOW_REC::plotStuff.
Referenced by makeGraphicsWindow().
void inputCommand | ( | Widget | cmd_widget, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
int makeGraphicsWindow | ( | const aString & | windowTitle, |
aString | fileMenuItems[], | ||
aString | helpMenuItems[], | ||
ClippingPlaneInfo & | clippingPlaneInfo, | ||
ViewCharacteristics & | viewChar, | ||
DialogData & | hardCopyDialog, | ||
PullDownMenu & | optionMenu, | ||
WindowProperties & | wProp, | ||
int | directRendering | ||
) |
References annotateDialog(), WINDOW_REC::annotateOpen, buttonCallback(), ToggleButton::buttonCommand, ToggleButton::buttonLabel, clippingPlanesDialog(), WINDOW_REC::clipPlaneOpen, WINDOW_REC::cmap, WINDOW_REC::cx, WINDOW_REC::doubleBuffer, drawAreaInput(), exposeOrResize(), WINDOW_REC::fractionOfScreen, WINDOW_REC::frame, DialogData::getWidget(), GI_TOGGLEBUTTON, GLwNginitCallback, GLwNvisualInfo, graphicsInit(), WindowProperties::graphicsWindowHeight, WindowProperties::graphicsWindowWidth, WINDOW_REC::height, if(), WINDOW_REC::lineSF, WINDOW_REC::mainw, map_state_changed(), max(), WINDOW_REC::menubar, PullDownMenu::menupane, PullDownMenu::menuTitle, WINDOW_REC::midarea, min(), PullDownMenu::n_button, NULL, WINDOW_REC::numUserBtn, WINDOW_REC::plotStuff, popupCallback(), WINDOW_REC::postDisplay, WINDOW_REC::rightColumn, WINDOW_REC::rotateButtons, WINDOW_REC::rotateFrame, SC, ToggleButton::sensitive, showHardcopyDialog(), ToggleButton::state, ToggleButton::tb, PullDownMenu::tbList, toggled(), WINDOW_REC::toplevel, PullDownMenu::type, WINDOW_REC::userButton, WINDOW_REC::userButtonArea, WINDOW_REC::userCascade, WINDOW_REC::vi, viewCharacteristicsDialog(), WINDOW_REC::viewCharOpen, WINDOW_REC::width, ViewCharacteristics::win_number, and WINDOW_REC::xValue.
Referenced by GL_GraphicsInterface::createWindow().
void map_state_changed | ( | Widget | w, |
XtPointer | data, | ||
XEvent * | event, | ||
Boolean * | cont | ||
) |
Referenced by makeGraphicsWindow().
void moglBuildPopup | ( | const aString | menu[] | ) |
References FALSE, WINDOW_REC::mainw, NULL, and postIt().
void moglBuildUserButtons | ( | const aString | buttonCommand[], |
const aString | buttonLabel[], | ||
int | win_number | ||
) |
References MAX_BUTTONS, NULL, WINDOW_REC::numUserBtn, SC, WINDOW_REC::userButton, and WINDOW_REC::userButtonArea.
References WINDOW_REC::menubar, NULL, popupCallback(), SC, and WINDOW_REC::userCascade.
void moglCloseFileSB | ( | ) |
References NULL.
void moglCreateMessageDialog | ( | aString | msg, |
MessageTypeEnum | type | ||
) |
References errorDialog, informationDialog, messageDialog, NULL, SC, and warningDialog.
void moglDisplay | ( | int | win | ) |
References draw(), and plotStuff().
int moglGetCurrentWindow | ( | ) |
int moglGetInfo | ( | Display *& | dpy_, |
XVisualInfo *& | vi, | ||
GLXContext & | cx | ||
) |
References WINDOW_REC::cx, and WINDOW_REC::vi.
int moglGetNWindows | ( | ) |
void moglGetWindowSize | ( | int & | width, |
int & | height, | ||
int | win | ||
) |
References NULL, and WINDOW_REC::plotStuff.
void moglInit | ( | int & | argc, |
char * | argv[], | ||
const aString & | windowTitle, | ||
aString | fileMenuItems[], | ||
aString | helpMenuItems[], | ||
WindowProperties & | wProp | ||
) |
References WindowProperties::commandWindowHeight, WindowProperties::commandWindowWidth, detectOverlaySupport(), down_height, down_width, exec_cmd(), left_height, left_width, max(), min(), NULL, popupCallback(), reset_height, reset_width, right_height, right_width, rotpnt_height, rotpnt_width, SC, WindowProperties::showCommandHistory, WindowProperties::showPrompt, WindowProperties::showRubberBandBox, up_height, up_width, xrotm_height, xrotm_width, xrotp_height, xrotp_width, yrotm_height, yrotm_width, yrotp_height, yrotp_width, zm_height, zm_width, zoom_in_height, zoom_in_width, zoom_out_height, zoom_out_width, zp_height, zp_width, zrotm_height, zrotm_width, zrotp_height, and zrotp_width.
int moglMakeCurrent | ( | int | win | ) |
References checkGLError(), ERROR, OK, and plotStuff().
void moglOpenFileSB | ( | char * | extension | ) |
References NULL.
void moglPollEvents | ( | ) |
References draw(), FALSE, moglMakeCurrent(), WINDOW_REC::plotStuff, WINDOW_REC::postDisplay, and WINDOW_REC::toplevel.
void moglPostDisplay | ( | int | win | ) |
References WINDOW_REC::postDisplay, and TRUE.
void moglPrintFractionOfScreen | ( | real | fraction, |
int | win_number | ||
) |
Referenced by GL_GraphicsInterface::processSpecialMenuItems().
void moglPrintLineWidth | ( | real | lw, |
int | win_number | ||
) |
Referenced by GL_GraphicsInterface::processSpecialMenuItems().
Referenced by GL_GraphicsInterface::processSpecialMenuItems().
void moglResetContext | ( | ) |
bool moglRotationKeysPressed | ( | int | win_number | ) |
References WINDOW_REC::toplevel.
void moglSetButtonSensitive | ( | int | win_number, |
int | btn, | ||
int | trueOrFalse | ||
) |
References WINDOW_REC::userButton.
void moglSetFunctions | ( | GL_GraphicsInterface * | giPointer, |
MOGL_DISPLAY_FUNCTION | displayFunc, | ||
MOGL_RESIZE_FUNCTION | resizeFunc | ||
) |
References displayFunction, and resizeFunction.
void moglSetSensitive | ( | int | win_number, |
int | trueOrFalse | ||
) |
References WINDOW_REC::numUserBtn, WINDOW_REC::userButton, and WINDOW_REC::userCascade.
int moglSetTitle | ( | int | win_number, |
const aString & | windowTitle | ||
) |
References ERROR, NULL, OK, SC, and WINDOW_REC::toplevel.
void moglSetViewFunction | ( | MOGL_VIEW_FUNCTION | viewFunction_ | ) |
References viewFunction.
void popupCallback | ( | Widget | menuItem, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References NULL, setMenuNameChosen(), and TRUE.
Referenced by makeGraphicsWindow(), moglBuildUserMenu(), and moglInit().
void positionDialog | ( | Widget | dialog, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
Referenced by DialogData::openDialog().
void postIt | ( | Widget | cmd_widget, |
XtPointer | client_data, | ||
XEvent * | event, | ||
char * | dum | ||
) |
Referenced by moglBuildPopup(), and moglGetAnswer().
void scaleCallback | ( | Widget | widget, |
XtPointer | clinet_data, | ||
XtPointer | call_data | ||
) |
References setMenuChosen().
Referenced by clippingPlanesDialog().
void setMenuChosen | ( | const int & | menuItem, |
char * | answer | ||
) |
References setMenuNameChosen(), and TRUE.
Referenced by annotateOnOff(), annotateText(), changeNormal(), clipPlaneOnOff(), and scaleCallback().
void setMenuNameChosen | ( | const char * | answer | ) |
Referenced by backgroundCallback(), buttonCallback(), exec_cmd(), foregroundCallback(), moglGetAnswer(), popupCallback(), setMenuChosen(), and toggled().
void showHardcopyDialog | ( | Widget | pb, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
Referenced by makeGraphicsWindow().
void toggled | ( | Widget | widget, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References setMenuNameChosen(), ToggleButton::state, and TRUE.
Referenced by makeGraphicsWindow().
void viewCharacteristicsDialog | ( | Widget | pb, |
XtPointer | client_data, | ||
XtPointer | call_data | ||
) |
References backgroundCallback(), foregroundCallback(), WINDOW_REC::fractionOfScreen, WINDOW_REC::lineSF, NULL, WINDOW_REC::viewCharOpen, ViewCharacteristics::win_number, and WINDOW_REC::xValue.
Referenced by makeGraphicsWindow().
MOGL_DISPLAY_FUNCTION* displayFunction = display |
Referenced by draw(), and moglSetFunctions().
XGCValues gcValues |
MOGL_RESIZE_FUNCTION* resizeFunction = resize |
Referenced by exposeOrResize(), and moglSetFunctions().
MOGL_VIEW_FUNCTION* viewFunction = NULL |
Referenced by getRubberBandBoxCorners(), and moglSetViewFunction().