mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
- InsetPhantom.h: remove unneeded declarations
- InsetPhantom.cpp: add tooltips git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28311 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
83292eacd1
commit
e900790be8
@ -303,6 +303,24 @@ bool InsetPhantom::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
docstring InsetPhantom::toolTip(BufferView const & bv, int x, int y) const
|
||||||
|
{
|
||||||
|
OutputParams rp(&buffer().params().encoding());
|
||||||
|
odocstringstream ods;
|
||||||
|
InsetText::plaintext(ods, rp);
|
||||||
|
docstring content_tip = ods.str();
|
||||||
|
// shorten it if necessary
|
||||||
|
if (content_tip.size() > 200)
|
||||||
|
content_tip = content_tip.substr(0, 200) + "...";
|
||||||
|
if (params_.type == InsetPhantomParams::Phantom)
|
||||||
|
return from_ascii("Phantom: ") + content_tip;
|
||||||
|
if (params_.type == InsetPhantomParams::HPhantom)
|
||||||
|
return from_ascii("HPhantom: ") + content_tip;
|
||||||
|
if (params_.type == InsetPhantomParams::VPhantom)
|
||||||
|
return from_ascii("VPhantom: ") + content_tip;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetPhantom::latex(odocstream & os, OutputParams const & runparams_in) const
|
int InsetPhantom::latex(odocstream & os, OutputParams const & runparams_in) const
|
||||||
{
|
{
|
||||||
OutputParams runparams(runparams_in);
|
OutputParams runparams(runparams_in);
|
||||||
|
@ -60,14 +60,10 @@ private:
|
|||||||
///
|
///
|
||||||
docstring editMessage() const;
|
docstring editMessage() const;
|
||||||
///
|
///
|
||||||
InsetCode lyxCode() const { return PHANTOM_CODE; }
|
|
||||||
///
|
|
||||||
docstring name() const;
|
docstring name() const;
|
||||||
///
|
///
|
||||||
DisplayType display() const;
|
DisplayType display() const;
|
||||||
///
|
///
|
||||||
bool noFontChange() const { return params_.type != InsetPhantomParams::Phantom; }
|
|
||||||
///
|
|
||||||
void metrics(MetricsInfo &, Dimension &) const;
|
void metrics(MetricsInfo &, Dimension &) const;
|
||||||
///
|
///
|
||||||
void draw(PainterInfo & pi, int x, int y) const;
|
void draw(PainterInfo & pi, int x, int y) const;
|
||||||
@ -90,7 +86,7 @@ private:
|
|||||||
///
|
///
|
||||||
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
||||||
///
|
///
|
||||||
Inset * clone() const { return new InsetPhantom(*this); }
|
docstring toolTip(BufferView const & bv, int x, int y) const;
|
||||||
/// used by the constructors
|
/// used by the constructors
|
||||||
void init();
|
void init();
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user