file: brush_oper.h
/*
* brush_oper.h - Contains definition of brush and prototypes for brush
* operationrelated functions.
*/
#ifndef _BRUSH_OPER_H
#define _BRUSH_OPER_H
#include "XmdvTool.h"
#include "brush.h"
/* the conjunctions */
#define CONJ_NONE 0
#define CONJ_AND 1
#define CONJ_OR 2
#define CONJ_XOR 3
/* the operations */
#define OPER_NONE 0
#define OPER_HIGHLIGHT 1<<0
#define OPER_MASK 1<<1
#define OPER_VALUES 1<<2
#define OPER_AVERAGE 1<<3
/* brush define */
#define BRUSH_NONE -1
/* brush operation structure */
typedef struct {
int order; /* how many brushes are in this operation */
int not[MAXBRUSH]; /* the not's */
int brush[MAXBRUSH]; /* the brush numbers */
int conj[MAXBRUSH-1]; /* the conjunctions */
int oper; /* the operation */
int has_color; /* boolean flag - does this operation */
/* have a private color? */
unsigned long
cells[NUM_BOUND_COL]; /* the color cells */
XColor colors[NUM_BOUND_COL]; /* the colors to highlight with */
Widget menu_item; /* the menu item in the color menu */
/* associated with this operation */
} Operation;
/* public functions */
void BrushOperListInitCB(Widget w, XtPointer params, XtPointer call_data);
void BrushOperNewCB(Widget w, XtPointer params, XtPointer call_data);
void BrushOperDeleteCB(Widget w, XtPointer params, XtPointer call_data);
void BrushOperEditCB(Widget w, XtPointer params, XtPointer call_data);
void BrushOperOkCB(Widget w, XtPointer params, XtPointer call_data);
void BrushOperCancelCB(Widget w, XtPointer params, XtPointer call_data);
char *NameFromOperation(int op);
void BrushOperResetCB(Widget w, XtPointer params, XtPointer call_data);
void ClearOperPopup(void);
void InitOperPopup(Operation *oper);
void BrushOperUpdateList(void);
int OperationFromPopup(Operation *oper);
int OperationPoint(double *point, int op);
double PercentOperationPoint(double *point, int op);
unsigned long ColorFromOperations(double *point);
void BrushOperHighCB(Widget w, XtPointer params, XtPointer call_data);
void BrushOperLowCB(Widget w, XtPointer params, XtPointer call_data);
int BrushOperAllocColors(Operation *op);
void BrushOperFreeColors(Operation *op);
void BrushOperInterpolateColors(Operation *op);
#endif /* _BRUSH_OPER_H */
C++ to HTML Conversion by ctoohtml