insetnames[FLOAT_CODE] = InsetName("float", _("Float"));
insetnames[WRAP_CODE] = InsetName("wrap");
insetnames[SPECIALCHAR_CODE] = InsetName("specialchar");
- insetnames[TABULAR_CODE] = InsetName("tabular");
+ insetnames[TABULAR_CODE] = InsetName("tabular", _("Table"));
insetnames[EXTERNAL_CODE] = InsetName("external");
insetnames[CAPTION_CODE] = InsetName("caption");
insetnames[MATHMACRO_CODE] = InsetName("mathmacro");
}
+bool Inset::showInsetDialog(BufferView * bv) const
+{
+ InsetCode const code = lyxCode();
+ switch (code){
+ case ERT_CODE:
+ case FLOAT_CODE:
+ case BOX_CODE:
+ case INFO_CODE:
+ //FIXME: not ready yet.
+ //case TABULAR_CODE:
+ case VSPACE_CODE:
+ bv->showDialog(insetName(code));
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+
void Inset::doDispatch(Cursor & cur, FuncRequest &cmd)
{
switch (cmd.action) {
///
virtual bool editing(BufferView const * bv) const;
///
- virtual bool showInsetDialog(BufferView *) const { return false; }
+ virtual bool showInsetDialog(BufferView *) const;
/// draw inset decoration if necessary.
/// This can use \c drawMarkers() for example.
}
-bool InsetBox::showInsetDialog(BufferView * bv) const
-{
- bv->showDialog("box");
- return true;
-}
-
-
void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
void setButtonLabel();
///
void metrics(MetricsInfo &, Dimension &) const;
- /// show the Box dialog
- bool showInsetDialog(BufferView * bv) const;
///
DisplayType display() const { return Inline; }
///
}
-bool InsetERT::showInsetDialog(BufferView * bv) const
-{
- bv->showDialog("ert");
- return true;
-}
-
-
InsetCollapsable::CollapseStatus InsetERT::string2params(string const & in)
{
if (in.empty())
docstring xhtml(XHTMLStream &, OutputParams const &) const;
///
void validate(LaTeXFeatures &) const {}
- ///
- bool showInsetDialog(BufferView *) const;
/// should paragraph indendation be omitted in any case?
bool neverIndent() const { return true; }
///
}
-bool InsetFloat::showInsetDialog(BufferView * bv) const
-{
- if (!InsetText::showInsetDialog(bv))
- bv->showDialog("float");
- return true;
-}
-
-
void InsetFloat::setWide(bool w, bool update_label)
{
params_.wide = w;
insets that may contain several paragraphs */
bool noFontChange() const { return true; }
///
- bool showInsetDialog(BufferView *) const;
- ///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
// Update the counters of this inset and of its contents
void updateLabels(ParIterator const &, UpdateType);
}
-bool InsetText::showInsetDialog(BufferView *) const
-{
- return false;
-}
-
-
void InsetText::setText(docstring const & data, Font const & font, bool trackChanges)
{
clear();
///
void setFrameColor(ColorCode);
///
- bool showInsetDialog(BufferView *) const;
- ///
Text * getText(int i) const {
return (i == 0) ? const_cast<Text*>(&text_) : 0;
}
{}
-InsetVSpace::~InsetVSpace()
-{
- hideDialogs("vspace", this);
-}
-
-
void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
}
-bool InsetVSpace::showInsetDialog(BufferView * bv) const
-{
- bv->showDialog("vspace", params2string(space()),
- const_cast<InsetVSpace *>(this));
- return true;
-}
-
-
void InsetVSpace::read(Lexer & lex)
{
LASSERT(lex.isOK(), /**/);
InsetVSpace() : Inset(0) {}
///
InsetVSpace(VSpace const &);
- ///
- ~InsetVSpace();
/// How much?
VSpace const & space() const { return space_; }
///
Inset * clone() const { return new InsetVSpace(*this); }
///
docstring const label() const;
- ///
- bool showInsetDialog(BufferView * bv) const;
///
VSpace space_;