3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Abdelrazak Younes
8 * Full author contact details are available in file CREDITS.
15 #include "qt_helpers.h"
18 #include "buffer_funcs.h"
19 #include "BufferParams.h"
20 #include "BufferView.h"
22 #include "FuncRequest.h"
24 #include "insets/InsetInfo.h"
26 #include "support/debug.h"
34 /////////////////////////////////////////////////////////////////
38 /////////////////////////////////////////////////////////////////
40 GuiInfo::GuiInfo(GuiView & lv)
41 : DialogView(lv, "info", qt_("Info"))
47 void GuiInfo::on_closePB_clicked()
53 InsetInfo * GuiInfo::inset() const
55 Inset * ins = bufferview()->cursor().innerInsetOfType(INFO_CODE);
57 ins = bufferview()->cursor().nextInset();
58 if (ins->lyxCode() != INFO_CODE)
60 return static_cast<InsetInfo *>(ins);
64 void GuiInfo::applyView()
66 InsetInfo * ii = inset();
70 // FIXME: update the inset contents
72 updateLabels(bufferview()->buffer());
73 bufferview()->updateMetrics();
74 bufferview()->buffer().changed();
78 void GuiInfo::updateView()
80 InsetInfo * ii = inset();
82 // FIXME: A New button to create an InsetInfo at the cursor location
87 //FIXME: update the controls.
91 void GuiInfo::enableView(bool enable)
93 //FIXME: enable controls that need enabling.
97 void GuiInfo::dispatchParams()
102 Dialog * createGuiInfo(GuiView & lv) { return new GuiInfo(lv); }
105 } // namespace frontend
108 #include "GuiInfo_moc.cpp"