X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FWorkAreaManager.h;h=0434074ab45769fa9944972a304f1c4bbf5e0c87;hb=5d45c10fc785961d7c5f9e1cc291f14a116b1227;hp=5d7e9cc0ef69f8e1a7db581784692f4f9478438f;hpb=4ce0961b5acbaf0f78d6782cfedbbfa885b763ae;p=lyx.git diff --git a/src/frontends/WorkAreaManager.h b/src/frontends/WorkAreaManager.h index 5d7e9cc0ef..0434074ab4 100644 --- a/src/frontends/WorkAreaManager.h +++ b/src/frontends/WorkAreaManager.h @@ -12,29 +12,46 @@ #ifndef WORKAREA_MANAGER_H #define WORKAREA_MANAGER_H -#include +#include namespace lyx { + +class Buffer; + namespace frontend { class WorkArea; +/// \c WorkArea Manager. +/** + * This is a helper class designed to avoid signal/slot connections + * between a \c Buffer and the potentially multiple \c WorkArea(s) + * used to visualize this Buffer contents. + */ class WorkAreaManager { public: + /// WorkAreaManager() {} - /// - void registerWorkArea(WorkArea * wa); - + void add(WorkArea * wa); /// - void changed(); - + void remove(WorkArea * wa); /// - void closing(); + void redrawAll(bool update_metrics); + /// + void closeAll(); + /// Update window titles of all users and the external modifications + /// warning. + void updateTitles(); + /// If there is no work area, create a new one in the current view using the + /// buffer buf. Returns false if not possible. + bool unhide(Buffer * buf); private: - std::vector work_areas_; + typedef std::list::iterator iterator; + /// + std::list work_areas_; }; } // namespace frontend