2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-06-11 09:31:45 +02:00
|
|
|
#include "widgets/mainwindow.hpp"
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-04-13 19:25:33 +02:00
|
|
|
#include <mutex>
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
class WindowManager
|
2017-01-15 16:38:30 +01:00
|
|
|
{
|
|
|
|
public:
|
2017-04-13 19:25:33 +02:00
|
|
|
static WindowManager &getInstance()
|
2017-01-15 16:38:30 +01:00
|
|
|
{
|
2017-04-13 19:25:33 +02:00
|
|
|
return instance;
|
2017-01-15 16:38:30 +01:00
|
|
|
}
|
|
|
|
|
2017-04-13 19:25:33 +02:00
|
|
|
void layoutVisibleChatWidgets(Channel *channel = nullptr);
|
|
|
|
void repaintVisibleChatWidgets(Channel *channel = nullptr);
|
|
|
|
void repaintGifEmotes();
|
|
|
|
void updateAll();
|
|
|
|
|
|
|
|
widgets::MainWindow &getMainWindow();
|
|
|
|
|
|
|
|
void load();
|
|
|
|
void save();
|
2017-01-26 21:04:01 +01:00
|
|
|
|
2017-01-15 16:38:30 +01:00
|
|
|
private:
|
2017-04-13 19:25:33 +02:00
|
|
|
static WindowManager instance;
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-04-13 19:25:33 +02:00
|
|
|
WindowManager();
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-04-13 19:25:33 +02:00
|
|
|
std::mutex _windowMutex;
|
|
|
|
widgets::MainWindow *_mainWindow;
|
2017-01-15 16:38:30 +01:00
|
|
|
};
|
2017-01-28 22:35:23 +01:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace chatterino
|