2016-05-04 10:07:13 +00:00
|
|
|
#if defined(Hiro_TableView)
|
2015-06-12 13:14:38 +00:00
|
|
|
|
|
|
|
namespace hiro {
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::construct() -> void {
|
Update to v094r40 release.
byuu says:
Changelog:
- updated to newest hiro API
- SFC performance profile builds once again
- hiro: Qt port completed
Errata 1: the hiro/Qt target won't run tomoko just yet. Starts by
crashing inside InputSettings because hiro/Qt isn't forcefully selecting
the first item added to a ComboButton just yet. Even with a monkey patch
to get around that, the UI is incredibly unstable. Lots of geometry
calculation bugs, and a crash when you try and access certain folders in
the browser dialog. Lots of work left to be done there, sadly.
Errata 2: the hiro/Windows port has black backgrounds on all ListView
items. It's because I need to test for unassigned colors and grab the
default Windows brush colors in those cases.
Note: alternating row colors on multi-column ListView widgets is gone
now. Not a bug. May add it back later, but I'm not sure. It doesn't
interact nicely with per-cell background colors.
Things left to do:
First, I have to fix the Windows and Qt target bugs.
Next, I need to go through and revise the hiro API even more (nothing
too major.)
Next, I need to update icarus to use the new hiro API, and add support
for the SFC games database.
Next, I have to rewrite my TSV->BML cheat code tool.
Next, I need to post a final WIP of higan+icarus publicly and wait a few
days.
Next, I need to fix any bugs reported from the final WIP that I can.
Finally, I should be able to release v095.
2015-08-18 10:18:00 +00:00
|
|
|
if(auto parent = _parent()) {
|
|
|
|
parent->lock();
|
|
|
|
wchar_t text[] = L"";
|
|
|
|
LVITEM lvItem{0};
|
|
|
|
lvItem.mask = LVIF_TEXT;
|
|
|
|
lvItem.iItem = self().offset();
|
|
|
|
lvItem.iSubItem = 0;
|
|
|
|
lvItem.pszText = text;
|
|
|
|
ListView_InsertItem(parent->hwnd, &lvItem);
|
|
|
|
_setState();
|
|
|
|
parent->unlock();
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::destruct() -> void {
|
Update to v094r40 release.
byuu says:
Changelog:
- updated to newest hiro API
- SFC performance profile builds once again
- hiro: Qt port completed
Errata 1: the hiro/Qt target won't run tomoko just yet. Starts by
crashing inside InputSettings because hiro/Qt isn't forcefully selecting
the first item added to a ComboButton just yet. Even with a monkey patch
to get around that, the UI is incredibly unstable. Lots of geometry
calculation bugs, and a crash when you try and access certain folders in
the browser dialog. Lots of work left to be done there, sadly.
Errata 2: the hiro/Windows port has black backgrounds on all ListView
items. It's because I need to test for unassigned colors and grab the
default Windows brush colors in those cases.
Note: alternating row colors on multi-column ListView widgets is gone
now. Not a bug. May add it back later, but I'm not sure. It doesn't
interact nicely with per-cell background colors.
Things left to do:
First, I have to fix the Windows and Qt target bugs.
Next, I need to go through and revise the hiro API even more (nothing
too major.)
Next, I need to update icarus to use the new hiro API, and add support
for the SFC games database.
Next, I have to rewrite my TSV->BML cheat code tool.
Next, I need to post a final WIP of higan+icarus publicly and wait a few
days.
Next, I need to fix any bugs reported from the final WIP that I can.
Finally, I should be able to release v095.
2015-08-18 10:18:00 +00:00
|
|
|
if(auto parent = _parent()) {
|
|
|
|
parent->lock();
|
|
|
|
ListView_DeleteItem(parent->hwnd, self().offset());
|
|
|
|
parent->unlock();
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::append(sTableViewCell cell) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::remove(sTableViewCell cell) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::setAlignment(Alignment alignment) -> void {
|
Update to v094r39 release.
byuu says:
Changelog:
- SNES mid-scanline BGMODE fixes finally merged (can run
atx2.zip{mode7.smc}+mtest(2).sfc properly now)
- Makefile now discards all built-in rules and variables
- switch on bool warning disabled for GCC now as well (was already
disabled for Clang)
- when loading a game, if any required files are missing, display
a warning message box (manifest.bml, program.rom, bios.rom, etc)
- when loading a game (or a game slot), if manifest.bml is missing, it
will invoke icarus to try and generate it
- if that fails (icarus is missing or the folder is bad), you will get
a warning telling you that the manifest can't be loaded
The warning prompt on missing files work for both games and the .sys
folders and their files. For some reason, failing to load the DMG/CGB
BIOS is causing a crash before I can display the modal dialog. I have no
idea why, and the stack frame backtrace is junk.
I also can't seem to abort the failed loading process. If I call
Program::unloadMedia(), I get a nasty segfault. Again with a really
nasty stack trace. So for now, it'll just end up sitting there emulating
an empty ROM (solid black screen.) In time, I'd like to fix that too.
Lastly, I need a better method than popen for Windows. popen is kind of
ugly and flashes a console window for a brief second even if the
application launched is linked with -mwindows. Not sure if there even is
one (I need to read the stdout result, so CreateProcess may not work
unless I do something nasty like "> %tmp%/temp") I'm also using the
regular popen instead of _wpopen, so for this WIP, it won't work if your
game folder has non-English letters in the path.
2015-08-04 09:00:55 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::setBackgroundColor(Color color) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::setFocused() -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto parent = _parent()) {
|
|
|
|
parent->lock();
|
|
|
|
ListView_SetItemState(parent->hwnd, self().offset(), LVIS_FOCUSED, LVIS_FOCUSED);
|
|
|
|
parent->unlock();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::setForegroundColor(Color color) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::setSelected(bool selected) -> void {
|
Update to v094r40 release.
byuu says:
Changelog:
- updated to newest hiro API
- SFC performance profile builds once again
- hiro: Qt port completed
Errata 1: the hiro/Qt target won't run tomoko just yet. Starts by
crashing inside InputSettings because hiro/Qt isn't forcefully selecting
the first item added to a ComboButton just yet. Even with a monkey patch
to get around that, the UI is incredibly unstable. Lots of geometry
calculation bugs, and a crash when you try and access certain folders in
the browser dialog. Lots of work left to be done there, sadly.
Errata 2: the hiro/Windows port has black backgrounds on all ListView
items. It's because I need to test for unassigned colors and grab the
default Windows brush colors in those cases.
Note: alternating row colors on multi-column ListView widgets is gone
now. Not a bug. May add it back later, but I'm not sure. It doesn't
interact nicely with per-cell background colors.
Things left to do:
First, I have to fix the Windows and Qt target bugs.
Next, I need to go through and revise the hiro API even more (nothing
too major.)
Next, I need to update icarus to use the new hiro API, and add support
for the SFC games database.
Next, I have to rewrite my TSV->BML cheat code tool.
Next, I need to post a final WIP of higan+icarus publicly and wait a few
days.
Next, I need to fix any bugs reported from the final WIP that I can.
Finally, I should be able to release v095.
2015-08-18 10:18:00 +00:00
|
|
|
_setState();
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::_parent() -> maybe<pTableView&> {
|
|
|
|
if(auto parent = self().parentTableView()) {
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto self = parent->self()) return *self;
|
|
|
|
}
|
|
|
|
return nothing;
|
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableViewItem::_setState() -> void {
|
Update to v094r40 release.
byuu says:
Changelog:
- updated to newest hiro API
- SFC performance profile builds once again
- hiro: Qt port completed
Errata 1: the hiro/Qt target won't run tomoko just yet. Starts by
crashing inside InputSettings because hiro/Qt isn't forcefully selecting
the first item added to a ComboButton just yet. Even with a monkey patch
to get around that, the UI is incredibly unstable. Lots of geometry
calculation bugs, and a crash when you try and access certain folders in
the browser dialog. Lots of work left to be done there, sadly.
Errata 2: the hiro/Windows port has black backgrounds on all ListView
items. It's because I need to test for unassigned colors and grab the
default Windows brush colors in those cases.
Note: alternating row colors on multi-column ListView widgets is gone
now. Not a bug. May add it back later, but I'm not sure. It doesn't
interact nicely with per-cell background colors.
Things left to do:
First, I have to fix the Windows and Qt target bugs.
Next, I need to go through and revise the hiro API even more (nothing
too major.)
Next, I need to update icarus to use the new hiro API, and add support
for the SFC games database.
Next, I have to rewrite my TSV->BML cheat code tool.
Next, I need to post a final WIP of higan+icarus publicly and wait a few
days.
Next, I need to fix any bugs reported from the final WIP that I can.
Finally, I should be able to release v095.
2015-08-18 10:18:00 +00:00
|
|
|
if(auto parent = _parent()) {
|
|
|
|
parent->lock();
|
|
|
|
ListView_SetItemState(parent->hwnd, self().offset(), state().selected ? LVIS_SELECTED : 0, LVIS_SELECTED);
|
|
|
|
for(auto& cell : state().cells) {
|
|
|
|
if(auto self = cell->self()) self->_setState();
|
|
|
|
}
|
|
|
|
parent->unlock();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|