xdmxconfig.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Box.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/SimpleMenu.h>
#include <X11/Xaw/SmeBSB.h>
#include <X11/Xaw/MenuButton.h>
#include <X11/Xaw/Viewport.h>
#include <X11/Xaw/Dialog.h>
#include <X11/keysym.h>
#include <X11/Xmu/SysUtil.h>
#include "Canvas.h"
#include "dmxparse.h"
#include "dmxprint.h"
#include "dmxlog.h"

Defines

#define DMX_INFO   "xdmxconfig v0.9\nCopyright 2002 Red Hat Inc.\n"
#define DMX_MAIN_WIDTH   800
#define DMX_MAIN_HEIGHT   600
#define DMX_DATA_WIDTH   200
#define DMX_DATA_HEIGHT   200
#define DMX_CANVAS_WIDTH   400
#define DMX_CANVAS_HEIGHT   500

Enumerations

enum  { dmxConfigStateOpen, dmxConfigStateSave }

Functions

int yyparse (void)
static void dmxConfigCanvasGCs (void)
static void dmxConfigGetDims (int *maxWidth, int *maxHeight)
static int scalex (int x)
static int scaley (int y)
static int unscalex (int x)
static int unscaley (int y)
static void dmxConfigDataUpdate (void)
static void dmxConfigCanvasUpdate (void)
static void dmxConfigCanvasDraw (Region region)
static void dmxConfigSelectCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigCopystrings (void)
static void dmxConfigGetValueString (char **d, Widget w)
static void dmxConfigSetupCnamemenu (void)
static void dmxConfigReadFile (void)
static void dmxConfigWriteFile (void)
static DMXConfigDisplayPtr dmxConfigFindDisplay (int x, int y)
static void dmxConfigSetPopupPosition (Widget popup)
static void dmxConfigPlaceMenu (Widget w, XEvent *event, String *params, Cardinal *num_params)
static void dmxConfigMove (int deltaX, int deltaY)
static void dmxConfigCanvasInput (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigCanvasResize (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigCanvasExpose (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigOpenCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigSaveCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigOkCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigCanCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigECCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigNCCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigDCCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigECOkCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigECCanCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigEDCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigNDCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigDDCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigAboutCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigAboutOkCallback (Widget w, XtPointer closure, XtPointer CallData)
static void dmxConfigQuitCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigQuitOkCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigQuitCanCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigEDOkCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigEDCanCallback (Widget w, XtPointer closure, XtPointer callData)
static void dmxConfigOkAction (Widget w, XEvent *event, String *params, Cardinal *num_params)
int main (int argc, char **argv)

Variables

FILE * yyin
DMXConfigEntryPtr dmxConfigEntry
static DMXConfigVirtualPtr dmxConfigCurrent
static DMXConfigVirtualPtr dmxConfigNewVirtual
static DMXConfigDisplayPtr dmxConfigCurrentDisplay
static DMXConfigDisplayPtr dmxConfigNewDisplay
static int dmxConfigGrabbed
static int dmxConfigGrabbedFine
static int dmxConfigGrabbedX
static int dmxConfigGrabbedY
static char * dmxConfigFilename
static GC dmxConfigGC
static GC dmxConfigGCRev
static GC dmxConfigGCHL
static int dmxConfigGCInit = 0
static Dimension dmxConfigWidgetWidth
static Dimension dmxConfigWidgetHeight
static Dimension dmxConfigWallWidth
static Dimension dmxConfigWallHeight
static double dmxConfigScaleX
static double dmxConfigScaleY
static int dmxConfigNotSaved
static enum { ... }  dmxConfigState
static Widget canvas
static Widget cnamebox
static Widget cdimbox
static Widget openpopup
static Widget opendialog
static Widget namebox
static Widget dimbox
static Widget rtbox
static Widget origbox
static Widget okbutton
static Widget buttonpopup
static Widget ecbutton
static Widget dcbutton
static Widget ndbutton0
static Widget ndbutton1
static Widget edbutton
static Widget ddbutton
static Widget ecpopup
static Widget ecdialog0
static Widget ecdialog1
static Widget edpopup
static Widget eddialog0
static Widget eddialog1
static Widget eddialog2
static Widget aboutpopup
static Widget quitpopup

Define Documentation

#define DMX_CANVAS_HEIGHT   500

Referenced by main().

#define DMX_CANVAS_WIDTH   400

Referenced by main().

#define DMX_DATA_HEIGHT   200

Referenced by main().

#define DMX_DATA_WIDTH   200

Referenced by main().

#define DMX_INFO   "xdmxconfig v0.9\nCopyright 2002 Red Hat Inc.\n"

Referenced by main().

#define DMX_MAIN_HEIGHT   600

Referenced by main().

#define DMX_MAIN_WIDTH   800

Referenced by main().


Enumeration Type Documentation

anonymous enum
Enumerator:
dmxConfigStateOpen 
dmxConfigStateSave 

Function Documentation

static void dmxConfigAboutCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References aboutpopup, and dmxConfigSetPopupPosition().

Referenced by main().

static void dmxConfigAboutOkCallback ( Widget  w,
XtPointer  closure,
XtPointer  CallData 
) [static]

References aboutpopup.

Referenced by main().

static void dmxConfigCanCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References openpopup.

Referenced by main().

static void dmxConfigCanvasExpose ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References dmxConfigCanvasDraw().

Referenced by main().

static void dmxConfigCanvasGCs ( void  ) [static]
static void dmxConfigCanvasInput ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigCanvasResize ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References dmxConfigCanvasDraw().

Referenced by main().

static void dmxConfigDCCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigDDCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigECCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigECCanCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References dmxConfigDCCallback(), and ecpopup.

Referenced by main().

static void dmxConfigECOkCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigEDCanCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References dmxConfigDDCallback(), and edpopup.

Referenced by main().

static void dmxConfigGetValueString ( char **  d,
Widget  w 
) [static]
static void dmxConfigMove ( int  deltaX,
int  deltaY 
) [static]
static void dmxConfigNCCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigNDCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigOkAction ( Widget  w,
XEvent *  event,
String *  params,
Cardinal *  num_params 
) [static]
static void dmxConfigOkCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigOpenCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigPlaceMenu ( Widget  w,
XEvent *  event,
String *  params,
Cardinal *  num_params 
) [static]

References buttonpopup, and dmxConfigSetPopupPosition().

Referenced by main().

static void dmxConfigQuitCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigQuitCanCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References quitpopup.

Referenced by main().

static void dmxConfigQuitOkCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]

References quitpopup.

Referenced by main().

static void dmxConfigSaveCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigSelectCallback ( Widget  w,
XtPointer  closure,
XtPointer  callData 
) [static]
static void dmxConfigWriteFile ( void  ) [static]
static int scalex ( int  x) [static]
static int scaley ( int  y) [static]
static int unscalex ( int  x) [static]

References dmxConfigScaleX.

Referenced by dmxConfigCanvasInput().

static int unscaley ( int  y) [static]

References dmxConfigScaleY.

Referenced by dmxConfigCanvasInput().

int yyparse ( void  )

Variable Documentation

Widget buttonpopup

Referenced by dmxConfigPlaceMenu(), and main().

Widget cdimbox

Referenced by dmxConfigDataUpdate(), and main().

Widget cnamebox [static]
Widget dcbutton

Referenced by dmxConfigDataUpdate(), and main().

Widget ddbutton

Referenced by dmxConfigDataUpdate(), and main().

Widget dimbox

Referenced by dmxConfigDataUpdate(), and main().

int dmxConfigGCInit = 0 [static]

Referenced by dmxConfigCanvasGCs().

int dmxConfigGrabbed [static]

Referenced by dmxConfigCanvasInput().

int dmxConfigGrabbedX [static]

Referenced by dmxConfigCanvasInput().

double dmxConfigScaleX [static]
Dimension dmxConfigWidgetWidth [static]
Widget ecbutton [static]

Referenced by dmxConfigDataUpdate(), and main().

Widget edbutton

Referenced by dmxConfigDataUpdate(), and main().

Widget namebox [static]

Referenced by dmxConfigDataUpdate(), and main().

Widget ndbutton0 [static]

Referenced by dmxConfigDataUpdate(), and main().

Widget ndbutton1

Referenced by dmxConfigDataUpdate(), and main().

Widget okbutton [static]
Widget origbox

Referenced by dmxConfigDataUpdate(), and main().

Widget rtbox

Referenced by dmxConfigDataUpdate(), and main().

FILE* yyin