mirror of https://github.com/bsnes-emu/bsnes.git
35 lines
765 B
C++
35 lines
765 B
C++
auto mVerticalScroller::allocate() -> pObject* {
|
|
return new pVerticalScroller(*this);
|
|
}
|
|
|
|
//
|
|
|
|
auto mVerticalScroller::doChange() const -> void {
|
|
if(state.onChange) return state.onChange();
|
|
}
|
|
|
|
auto mVerticalScroller::length() const -> unsigned {
|
|
return state.length;
|
|
}
|
|
|
|
auto mVerticalScroller::onChange(const function<void ()>& function) -> type& {
|
|
state.onChange = function;
|
|
return *this;
|
|
}
|
|
|
|
auto mVerticalScroller::position() const -> unsigned {
|
|
return state.position;
|
|
}
|
|
|
|
auto mVerticalScroller::setLength(unsigned length) -> type& {
|
|
state.length = length;
|
|
signal(setLength, length);
|
|
return *this;
|
|
}
|
|
|
|
auto mVerticalScroller::setPosition(unsigned position) -> type& {
|
|
state.position = position;
|
|
signal(setPosition, position);
|
|
return *this;
|
|
}
|