3 #ifndef __ZmTableTool_H
4 #define __ZmTableTool_H
6 #include <X11/Intrinsic.h>
10 #include <mix/growbuf.h>
11 #include <zm/ZmSelection.H>
15 #define ZmTT_DEFAULT_COLUMN_WIDTH 10
18 #define ZmTT_DEFAULT_RES_NAME "TableTool"
21 #define ZmTT_DEFAULT_ROW_LABEL_WIDTH 6
24 #define ZmTT_VECTOR_SEPARATOR "; "
37 const char* szResName = ZmTT_DEFAULT_RES_NAME);
47 operator Widget ()
const;
67 Logic is_left_column_fixed ()
const;
71 Logic is_rows_number_fixed ()
const;
75 void get_current_pos (
int& iRow,
int& iColumn)
const;
101 void scan_string (AtomType atype,
const char* s,
void* v);
105 void scan_string (AtomType atype,
int dim,
const char* s,
void* v);
117 virtual void write_cell (
int iRow,
int iColumn,
const char* s);
135 virtual char*
draw_cell (
int iRow,
int iColumn);
166 virtual Logic
verify_cell (
int iRow,
int iColumn,
const char* szText);
169 virtual void popup_menu (
int iRow,
int iColumn);
236 #define POPUP_MENU_clipboard 0
237 #define POPUP_MENU_sep1 1
238 #define POPUP_MENU_COPY 2
239 #define POPUP_MENU_PASTE 3
240 #define POPUP_MENU_sep2 4
241 #define POPUP_MENU_sep3 5
242 #define POPUP_MENU_rows 6
243 #define POPUP_MENU_sep4 7
244 #define POPUP_MENU_INSERT_ROW 8
245 #define POPUP_MENU_INSERT_ROWS 9
246 #define POPUP_MENU_DELETE 10
247 #define POPUP_MENU_DUPLICATE 11
248 #define POPUP_MENU_SELECT_ROW 12
249 #define POPUP_MENU_SELECT_TILL 13
250 #define POPUP_MENU_SELECT_ALL 14
251 #define POPUP_MENU_UNSELECT_ALL 15
294 Logic
event_to_pos (XEvent* xev,
int& iRow,
int& iColumn);
324 static void PostItCB (Widget w, XtPointer pUserData,
325 XEvent* event, Boolean* rc);
329 XtPointer pCallData);
332 static void InsertRowCB (Widget w, XtPointer pUserData,
333 XtPointer pCallData);
334 static void InsertRowsCB (Widget w, XtPointer pUserData,
335 XtPointer pCallData);
338 static void DeleteRowsCB (Widget w, XtPointer pUserData,
339 XtPointer pCallData);
343 XtPointer pCallData);
346 static void SelectRowCB (Widget w, XtPointer pUserData,
347 XtPointer pCallData);
351 XtPointer pCallData);
355 XtPointer pCallData);
359 XtPointer pCallData);
362 static void EnterCellCB (Widget w, XtPointer pUserData,
363 XtPointer pCallData);
366 static void ModifyCellCB (Widget w, XtPointer pUserData,
367 XtPointer pCallData);
370 static void VerifyCellCB (Widget w, XtPointer pUserData,
371 XtPointer pCallData);
375 XtPointer pCallData);
378 static void LabelCB (Widget w, XtPointer pUserData,
379 XtPointer pCallData);
389 static void ClipbCutCB (Widget w, XtPointer pUserData,
390 XtPointer pCallData);
393 static void ClipbCopyCB (Widget w, XtPointer pUserData,
394 XtPointer pCallData);
400 static void ClipbPasteCB (Widget w, XtPointer pUserData,
401 XtPointer pCallData);
Definition: ZmSelection.H:16