mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 21:49:51 +00:00
ac1fd9b37f
The basic idea was to reuse the corresponding text space inset in the same fashion as is already done for references. The dialog displays a different selection for math than for text. If wanted, the additional spaces could also be enabled for text, but that would be a file format change. Constructs like \hspace{\mylengthvariable} that are not supported are treated by the math parser as ERT as before. For reasons I don't know the context menu does not work, but this is not so important IMHO (since a left click opens the dialog). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27954 a592a061-630c-0410-9148-cb99ea01b6c8
63 lines
1.1 KiB
C++
63 lines
1.1 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiHSpace.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Jürgen Spitzmüller
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef GUIHSPACE_H
|
|
#define GUIHSPACE_H
|
|
|
|
#include "GuiDialog.h"
|
|
#include "ui_HSpaceUi.h"
|
|
#include "insets/InsetSpace.h"
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class GuiHSpace : public GuiDialog, public Ui::HSpaceUi
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GuiHSpace(GuiView & lv, bool math);
|
|
|
|
private Q_SLOTS:
|
|
///
|
|
void change_adaptor();
|
|
///
|
|
void enableWidgets(int);
|
|
///
|
|
void patternChanged();
|
|
|
|
private:
|
|
///
|
|
void setMath(bool custom);
|
|
/// Apply from dialog
|
|
void applyView();
|
|
/// Update the dialog
|
|
void updateContents();
|
|
///
|
|
bool isValid();
|
|
///
|
|
bool initialiseParams(std::string const & data);
|
|
/// clean-up on hide.
|
|
void clearParams();
|
|
/// clean-up on hide.
|
|
void dispatchParams();
|
|
///
|
|
bool isBufferDependent() const { return true; }
|
|
|
|
///
|
|
InsetSpaceParams params_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUIHSPACE_H
|