2002-11-15 02:41:54 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file ControlTabular.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*
|
|
|
|
* This is pretty icky, we should really be able to use
|
|
|
|
* ControlInset. We can't because there are no params for
|
|
|
|
* tabular inset.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CONTROLTABULAR_H
|
|
|
|
#define CONTROLTABULAR_H
|
|
|
|
|
2003-03-09 18:11:57 +00:00
|
|
|
#include "Dialog.h"
|
2002-11-15 02:41:54 +00:00
|
|
|
#include "tabular.h"
|
|
|
|
|
|
|
|
|
2003-03-09 18:11:57 +00:00
|
|
|
class ControlTabular : public Dialog::Controller {
|
2002-11-15 02:41:54 +00:00
|
|
|
public:
|
|
|
|
|
2003-03-09 18:11:57 +00:00
|
|
|
ControlTabular(Dialog &);
|
|
|
|
///
|
2003-03-14 00:20:42 +00:00
|
|
|
virtual bool initialiseParams(string const & data);
|
2003-03-09 18:11:57 +00:00
|
|
|
/// clean-up on hide.
|
|
|
|
virtual void clearParams();
|
|
|
|
/// We use set() instead.
|
|
|
|
virtual void dispatchParams() {};
|
|
|
|
///
|
|
|
|
virtual bool isBufferDependent() const { return true; }
|
2002-11-15 02:41:54 +00:00
|
|
|
|
2003-03-09 10:08:22 +00:00
|
|
|
///
|
|
|
|
int getActiveCell() const;
|
2002-11-15 02:41:54 +00:00
|
|
|
/// get the contained tabular
|
2003-03-09 10:08:22 +00:00
|
|
|
LyXTabular const & tabular() const;
|
|
|
|
/// return true if units should default to metric
|
|
|
|
bool useMetricUnits() const;
|
2002-11-15 02:41:54 +00:00
|
|
|
/// set a parameter
|
|
|
|
void set(LyXTabular::Feature, string const & arg = string());
|
|
|
|
|
2003-04-10 20:20:36 +00:00
|
|
|
/// borders
|
|
|
|
void toggleTopLine();
|
|
|
|
void toggleBottomLine();
|
|
|
|
void toggleLeftLine();
|
|
|
|
void toggleRightLine();
|
|
|
|
|
|
|
|
void setSpecial(string const & special);
|
|
|
|
|
|
|
|
void setWidth(string const & width);
|
|
|
|
|
|
|
|
void toggleMultiColumn();
|
|
|
|
|
|
|
|
void rotateTabular(bool yes);
|
|
|
|
void rotateCell(bool yes);
|
|
|
|
|
|
|
|
enum HALIGN { LEFT, RIGHT, CENTER, BLOCK };
|
|
|
|
|
|
|
|
void halign(HALIGN h);
|
|
|
|
|
|
|
|
enum VALIGN { TOP, VCENTER, BOTTOM };
|
|
|
|
|
|
|
|
void valign(VALIGN h);
|
|
|
|
|
|
|
|
void longTabular(bool yes);
|
|
|
|
|
2002-11-15 02:41:54 +00:00
|
|
|
private:
|
2003-03-09 18:11:57 +00:00
|
|
|
///
|
|
|
|
int active_cell_;
|
|
|
|
///
|
|
|
|
boost::scoped_ptr<LyXTabular> params_;
|
2002-11-15 02:41:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLTABULAR_H
|