File: XaPgplotP.h

package info (click to toggle)
pgplot5 5.2.2-19.8
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 7,192 kB
  • sloc: fortran: 39,795; ansic: 22,554; objc: 1,534; sh: 1,298; makefile: 269; pascal: 233; perl: 209; tcl: 190; awk: 51; csh: 25
file content (97 lines) | stat: -rw-r--r-- 3,648 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef XaPgplotP_h
#define XaPgplotP_h

#include <X11/Xaw/SimpleP.h>

#define XtNresizeCallback "resizeCallback"
#define XtCResizeCallback "ResizeCallback"

#include "XaPgplot.h"
#include "pgxwin.h"

/*
 * Declare a container for a list of widgets.
 */
typedef struct {
  XaPgplotWidget head;  /* The head of the list of widgets */
} XaPgplotList;

/*
 * Declare the structure that will contain class-specific
 * attributes. These are effectively shared by all instances
 * of the class widgets.
 */
typedef struct XaPgplotClassPart {
  int widget_id_counter; /* Used to give widgets unique numeric identifiers */
  XaPgplotList active_widgets; /* List of active widgets */
  XaPgplotList free_widgets;   /* List of unnassigned widgets */
  XtPointer *extension;  /* Unused extension field */
} XaPgplotClassPart;

/*
 * Collect all class-specific parts from superclasses and the current
 * new class.
 */
typedef struct XaPgplotClassRec {
  CoreClassPart core_class;
  SimpleClassPart simple_class;
  XaPgplotClassPart pgplot_class;
} XaPgplotClassRec;

externalref XaPgplotClassRec xaPgplotClassRec;

/*
 * A context descriptor for dispatching pointer input events.
 */
typedef struct {
  unsigned long mask;       /* The current cursor event-mask */
  XtCallbackProc callback;  /* The cursor-event client callback, or 0 */
  void *client_data;        /* Client data to be sent to the callback */
} XapInput;

/*
 * Now declare a structure to contain the instance specific parts of
 * the class. This contains members that are different from one
 * instance of the widget class to the next.
 */
typedef struct XaPgplotPart {
/* Public resource attributes */
  int max_colors;       /* The max number of colors needed */
  int min_colors;       /* The min number of colors needed */
  Colormap colormap;    /* The default colormap to use */
  Visual *visual;       /* The default visual to use */  
  XtCallbackList resize_callback; /* User resize-window callbacks */
  Dimension pad_x;      /* The number of pixels to assign to the optional */
                        /*  margin either side of the viewsurface */
  Dimension pad_y;      /* The number of pixels to assign to the optional */
                        /*  margin above and below the viewsurface */
  Boolean share;        /* Non-zero to allocate shared color cells */
/* Private attributes */
  XaPgplotWidget next;  /* The next widget of a list of PGPLOT Motif widgets */
  int xaslct_id;        /* The device ID returned to PGPLOT by the */
                        /* open-workstation driver opcode, and used for */
                        /* subsequent device selection via the */
                        /* select-plot driver opcode */
  int pgslct_id;        /* The device ID returned to the application by */
                        /* pgopen() for subsequent device selection with */
                        /* the pgslct() function */
  char *device;         /* A possible PGPLOT cpgbeg() file string */
  XtAppContext app;     /* The application context */
  XapInput input;       /* Cursor input callback and client data container */
  Pixel fgpixel;        /* In the athena port, we have nowhere to store this otherwise */
  XColor bg, fg;        /* The RGB values of the current foreground and */
                        /* background colors. The pixel member is ignored. */
  PgxWin *pgx;          /* PGPLOT generic X-window context descriptor */
} XaPgplotPart;

/*
 * Collect the instance structures of the super-classes and the
 * PGPLOT class.
 */
typedef struct XaPgplotRec {
  CorePart core;
  SimplePart      simple;
  XaPgplotPart pgplot;
} XaPgplotRec;

#endif