2006-03-05 17:24:44 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
|
* \file GuiBox.h
|
2006-03-05 17:24:44 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author J<EFBFBD>rgen Spitzm<EFBFBD>ller
|
|
|
|
|
* \ author Martin Vermeer
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
#ifndef GUIBOX_H
|
|
|
|
|
#define GUIBOX_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
#include "GuiDialogView.h"
|
2007-08-31 22:16:11 +00:00
|
|
|
|
#include "ControlBox.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
|
#include "ui_BoxUi.h"
|
2007-04-24 10:56:22 +00:00
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
#include <vector>
|
|
|
|
|
|
2007-04-24 10:56:22 +00:00
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
namespace frontend {
|
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
class GuiBox;
|
2007-04-24 10:56:22 +00:00
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
|
class GuiBoxDialog : public QDialog, public Ui::BoxUi {
|
2007-04-24 10:56:22 +00:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2007-08-31 05:53:55 +00:00
|
|
|
|
GuiBoxDialog(GuiBox * form);
|
2007-04-24 10:56:22 +00:00
|
|
|
|
protected Q_SLOTS:
|
|
|
|
|
virtual void change_adaptor();
|
|
|
|
|
virtual void innerBoxChanged(const QString &);
|
|
|
|
|
virtual void typeChanged(int);
|
|
|
|
|
virtual void restoreClicked();
|
|
|
|
|
protected:
|
|
|
|
|
virtual void closeEvent(QCloseEvent * e);
|
|
|
|
|
private:
|
2007-08-31 05:53:55 +00:00
|
|
|
|
GuiBox * form_;
|
2007-04-24 10:56:22 +00:00
|
|
|
|
};
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
class GuiBox : public GuiView<GuiBoxDialog>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
///
|
2007-09-03 05:59:32 +00:00
|
|
|
|
GuiBox(GuiDialog &);
|
2007-08-31 22:16:11 +00:00
|
|
|
|
/// parent controller
|
|
|
|
|
ControlBox & controller()
|
|
|
|
|
{ return static_cast<ControlBox &>(this->getController()); }
|
|
|
|
|
/// parent controller
|
|
|
|
|
ControlBox const & controller() const
|
|
|
|
|
{ return static_cast<ControlBox const &>(this->getController()); }
|
2006-03-05 17:24:44 +00:00
|
|
|
|
/// add and remove special lengths
|
|
|
|
|
void setSpecial(bool ibox);
|
|
|
|
|
/// only show valid inner box items
|
|
|
|
|
void setInnerType(bool frameless, int i);
|
|
|
|
|
private:
|
2007-08-31 22:16:11 +00:00
|
|
|
|
///
|
|
|
|
|
friend class GuiBoxDialog;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
/// Apply changes
|
2007-09-03 20:28:26 +00:00
|
|
|
|
virtual void applyView();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
/// update
|
|
|
|
|
virtual void update_contents();
|
|
|
|
|
/// build the dialog
|
|
|
|
|
virtual void build_dialog();
|
|
|
|
|
///
|
|
|
|
|
std::vector<std::string> ids_;
|
|
|
|
|
///
|
2006-12-21 20:52:59 +00:00
|
|
|
|
std::vector<docstring> gui_names_;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
///
|
|
|
|
|
std::vector<std::string> ids_spec_;
|
|
|
|
|
///
|
2006-12-21 20:52:59 +00:00
|
|
|
|
std::vector<docstring> gui_names_spec_;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
|
#endif // GUIBOX_H
|