}
-void Buffer::closing(Buffer * buf) const
-{
- if (gui_)
- gui_->closing(buf);
-}
-
-
void Buffer::setGuiDelegate(frontend::GuiBufferDelegate * gui)
{
gui_ = gui;
{
public:
virtual ~GuiBufferDelegate() {}
- /// This function is called when the buffer is changed.
- virtual void changed() = 0;
/// This function is called when the buffer structure is changed.
virtual void structureChanged() = 0;
/// This function is called when an embedded file is changed
virtual void updateTitles() = 0;
/// Reset autosave timers for all users.
virtual void resetAutosaveTimers() = 0;
- /// This signal is emitting if the buffer is being closed.
- virtual void closing(Buffer *) = 0;
};
} // namespace frontend
return &work_area->bufferView().buffer();
}
-
-
-void LyXView::changed()
-{
- if (WorkArea * wa = currentWorkArea())
- wa->redraw();
-}
-
-
-void LyXView::closing(Buffer *)
-{
- if (WorkArea * wa = currentWorkArea())
- removeWorkArea(wa);
-}
-
-
} // namespace frontend
} // namespace lyx
//
// GuiBufferDelegate
//
- /// This function is called when the buffer is changed.
- void changed();
- /// This function is called if the buffer is being closed.
- void closing(Buffer *);
/// This function is called when the buffer structure is changed.
void structureChanged() { updateToc(); }
/// This function is called when an embedded file is changed