KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWMultiColumnList.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWMultiColumnList.h,v $
4 
5  Copyright (c) Kitware, Inc.
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 // .NAME vtkKWMultiColumnList - a multi-column list
15 // .SECTION Description
16 // A composite widget used for displaying multi-column lists. It is a
17 // front-end to a tablelist::tablelist.
18 // A tablelist is a multi-column listbox, implemented as a mega-widget,
19 // consisting of a body and a header. The body displays a list of items, one
20 // per line. Each item is a list of elements, which are aligned in columns.
21 // In other words, an item is the contents of a row, and an element is the
22 // text contained in a cell. The header consists of label widgets displaying
23 // the column titles. The labels can be used, among others, for interactive
24 // column resizing and column-based sorting of the items.
25 // Use vtkKWMultiColumnListWithScrollbars if you need scrollbars.
26 // .SECTION Thanks
27 // This work is part of the National Alliance for Medical Image
28 // Computing (NAMIC), funded by the National Institutes of Health
29 // through the NIH Roadmap for Medical Research, Grant U54 EB005149.
30 // Information on the National Centers for Biomedical Computing
31 // can be obtained from http://nihroadmap.nih.gov/bioinformatics.
32 // .SECTION See Also
33 // vtkKWMultiColumnListWithScrollbars
34 
35 #ifndef __vtkKWMultiColumnList_h
36 #define __vtkKWMultiColumnList_h
37 
38 #include "vtkKWCoreWidget.h"
39 
40 class vtkKWIcon;
41 class vtkKWMultiColumnListInternals;
42 class vtkKWCheckButton;
43 class vtkKWComboBox;
44 class vtkKWFrame;
46 class vtkStringArray;
47 
49 {
50 public:
51  static vtkKWMultiColumnList* New();
52  vtkTypeRevisionMacro(vtkKWMultiColumnList,vtkKWCoreWidget);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
55  // Description:
56  // Set/add/remove a binding to a widget, i.e. the command that is invoked
57  // whenever the 'event' is triggered on the widget.
58  // SetBinding will replace any old bindings, whereas AddBinding will
59  // add the binding to the list of bindings already defined for that event.
60  // RemoveBinding can remove a specific binding or all bindings for an event.
61  // The 'object' argument is the object that will have the method called on
62  // it. The 'method' argument is the name of the method to be called and any
63  // arguments in string form. If the object is NULL, the method is still
64  // evaluated as a simple command.
65  virtual void SetBinding(
66  const char *event, vtkObject *object, const char *method);
67  virtual void SetBinding(
68  const char *event, const char *command);
69  virtual void AddBinding(
70  const char *event, vtkObject *object, const char *method);
71  virtual void AddBinding(
72  const char *event, const char *command);
73  virtual void RemoveBinding(const char *event);
74  virtual void RemoveBinding(
75  const char *event, vtkObject *object, const char *method);
76 
77  // Description:
78  // Set focus to this widget.
79  virtual void Focus();
80  virtual int HasFocus();
81 
82  // Description:
83  // Set the width (in chars) and height (in lines).
84  // If width is set to 0, the widget will be large enough to show
85  // all columns. If set to a different value, columns will stretch
86  // depending on their width (see SetColumnWidth) and on the strech
87  // parameter (see SetColumnStretchable and StretchableColumns)
88  virtual void SetWidth(int width);
89  virtual int GetWidth();
90  virtual void SetHeight(int height);
91  virtual int GetHeight();
92 
93  // Description:
94  // Set/Get the background color of the widget.
95  virtual void GetBackgroundColor(double *r, double *g, double *b);
96  virtual double* GetBackgroundColor();
97  virtual void SetBackgroundColor(double r, double g, double b);
98  virtual void SetBackgroundColor(double rgb[3])
99  { this->SetBackgroundColor(rgb[0], rgb[1], rgb[2]); };
100 
101  // Description:
102  // Set/Get the foreground color of the widget.
103  virtual void GetForegroundColor(double *r, double *g, double *b);
104  virtual double* GetForegroundColor();
105  virtual void SetForegroundColor(double r, double g, double b);
106  virtual void SetForegroundColor(double rgb[3])
107  { this->SetForegroundColor(rgb[0], rgb[1], rgb[2]); };
108 
109  // Description:
110  // Set/Get the highlight thickness, a non-negative value indicating the
111  // width of the highlight rectangle to draw around the outside of the
112  // widget when it has the input focus.
113  virtual void SetHighlightThickness(int);
114  virtual int GetHighlightThickness();
115 
116  // Description:
117  // Set/Get the border width, a non-negative value indicating the width of
118  // the 3-D border to draw around the outside of the widget (if such a border
119  // is being drawn; the Relief option typically determines this).
120  virtual void SetBorderWidth(int);
121  virtual int GetBorderWidth();
122 
123  // Description:
124  // Set/Get the 3-D effect desired for the widget.
125  // The value indicates how the interior of the widget should appear
126  // relative to its exterior.
127  // Valid constants can be found in vtkKWOptions::ReliefType.
128  virtual void SetRelief(int);
129  virtual int GetRelief();
130  virtual void SetReliefToRaised();
131  virtual void SetReliefToSunken();
132  virtual void SetReliefToFlat();
133  virtual void SetReliefToRidge();
134  virtual void SetReliefToSolid();
135  virtual void SetReliefToGroove();
136 
137  // Description:
138  // Insert a column just before the column given by col_index. If col_index
139  // is equal to (or greater than) the number of columns the new column is
140  // added to the end of the column list. The AddColumn method can be
141  // used to add a column directly to the end of the list.
142  // Returns the index of the column
143  virtual int InsertColumn(int col_index, const char *title);
144  virtual int AddColumn(const char *title);
145 
146  // Description:
147  // Set a column name. Most of the API in this class uses numerical indices
148  // to refer to columns. Yet, the index of a column can change if columns
149  // are added or removed. Assigning a unique name to a column provides a
150  // way to refer to a column without worrying about its location. Use the
151  // GetColumnIndexWithName() to query the index of a column given its name.
152  // indexing is done using numerical index.
153  // Note that the name of a column has nothing to do with its title, which
154  // is used to label the column in the table.
155  virtual void SetColumnName(int col_index, const char *col_name);
156  virtual const char* GetColumnName(int col_index);
157  virtual int GetColumnIndexWithName(const char *col_name);
158 
159  // Description:
160  // Get number columns.
161  // Returns -1 on error.
162  virtual int GetNumberOfColumns();
163 
164  // Description:
165  // Adjusts the view in the tablelist so that the column is visible.
166  virtual void SeeColumn(int col_index);
167 
168  // Description:
169  // Delete one or all columns in the list.
170  virtual void DeleteColumn(int col_index);
171  virtual void DeleteAllColumns();
172 
173  // Description:
174  // Specifies a boolean value that determines whether the columns can be
175  // moved interactively.
176  vtkBooleanMacro(MovableColumns, int);
177  virtual void SetMovableColumns(int);
178  virtual int GetMovableColumns();
179 
180  // Description:
181  // Specifies additional space to provide above and below each row of the
182  // widget.
183  virtual void SetRowSpacing(int);
184  virtual int GetRowSpacing();
185 
186  // Description:
187  // Specifies a boolean value that determines whether the columns can be
188  // resized interactively.
189  vtkBooleanMacro(ResizableColumns, int);
190  virtual void SetResizableColumns(int);
191  virtual int GetResizableColumns();
192 
193  // Description:
194  // Specifies a boolean value that determines whether the columns are to be
195  // separated with borders.
196  vtkBooleanMacro(ColumnSeparatorsVisibility, int);
197  virtual void SetColumnSeparatorsVisibility(int);
198  virtual int GetColumnSeparatorsVisibility();
199 
200  // Description:
201  // Specifies a boolean value that determines whether the columns labels
202  // are to be shown.
203  vtkBooleanMacro(ColumnLabelsVisibility, int);
204  virtual void SetColumnLabelsVisibility(int);
205  virtual int GetColumnLabelsVisibility();
206 
207  // Description:
208  // Set/Get the column label background and foreground colors.
209  virtual void GetColumnLabelBackgroundColor(double *r, double *g, double *b);
210  virtual double* GetColumnLabelBackgroundColor();
211  virtual void SetColumnLabelBackgroundColor(double r, double g, double b);
212  virtual void SetColumnLabelBackgroundColor(double rgb[3])
213  { this->SetColumnLabelBackgroundColor(rgb[0], rgb[1], rgb[2]); };
214  virtual void GetColumnLabelForegroundColor(double *r, double *g, double *b);
215  virtual double* GetColumnLabelForegroundColor();
216  virtual void SetColumnLabelForegroundColor(double r, double g, double b);
217  virtual void SetColumnLabelForegroundColor(double rgb[3])
218  { this->SetColumnLabelForegroundColor(rgb[0], rgb[1], rgb[2]); };
219 
220  // Description:
221  // Set/Get the column title.
222  virtual void SetColumnTitle(int col_index, const char*);
223  virtual const char* GetColumnTitle(int col_index);
224 
225  // Description:
226  // Set/Get the width and maxwidth of a column.
227  // Both must be a number. A positive value specifies the column's
228  // width in average-size characters of the widget's font. If width is
229  // negative, its absolute value is interpreted as a column width in pixels.
230  // Finally, a value of zero (default) specifies that the column's width is
231  // to be made just large enough to hold all the elements in the column,
232  // including its header
233  virtual void SetColumnWidth(int col_index, int width);
234  virtual int GetColumnWidth(int col_index);
235  virtual void SetColumnMaximumWidth(int col_index, int width);
236  virtual int GetColumnMaximumWidth(int col_index);
237 
238  // Description:
239  // Specifies a boolean value that determines whether a specific column
240  // can be stretched or not to fill the empty space on the right of
241  // the table that might appear when it is resized or the width is
242  // set to a larger value (see SetWidth).
243  // Use StretchableColumns to set all columns to be stretchable.
244  virtual void SetColumnStretchable(int col_index, int flag);
245  virtual void ColumnStretchableOn(int col_index)
246  { this->SetColumnStretchable(col_index, 1); };
247  virtual void ColumnStretchableOff(int col_index)
248  { this->SetColumnStretchable(col_index, 0); };
249  virtual int GetColumnStretchable(int col_index);
250  vtkBooleanMacro(StretchableColumns, int);
251  virtual void SetStretchableColumns(int);
252 
253  // Description:
254  // Set/Get the alignment of a column, or the aligment of the column
255  // label specifically.
256  // The alignment must be one of left (default), right, or center.
257  //BTX
258  enum
259  {
260  ColumnAlignmentLeft = 0,
263  ColumnAlignmentUnknown
264  };
265  //ETX
266  virtual int GetColumnAlignment(int col_index);
267  virtual void SetColumnAlignment(int col_index, int align);
268  virtual void SetColumnAlignmentToLeft(int col_index)
269  { this->SetColumnAlignment(
271  virtual void SetColumnAlignmentToRight(int col_index)
272  { this->SetColumnAlignment(
274  virtual void SetColumnAlignmentToCenter(int col_index)
275  { this->SetColumnAlignment(
277  virtual int GetColumnLabelAlignment(int col_index);
278  virtual void SetColumnLabelAlignment(int col_index, int align);
279  virtual void SetColumnLabelAlignmentToLeft(int col_index)
280  { this->SetColumnLabelAlignment(
282  virtual void SetColumnLabelAlignmentToRight(int col_index)
283  { this->SetColumnLabelAlignment(
285  virtual void SetColumnLabelAlignmentToCenter(int col_index)
286  { this->SetColumnLabelAlignment(
288 
289  // Description:
290  // Sort by a given column.
291  // The GetLastSortedColumn returns the numerical index of the column by
292  // which the items were last sorted with the aid of the SortByColumn or -1 if
293  // they haven't been sorted at all.
294  //BTX
295  enum
296  {
297  SortByIncreasingOrder = 0,
299  SortByUnknownOrder
300  };
301  //ETX
302  virtual void SortByColumn(int col_index, int order);
303  virtual void SortByColumnIncreasingOrder(int col_index)
304  { this->SortByColumn(
306  virtual void SortByColumnDecreasingOrder(int col_index)
307  { this->SortByColumn(
309  virtual int GetLastSortedColumn();
310  virtual int GetLastSortedOrder();
311 
312  // Description:
313  // Set/Get each column sort mode
314  //BTX
315  enum
316  {
317  SortModeAscii = 0,
322  SortModeUnknown
323  };
324  //ETX
325  virtual int GetColumnSortMode(int col_index);
326  virtual void SetColumnSortMode(int col_index, int mode);
327  virtual void SetColumnSortModeToAscii(int col_index)
328  { this->SetColumnSortMode(
330  virtual void SetColumnSortModeToDictionary(int col_index)
331  { this->SetColumnSortMode(
333  virtual void SetColumnSortModeToInteger(int col_index)
334  { this->SetColumnSortMode(
336  virtual void SetColumnSortModeToReal(int col_index)
337  { this->SetColumnSortMode(
338  col_index, vtkKWMultiColumnList::SortModeReal); };
339 
340  // Description:
341  // Specifies a boolean value that determines whether the widget should place
342  // an arrow indicating the sort order into the header label of the column
343  // being sorted
344  vtkBooleanMacro(SortArrowVisibility, int);
345  virtual void SetSortArrowVisibility(int);
346  virtual int GetSortArrowVisibility();
347 
348  // Description:
349  // Set/Get if the background color of the sorted column should be set
350  // automatically to SortedColumnBackgroundColor.
351  // Warning: when a different column is sorted, the background color of the
352  // previously sorted column is cleared (i.e., this column has no background
353  // color anymore).
354  vtkBooleanMacro(ColorSortedColumn, int);
355  vtkGetMacro(ColorSortedColumn, int);
356  virtual void SetColorSortedColumn(int);
357 
358  // Description:
359  // Set/Get the background color of the sorted column, when ColorSortedColumn
360  // is set to On.
361  vtkGetVector3Macro(SortedColumnBackgroundColor,double);
362  virtual void SetSortedColumnBackgroundColor(
363  double r, double g, double b);
364  virtual void SetSortedColumnBackgroundColor(double rgb[3])
365  { this->SetSortedColumnBackgroundColor(rgb[0], rgb[1], rgb[2]); };
366 
367  // Description:
368  // Set/Get the type of the temporary embedded widget to be used for
369  // interactive editing of the contents of the given column's cells.
370  // It can be one of entry (which is the default), spinbox or checkbutton
371  // at the moment.
372  // This can be set at the cell level too (see SetCellEditWindow).
373  // Note that this setting controls the widget used for *editing*, not for
374  // display. The cell contents is still displayed using whatever text (see
375  // SetCellText), image (see SetCellImage) or custom window (see
376  // SetCellWindowCommand) is defined at the cell level. Check the
377  // SetCellWindowCommandToCheckButton or SetCellWindowCommandToColorButton
378  // methods for more advanced display *and* editing features.
379  //BTX
380  enum
381  {
382  ColumnEditWindowEntry = 0,
385  ColumnEditWindowUnknown
386  };
387  //ETX
388  virtual int GetColumnEditWindow(int col_index);
389  virtual void SetColumnEditWindow(int col_index, int arg);
390  virtual void SetColumnEditWindowToEntry(int col_index)
391  { this->SetColumnEditWindow(
393  virtual void SetColumnEditWindowToCheckButton(int col_index)
394  { this->SetColumnEditWindow(
396  virtual void SetColumnEditWindowToSpinBox(int col_index)
397  { this->SetColumnEditWindow(
399 
400  // Description:
401  // Specifies a boolean value that determines whether a specific column
402  // can be resized interactively.
403  virtual void SetColumnResizable(int col_index, int flag);
404  virtual void ColumnResizableOn(int col_index)
405  { this->SetColumnResizable(col_index, 1); };
406  virtual void ColumnResizableOff(int col_index)
407  { this->SetColumnResizable(col_index, 0); };
408  virtual int GetColumnResizable(int col_index);
409 
410  // Description:
411  // Specifies a boolean value that determines whether a specific column
412  // can be edited interactively.
413  virtual void SetColumnEditable(int col_index, int flag);
414  virtual void ColumnEditableOn(int col_index)
415  { this->SetColumnEditable(col_index, 1); };
416  virtual void ColumnEditableOff(int col_index)
417  { this->SetColumnEditable(col_index, 0); };
418  virtual int GetColumnEditable(int col_index);
419 
420  // Description:
421  // Specifies a boolean value that determines whether a specific column
422  // is visible or not.
423  virtual void SetColumnVisibility(int col_index, int flag);
424  virtual void ColumnVisibilityOn(int col_index)
425  { this->SetColumnVisibility(col_index, 1); };
426  virtual void ColumnVisibilityOff(int col_index)
427  { this->SetColumnVisibility(col_index, 0); };
428  virtual int GetColumnVisibility(int col_index);
429 
430  // Description:
431  // Set/Get an arbitrary column attribute
432  // (warning, Get returns a pointer to the Tcl buffer).
433  virtual int HasColumnAttribute(
434  int col_index, const char *name);
435  virtual void SetColumnAttribute(
436  int col_index, const char *name, const char *value);
437  virtual const char* GetColumnAttribute(
438  int col_index, const char *name);
439  virtual void SetColumnAttributeAsInt(
440  int col_index, const char *name, int value);
441  virtual int GetColumnAttributeAsInt(
442  int col_index, const char *name);
443 
444  // Description:
445  // Set/Get a column background and foreground colors
446  virtual void GetColumnBackgroundColor(
447  int col_index, double *r, double *g, double *b);
448  virtual double* GetColumnBackgroundColor(int col_index);
449  virtual void SetColumnBackgroundColor(
450  int col_index, double r, double g, double b);
451  virtual void SetColumnBackgroundColor(int col_index, double rgb[3])
452  { this->SetColumnBackgroundColor(col_index, rgb[0], rgb[1], rgb[2]); };
453  virtual void ClearColumnBackgroundColor(int col_index);
454  virtual void GetColumnForegroundColor(
455  int col_index, double *r, double *g, double *b);
456  virtual double* GetColumnForegroundColor(int col_index);
457  virtual void SetColumnForegroundColor(
458  int col_index, double r, double g, double b);
459  virtual void SetColumnForegroundColor(int col_index, double rgb[3])
460  { this->SetColumnForegroundColor(col_index, rgb[0], rgb[1], rgb[2]); };
461 
462  // Description:
463  // Specifies an image to display in the label of a column
464  virtual void SetColumnLabelImage(int col_index, const char *);
465  virtual void SetColumnLabelImageToIcon(int col_index, vtkKWIcon *icon);
466  virtual void SetColumnLabelImageToPredefinedIcon(
467  int col_index, int icon_index);
468  virtual void SetColumnLabelImageToPixels(
469  int col_index,
470  const unsigned char *pixels, int width, int height, int pixel_size,
471  unsigned long buffer_length = 0);
472 
473  // Description:
474  // Specifies the command to be invoked when displaying the contents of a
475  // cell within a column col_index or adding them to the selection when the
476  // latter is being exported. If command is a nonempty string, then it is
477  // automatically concatenated with the cell's text, the resulting script is
478  // evaluated in the global scope, and the return value is displayed in the
479  // cell or added to the selection instead of the original data. For example,
480  // a cell may hold a data value in seconds, but the format command could
481  // be set to display the cell value as a formatted data (say "%Y-%m-%d").
482  // Notice that this option is only used for preparing the text to be
483  // displayed or returned when exporting the selection, and does not affect
484  // the internal cell contents. In the case of the above example, this will
485  // make it possible to sort the items very easily by time, with a second's
486  // precision, even if their visual representation only contains the year,
487  // month, and day.
488  // Also check SetColumnFormatCommandToEmptyOutput or
489  // SetColumnFormatCommandToEmptyOutputIfWindowCommand, which can be used
490  // to set the ColumnFormatCommand to return an empty output.
491  // The 'object' argument is the object that will have the method called on
492  // it. The 'method' argument is the name of the method to be called and any
493  // arguments in string form. If the object is NULL, the method is still
494  // evaluated as a simple command.
495  // The following parameters are also passed to the command:
496  // - the current cell's text for that col_index column: const char*
497  // The following output is expected from the command:
498  // - the text to be displayed in the cell instead: const char*
499  virtual void SetColumnFormatCommand(int col_index,
500  vtkObject *object, const char *method);
501 
502  // Description:
503  // Specifies a command to be used for the comparison of the items when
504  // invoking the sort subcommand of the Tcl command associated with the
505  // specified column of the tablelist widget.
506  // To compare two items (viewed as lists of cell contents
507  // within one row each) during the sort operation, the command is
508  // automatically concatenated with the two items and the resulting script
509  // is evaluated. The script should return an integer less than, equal to, or
510  // greater than zero if the first item is to be considered less than, equal
511  // to, or greater than the second, respectively.
512  // The 'object' argument is the object that will have the method called on
513  // it. The 'method' argument is the name of the method to be called and any
514  // arguments in string form. If the object is NULL, the method is still
515  // evaluated as a simple command.
516  // The following parameters are also passed to the command:
517  // - the contents of the first item/cell to compare: const char*
518  // - the contents of the second item/cell to compare: const char*
519  // The following output is expected from the command:
520  // - the result of the comparison: int
521  virtual void SetColumnSortCommand(int col_index,
522  vtkObject *object, const char *method);
523 
524  // Description:
525  // Specifies the command to be invoked when displaying the contents of a
526  // cell within a column col_index.
527  // This is a convenience method to set the ColumnFormatCommand to return an
528  // empty output. This comes in handy if only images or embedded windows are
529  // to be displayed in a column but the texts associated with the cells may
530  // not simply be empty strings because they are needed for other purposes
531  // (like sorting or editing). In such cases, a command returning an empty
532  // string can be used, thus making sure that the textual information
533  // contained in that column remains hidden. This method can be used just
534  // for that instead of SetColumnFormatCommand.
535  // SetColumnFormatCommandToEmptyOutputIfWindowCommand is another variant
536  // of that will only return an empty ouput if the cell's window command
537  // is set (see SetCellWindowCommand methods).
538  virtual void SetColumnFormatCommandToEmptyOutput(int col_index);
539  virtual void SetColumnFormatCommandToEmptyOutputIfWindowCommand(int col_index);
540 
541  // Description:
542  // Specifies a command to associate with the widget. This command is
543  // typically invoked when the "Delete" Key is pressed, but this will only
544  // invoke the 'method' passed in. This 'method' of the 'object' needs to
545  // decide what to do with this <KeyPress-Delete> event. For examples, if
546  // user wants to go ahead and delete, the 'object' needs to find out the
547  // selected rows/cells and delete them using API of this class.
548  // The 'object' argument is the object that will have the method called on
549  // it. The 'method' argument is the name of the method to be called and any
550  // arguments in string form. If the object is NULL, the method is still
551  // evaluated as a simple command.
552  virtual void SetKeyPressDeleteCommand(vtkObject *object,
553  const char *method);
554 
555  // Description:
556  // Specifies a boolean value that determines whether the rows can be
557  // moved interactively.
558  vtkBooleanMacro(MovableRows, int);
559  virtual void SetMovableRows(int);
560  virtual int GetMovableRows();
561 
562  // Description:
563  // Add a row(rows) at the end, or insert it(them) at a given location.
564  virtual void AddRow();
565  virtual void AddRows(int num_rows);
566  virtual void InsertRow(int row_index);
567  virtual void InsertRows(int row_index, int num_rows);
568 
569  // Description:
570  // Get number of rows.
571  // Returns -1 on error.
572  virtual int GetNumberOfRows();
573 
574  // Description:
575  // Adjusts the view in the tablelist so that the row is visible.
576  virtual void SeeRow(int row_index);
577 
578  // Description:
579  // Delete one or all rows in the list.
580  virtual void DeleteRow(int row_index);
581  virtual void DeleteAllRows();
582 
583  // Description:
584  // Find a specific text in a specific column and delete the corresponding
585  // row if found.
586  virtual void FindAndDeleteRow(
587  int look_for_col_index, const char *look_for_text);
588 
589  // Description:
590  // Set/Get an arbitrary row attribute
591  // (warning, Get returns a pointer to the Tcl buffer).
592  virtual int HasRowAttribute(
593  int row_index, const char *name);
594  virtual void SetRowAttribute(
595  int row_index, const char *name, const char *value);
596  virtual const char* GetRowAttribute(
597  int row_index, const char *name);
598  virtual void SetRowAttributeAsInt(
599  int row_index, const char *name, int value);
600  virtual int GetRowAttributeAsInt(
601  int row_index, const char *name);
602 
603  // Description:
604  // Set/Get a row background and foreground colors
605  virtual void GetRowBackgroundColor(
606  int row_index, double *r, double *g, double *b);
607  virtual double* GetRowBackgroundColor(int row_index);
608  virtual void SetRowBackgroundColor(
609  int row_index, double r, double g, double b);
610  virtual void SetRowBackgroundColor(int row_index, double rgb[3])
611  { this->SetRowBackgroundColor(row_index, rgb[0], rgb[1], rgb[2]); };
612  virtual void ClearRowBackgroundColor(int col_index);
613  virtual void GetRowForegroundColor(
614  int row_index, double *r, double *g, double *b);
615  virtual double* GetRowForegroundColor(int row_index);
616  virtual void SetRowForegroundColor(
617  int row_index, double r, double g, double b);
618  virtual void SetRowForegroundColor(int row_index, double rgb[3])
619  { this->SetRowForegroundColor(row_index, rgb[0], rgb[1], rgb[2]); };
620 
621  // Description:
622  // Set/Get the stripe background and foreground colors, and strip height
623  // Specifies the colors to use when displaying the items belonging to a
624  // stripe. Each stripe is composed of the same number StripeHeight of
625  // consecutive items. The first stripeHeight items are "normal" ones; they
626  // are followed by a stripe composed of the next StripeHeight items, which
627  // in turn is followed by the same number of "normal" items, and so on.
628  // The default value is an empty string, indicating that the stripes will
629  // inherit the colors of the widget. The Stripe colors have a higher
630  // priority than the column colors, but a lower priority than the
631  // row or cell color.
632  virtual void GetStripeBackgroundColor(double *r, double *g, double *b);
633  virtual double* GetStripeBackgroundColor();
634  virtual void SetStripeBackgroundColor(double r, double g, double b);
635  virtual void SetStripeBackgroundColor(double rgb[3])
636  { this->SetStripeBackgroundColor(rgb[0], rgb[1], rgb[2]); };
637  virtual void ClearStripeBackgroundColor();
638  virtual void GetStripeForegroundColor(double *r, double *g, double *b);
639  virtual double* GetStripeForegroundColor();
640  virtual void SetStripeForegroundColor(double r, double g, double b);
641  virtual void SetStripeForegroundColor(double rgb[3])
642  { this->SetStripeForegroundColor(rgb[0], rgb[1], rgb[2]); };
643  virtual void SetStripeHeight(int height);
644  virtual int GetStripeHeight();
645 
646  // Description:
647  // Specifies a boolean value that determines whether a specific row
648  // can be selected interactively.
649  virtual void SetRowSelectable(int row_index, int flag);
650  virtual void RowSelectableOn(int row_index)
651  { this->SetRowSelectable(row_index, 1); };
652  virtual void RowSelectableOff(int row_index)
653  { this->SetRowSelectable(row_index, 0); };
654  virtual int GetRowSelectable(int row_index);
655 
656  // Description:
657  // Activate a row.
658  virtual void ActivateRow(int row_index);
659 
660  // Description:
661  // Set/Get contents of cell (warning, Get returns a pointer to the Tcl
662  // buffer, copy the resulting string ASAP).
663  // SetCellText is the fast version and assumes the cell already exists!
664  // InsertCellText will insert one (or more) full row(s) if there is no
665  // row/cell at that location (using InsertRow).
666  // Note that InsertCellTextAsDouble will insert a number using the
667  // printf-style %f format type. Use InsertCellTextAsFormattedDouble to
668  // restrict the number of digits (i.e. if size = 5, format will be %.5g)
669  virtual void InsertCellText(
670  int row_index, int col_index, const char *text);
671  virtual void InsertCellTextAsInt(
672  int row_index, int col_index, int value);
673  virtual void InsertCellTextAsDouble(
674  int row_index, int col_index, double value);
675  virtual void InsertCellTextAsFormattedDouble(
676  int row_index, int col_index, double value, int size);
677  virtual void SetCellText(
678  int row_index, int col_index, const char *text);
679  virtual const char* GetCellText(int row_index, int col_index);
680  virtual void SetCellTextAsInt(
681  int row_index, int col_index, int value);
682  virtual int GetCellTextAsInt(int row_index, int col_index);
683  virtual void SetCellTextAsDouble(
684  int row_index, int col_index, double value);
685  virtual void SetCellTextAsFormattedDouble(
686  int row_index, int col_index, double value, int size);
687  virtual double GetCellTextAsDouble(int row_index, int col_index);
688 
689  // Description:
690  // Set/Get an arbitrary cell attribute
691  // (warning, Get returns a pointer to the Tcl buffer).
692  virtual int HasCellAttribute(
693  int row_index, int col_index, const char *name);
694  virtual void SetCellAttribute(
695  int row_index, int col_index, const char *name, const char *value);
696  virtual const char* GetCellAttribute(
697  int row_index, int col_index, const char *name);
698  virtual void SetCellAttributeAsInt(
699  int row_index, int col_index, const char *name, int value);
700  virtual int GetCellAttributeAsInt(
701  int row_index, int col_index, const char *name);
702 
703  // Description:
704  // Convenience function to Set/Get the "enabled" attribute
705  // on a cell. Note that this doesn't automatically enabled or disabled
706  // the contents of a cell but embedded window should check if this
707  // attribute was set to create themselves enabled or disabled automatically.
708  // SetCellEnabledAttribute will call RefreshCellWithWindowCommand on the
709  // cell to give a chance to an embedded window to enable/disable itself.
710  virtual void SetCellEnabledAttribute(
711  int row_index, int col_index, int value);
712  virtual int GetCellEnabledAttribute(
713  int row_index, int col_index);
714  virtual int HasCellEnabledAttribute(
715  int row_index, int col_index);
716 
717  // Description:
718  // Set the contents of a full row or full column.
719  virtual void InsertRowText(int row_index, const char *text);
720  virtual void InsertColumnText(int col_index, const char *text);
721 
722  // Description:
723  // Set the contents of the cell given a column index only and a text to look
724  // for in a specific column. If that text is found, its row index is used to
725  // set the contents of the cell, if it is not found, a new row is inserted.
726  virtual void FindAndInsertCellText(
727  int look_for_col_index, const char *look_for_text ,
728  int col_index, const char *text);
729 
730  // Description:
731  // Activate a cell.
732  virtual void ActivateCell(int row_index, int col_index);
733 
734  // Description:
735  // Adjusts the view in the tablelist so that the cell is visible.
736  virtual void SeeCell(int row_index, int col_index);
737 
738  // Description:
739  // Set/Get a cell background and foreground colors
740  virtual void GetCellBackgroundColor(
741  int row_index, int col_index, double *r, double *g, double *b);
742  virtual double* GetCellBackgroundColor(int row_index, int col_index);
743  virtual void SetCellBackgroundColor(
744  int row_index, int col_index, double r, double g, double b);
745  virtual void SetCellBackgroundColor(
746  int row_index, int col_index, double rgb[3])
747  { this->SetCellBackgroundColor(
748  row_index, col_index, rgb[0], rgb[1], rgb[2]); };
749  virtual void ClearCellBackgroundColor(int row_index, int col_index);
750  virtual void GetCellForegroundColor(
751  int row_index, int col_index, double *r, double *g, double *b);
752  virtual double* GetCellForegroundColor(int row_index, int col_index);
753  virtual void SetCellForegroundColor(
754  int row_index, int col_index, double r, double g, double b);
755  virtual void SetCellForegroundColor(
756  int row_index, int col_index, double rgb[3])
757  { this->SetCellForegroundColor(
758  row_index, col_index, rgb[0], rgb[1], rgb[2]); };
759 
760  // Description:
761  // Get the cell background or foreground color
762  // In order of priority:
763  // - if not selected, color is: cell > row > stripe > column > widget.
764  // - if selected, color is: cell > row > column > widget.
765  virtual void GetCellCurrentBackgroundColor(
766  int row_index, int col_index, double *r, double *g, double *b);
767  virtual double* GetCellCurrentBackgroundColor(int row_index, int col_index);
768  virtual void GetCellCurrentForegroundColor(
769  int row_index, int col_index, double *r, double *g, double *b);
770  virtual double* GetCellCurrentForegroundColor(int row_index, int col_index);
771 
772  // Description:
773  // Specifies a boolean value that determines whether a specific row
774  // can be edited interactively.
775  virtual void SetCellEditable(int row_index, int col_index, int flag);
776  virtual void CellEditableOn(int row_index, int col_index)
777  { this->SetCellEditable(row_index, col_index, 1); };
778  virtual void CellEditableOff(int row_index, int col_index)
779  { this->SetCellEditable(row_index, col_index, 0); };
780  virtual int GetCellEditable(int row_index, int col_index);
781 
782  // Description:
783  // Specifies an image to display in the cell. Both text and image can
784  // be displayed simultaneously. If a WindowCommand is specified for that
785  // cell, it overrides the image.
786  // An attempt is made to blend the image with the current cell background
787  // color (as returned by GetCellBackgroundColor). But since sorting
788  // a column, or inserting new rows, can change the position of the cell
789  // in a stripe (see SetStripeBackgroundColor), it is best to:
790  // - use images that do not have an alpha component, or
791  // - refresh the image periodically (each time a row is added/removed)
792  // also check SetPotentialCellColorsChangedCommand and
793  // ScheduleRefreshAllCellsWithWindowCommand or
794  // ScheduleRefreshAllRowsWithWindowCommand.
795  virtual void SetCellImage(int row_index, int col_index, const char *);
796  virtual void SetCellImageToIcon(
797  int row_index, int col_index, vtkKWIcon *icon);
798  virtual void SetCellImageToPredefinedIcon(
799  int row_index, int col_index, int icon_index);
800  virtual void SetCellImageToPixels(
801  int row_index, int col_index,
802  const unsigned char *pixels, int width, int height, int pixel_size,
803  unsigned long buffer_length = 0);
804  virtual const char* GetCellImage(int row_index, int col_index);
805 
806  // Description:
807  // Set/Get the type of the temporary embedded widget to be used for
808  // interactive editing of the contents of the cell.
809  // This option overrides the one with the same name for the column
810  // containing the given cell, and may have the same values as its
811  // column-related counterpart (see SetColumnEditWindow).
812  // It can be one of entry (which is the default), spinbox or checkbutton
813  // at the moment.
814  // Note that this setting controls the widget used for *editing*, not for
815  // display. The cell contents is still displayed using whatever text (see
816  // SetCellText), image (see SetCellImage) or custom window (see
817  // SetCellWindowCommand) is defined at the cell level. Check the
818  // SetCellWindowCommandToCheckButton or SetCellWindowCommandToColorButton
819  // methods for more advanced display *and* editing features.
820  //BTX
821  enum
822  {
823  CellEditWindowEntry = 0,
826  CellEditWindowUnknown
827  };
828  //ETX
829  virtual int GetCellEditWindow(int row_index, int col_index);
830  virtual void SetCellEditWindow(int row_index, int col_index, int arg);
831  virtual void SetCellEditWindowToEntry(int row_index, int col_index)
832  { this->SetCellEditWindow(
833  row_index, col_index, vtkKWMultiColumnList::CellEditWindowEntry); };
834  virtual void SetCellEditWindowToCheckButton(int row_index, int col_index)
835  { this->SetCellEditWindow(
836  row_index,col_index, vtkKWMultiColumnList::CellEditWindowCheckButton);};
837  virtual void SetCellEditWindowToSpinBox(int row_index, int col_index)
838  { this->SetCellEditWindow(
839  row_index, col_index, vtkKWMultiColumnList::CellEditWindowSpinBox); };
840 
841  // Description:
842  // Specifies a command to create the window (i.e. widget) to be embedded
843  // into the cell located at (row_index, col_index).
844  // The command is automatically concatenated with the name of the tablelist
845  // widget, the cell's row and column indices, as well as the path name of
846  // the embedded window to be created, and the resulting script is evaluated
847  // in the global scope. This path name can be used to create your own
848  // vtkKWWidget by assigning the widget's name manually using vtkKWWidget's
849  // SetWidgetName method.
850  // In most case, you should attempt to set the widget's background and
851  // foreground colors to match the cell's background and foreground colors
852  // (which can be retrieved using GetCellCurrentBackgroundColor and
853  // GetCellCurrentForegroundColor).
854  // Since the background and foreground colors of the cell change dynamically
855  // depending on the sorting order and the selected rows, you should set
856  // the SetPotentialCellColorsChangedCommand to this object's own
857  // ScheduleRefreshColorsOfAllCellsWithWindowCommand method so that each time
858  // the cell colors change, this user-defined widget is refreshed.
859  // Also, if you have set a text contents in the same cell (using SetCellText)
860  // you may want to hide it automatically using
861  // SetColumnFormatCommandToEmptyOutput or
862  // SetColumnFormatCommandToEmptyOutputIfWindowCommand.
863  // The 'object' argument is the object that will have the method called on
864  // it. The 'method' argument is the name of the method to be called and any
865  // arguments in string form. If the object is NULL, the method is still
866  // evaluated as a simple command.
867  // The following parameters are also passed to the command:
868  // - the name of the internal tablelist widget (to be ignored): const char*
869  // - the cell location, i.e. its row and column indices: int, int
870  // - the path name of the embedded window/widget to be created: const char*
871  virtual void SetCellWindowCommand(
872  int row_index, int col_index, vtkObject *object, const char *method);
873 
874  // Description:
875  // The SetCellWindowCommandToCheckButton method is a very convenient
876  // way to automatically display a checkbutton in the cell. The selected
877  // state of the button is interpreted directly from the text in the cell
878  // (as set by SetCellText for example), and thus should be either 0 or 1.
879  // The editable flag of the cell is automatically set to 0, do
880  // not change it manually using SetCellEditable.
881  // When the checkbutton selected state changes, the contents of
882  // the cell is updated automatically (to 0 or 1). Note that the
883  // EditEndCommand and CellUpdatedCommand are handled the same way.
884  // Check the SetCellWindowCommand method for more information.
885  // Important: note that you can not set the Command for this checkbutton
886  // (doing so will prevent CellUpdatedCommand from being called for example
887  // or the cell contents to be updated). Also note that a new checkbutton
888  // instance will be created each time you sort its column (by design of
889  // the third-party tablelist Tk widget used under the hood).
890  // WARNING: do NOT use GetCellWindowAsCheckButton and set any value on it;
891  // anytime the table is sorted, a new checkbutton is recreated automatically
892  // by calling the corresponding CellWindowCommand; therefore, any value
893  // you may have set will be lost. The widget itself is just a representation
894  // of the value inside a cell (here, a boolean).
895  virtual void SetCellWindowCommandToCheckButton(int row_index, int col_index);
896  virtual vtkKWCheckButton *GetCellWindowAsCheckButton(
897  int row_index, int col_index);
898 
899  // Description:
900  // The SetCellWindowCommandToComboBox is a convenience method to
901  // add a list of items in a combo box within one of the cells. For instance,
902  // similar items may be grouped and added in a pull down list. This also
903  // prevents overcrowding the Multi-column list by having things hidden in a
904  // combo box.
905  // WARNING: do NOT use GetCellWindowAsComboBox and set any value on it;
906  // anytime the table is sorted, a new combo box is recreated automatically
907  // by calling the corresponding CellWindowCommand; therefore, any value
908  // you may have set will be lost. The widget itself is just a representation
909  // of the value inside a cell.
910  virtual void SetCellWindowCommandToComboBox(int row_index, int col_index);
911  virtual void SetCellWindowCommandToComboBoxWithValues(
912  int row_index, int col_index, int nb_values, const char *values[]);
913  virtual void SetCellWindowCommandToComboBoxWithValuesAsArray(
914  int row_index, int col_index, vtkStringArray *values);
915  virtual void SetCellWindowCommandToComboBoxWithValuesAsSemiColonSeparated(
916  int row_index, int col_index, const char *values);
917  virtual vtkKWComboBox *GetCellWindowAsComboBox(int row_index, int col_index);
918  virtual void SetCellWindowComboBoxValues(
919  int row_index, int col_index, int nb_values, const char *values[]);
920  virtual void SetCellWindowComboBoxValuesAsArray(
921  int row_index, int col_index, vtkStringArray *values);
922  virtual void SetCellWindowComboBoxValuesAsSemiColonSeparated(
923  int row_index, int col_index, const char *values);
924 
925  // Description:
926  // The SetCellWindowCommandToColorButton method is a convenient
927  // way to automatically display a color button in the cell. The color of
928  // the button is interpreted directly from the text in the cell
929  // (as set by SetCellText for example), provided it is a space separated
930  // list of 3 normalized floating point numbers representing the
931  // red, green and blue components of the color (ex: "1.0 0.2 0.6").
932  // When the color button is edited (if the column or cell is
933  // made editable), a color dialog pops up so that the user can pick
934  // a new color. The contents of the cell is updated automatically
935  // with the new color value, as a similar space separated list of
936  // normalized R, G, B values. Note that the EditStartCommand,
937  // EditEndCommand and CellUpdatedCommand are handled the same way.
938  // Check the SetCellWindowCommand method for more information.
939  // Set UseBalloonHelpStringInCellColorButton to On to set the color button
940  // balloon help string automatically (it will be set to display the
941  // color in different color space). Off by default for performance reasons.
942  // WARNING: do NOT use GetCellWindowAsFrame and set any value on it;
943  // anytime the table is sorted, a new frame is recreated automatically
944  // by calling the corresponding CellWindowCommand; therefore, any value
945  // you may have set will be lost. The widget itself is just a representation
946  // of the value inside a cell (here, a color).
947  virtual void SetCellWindowCommandToColorButton(int row_index, int col_index);
948  virtual vtkKWFrame* GetCellWindowAsFrame(int row_index, int col_index);
949  vtkBooleanMacro(UseBalloonHelpStringInCellColorButton, int);
950  vtkGetMacro(UseBalloonHelpStringInCellColorButton, int);
951  virtual void SetUseBalloonHelpStringInCellColorButton(int);
952 
953  // Description:
954  // The SetCellWindowCommandToPickDirectoryButton is a convenience method
955  // to automatically display a LoadSaveButton with ChooseDirectoryOn
956  // in the cell. The selected directory of the button is interpreted
957  // directly from the text in the cell, as set by SetCellText for example.
958  // WARNING: do NOT use GetCellWindowAsPickDirectoryButton and set any value
959  // on it; anytime the table is sorted, a new directory button is recreated
960  // automatically by calling the corresponding CellWindowCommand; therefore,
961  // any value you may have set will be lost. The widget itself is just a
962  // representation of the value inside a cell (here, a filename).
963  virtual void SetCellWindowCommandToPickDirectoryButton(
964  int row_index, int col_index);
965  virtual vtkKWLoadSaveButton* GetCellWindowAsPickDirectoryButton(
966  int row_index, int col_index);
967 
968  // Description:
969  // Specifies a command to be invoked when the window embedded into the cell
970  // located at (row_index, col_index) is destroyed. It is automatically
971  // concatenated the same parameter as the SetCellWindowCommand method that
972  // was used to create the embedded window.
973  // The 'object' argument is the object that will have the method called on
974  // it. The 'method' argument is the name of the method to be called and any
975  // arguments in string form. If the object is NULL, the method is still
976  // evaluated as a simple command.
977  // The following parameters are also passed to the command:
978  // - the name of the internal tablelist widget (to be ignored): const char*
979  // - the cell location, i.e. row and column indices: int, int
980  // - the path name of the embedded window/widget to be created: const char*
981  virtual void SetCellWindowDestroyCommand(
982  int row_index, int col_index, vtkObject *object, const char *method);
983 
984  // Description:
985  // The SetCellWindowDestroyCommandToRemoveChild method is a convenient
986  // way to automatically set the CellWindowDestroyCommand to a callback that
987  // will remove the child widget that matches the name of the Tk widget about
988  // to be destroyed. This is very useful if the SetCellWindowCommand
989  // is set to a callback that actually allocates a new vtkKWWidget object.
990  // That way, each time the cell is about to be destroyed, it is
991  // cleanly de-allocated first (by setting its Parent to NULL).
992  virtual void SetCellWindowDestroyCommandToRemoveChild(
993  int row_index, int col_index);
994 
995  // Description:
996  // Force a cell (or all cells, or all rows in a column) for which a
997  // WindowCommand has been defined to recreate its dynamic content. It does
998  // so by setting the WindowCommand to NULL, than setting it to its previous
999  // value (per author's suggestion).
1000  // The ScheduleRefreshAllCellsWithWindowCommand method will
1001  // schedule RefreshAllCellsWithWindowCommand when the application is idle.
1002  // The ScheduleRefreshAllRowsWithWindowCommand method will
1003  // schedule RefreshAllRowsWithWindowCommand when the application is idle.
1004  virtual void RefreshCellWithWindowCommand(int row_index, int col_index);
1005  virtual void RefreshAllCellsWithWindowCommand();
1006  virtual void ScheduleRefreshAllCellsWithWindowCommand();
1007  virtual void RefreshAllRowsWithWindowCommand(int col);
1008  virtual void ScheduleRefreshAllRowsWithWindowCommand(int col);
1009  virtual void RefreshEnabledStateOfAllCellsWithWindowCommand();
1010  virtual void ScheduleRefreshEnabledStateOfAllCellsWithWindowCommand();
1011 
1012  // Description:
1013  // Force a cell (or all cells) for which a WindowCommand has been defined
1014  // to set the background and foreground colors to the cell current
1015  // background and foreground colors.
1016  // It does so by tyring to safe-down-cast the widget inside that cell into
1017  // a vtkKWCoreWidget and set its background color to the color returned
1018  // by GetCellCurrentBackgroundColor and its foreground color to the color
1019  // returned by GetCellCurrentForegroundColor. It then performs the same
1020  // for the first level children of the widget inside that cell.
1021  // This can be useful when the cell contents is an image with an alpha
1022  // channel (transparency), or a user-defined dynamic widget
1023  // (see SetCellWindowCommand and SetPotentialCellColorsChangedCommand).
1024  // The ScheduleRefreshColorsOfAllCellsWithWindowCommand method will
1025  // schedule RefreshColorsOfAllCellsWithWindowCommand when the application
1026  // is idle: this is especially useful in conjonction with the
1027  // SetPotentialCellColorsChangedCommand method.
1028  virtual void RefreshColorsOfCellWithWindowCommand(
1029  int row_index, int col_index);
1030  virtual void RefreshColorsOfAllCellsWithWindowCommand();
1031  virtual void ScheduleRefreshColorsOfAllCellsWithWindowCommand();
1032 
1033  // Description:
1034  // Retrieve the path of the window contained in the cell as created by
1035  // the WindowCommand.
1036  virtual const char* GetCellWindowWidgetName(int row_index, int col_index);
1037 
1038  // Description:
1039  // Once a user-defined dynamic widget is created by the WindowCommand,
1040  // clicking on it is likely *not* to trigger the same interactive behavior
1041  // as clicking on a regular cell (i.e., clicking on the widget will not
1042  // select the row or cell for example). This can be a good thing if
1043  // clicking on the widget is meant to be intercepted by the widget to
1044  // trigger a different behaviour, but in many other cases, one would want
1045  // the interaction bindings to remain the same and consistent for all rows.
1046  // In order to do so, the common widget row bindings have to be added to the
1047  // widget the was just created. To do so, call AddBindingsToWidget, either on
1048  // the Tk widget name, or on avtkKWWidget that may have been used to wrap
1049  // around that Tk widget name.
1050  // A complex widget can be made of several other sub-widgets that need
1051  // the bindings to be passed on too. Use AddBindingsToWidgetAndChildren
1052  // to pass the bindings to a widget and its chilren automatically (or
1053  // call AddBindingsToWidget manually on each sub-widgets).
1054  virtual void AddBindingsToWidgetName(const char *widget_name);
1055  virtual void AddBindingsToWidget(vtkKWWidget *widget);
1056  virtual void AddBindingsToWidgetAndChildren(vtkKWWidget *widget);
1057 
1058  // Description:
1059  // Find contents of cell in all table or single column
1060  // One FindCellText signature returns 1 if found, 0 otherwise, and
1061  // assign the position to row_index, col_index. The other FindCellText
1062  // method returns a pointer to an array of 2 ints (row and col index) if
1063  // found, NULL otherwise.
1064  // FindCellTextInColumn return the row index of the cell in the col_index
1065  // column if found, or -1 otherwise.
1066  virtual int FindCellText(const char *text, int *row_index, int *col_index);
1067  virtual int* FindCellText(const char *text);
1068  virtual int FindCellTextInColumn(int col_index, const char *text);
1069  virtual int FindCellTextAsIntInColumn(int col_index, int value);
1070 
1071  // Description:
1072  // Edit cell (or cancel edit). If supported, edit cell contents interactively
1073  // CancelEditing attempts to cancel the current interactive editing.
1074  // FinishEditing attempts to terminate the current interactive editing.
1075  virtual void EditCell(int row_index, int col_index);
1076  virtual void CancelEditing();
1077  virtual void FinishEditing();
1078 
1079  // Description:
1080  // Set/Get the selection background and foreground colors.
1081  virtual void GetSelectionBackgroundColor(double *r, double *g, double *b);
1082  virtual double* GetSelectionBackgroundColor();
1083  virtual void SetSelectionBackgroundColor(double r, double g, double b);
1084  virtual void SetSelectionBackgroundColor(double rgb[3])
1085  { this->SetSelectionBackgroundColor(rgb[0], rgb[1], rgb[2]); };
1086  virtual void GetSelectionForegroundColor(double *r, double *g, double *b);
1087  virtual double* GetSelectionForegroundColor();
1088  virtual void SetSelectionForegroundColor(double r, double g, double b);
1089  virtual void SetSelectionForegroundColor(double rgb[3])
1090  { this->SetSelectionForegroundColor(rgb[0], rgb[1], rgb[2]); };
1091 
1092  // Description:
1093  // Set/Get the selection background and foreground colors for a specific
1094  // column.
1095  virtual void GetColumnSelectionBackgroundColor(
1096  int col_index, double *r, double *g, double *b);
1097  virtual double* GetColumnSelectionBackgroundColor(int col_index);
1098  virtual void SetColumnSelectionBackgroundColor(
1099  int col_index, double r, double g, double b);
1100  virtual void SetColumnSelectionBackgroundColor(int col_index, double rgb[3])
1102  col_index, rgb[0], rgb[1], rgb[2]); };
1103  virtual void GetColumnSelectionForegroundColor(
1104  int col_index, double *r, double *g, double *b);
1105  virtual double* GetColumnSelectionForegroundColor(int col_index);
1106  virtual void SetColumnSelectionForegroundColor(
1107  int col_index, double r, double g, double b);
1108  virtual void SetColumnSelectionForegroundColor(int col_index, double rgb[3])
1110  col_index, rgb[0], rgb[1], rgb[2]); };
1111 
1112  // Description:
1113  // Set/Get the selection background and foreground colors for a specific
1114  // row.
1115  virtual void GetRowSelectionBackgroundColor(
1116  int row_index, double *r, double *g, double *b);
1117  virtual double* GetRowSelectionBackgroundColor(int row_index);
1118  virtual void SetRowSelectionBackgroundColor(
1119  int row_index, double r, double g, double b);
1120  virtual void SetRowSelectionBackgroundColor(int row_index, double rgb[3])
1122  row_index, rgb[0], rgb[1], rgb[2]); };
1123  virtual void GetRowSelectionForegroundColor(
1124  int row_index, double *r, double *g, double *b);
1125  virtual double* GetRowSelectionForegroundColor(int row_index);
1126  virtual void SetRowSelectionForegroundColor(
1127  int row_index, double r, double g, double b);
1128  virtual void SetRowSelectionForegroundColor(int row_index, double rgb[3])
1130  row_index, rgb[0], rgb[1], rgb[2]); };
1131 
1132  // Description:
1133  // Set/Get the selection background and foreground colors for a specific
1134  // cell.
1135  virtual void GetCellSelectionBackgroundColor(
1136  int row_index, int col_index, double *r, double *g, double *b);
1137  virtual double* GetCellSelectionBackgroundColor(
1138  int row_index, int col_index);
1139  virtual void SetCellSelectionBackgroundColor(
1140  int row_index, int col_index, double r, double g, double b);
1141  virtual void SetCellSelectionBackgroundColor(
1142  int row_index, int col_index, double rgb[3])
1144  row_index, col_index, rgb[0], rgb[1], rgb[2]); };
1145  virtual void GetCellSelectionForegroundColor(
1146  int row_index, int col_index, double *r, double *g, double *b);
1147  virtual double* GetCellSelectionForegroundColor(
1148  int row_index, int col_index);
1149  virtual void SetCellSelectionForegroundColor(
1150  int row_index, int col_index, double r, double g, double b);
1151  virtual void SetCellSelectionForegroundColor(
1152  int row_index, int col_index, double rgb[3])
1154  row_index, col_index, rgb[0], rgb[1], rgb[2]); };
1155 
1156  // Description:
1157  // Set/Get the one of several styles for manipulating the selection.
1158  // Valid constants can be found in vtkKWOptions::SelectionModeType.
1159  // Default is browse.
1160  virtual void SetSelectionMode(int);
1161  virtual int GetSelectionMode();
1162  virtual void SetSelectionModeToSingle();
1163  virtual void SetSelectionModeToBrowse();
1164  virtual void SetSelectionModeToMultiple();
1165  virtual void SetSelectionModeToExtended();
1166 
1167  // Description:
1168  // Set/Get the selection type.
1169  // Specifies one of two selection types for the tablelist widget: row or
1170  // cell. If the selection type is row then the default bindings will select
1171  // and deselect entire items, and the whole row having the location cursor
1172  // will be displayed as active when the tablelist has the keyboard focus.
1173  // If the selection type is cell then the default bindings will select and
1174  // deselect individual elements, and the single cell having the location
1175  // cursor will be displayed as active when the tablelist has the keyboard
1176  // focus.
1177  //BTX
1178  enum
1179  {
1182  SelectionTypeUnknown
1183  };
1184  //ETX
1185  virtual int GetSelectionType();
1186  virtual void SetSelectionType(int align);
1187  virtual void SetSelectionTypeToRow()
1188  { this->SetSelectionType(vtkKWMultiColumnList::SelectionTypeRow); };
1189  virtual void SetSelectionTypeToCell()
1190  { this->SetSelectionType(vtkKWMultiColumnList::SelectionTypeCell); };
1191 
1192  // Description:
1193  // Select/deselect a row, or single row (any other selection is cleared).
1194  virtual void SelectRow(int row_index);
1195  virtual void DeselectRow(int row_index);
1196  virtual void SelectSingleRow(int row_index);
1197 
1198  // Description:
1199  // Check if row is selected (i.e. any element in the row is selected)
1200  virtual int IsRowSelected(int row_index);
1201 
1202  // Description:
1203  // Get the number of selected rows, and retrieve their indices (it is up
1204  // to the caller to provide a large enough buffer). Both returns the
1205  // number of selected rows.
1206  virtual int GetNumberOfSelectedRows();
1207  virtual int GetSelectedRows(int *indices);
1208 
1209  // Description:
1210  // Get index of first selected row.
1211  // Returns -1 on error.
1212  virtual int GetIndexOfFirstSelectedRow();
1213 
1214  // Description:
1215  // Select/deselect a cell, or single cell (any other selection is cleared).
1216  virtual void SelectCell(int row_index, int col_index);
1217  virtual void DeselectCell(int row_index, int col_index);
1218  virtual void SelectSingleCell(int row_index, int col_index);
1219 
1220  // Description:
1221  // Check if cell is selected
1222  virtual int IsCellSelected(int row_index, int col_index);
1223 
1224  // Description:
1225  // Get the number of selected cells, and retrieve their indices (it is up
1226  // to the caller to provide large enough buffers). Both returns the
1227  // number of selected cells.
1228  virtual int GetNumberOfSelectedCells();
1229  virtual int GetSelectedCells(int *row_indices, int *col_indices);
1230 
1231  // Description:
1232  // Clear selection
1233  virtual void ClearSelection();
1234 
1235  // Description:
1236  // Specifies whether or not a selection in the widget should also be the X
1237  // selection. If the selection is exported, then selecting in the widget
1238  // deselects the current X selection, selecting outside the widget deselects
1239  // any widget selection, and the widget will respond to selection retrieval
1240  // requests when it has a selection.
1241  virtual void SetExportSelection(int);
1242  virtual int GetExportSelection();
1243  vtkBooleanMacro(ExportSelection, int);
1244 
1245  // Description:
1246  // Specifies a command to be invoked when an element is selected/deselected
1247  // in the widget. Re-selecting an element will trigger this command too.
1248  // If one want to be notified only when the selection has *changed* (the
1249  // number of selected/deselected items has changed), use the
1250  // SelectionChangedCommand command instead.
1251  // The 'object' argument is the object that will have the method called on
1252  // it. The 'method' argument is the name of the method to be called and any
1253  // arguments in string form. If the object is NULL, the method is still
1254  // evaluated as a simple command.
1255  virtual void SetSelectionCommand(vtkObject *object, const char *method);
1256 
1257  // Description:
1258  // Specifies a command to be invoked when the selection has *changed*. This
1259  // command will *not* be invoked when an item is re-selected (i.e. it
1260  // was already selected when the user clicked on it again). To be notified
1261  // when any selection event occurs, use SelectionCommand instead.
1262  // The 'object' argument is the object that will have the method called on
1263  // it. The 'method' argument is the name of the method to be called and any
1264  // arguments in string form. If the object is NULL, the method is still
1265  // evaluated as a simple command.
1266  virtual void SetSelectionChangedCommand(
1267  vtkObject *object, const char *method);
1268 
1269  // Description:
1270  // Specifies a command to be invoked when any change is made that
1271  // can potentially affect the background color of a cell (selecting
1272  // a cell, sorting a column, adding/removing rows, etc).
1273  // This is useful if a user-defined dynamic widget created in a cell
1274  // (using the SetCellWindowCommand methods)
1275  // is setting its own background color to match the background color
1276  // of a cell (using GetCellCurrentBackgroundColor). In that case,
1277  // just set this command to RefreshColorsOfAllCellsWithWindowCommand.
1278  // The 'object' argument is the object that will have the method called on
1279  // it. The 'method' argument is the name of the method to be called and any
1280  // arguments in string form. If the object is NULL, the method is still
1281  // evaluated as a simple command.
1282  virtual void SetPotentialCellColorsChangedCommand(
1283  vtkObject *object, const char *method);
1284 
1285  // Description:
1286  // Specifies a command to be invoked when a column has been sorted.
1287  // The 'object' argument is the object that will have the method called on
1288  // it. The 'method' argument is the name of the method to be called and any
1289  // arguments in string form. If the object is NULL, the method is still
1290  // evaluated as a simple command.
1291  virtual void SetColumnSortedCommand(
1292  vtkObject *object, const char *method);
1293 
1294  // Description:
1295  // Specifies a command to be invoked when a row has been moved.
1296  // The 'object' argument is the object that will have the method called on
1297  // it. The 'method' argument is the name of the method to be called and any
1298  // arguments in string form. If the object is NULL, the method is still
1299  // evaluated as a simple command.
1300  virtual void SetRowMovedCommand(
1301  vtkObject *object, const char *method);
1302 
1303  // Description:
1304  // Specifies a command to be invoked when the number of rows changed.
1305  // The 'object' argument is the object that will have the method called on
1306  // it. The 'method' argument is the name of the method to be called and any
1307  // arguments in string form. If the object is NULL, the method is still
1308  // evaluated as a simple command.
1309  virtual void SetNumberOfRowsChangedCommand(
1310  vtkObject *object, const char *method);
1311 
1312  // Description:
1313  // Specifies a command to be invoked when the interactive editing of a cell's
1314  // contents is started. The command is automatically concatenated with
1315  // the cell's row and column indices, as well as the text displayed in
1316  // the cell, the resulting script is evaluated in the global scope, and
1317  // the return value becomes the initial contents of the temporary
1318  // embedded widget used for the editing.
1319  // The next step (validation) is handled by SetEditEndCommand (if any)
1320  // The 'object' argument is the object that will have the method called on
1321  // it. The 'method' argument is the name of the method to be called and any
1322  // arguments in string form. If the object is NULL, the method is still
1323  // evaluated as a simple command.
1324  // The following parameters are also passed to the command:
1325  // - the cell location, i.e. its row and column indices: int, int
1326  // - the current cell's text: const char*
1327  // The following output is expected from the command:
1328  // - the initial contents of the widget used for editing: const char*
1329  virtual void SetEditStartCommand(vtkObject *object, const char *method);
1330 
1331  // Description:
1332  // Specifies a command to be invoked on normal termination of the
1333  // interactive editing of a cell's contents if the final text of the
1334  // temporary embedded widget used for the editing is different from its
1335  // initial one. The command is automatically concatenated with the
1336  // cell's row and column indices, as well as the final contents of the edit
1337  // window, the resulting script is evaluated in the global scope, and the
1338  // return value becomes the cell's new contents after destroying the
1339  // temporary embedded widget. The main purpose of this script is to perform
1340  // a final validation of the edit window's contents and eventually reject
1341  // the input by calling the RejectInput() method. Another purpose of this
1342  // command is to convert the edit window's text to the cell's new internal
1343  // contents, which is necessary if, due to the SetColumnFormatCommand option
1344  // the cell's internal value is different from its external representation.
1345  // The next step (updating) is handled by SetCellUpdatedCommand (if any)
1346  // The 'object' argument is the object that will have the method called on
1347  // it. The 'method' argument is the name of the method to be called and any
1348  // arguments in string form. If the object is NULL, the method is still
1349  // evaluated as a simple command.
1350  // The following parameters are also passed to the command:
1351  // - the cell location, i.e. its row and column indices: int, int
1352  // - the final contents of the edit window: const char*
1353  // The following output is expected from the command:
1354  // - the cell's new contents: const char*
1355  virtual void SetEditEndCommand(vtkObject *object, const char *method);
1356 
1357  // Description:
1358  // If invoked from within EditEndCommand, this method prevents the
1359  // termination of the interactive editing of the contents of a cell. It
1360  // enables you to reject the widget's text during the final validation of the
1361  // string intended to become the new cell contents.
1362  virtual void RejectInput();
1363 
1364  // Description:
1365  // Specifies a command to be invoked when a cell contents has been
1366  // successfully updated after editing it. The command is automatically
1367  // concatenated with the cell's row and column indices, as well as the
1368  // new contents of the cell. The main purpose of this script is to let
1369  // external/third-party applications/objects retrieve the new cell contents
1370  // and update their own internal values.
1371  // The 'object' argument is the object that will have the method called on
1372  // it. The 'method' argument is the name of the method to be called and any
1373  // arguments in string form. If the object is NULL, the method is still
1374  // evaluated as a simple command.
1375  // The following parameters are also passed to the command:
1376  // - the cell location, i.e. its row and column indices: int, int
1377  // - the cell's new contents: const char*
1378  virtual void SetCellUpdatedCommand(vtkObject *object, const char *method);
1379 
1380  // Description:
1381  // Specifies a command to be invoked when mouse button 1 is pressed over one
1382  // of the header labels and later released over the same label. When the
1383  // <ButtonRelease-1> event occurs, the command is automatically
1384  // concatenated with the name of the tablelist widget and the column index
1385  // of the respective label, and the resulting script is evaluated in the
1386  // global scope.
1387  // The 'object' argument is the object that will have the method called on
1388  // it. The 'method' argument is the name of the method to be called and any
1389  // arguments in string form. If the object is NULL, the method is still
1390  // evaluated as a simple command.
1391  // The following parameters are also passed to the command:
1392  // - the name of the internal tablelist widget (to be ignored): const char*
1393  // - the column index of the label: int
1394  virtual void SetLabelCommand(vtkObject *object, const char *method);
1395 
1396  // Description:
1397  // Specifies a command to be used for the comparison of the items when
1398  // invoking the sort subcommand of the Tcl command associated with the
1399  // tablelist widget. To compare two items (viewed as lists of cell contents
1400  // within one row each) during the sort operation, the command is
1401  // automatically concatenated with the two items and the resulting script
1402  // is evaluated. The script should return an integer less than, equal to, or
1403  // greater than zero if the first item is to be considered less than, equal
1404  // to, or greater than the second, respectively.
1405  // The 'object' argument is the object that will have the method called on
1406  // it. The 'method' argument is the name of the method to be called and any
1407  // arguments in string form. If the object is NULL, the method is still
1408  // evaluated as a simple command.
1409  // The following parameters are also passed to the command:
1410  // - the contents of the first item/cell to compare: const char*
1411  // - the contents of the second item/cell to compare: const char*
1412  // The following output is expected from the command:
1413  // - the result of the comparison: int
1414  virtual void SetSortCommand(vtkObject *object, const char *method);
1415 
1416  // Description:
1417  // Specifies a command to be invoked when the user right-click on a cell.
1418  // The 'object' argument is the object that will have the method called on
1419  // it. The 'method' argument is the name of the method to be called and any
1420  // arguments in string form. If the object is NULL, the method is still
1421  // evaluated as a simple command.
1422  // The following parameters are also passed to the command:
1423  // - the cell location, i.e. its row and column indices: int, int
1424  // - the pointer (x, y) absolute location the click occured at: int, int
1425  virtual void SetRightClickCommand(vtkObject *object, const char *method);
1426 
1427  // Description:
1428  // The command is invoked when the user double-clicks on any uneditable
1429  // cell of the listbox. The command is not invoked on a double click on
1430  // an editable cell.
1431  // The 'object' argument is the object that will have the method called on
1432  // it. The 'method' argument is the name of the method to be called and any
1433  // arguments in string form. If the object is NULL, the method is still
1434  // evaluated as a simple command.
1435  virtual void SetUneditableCellDoubleClickCommand(
1436  vtkObject *object, const char *method);
1437 
1438  // Description:
1439  // Update the "enable" state of the object and its internal parts.
1440  // Depending on different Ivars (this->Enabled, the application's
1441  // Limited Edition Mode, etc.), the "enable" state of the object is updated
1442  // and propagated to its internal parts/subwidgets. This will, for example,
1443  // enable/disable parts of the widget UI, enable/disable the visibility
1444  // of 3D widgets, etc.
1445  virtual void UpdateEnableState();
1446 
1447  // Description:
1448  // Events. The SelectionChangedEvent is triggered when the selection is
1449  // changed (see SetSelectionCommand for more details).
1450  // The CellUpdatedEvent is triggered whenever a cell is updated, i.e.
1451  // when InvokeCellUpdatedCommand is called. The following parameters are
1452  // also passed as client data for CellUpdatedEvent:
1453  // - the cell location, i.e. its row and column indices: int, int
1454  // - the cell's new contents: const char*
1455  // Note that given the heterogeneous nature of types passed as client data,
1456  // you should treat it as an array of void*[3], each one a pointer to
1457  // the parameter (i.e., &int, &int, &const char*).
1458  //BTX
1459  enum
1460  {
1461  SelectionChangedEvent = 10000,
1463  CellUpdatedEvent
1464  };
1465  //ETX
1466 
1467  // Description:
1468  // Callbacks. Internal, do not use.
1469  virtual void SelectionCallback();
1470  virtual void CellWindowDestroyRemoveChildCallback(
1471  const char*, int, int, const char*);
1472  virtual void CellUpdatedCallback();
1473  virtual void UneditableCellDoubleClickCallback();
1474  virtual const char* EditStartCallback(
1475  const char *widget, int row, int col, const char *text);
1476  virtual const char* EditEndCallback(
1477  const char *widget, int row, int col, const char *text);
1478  virtual void CellWindowCommandToCheckButtonCreateCallback(
1479  const char*, int, int, const char*);
1480  virtual void CellWindowCommandToCheckButtonSelectCallback(
1481  vtkKWWidget*, int, int, int);
1482  virtual void CellWindowCommandToComboBoxCreateCallback(
1483  const char *values, const char*, int, int, const char*);
1484  virtual void CellWindowCommandToComboBoxValueCallback(
1485  vtkKWWidget*, int, int, const char *);
1486  virtual void CellWindowCommandToColorButtonCallback(
1487  const char*, int, int, const char*);
1488  virtual void CellWindowCommandToPickDirectoryButtonCallback(
1489  const char*, int, int, const char*);
1490  virtual void CellWindowCommandToPickDirectoryButtonChangeCallback(
1491  vtkKWWidget*, int, int);
1492  virtual const char* ColumnFormatCommandToEmptyOutputIfWindowCommandCallback(
1493  vtkKWWidget*, const char *);
1494  virtual void ColumnSortedCallback();
1495  virtual void ColumnMovedCallback();
1496  virtual void RowMovedCallback();
1497  virtual void RightClickCallback(
1498  const char *w, int x, int y, int root_x, int root_y);
1499  virtual void RefreshColorsOfAllCellsWithWindowCommandCallback();
1500  virtual void RefreshAllCellsWithWindowCommandCallback();
1501  virtual void RefreshEnabledStateOfAllCellsWithWindowCommandCallback();
1502  virtual void RefreshAllRowsWithWindowCommandCallback(int col);
1503  virtual void KeyPressDeleteCallback();
1504 
1505 protected:
1508 
1509  // Description:
1510  // Create the widget.
1511  virtual void CreateWidget();
1512 
1514  void InvokeKeyPressDeleteCommand();
1515 
1517  const char* InvokeEditStartCommand(int row, int col, const char *text);
1518 
1520  const char* InvokeEditEndCommand(int row, int col, const char *text);
1521 
1523  void InvokeCellUpdatedCommand(int row, int col, const char *text);
1524 
1526  virtual void InvokeSelectionCommand();
1527 
1529  virtual void InvokeSelectionChangedCommand();
1530 
1532  virtual void InvokePotentialCellColorsChangedCommand();
1533 
1535  void InvokeColumnSortedCommand();
1536 
1538  void InvokeRowMovedCommand();
1539 
1541  void InvokeNumberOfRowsChangedCommand();
1542 
1544  void InvokeRightClickCommand(int row, int col, int x, int y);
1545 
1547  virtual void InvokeUneditableCellDoubleClickCommand();
1548 
1549  // Description:
1550  // Called when the number of rows/columns changed
1551  virtual void NumberOfRowsChanged();
1552  virtual void NumberOfColumnsChanged();
1553 
1554  // Description:
1555  // Set/Get a column configuration option (ex: "-bg")
1556  virtual int SetColumnConfigurationOption(
1557  int col_index, const char* option, const char *value);
1558  virtual int HasColumnConfigurationOption(
1559  int col_index, const char* option);
1560  virtual const char* GetColumnConfigurationOption(
1561  int col_index, const char* option);
1562  virtual int GetColumnConfigurationOptionAsInt(
1563  int col_index, const char* option);
1564  virtual int SetColumnConfigurationOptionAsInt(
1565  int col_index, const char* option, int value);
1566  virtual void SetColumnConfigurationOptionAsText(
1567  int col_index, const char *option, const char *value);
1568  virtual const char* GetColumnConfigurationOptionAsText(
1569  int col_index, const char *option);
1570 
1571  // Description:
1572  // Set/Get a row configuration option (ex: "-bg")
1573  virtual int SetRowConfigurationOption(
1574  int row_index, const char* option, const char *value);
1575  virtual int HasRowConfigurationOption(
1576  int row_index, const char* option);
1577  virtual const char* GetRowConfigurationOption(
1578  int row_index, const char* option);
1579  virtual int GetRowConfigurationOptionAsInt(
1580  int row_index, const char* option);
1581  virtual int SetRowConfigurationOptionAsInt(
1582  int row_index, const char* option, int value);
1583 
1584  // Description:
1585  // Set/Get a cell configuration option (ex: "-bg")
1586  virtual int SetCellConfigurationOption(
1587  int row_index, int col_index, const char* option, const char *value);
1588  virtual int HasCellConfigurationOption(
1589  int row_index, int col_index, const char* option);
1590  virtual const char* GetCellConfigurationOption(
1591  int row_index, int col_index, const char* option);
1592  virtual int GetCellConfigurationOptionAsInt(
1593  int row_index, int col_index, const char* option);
1594  virtual int SetCellConfigurationOptionAsInt(
1595  int row_index, int col_index, const char* option, int value);
1596  virtual double GetCellConfigurationOptionAsDouble(
1597  int row_index, int col_index, const char* option);
1598  virtual int SetCellConfigurationOptionAsDouble(
1599  int row_index, int col_index, const char* option, double value);
1600  virtual int SetCellConfigurationOptionAsFormattedDouble(
1601  int row_index, int col_index, const char* option, double value, int size);
1602  virtual int SetCellConfigurationOptionAsText(
1603  int row_index, int col_index, const char *option, const char *value);
1604  virtual const char* GetCellConfigurationOptionAsText(
1605  int row_index, int col_index, const char *option);
1606  virtual void ReportErrorOnSetCellConfigurationOption(
1607  int row_index, int col_index, const char* option, const char *res);
1608 
1609  // PIMPL Encapsulation for STL containers
1610  //BTX
1611  vtkKWMultiColumnListInternals *Internals;
1612  //ETX
1613 
1614  // Description:
1615  // Check if the selection has changed and invoke the corresponding command
1616  virtual void HasSelectionChanged();
1617 
1618  // Description:
1619  // Find cell at relative coordinate x, y
1620  virtual int FindCellAtRelativeCoordinates(
1621  int x, int y, int *row_index, int *col_index);
1622 
1623  // Description:
1624  // Color of the sorted column.
1626  double SortedColumnBackgroundColor[3];
1627  virtual void UpdateSortedColumnBackgroundColor();
1628 
1629  // Description:
1630  // Remove all the window destroy commands.
1631  virtual void RemoveAllWindowDestroyCommandFromCells();
1632 
1633  // Description:
1634  // Add/Remove some interaction bindings
1635  virtual void AddInteractionBindings();
1636  virtual void RemoveInteractionBindings();
1637 
1638  // Description:
1639  // Manage the column name to index cache
1640  virtual void SetColumnNameToIndexCacheEntry(
1641  const char *col_name, int col_index);
1642  virtual int GetColumnNameToIndexCacheEntry(const char *col_name);
1643  virtual void DeleteColumnNameToIndexCacheEntry(const char *col_name);
1644  virtual void InvalidateColumnNameToIndexCache();
1645 
1646  // Description:
1647  // Manage the column name to visibility cache
1648  virtual void SetColumnIndexToVisibilityCacheEntry(
1649  int col_index, int vis);
1650  virtual int GetColumnIndexToVisibilityCacheEntry(int col_index);
1651  virtual void InvalidateColumnIndexToVisibilityCache();
1652 
1654 
1655 private:
1656  vtkKWMultiColumnList(const vtkKWMultiColumnList&); // Not implemented
1657  void operator=(const vtkKWMultiColumnList&); // Not implemented
1658 };
1659 
1660 #endif