lyx_mirror/src/frontends/controllers/ControlTabular.h
John Levon b572c6ca4c move some stuff from the qt dialog into the controller.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6771 a592a061-630c-0410-9148-cb99ea01b6c8
2003-04-10 20:20:36 +00:00

78 lines
1.6 KiB
C++

// -*- 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
#include "Dialog.h"
#include "tabular.h"
class ControlTabular : public Dialog::Controller {
public:
ControlTabular(Dialog &);
///
virtual bool initialiseParams(string const & data);
/// clean-up on hide.
virtual void clearParams();
/// We use set() instead.
virtual void dispatchParams() {};
///
virtual bool isBufferDependent() const { return true; }
///
int getActiveCell() const;
/// get the contained tabular
LyXTabular const & tabular() const;
/// return true if units should default to metric
bool useMetricUnits() const;
/// set a parameter
void set(LyXTabular::Feature, string const & arg = string());
/// 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);
private:
///
int active_cell_;
///
boost::scoped_ptr<LyXTabular> params_;
};
#endif // CONTROLTABULAR_H