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 #ifndef XmLGridH
51 #define XmLGridH
52
53 #include "XmL.h"
54 #include <stdio.h>
55
56 #ifdef XmL_CPP
57 extern "C" {
58 #endif
59
60 extern WidgetClass xmlGridWidgetClass;
61 typedef struct _XmLGridClassRec *XmLGridWidgetClass;
62 typedef struct _XmLGridRec *XmLGridWidget;
63 typedef struct _XmLGridRowRec *XmLGridRow;
64 typedef struct _XmLGridColumnRec *XmLGridColumn;
65 typedef struct _XmLGridCellRec *XmLGridCell;
66
67 #define XmLIsGrid(w) XtIsSubclass((w), xmlGridWidgetClass)
68
69 Widget XmLCreateGrid(Widget parent,
char *name, ArgList arglist,
70 Cardinal argcount);
71 void XmLGridAddColumns(Widget w,
unsigned char type,
int position,
int count);
72 void XmLGridAddRows(Widget w,
unsigned char type,
int position,
int count);
73 Boolean XmLGridColumnIsVisible(Widget w,
int column);
74 Boolean XmLGridCopyPos(Widget w, Time time,
unsigned char rowType,
int row,
75 unsigned char columnType,
int column,
int nrow,
int ncolumn);
76 Boolean XmLGridCopySelected(Widget w, Time time);
77 void XmLGridDeleteAllColumns(Widget w,
unsigned char type);
78 void XmLGridDeleteAllRows(Widget w,
unsigned char type);
79 void XmLGridDeleteColumns(Widget w,
unsigned char type,
int position,
80 int count);
81 void XmLGridDeleteRows(Widget w,
unsigned char type,
int position,
int count);
82 void XmLGridDeselectAllCells(Widget w, Boolean notify);
83 void XmLGridDeselectAllColumns(Widget w, Boolean notify);
84 void XmLGridDeselectAllRows(Widget w, Boolean notify);
85 void XmLGridDeselectCell(Widget w,
int row,
int column, Boolean notify);
86 void XmLGridDeselectColumn(Widget w,
int column, Boolean notify);
87 void XmLGridDeselectRow(Widget w,
int row, Boolean notify);
88 int XmLGridEditBegin(Widget w, Boolean insert,
int row,
int column);
89 void XmLGridEditCancel(Widget w);
90 void XmLGridEditComplete(Widget w);
91 XmLGridColumn XmLGridGetColumn(Widget w,
unsigned char columnType,
int column);
92 void XmLGridGetFocus(Widget w,
int *row,
int *column, Boolean *focusIn);
93 XmLGridRow XmLGridGetRow(Widget w,
unsigned char rowType,
int row);
94 int XmLGridGetSelectedCellCount(Widget w);
95 int XmLGridGetSelectedCells(Widget w,
int *rowPositions,
96 int *columnPositions,
int count);
97 int XmLGridGetSelectedColumnCount(Widget w);
98 int XmLGridGetSelectedColumns(Widget w,
int *positions,
int count);
99 int XmLGridGetSelectedRow(Widget w);
100 int XmLGridGetSelectedRowCount(Widget w);
101 int XmLGridGetSelectedRows(Widget w,
int *positions,
int count);
102 void XmLGridMoveColumns(Widget w,
int newPosition,
int position,
int count);
103 void XmLGridMoveRows(Widget w,
int newPosition,
int position,
int count);
104 Boolean XmLGridPaste(Widget w);
105 Boolean XmLGridPastePos(Widget w,
unsigned char rowType,
int row,
106 unsigned char columnType,
int column);
107 int XmLGridRead(Widget w,
FILE *file,
int format,
char delimiter);
108 int XmLGridReadPos(Widget w,
FILE *file,
int format,
char delimiter,
109 unsigned char rowType,
int row,
unsigned char columnType,
int column);
110 void XmLGridRedrawAll(Widget w);
111 void XmLGridRedrawCell(Widget w,
unsigned char rowType,
int row,
112 unsigned char columnType,
int column);
113 void XmLGridRedrawColumn(Widget w,
unsigned char type,
int column);
114 void XmLGridRedrawRow(Widget w,
unsigned char type,
int row);
115 void XmLGridReorderColumns(Widget w,
int *newPositions,
116 int position,
int count);
117 void XmLGridReorderRows(Widget w,
int *newPositions,
118 int position,
int count);
119 int XmLGridRowColumnToXY(Widget w,
unsigned char rowType,
int row,
120 unsigned char columnType,
int column, Boolean clipped, XRectangle *rect);
121 Boolean XmLGridRowIsVisible(Widget w,
int row);
122 void XmLGridSelectAllCells(Widget w, Boolean notify);
123 void XmLGridSelectAllColumns(Widget w, Boolean notify);
124 void XmLGridSelectAllRows(Widget w, Boolean notify);
125 void XmLGridSelectCell(Widget w,
int row,
int column, Boolean notify);
126 void XmLGridSelectColumn(Widget w,
int column, Boolean notify);
127 void XmLGridSelectRow(Widget w,
int row, Boolean notify);
128 int XmLGridSetFocus(Widget w,
int row,
int column);
129 int XmLGridSetStrings(Widget w,
char *data);
130 int XmLGridSetStringsPos(Widget w,
unsigned char rowType,
int row,
131 unsigned char columnType,
int column,
char *data);
132 int XmLGridWrite(Widget w,
FILE *file,
int format,
char delimiter,
133 Boolean skipHidden);
134 int XmLGridWritePos(Widget w,
FILE *file,
int format,
char delimiter,
135 Boolean skipHidden,
unsigned char rowType,
int row,
136 unsigned char columnType,
int column,
int nrow,
int ncolumn);
137 int XmLGridXYToRowColumn(Widget w,
int x,
int y,
unsigned char *rowType,
138 int *row,
unsigned char *columnType,
int *column);
139
140 int XmLGridPosIsResize(Widget g,
int x,
int y);
141
142 void XmLGridSetVisibleColumnCount(Widget w,
int num_visible);
143 void XmLGridHideRightColumn(Widget w);
144 void XmLGridUnhideRightColumn(Widget w);
145
146 int XmLGridGetRowCount(Widget w);
147 int XmLGridGetColumnCount(Widget w);
148
149 int XmLGridColumnWidthInPixels(XmLGridColumn column);
150 int XmLGridVSBWidth(Widget w);
151
152 void
153 XmLGridXYToCellTracking(Widget widget,
154 int x,
155 int y,
156 Boolean * m_inGrid,
157 int * m_lastRow,
158 int * m_lastCol,
159 unsigned char * m_lastRowtype,
160 unsigned char * m_lastColtype,
161 int * outRow,
162 int * outCol,
163 Boolean * enter,
164 Boolean * leave);
165
166 void XmLGridGetSort(Widget w,
int *column,
unsigned char *sortType);
167 void XmLGridSetSort(Widget w,
int column,
unsigned char sortType);
168
169
170 void XmLGridSetIgnoreModifyVerify(Widget g, Boolean set);
171 void XmLGridFocusAndShowRow(Widget g,
int row);
172
173
174 #ifdef XmL_CPP
175 }
176 #endif
177 #endif
178