mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 14:42:33 +01:00
byuu says: Changelog: - fixed major nall/vector/prepend bug - renamed hiro/ListView to hiro/TableView - added new hiro/ListView control which is a simplified abstraction of hiro/TableView - updated higan's cheat database window and icarus' scan dialog to use the new ListView control - compilation works once again on all platforms (Windows, Cocoa, GTK, Qt) - the loki skeleton compiles once again (removed nall/DSP references; updated port/device ID names) Small catch: need to capture layout resize events internally in Windows to call resizeColumns. For now, just resize the icarus window to get it to use the full window width for list view items.
43 lines
936 B
C++
43 lines
936 B
C++
#if defined(Hiro_TableView)
|
|
|
|
namespace hiro {
|
|
|
|
auto pTableViewHeader::construct() -> void {
|
|
_setState();
|
|
}
|
|
|
|
auto pTableViewHeader::destruct() -> void {
|
|
}
|
|
|
|
auto pTableViewHeader::append(sTableViewColumn column) -> void {
|
|
}
|
|
|
|
auto pTableViewHeader::remove(sTableViewColumn column) -> void {
|
|
}
|
|
|
|
auto pTableViewHeader::setVisible(bool visible) -> void {
|
|
_setState();
|
|
}
|
|
|
|
auto pTableViewHeader::_parent() -> maybe<pTableView&> {
|
|
if(auto parent = self().parentTableView()) {
|
|
if(auto self = parent->self()) return *self;
|
|
}
|
|
return nothing;
|
|
}
|
|
|
|
auto pTableViewHeader::_setState() -> void {
|
|
if(auto parent = _parent()) {
|
|
auto style = GetWindowLong(parent->hwnd, GWL_STYLE);
|
|
self().visible() ? style &=~ LVS_NOCOLUMNHEADER : style |= LVS_NOCOLUMNHEADER;
|
|
SetWindowLong(parent->hwnd, GWL_STYLE, style);
|
|
for(auto& column : state().columns) {
|
|
if(auto self = column->self()) self->_setState();
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|