bsnes/hiro/core/widget/viewport.cpp
Tim Allen 8d5cc0c35e Update to v099r15 release.
byuu says:

Changelog:
- nall::lstring -> nall::string_vector
- added IntegerBitField<type, lo, hi> -- hopefully it works correctly...
- Multitap 1-4 -> Super Multitap 2-5
- fixed SFC PPU CGRAM read regression
- huge amounts of SFC PPU IO register cleanups -- .bits really is lovely
- re-added the read/write(VRAM,OAM,CGRAM) helpers for the SFC PPU
  - but they're now optimized to the realities of the PPU (16-bit data
    sizes / no address parameter / where appropriate)
  - basically used to get the active-display overrides in a unified place;
    but also reduces duplicate code in (read,write)IO
2016-07-04 21:48:17 +10:00

69 lines
1.6 KiB
C++

#if defined(Hiro_Viewport)
auto mViewport::allocate() -> pObject* {
return new pViewport(*this);
}
//
auto mViewport::doDrop(string_vector names) const -> void {
if(state.onDrop) return state.onDrop(names);
}
auto mViewport::doMouseLeave() const -> void {
if(state.onMouseLeave) return state.onMouseLeave();
}
auto mViewport::doMouseMove(Position position) const -> void {
if(state.onMouseMove) return state.onMouseMove(position);
}
auto mViewport::doMousePress(Mouse::Button button) const -> void {
if(state.onMousePress) return state.onMousePress(button);
}
auto mViewport::doMouseRelease(Mouse::Button button) const -> void {
if(state.onMouseRelease) return state.onMouseRelease(button);
}
auto mViewport::droppable() const -> bool {
return state.droppable;
}
auto mViewport::handle() const -> uintptr_t {
return signal(handle);
}
auto mViewport::onDrop(const function<void (string_vector)>& callback) -> type& {
state.onDrop = callback;
return *this;
}
auto mViewport::onMouseLeave(const function<void ()>& callback) -> type& {
state.onMouseLeave = callback;
return *this;
}
auto mViewport::onMouseMove(const function<void (Position)>& callback) -> type& {
state.onMouseMove = callback;
return *this;
}
auto mViewport::onMousePress(const function<void (Mouse::Button)>& callback) -> type& {
state.onMousePress = callback;
return *this;
}
auto mViewport::onMouseRelease(const function<void (Mouse::Button)>& callback) -> type& {
state.onMouseRelease = callback;
return *this;
}
auto mViewport::setDroppable(bool droppable) -> type& {
state.droppable = droppable;
signal(setDroppable, droppable);
return *this;
}
#endif