/************************************************************************/
/* Copyright 1998 MBARI							*/
/************************************************************************/
#ifndef _TABLEFORM_H
#define _TABLEFORM_H

#include <Vk/VkComponent.h>
#include "ErrorHandler.h"

/*
CLASS 
TableRowForm

DESCRIPTION
Widget manager; represents a row in a "table"

AUTHOR
Tom O'Reilly
*/
class TableRowForm : public VkComponent, public ErrorHandler
{
  public:
  TableRowForm(const char *name, Widget parent, int nColumns);
  ~TableRowForm();

  virtual const char *className()
  {
    return "TableRowForm";
  }
  
  ///////////////////////////////////////////////////////////////////
  // Add Widget to end of row, return -1 if nColumns exceeded
  int append(Widget w);

  ///////////////////////////////////////////////////////////////////
  // Add VkComponent to end of row, return -1 if nColumns exceeded
  int append(VkComponent *component);

  ///////////////////////////////////////////////////////////////////
  // Attach Widget to specified colum, return -1 if nColumns exceeded
  int attach(int column, Widget w);

  ///////////////////////////////////////////////////////////////////
  // Attach VkComponent to specified colum, return -1 if nColumns exceeded
  int attach(int column, VkComponent *component);
  
  protected:
  int _nColumns;
  int _nAppended;
  int _spacing;
};


#endif
