metaforce/specter/include/Specter/RootView.hpp

46 lines
1.6 KiB
C++
Raw Normal View History

2015-11-21 01:14:49 +00:00
#ifndef SPECTER_ROOTVIEW_HPP
#define SPECTER_ROOTVIEW_HPP
#include "View.hpp"
2015-11-22 04:32:12 +00:00
#include "FontCache.hpp"
2015-11-21 01:14:49 +00:00
#include <boo/boo.hpp>
namespace Specter
{
2015-11-21 23:45:02 +00:00
class RootView : public View, public boo::IWindowCallback
2015-11-21 01:14:49 +00:00
{
2015-11-22 04:32:12 +00:00
FontCache& m_fontCache;
2015-11-21 23:45:02 +00:00
boo::IWindow* m_window = nullptr;
2015-11-22 04:32:12 +00:00
float m_scale = 1.0;
2015-11-21 23:45:02 +00:00
2015-11-21 01:14:49 +00:00
void resized(const boo::SWindowRect& rect);
void mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods);
void mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mods);
void mouseMove(const boo::SWindowCoord& coord);
void mouseEnter(const boo::SWindowCoord& coord);
void mouseLeave(const boo::SWindowCoord& coord);
void scroll(const boo::SWindowCoord& coord, const boo::SScrollDelta& scroll);
void touchDown(const boo::STouchCoord& coord, uintptr_t tid);
void touchUp(const boo::STouchCoord& coord, uintptr_t tid);
void touchMove(const boo::STouchCoord& coord, uintptr_t tid);
void charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat);
void charKeyUp(unsigned long charCode, boo::EModifierKey mods);
void specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat);
void specialKeyUp(boo::ESpecialKey key, boo::EModifierKey mods);
void modKeyDown(boo::EModifierKey mod, bool isRepeat);
void modKeyUp(boo::EModifierKey mod);
2015-11-21 23:45:02 +00:00
void draw(boo::IGraphicsCommandQueue* gfxQ);
2015-11-22 04:32:12 +00:00
public:
RootView(FontCache& fontCache) : m_fontCache(fontCache) {}
void setWindow(boo::IWindow* window, float userScale);
2015-11-21 01:14:49 +00:00
};
}
#endif // SPECTER_ROOTVIEW_HPP