Rob Oakes schreef:
Dear LyX Developers,
Because I had a few minutes today, I thought I would sit down and spend
some time working on a pet LyX project (which are nowhere near ready for
submission to the list). For one of those projects, I threw together a
very simple dock widget that would allow me to test a few modifications
that I have made. However (much to my embarrassment), I can't remember
how to add a new widget to LyX's GUI.
>From looking at the source, I have managed to puzzle out a few of the
steps:
1.) You have to create a DockWidget container (forgive me if I use the
wrong terms) similar to GuiToc, GuiProgressView or GuiViewSource. I
have done this, basing the code on GuiToc.
GuiTestMod::GuiTestMod(GuiView & parent, Qt::DockWidgetArea area,
Qt::WindowFlags flags)
: DockView(parent, "testmod", qt_("Testmod"), area, flags),
is_closing_(false)
2.) You need to add an entry in GuiView.cpp, which can call
dialog->prepareView()
if ((dialog = findOrBuild(testmod", true)))
dialog->prepareView();
This one is not really necessary at first.
However, did you add the following to GuiView::build() ?
if (name == "testmod")
return createGuiTestMod(*this);
Vincent