2016-05-04 10:07:13 +00:00
|
|
|
#if defined(Hiro_TableView)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
namespace hiro {
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::construct() -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
hwnd = CreateWindowEx(
|
Update to higan and icarus v095r17 release.
byuu says:
higan supports Event mapping again.
Further, icarus can now detect Event ROMs and MSU1 games.
Event ROMs must be named "program.rom", "slot-(1,2,3).rom" MSU1 games
must contain "msu1.rom"; and tracks must be named "track-#.pcm"
When importing the CC'92, PF'94 ROMs, the program.rom and
slot-(1,2,3).rom files must be concatenated. The DSP firmware can
optionally be separate, but I'd recommend you go ahead and merge it all
to one file. Especially since that common "higan DSP pack" floating
around on the web left out the DSP1 ROMs (only has DSP1B) for god knows
what reason.
There is no support for loading "game.sfc+game.msu+game-*.pcm", because
I'm not going to support trying to pull in all of those files through
importing. Games will have to be distributed as game folders to use
MSU1. The MSU1 icarus support is simply so your game folders won't
require an unstable manifest.bml file to be played. So once they're in
there, they are good for life.
Note: the Event sizes in icarus' SFC heuristics are wrong for appended
firmware. Change from 0xXX8000 to 0xXX2000 and it works fine. Will be
fixed in r18.
Added Sintendo's flickering fixes. The window one's a big help for
regular controls, but the ListView double buffering does nothing for me
on Windows 7 :( Fairly sure I know why, but too lazy to try and fix that
now.
Also fixes the mMenu thing.
2015-12-20 02:53:40 +00:00
|
|
|
WS_EX_CLIENTEDGE | LVS_EX_DOUBLEBUFFER, WC_LISTVIEW, L"",
|
2015-06-12 13:14:38 +00:00
|
|
|
WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_SHOWSELALWAYS,
|
|
|
|
0, 0, 0, 0, _parentHandle(), nullptr, GetModuleHandle(0), 0
|
|
|
|
);
|
|
|
|
ListView_SetExtendedListViewStyle(hwnd, LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES);
|
Update to v106r57 release.
byuu says:
I've added tool tips to hiro for Windows, GTK, and Qt. I'm unsure how to
add them for Cocoa. I wasted am embarrassing ~14 hours implementing tool
tips from scratch on Windows, because the `TOOLTIPS_CLASS` widget just
absolutely refused to show up, no matter what I tried. As such, they're
not quite 100% native, but I would really appreciate any patch
submissions to help improve my implementation.
I added tool tips to all of the confusing settings in bsnes. And of
course, for those of you who don't like them, there's a configuration
file setting to turn them off globally.
I also improved Mega Drive handling of the Game Genie a bit, and
restructured the way the Settings class works in bsnes.
Starting now, I'm feature-freezing bsnes and higan. From this point
forward:
- polishing up and fixing bugs caused by the ruby/hiro changes
- adding DRC to XAudio2, and maybe exclusive mode to WGL
- correcting FEoEZ (English) to load and work again out of the box
Once that's done, a final beta of bsnes will go out, I'll fix any
reported bugs that I'm able to, and then v107 should be ready. This time
with higan being functional, but marked as v107 beta. v108 will restore
higan to production status again, alongside bsnes.
2018-08-08 08:46:58 +00:00
|
|
|
pWidget::construct();
|
2015-06-12 13:14:38 +00:00
|
|
|
setBackgroundColor(state().backgroundColor);
|
|
|
|
setBatchable(state().batchable);
|
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
|
|
|
setBordered(state().bordered);
|
2018-08-05 09:00:15 +00:00
|
|
|
setHeadered(state().headered);
|
|
|
|
setSortable(state().sortable);
|
2015-06-12 13:14:38 +00:00
|
|
|
_setIcons();
|
|
|
|
resizeColumns();
|
2012-06-25 12:49:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::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(imageList) { ImageList_Destroy(imageList); imageList = nullptr; }
|
2015-06-12 13:14:38 +00:00
|
|
|
DestroyWindow(hwnd);
|
|
|
|
}
|
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
auto pTableView::append(sTableViewColumn column) -> void {
|
2016-06-07 11:55:03 +00:00
|
|
|
resizeColumns();
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2012-08-11 02:18:19 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::append(sTableViewItem item) -> void {
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
auto pTableView::remove(sTableViewColumn column) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::remove(sTableViewItem item) -> void {
|
2012-06-25 12:49:39 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::resizeColumns() -> void {
|
2018-08-05 09:00:15 +00:00
|
|
|
auto lock = acquire();
|
|
|
|
|
|
|
|
vector<signed> widths;
|
|
|
|
signed minimumWidth = 0;
|
|
|
|
signed expandable = 0;
|
|
|
|
for(auto column : range(self().columnCount())) {
|
|
|
|
signed width = _width(column);
|
|
|
|
widths.append(width);
|
|
|
|
minimumWidth += width;
|
|
|
|
if(state().columns[column]->expandable()) expandable++;
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
signed maximumWidth = self().geometry().width() - 4;
|
|
|
|
SCROLLBARINFO sbInfo{sizeof(SCROLLBARINFO)};
|
|
|
|
if(GetScrollBarInfo(hwnd, OBJID_VSCROLL, &sbInfo)) {
|
|
|
|
if(!(sbInfo.rgstate[0] & STATE_SYSTEM_INVISIBLE)) {
|
|
|
|
maximumWidth -= sbInfo.rcScrollBar.right - sbInfo.rcScrollBar.left;
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2018-08-05 09:00:15 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
signed expandWidth = 0;
|
|
|
|
if(expandable && maximumWidth > minimumWidth) {
|
|
|
|
expandWidth = (maximumWidth - minimumWidth) / expandable;
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
for(auto column : range(self().columnCount())) {
|
|
|
|
if(auto self = state().columns[column]->self()) {
|
|
|
|
signed width = widths[column];
|
|
|
|
if(self->state().expandable) width += expandWidth;
|
|
|
|
self->_width = width;
|
|
|
|
self->_setState();
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
}
|
Update to v094r08 release.
byuu says:
Lots of changes this time around. FreeBSD stability and compilation is
still a work in progress.
FreeBSD 10 + Clang 3.3 = 108fps
FreeBSD 10 + GCC 4.7 = 130fps
Errata 1: I've been fighting that god-damned endian.h header for the
past nine WIPs now. The above WIP isn't building now because FreeBSD
isn't including headers before using certain types, and you end up with
a trillion error messages. So just delete all the endian.h includes from
nall/intrinsics.hpp to build.
Errata 2: I was trying to match g++ and g++47, so I used $(findstring
g++,$(compiler)), which ends up also matching clang++. Oops. Easy fix,
put Clang first and then else if g++ next. Not ideal, but oh well. All
it's doing for now is declaring -fwrapv twice, so you don't have to fix
it just yet. Probably just going to alias g++="g++47" and do exact
matching instead.
Errata 3: both OpenGL::term and VideoGLX::term are causing a core dump
on BSD. No idea why. The resources are initialized and valid, but
releasing them crashes the application.
Changelog:
- nall/Makefile is more flexible with overriding $(compiler), so you can
build with GCC or Clang on BSD (defaults to GCC now)
- PLATFORM_X was renamed to PLATFORM_XORG, and it's also declared with
PLATFORM_LINUX or PLATFORM_BSD
- PLATFORM_XORG probably isn't the best name ... still thinking about
what best to call LINUX|BSD|SOLARIS or ^(WINDOWS|MACOSX)
- fixed a few legitimate Clang warning messages in nall
- Compiler::VisualCPP is ugly as hell, renamed to Compiler::CL
- nall/platform includes nall/intrinsics first. Trying to move away from
testing for _WIN32, etc directly in all files. Work in progress.
- nall turns off Clang warnings that I won't "fix", because they aren't
broken. It's much less noisy to compile with warnings on now.
- phoenix gains the ability to set background and foreground colors on
various text container widgets (GTK only for now.)
- rewrote a lot of the MSU1 code to try and simplify it. Really hope
I didn't break anything ... I don't have any MSU1 test ROMs handy
- SNES coprocessor audio is now mixed as sclamp<16>(system_sample
+ coprocessor_sample) instead of sclamp<16>((sys + cop) / 2)
- allows for greater chance of aliasing (still low, SNES audio is
quiet), but doesn't cut base system volume in half anymore
- fixed Super Scope and Justifier cursor colors
- use input.xlib instead of input.x ... allows Xlib input driver to be
visible on Linux and BSD once again
- make install and make uninstall must be run as root again; no longer
using install but cp instead for BSD compatibility
- killed $(DESTDIR) ... use make prefix=$DESTDIR$prefix instead
- you can now set text/background colors for the loki console via (eg):
- settings.terminal.background-color 0x000000
- settings.terminal.foreground-color 0xffffff
2014-02-24 09:39:09 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::setAlignment(Alignment alignment) -> void {
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::setBackgroundColor(Color color) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
if(!color) color = {255, 255, 255};
|
|
|
|
ListView_SetBkColor(hwnd, RGB(color.red(), color.green(), color.blue()));
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::setBatchable(bool batchable) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
auto style = GetWindowLong(hwnd, GWL_STYLE);
|
|
|
|
!batchable ? style |= LVS_SINGLESEL : style &=~ LVS_SINGLESEL;
|
|
|
|
SetWindowLong(hwnd, GWL_STYLE, style);
|
Update to v094r08 release.
byuu says:
Lots of changes this time around. FreeBSD stability and compilation is
still a work in progress.
FreeBSD 10 + Clang 3.3 = 108fps
FreeBSD 10 + GCC 4.7 = 130fps
Errata 1: I've been fighting that god-damned endian.h header for the
past nine WIPs now. The above WIP isn't building now because FreeBSD
isn't including headers before using certain types, and you end up with
a trillion error messages. So just delete all the endian.h includes from
nall/intrinsics.hpp to build.
Errata 2: I was trying to match g++ and g++47, so I used $(findstring
g++,$(compiler)), which ends up also matching clang++. Oops. Easy fix,
put Clang first and then else if g++ next. Not ideal, but oh well. All
it's doing for now is declaring -fwrapv twice, so you don't have to fix
it just yet. Probably just going to alias g++="g++47" and do exact
matching instead.
Errata 3: both OpenGL::term and VideoGLX::term are causing a core dump
on BSD. No idea why. The resources are initialized and valid, but
releasing them crashes the application.
Changelog:
- nall/Makefile is more flexible with overriding $(compiler), so you can
build with GCC or Clang on BSD (defaults to GCC now)
- PLATFORM_X was renamed to PLATFORM_XORG, and it's also declared with
PLATFORM_LINUX or PLATFORM_BSD
- PLATFORM_XORG probably isn't the best name ... still thinking about
what best to call LINUX|BSD|SOLARIS or ^(WINDOWS|MACOSX)
- fixed a few legitimate Clang warning messages in nall
- Compiler::VisualCPP is ugly as hell, renamed to Compiler::CL
- nall/platform includes nall/intrinsics first. Trying to move away from
testing for _WIN32, etc directly in all files. Work in progress.
- nall turns off Clang warnings that I won't "fix", because they aren't
broken. It's much less noisy to compile with warnings on now.
- phoenix gains the ability to set background and foreground colors on
various text container widgets (GTK only for now.)
- rewrote a lot of the MSU1 code to try and simplify it. Really hope
I didn't break anything ... I don't have any MSU1 test ROMs handy
- SNES coprocessor audio is now mixed as sclamp<16>(system_sample
+ coprocessor_sample) instead of sclamp<16>((sys + cop) / 2)
- allows for greater chance of aliasing (still low, SNES audio is
quiet), but doesn't cut base system volume in half anymore
- fixed Super Scope and Justifier cursor colors
- use input.xlib instead of input.x ... allows Xlib input driver to be
visible on Linux and BSD once again
- make install and make uninstall must be run as root again; no longer
using install but cp instead for BSD compatibility
- killed $(DESTDIR) ... use make prefix=$DESTDIR$prefix instead
- you can now set text/background colors for the loki console via (eg):
- settings.terminal.background-color 0x000000
- settings.terminal.foreground-color 0xffffff
2014-02-24 09:39:09 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::setBordered(bool bordered) -> 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
|
|
|
//rendered via onCustomDraw
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::setForegroundColor(Color color) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2011-02-24 09:25:20 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::setGeometry(Geometry geometry) -> 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
|
|
|
pWidget::setGeometry(geometry);
|
2018-08-05 09:00:15 +00:00
|
|
|
for(auto& column : state().columns) {
|
|
|
|
if(column->state.expandable) return resizeColumns();
|
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
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2011-02-24 09:25:20 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::onActivate(LPARAM lparam) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
auto nmlistview = (LPNMLISTVIEW)lparam;
|
|
|
|
if(ListView_GetSelectedCount(hwnd) == 0) return;
|
|
|
|
if(!locked()) {
|
2019-07-31 17:40:35 +00:00
|
|
|
activateCell = TableViewCell();
|
|
|
|
LVHITTESTINFO hitTest{};
|
|
|
|
GetCursorPos(&hitTest.pt);
|
|
|
|
ScreenToClient(nmlistview->hdr.hwndFrom, &hitTest.pt);
|
|
|
|
ListView_SubItemHitTest(nmlistview->hdr.hwndFrom, &hitTest);
|
|
|
|
if(hitTest.flags & LVHT_ONITEM) {
|
|
|
|
int row = hitTest.iItem;
|
|
|
|
if(row >= 0 && row < state().items.size()) {
|
|
|
|
int column = hitTest.iSubItem;
|
|
|
|
if(column >= 0 && column < state().columns.size()) {
|
|
|
|
auto item = state().items[row];
|
|
|
|
activateCell = item->cell(column);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
//LVN_ITEMACTIVATE is not re-entrant until DispatchMessage() completes
|
|
|
|
//thus, we don't call self().doActivate() here
|
2016-05-04 10:07:13 +00:00
|
|
|
PostMessageOnce(_parentHandle(), AppMessage::TableView_onActivate, 0, (LPARAM)&reference);
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
2011-02-27 09:05:10 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::onChange(LPARAM lparam) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
auto nmlistview = (LPNMLISTVIEW)lparam;
|
|
|
|
if(!(nmlistview->uChanged & LVIF_STATE)) return;
|
2011-02-24 09:25:20 +00:00
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
bool modified = false;
|
|
|
|
for(auto& item : state().items) {
|
|
|
|
bool selected = ListView_GetItemState(hwnd, item->offset(), LVIS_SELECTED) & LVIS_SELECTED;
|
|
|
|
if(item->state.selected != selected) {
|
|
|
|
modified = true;
|
|
|
|
item->state.selected = selected;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(modified && !locked()) {
|
|
|
|
//state event change messages are sent for every item
|
|
|
|
//so when doing a batch select/deselect; this can generate several messages
|
|
|
|
//we use a delayed AppMessage so that only one callback event is fired off
|
2016-05-04 10:07:13 +00:00
|
|
|
PostMessageOnce(_parentHandle(), AppMessage::TableView_onChange, 0, (LPARAM)&reference);
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2011-09-05 03:48:23 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::onContext(LPARAM lparam) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
auto nmitemactivate = (LPNMITEMACTIVATE)lparam;
|
|
|
|
return self().doContext();
|
2011-09-05 03:48:23 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::onCustomDraw(LPARAM lparam) -> LRESULT {
|
2015-06-12 13:14:38 +00:00
|
|
|
auto lvcd = (LPNMLVCUSTOMDRAW)lparam;
|
2012-06-25 12:49:39 +00:00
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
switch(lvcd->nmcd.dwDrawStage) {
|
|
|
|
default: return CDRF_DODEFAULT;
|
|
|
|
case CDDS_PREPAINT: return CDRF_NOTIFYITEMDRAW;
|
|
|
|
case CDDS_ITEMPREPAINT: return CDRF_NOTIFYSUBITEMDRAW | CDRF_NOTIFYPOSTPAINT;
|
|
|
|
case CDDS_ITEMPREPAINT | CDDS_SUBITEM: return CDRF_SKIPDEFAULT;
|
|
|
|
case CDDS_ITEMPOSTPAINT: {
|
|
|
|
HDC hdc = lvcd->nmcd.hdc;
|
|
|
|
HDC hdcSource = CreateCompatibleDC(hdc);
|
|
|
|
unsigned row = lvcd->nmcd.dwItemSpec;
|
2018-08-05 09:00:15 +00:00
|
|
|
for(auto column : range(self().columnCount())) {
|
2015-06-12 13:14:38 +00:00
|
|
|
RECT rc, rcLabel;
|
|
|
|
ListView_GetSubItemRect(hwnd, row, column, LVIR_BOUNDS, &rc);
|
|
|
|
ListView_GetSubItemRect(hwnd, row, column, LVIR_LABEL, &rcLabel);
|
|
|
|
rc.right = rcLabel.right; //bounds of column 0 returns width of entire item
|
|
|
|
signed iconSize = rc.bottom - rc.top - 1;
|
|
|
|
bool selected = state().items(row)->state.selected;
|
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 cell = self().item(row)->cell(column)) {
|
2015-08-21 10:56:39 +00:00
|
|
|
auto backgroundColor = cell->backgroundColor(true);
|
|
|
|
HBRUSH brush = CreateSolidBrush(
|
|
|
|
selected ? GetSysColor(COLOR_HIGHLIGHT)
|
|
|
|
: backgroundColor ? CreateRGB(backgroundColor)
|
|
|
|
: GetSysColor(COLOR_WINDOW)
|
|
|
|
);
|
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
|
|
|
FillRect(hdc, &rc, brush);
|
|
|
|
DeleteObject(brush);
|
|
|
|
|
|
|
|
if(cell->state.checkable) {
|
|
|
|
if(auto htheme = OpenThemeData(hwnd, L"BUTTON")) {
|
|
|
|
unsigned state = cell->state.checked ? CBS_CHECKEDNORMAL : CBS_UNCHECKEDNORMAL;
|
|
|
|
SIZE size;
|
|
|
|
GetThemePartSize(htheme, hdc, BP_CHECKBOX, state, nullptr, TS_TRUE, &size);
|
|
|
|
signed center = max(0, (rc.bottom - rc.top - size.cy) / 2);
|
|
|
|
RECT rd{rc.left + center, rc.top + center, rc.left + center + size.cx, rc.top + center + size.cy};
|
|
|
|
DrawThemeBackground(htheme, hdc, BP_CHECKBOX, state, &rd, nullptr);
|
|
|
|
CloseThemeData(htheme);
|
2015-10-10 02:16:12 +00:00
|
|
|
} else {
|
|
|
|
//Windows Classic
|
|
|
|
rc.left += 2;
|
|
|
|
RECT rd{rc.left, rc.top, rc.left + iconSize, rc.top + iconSize};
|
|
|
|
DrawFrameControl(hdc, &rd, DFC_BUTTON, DFCS_BUTTONCHECK | (cell->state.checked ? DFCS_CHECKED : 0));
|
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
|
|
|
}
|
|
|
|
rc.left += iconSize + 2;
|
|
|
|
} else {
|
|
|
|
rc.left += 2;
|
|
|
|
}
|
|
|
|
|
2016-01-07 08:14:33 +00:00
|
|
|
if(auto& icon = cell->state.icon) {
|
|
|
|
auto bitmap = CreateBitmap(icon);
|
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
|
|
|
SelectBitmap(hdcSource, bitmap);
|
|
|
|
BLENDFUNCTION blend{AC_SRC_OVER, 0, (BYTE)(selected ? 128 : 255), AC_SRC_ALPHA};
|
2016-01-07 08:14:33 +00:00
|
|
|
AlphaBlend(hdc, rc.left, rc.top, iconSize, iconSize, hdcSource, 0, 0, icon.width(), icon.height(), blend);
|
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
|
|
|
DeleteObject(bitmap);
|
|
|
|
rc.left += iconSize + 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(auto text = cell->state.text) {
|
|
|
|
auto alignment = cell->alignment(true);
|
|
|
|
if(!alignment) alignment = {0.0, 0.5};
|
|
|
|
utf16_t wText(text);
|
|
|
|
SetBkMode(hdc, TRANSPARENT);
|
2015-08-21 10:56:39 +00:00
|
|
|
auto foregroundColor = cell->foregroundColor(true);
|
|
|
|
SetTextColor(hdc,
|
|
|
|
selected ? GetSysColor(COLOR_HIGHLIGHTTEXT)
|
|
|
|
: foregroundColor ? CreateRGB(foregroundColor)
|
|
|
|
: GetSysColor(COLOR_WINDOWTEXT)
|
|
|
|
);
|
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
|
|
|
auto style = DT_SINGLELINE | DT_NOPREFIX | DT_END_ELLIPSIS;
|
|
|
|
style |= alignment.horizontal() < 0.333 ? DT_LEFT : alignment.horizontal() > 0.666 ? DT_RIGHT : DT_CENTER;
|
|
|
|
style |= alignment.vertical() < 0.333 ? DT_TOP : alignment.vertical() > 0.666 ? DT_BOTTOM : DT_VCENTER;
|
|
|
|
rc.right -= 2;
|
|
|
|
auto font = pFont::create(cell->font(true));
|
|
|
|
SelectObject(hdc, font);
|
|
|
|
DrawText(hdc, wText, -1, &rc, style);
|
|
|
|
DeleteObject(font);
|
2012-08-11 02:18:19 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
} else {
|
2015-08-21 10:56:39 +00:00
|
|
|
auto backgroundColor = state().backgroundColor;
|
|
|
|
HBRUSH brush = CreateSolidBrush(
|
|
|
|
selected ? GetSysColor(COLOR_HIGHLIGHT)
|
|
|
|
: backgroundColor ? CreateRGB(backgroundColor)
|
|
|
|
: GetSysColor(COLOR_WINDOW)
|
|
|
|
);
|
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
|
|
|
FillRect(hdc, &rc, brush);
|
|
|
|
DeleteObject(brush);
|
2012-06-25 12:49:39 +00:00
|
|
|
}
|
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(state().bordered) {
|
2015-06-12 13:14:38 +00:00
|
|
|
ListView_GetSubItemRect(hwnd, row, column, LVIR_BOUNDS, &rc);
|
|
|
|
rc.top = rc.bottom - 1;
|
|
|
|
FillRect(hdc, &rc, (HBRUSH)GetStockObject(LTGRAY_BRUSH));
|
|
|
|
ListView_GetSubItemRect(hwnd, row, column, LVIR_LABEL, &rc);
|
|
|
|
rc.left = rc.right - 1;
|
|
|
|
FillRect(hdc, &rc, (HBRUSH)GetStockObject(LTGRAY_BRUSH));
|
2012-08-11 02:18:19 +00:00
|
|
|
}
|
2012-06-18 10:13:51 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
DeleteDC(hdcSource);
|
|
|
|
return CDRF_SKIPDEFAULT;
|
|
|
|
}
|
2012-06-18 10:13:51 +00:00
|
|
|
}
|
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
|
|
|
|
|
|
|
return CDRF_SKIPDEFAULT;
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2012-06-18 10:13:51 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::onSort(LPARAM lparam) -> void {
|
2015-06-12 13:14:38 +00:00
|
|
|
auto nmlistview = (LPNMLISTVIEW)lparam;
|
2018-08-05 09:00:15 +00:00
|
|
|
if(auto column = self().column(nmlistview->iSubItem)) {
|
|
|
|
if(state().sortable) self().doSort(column);
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::onToggle(LPARAM lparam) -> 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
|
|
|
auto itemActivate = (LPNMITEMACTIVATE)lparam;
|
|
|
|
LVHITTESTINFO hitTestInfo{0};
|
|
|
|
hitTestInfo.pt = itemActivate->ptAction;
|
|
|
|
ListView_SubItemHitTest(hwnd, &hitTestInfo);
|
|
|
|
|
|
|
|
if(auto cell = self().item(hitTestInfo.iItem).cell(hitTestInfo.iSubItem)) {
|
|
|
|
if(cell->state.checkable) {
|
|
|
|
cell->state.checked = !cell->state.checked;
|
|
|
|
if(!locked()) self().doToggle(cell);
|
|
|
|
//todo: try to find a way to only repaint this cell instead of the entire control to reduce flickering
|
2016-05-04 10:07:13 +00:00
|
|
|
PostMessageOnce(_parentHandle(), AppMessage::TableView_doPaint, 0, (LPARAM)&reference);
|
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
|
|
|
}
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2012-08-11 02:18:19 +00:00
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
auto pTableView::setHeadered(bool headered) -> void {
|
|
|
|
auto style = GetWindowLong(hwnd, GWL_STYLE);
|
|
|
|
headered ? style &=~ LVS_NOCOLUMNHEADER : style |= LVS_NOCOLUMNHEADER;
|
|
|
|
SetWindowLong(hwnd, GWL_STYLE, style);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pTableView::setSortable(bool sortable) -> void {
|
|
|
|
//note: this won't change the visual style: WC_LISTVIEW caches this in CreateWindow
|
|
|
|
auto style = GetWindowLong(hwnd, GWL_STYLE);
|
|
|
|
sortable ? style &=~ LVS_NOSORTHEADER : style |= LVS_NOSORTHEADER;
|
|
|
|
SetWindowLong(hwnd, GWL_STYLE, style);
|
|
|
|
}
|
|
|
|
|
Update to v106r57 release.
byuu says:
I've added tool tips to hiro for Windows, GTK, and Qt. I'm unsure how to
add them for Cocoa. I wasted am embarrassing ~14 hours implementing tool
tips from scratch on Windows, because the `TOOLTIPS_CLASS` widget just
absolutely refused to show up, no matter what I tried. As such, they're
not quite 100% native, but I would really appreciate any patch
submissions to help improve my implementation.
I added tool tips to all of the confusing settings in bsnes. And of
course, for those of you who don't like them, there's a configuration
file setting to turn them off globally.
I also improved Mega Drive handling of the Game Genie a bit, and
restructured the way the Settings class works in bsnes.
Starting now, I'm feature-freezing bsnes and higan. From this point
forward:
- polishing up and fixing bugs caused by the ruby/hiro changes
- adding DRC to XAudio2, and maybe exclusive mode to WGL
- correcting FEoEZ (English) to load and work again out of the box
Once that's done, a final beta of bsnes will go out, I'll fix any
reported bugs that I'm able to, and then v107 should be ready. This time
with higan being functional, but marked as v107 beta. v108 will restore
higan to production status again, alongside bsnes.
2018-08-08 08:46:58 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
auto pTableView::windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> maybe<LRESULT> {
|
|
|
|
if(msg == WM_KEYDOWN || msg == WM_KEYUP || msg == WM_SYSKEYDOWN || msg == WM_SYSKEYUP) {
|
|
|
|
if(!self().enabled(true)) {
|
|
|
|
//WC_LISTVIEW responds to key messages even when its HWND is disabled
|
|
|
|
//the control should be inactive when disabled; so we intercept the messages here
|
|
|
|
return false;
|
|
|
|
}
|
Update to 20180809 release.
byuu says:
The Windows port can now run the emulation while navigating menus,
moving windows, and resizing windows. The main window also doesn't try
so hard to constantly clear itself. This may leave a bit of unwelcome
residue behind in some video drivers during resize, but under most
drivers, it lets you resize without a huge amount of flickering.
On all platforms, I now also run the emulation during MessageWindow
modal events, where I didn't before.
I'm thinking we should probably mute the audio during modal periods,
since it can generate a good deal of distortion.
The tooltip timeout was increased to ten seconds.
On Windows, the enter key can now activate buttons, so you can more
quickly dismiss MessageDialog windows. This part may not actually work
... I'm in the middle of trying to get messages out of the global
`Application_windowProc` hook and into the individual `Widget_windowProc`
hooks, so I need to do some testing.
I fixed a bug where changing the input driver wouldn't immediately
reload the input/hotkey settings lists properly.
I also went from disabling the driver "Change" button when the currently
active driver is selected in the list, to instead setting it to say
"Reload", and I also added a tool tip to the input driver reload button,
advising that if you're using DirectInput or SDL, you can hit "Reload"
to rescan for hotplugged gamepads without needing to restart the
emulator. XInput and udev have auto hotswap support. If we can ever get
that into DirectInput and SDL, then I'll remove the tooltip. But
regardless, the reload functionality is nice to have for all drivers.
I'm not sure what should happen when a user changes their driver
selection while a game is loaded, gets the warning dialog, chooses not
to change it, and then closes the emulator. Currently, it will make the
change happen the next time you start the emulator. This feels a bit
unexpected, but when you change the selection without a game loaded, it
takes immediate effect. So I'm not really sure what's best here.
2018-08-10 05:02:59 +00:00
|
|
|
|
|
|
|
if(msg == WM_KEYDOWN && wparam == VK_RETURN) {
|
|
|
|
if(self().selected()) {
|
|
|
|
//returning true generates LVN_ITEMACTIVATE message
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
Update to v106r57 release.
byuu says:
I've added tool tips to hiro for Windows, GTK, and Qt. I'm unsure how to
add them for Cocoa. I wasted am embarrassing ~14 hours implementing tool
tips from scratch on Windows, because the `TOOLTIPS_CLASS` widget just
absolutely refused to show up, no matter what I tried. As such, they're
not quite 100% native, but I would really appreciate any patch
submissions to help improve my implementation.
I added tool tips to all of the confusing settings in bsnes. And of
course, for those of you who don't like them, there's a configuration
file setting to turn them off globally.
I also improved Mega Drive handling of the Game Genie a bit, and
restructured the way the Settings class works in bsnes.
Starting now, I'm feature-freezing bsnes and higan. From this point
forward:
- polishing up and fixing bugs caused by the ruby/hiro changes
- adding DRC to XAudio2, and maybe exclusive mode to WGL
- correcting FEoEZ (English) to load and work again out of the box
Once that's done, a final beta of bsnes will go out, I'll fix any
reported bugs that I'm able to, and then v107 should be ready. This time
with higan being functional, but marked as v107 beta. v108 will restore
higan to production status again, alongside bsnes.
2018-08-08 08:46:58 +00:00
|
|
|
}
|
|
|
|
|
Update to bsnes v107.1 release.
byuu says:
Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.
Changelog:
- GUI: added high DPI support
- GUI: fixed the state manager image preview
- Windows: added a new waveOut driver with support for dynamic rate control
- Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
- Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
- Windows: fixed XInput controller support on Windows 10
- SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
coprocessors
- SFC: fixed a slight rendering glitch in the intro to Megalomania
If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.
The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.
Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 01:16:30 +00:00
|
|
|
//when hovering over a WC_LISTVIEW item, it will become selected after a very short pause (~200ms usually)
|
|
|
|
//this is extremely annoying; so intercept the hover event and block it to suppress the LVN_ITEMCHANGING message
|
|
|
|
if(msg == WM_MOUSEHOVER) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
Update to v106r57 release.
byuu says:
I've added tool tips to hiro for Windows, GTK, and Qt. I'm unsure how to
add them for Cocoa. I wasted am embarrassing ~14 hours implementing tool
tips from scratch on Windows, because the `TOOLTIPS_CLASS` widget just
absolutely refused to show up, no matter what I tried. As such, they're
not quite 100% native, but I would really appreciate any patch
submissions to help improve my implementation.
I added tool tips to all of the confusing settings in bsnes. And of
course, for those of you who don't like them, there's a configuration
file setting to turn them off globally.
I also improved Mega Drive handling of the Game Genie a bit, and
restructured the way the Settings class works in bsnes.
Starting now, I'm feature-freezing bsnes and higan. From this point
forward:
- polishing up and fixing bugs caused by the ruby/hiro changes
- adding DRC to XAudio2, and maybe exclusive mode to WGL
- correcting FEoEZ (English) to load and work again out of the box
Once that's done, a final beta of bsnes will go out, I'll fix any
reported bugs that I'm able to, and then v107 should be ready. This time
with higan being functional, but marked as v107 beta. v108 will restore
higan to production status again, alongside bsnes.
2018-08-08 08:46:58 +00:00
|
|
|
return pWidget::windowProc(hwnd, msg, wparam, lparam);
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_backgroundColor(unsigned _row, unsigned _column) -> Color {
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto item = self().item(_row)) {
|
|
|
|
if(auto cell = item->cell(_column)) {
|
|
|
|
if(auto color = cell->backgroundColor()) return color;
|
2012-06-25 12:49:39 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto color = item->backgroundColor()) return color;
|
|
|
|
}
|
2018-08-05 09:00:15 +00:00
|
|
|
//if(auto column = self().column(_column)) {
|
|
|
|
// if(auto color = column->backgroundColor()) return color;
|
|
|
|
//}
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto color = self().backgroundColor()) return color;
|
2018-08-05 09:00:15 +00:00
|
|
|
//if(state().columns.size() >= 2 && _row % 2) return {240, 240, 240};
|
2015-06-12 13:14:38 +00:00
|
|
|
return {255, 255, 255};
|
2012-06-18 10:13:51 +00:00
|
|
|
}
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_cellWidth(unsigned _row, unsigned _column) -> unsigned {
|
2015-06-12 13:14:38 +00:00
|
|
|
unsigned width = 6;
|
|
|
|
if(auto item = self().item(_row)) {
|
|
|
|
if(auto cell = item->cell(_column)) {
|
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(cell->state.checkable) {
|
|
|
|
width += 16 + 2;
|
|
|
|
}
|
2016-01-07 08:14:33 +00:00
|
|
|
if(auto& icon = cell->state.icon) {
|
2015-06-12 13:14:38 +00:00
|
|
|
width += 16 + 2;
|
|
|
|
}
|
|
|
|
if(auto& text = cell->state.text) {
|
Update to v094r43 release.
byuu says:
Updated to compile with all of the new hiro changes. My next step is to
write up hiro API documentation, and move the API from alpha (constantly
changing) to beta (rarely changing), in preparation for the first stable
release (backward-compatible changes only.)
Added "--fullscreen" command-line option. I like this over
a configuration file option. Lets you use the emulator in both modes
without having to modify the config file each time.
Also enhanced the command-line game loading. You can now use any of
these methods:
higan /path/to/game-folder.sfc
higan /path/to/game-folder.sfc/
higan /path/to/game-folder.sfc/program.rom
The idea is to support launchers that insist on loading files only.
Technically, the file can be any name (manifest.bml also works); the
only criteria is that the file actually exists and is a file, and not
a directory. This is a requirement to support the first version (a
directory lacking the trailing / identifier), because I don't want my
nall::string class to query the file system to determine if the string
is an actual existing file or directory for its pathname() / dirname()
functions.
Anyway, every game folder I've made so far has program.rom, and that's
very unlikely to change, so this should be fine.
Now, of course, if you drop a regular "game.sfc" file on the emulator,
it won't even try to load it, unless it's in a folder that ends in .fc,
.sfc, etc. In which case, it'll bail out immediately by being unable to
produce a manifest for what is obviously not really a game folder.
2015-08-30 02:08:26 +00:00
|
|
|
width += pFont::size(_font(_row, _column), text).width();
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return width;
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_columnWidth(unsigned _column) -> unsigned {
|
2015-06-12 13:14:38 +00:00
|
|
|
unsigned width = 12;
|
2018-08-05 09:00:15 +00:00
|
|
|
if(auto column = self().column(_column)) {
|
|
|
|
if(auto& icon = column->state.icon) {
|
|
|
|
width += 16 + 12; //yes; icon spacing in column headers is excessive
|
|
|
|
}
|
|
|
|
if(auto& text = column->state.text) {
|
|
|
|
width += pFont::size(self().font(true), text).width();
|
|
|
|
}
|
|
|
|
if(column->state.sorting != Sort::None) {
|
|
|
|
width += 12;
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
return width;
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_font(unsigned _row, unsigned _column) -> Font {
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto item = self().item(_row)) {
|
|
|
|
if(auto cell = item->cell(_column)) {
|
|
|
|
if(auto font = cell->font()) return font;
|
|
|
|
}
|
|
|
|
if(auto font = item->font()) return font;
|
Update to v094r09 release.
byuu says:
This will easily be the biggest diff in the history of higan. And not in
a good way.
* target-higan and target-loki have been blown away completely
* nall and ruby massively updated
* phoenix replaced with hiro (pretty near a total rewrite)
* target-higan restarted using hiro (just a window for now)
* all emulation cores updated to compile again
* installation changed to not require root privileges (installs locally)
For the foreseeable future (maybe even permanently?), the new higan UI
will only build under Linux/BSD with GTK+ 2.20+. Probably the most
likely route for Windows/OS X will be to try and figure out how to build
hiro/GTK on those platforms, as awful as that would be. The other
alternative would be to produce new UIs for those platforms ... which
would actually be a good opportunity to make something much more user
friendly.
Being that I just started on this a few hours ago, that means that for
at least a few weeks, don't expect to be able to actually play any
games. Right now, you can pretty much just compile the binary and that's
it. It's quite possible that some nall changes didn't produce
compilation errors, but will produce runtime errors. So until the UI can
actually load games, we won't know if anything is broken. But we should
mostly be okay. It was mostly just trim<1> -> trim changes, moving to
Hash::SHA256 (much cleaner), and patching some reckless memory copy
functions enough to compile.
Progress isn't going to be like it was before: I'm now dividing my time
much thinner between studying and other hobbies.
My aim this time is not to produce a binary for everyone to play games
on. Rather, it's to keep the emulator alive. I want to be able to apply
critical patches again. And I would also like the base of the emulator
to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
|
|
|
}
|
2018-08-05 09:00:15 +00:00
|
|
|
//if(auto column = self().column(_column)) {
|
|
|
|
// if(auto font = column->font()) return font;
|
|
|
|
//}
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto font = self().font(true)) return font;
|
Update to v094r43 release.
byuu says:
Updated to compile with all of the new hiro changes. My next step is to
write up hiro API documentation, and move the API from alpha (constantly
changing) to beta (rarely changing), in preparation for the first stable
release (backward-compatible changes only.)
Added "--fullscreen" command-line option. I like this over
a configuration file option. Lets you use the emulator in both modes
without having to modify the config file each time.
Also enhanced the command-line game loading. You can now use any of
these methods:
higan /path/to/game-folder.sfc
higan /path/to/game-folder.sfc/
higan /path/to/game-folder.sfc/program.rom
The idea is to support launchers that insist on loading files only.
Technically, the file can be any name (manifest.bml also works); the
only criteria is that the file actually exists and is a file, and not
a directory. This is a requirement to support the first version (a
directory lacking the trailing / identifier), because I don't want my
nall::string class to query the file system to determine if the string
is an actual existing file or directory for its pathname() / dirname()
functions.
Anyway, every game folder I've made so far has program.rom, and that's
very unlikely to change, so this should be fine.
Now, of course, if you drop a regular "game.sfc" file on the emulator,
it won't even try to load it, unless it's in a folder that ends in .fc,
.sfc, etc. In which case, it'll bail out immediately by being unable to
produce a manifest for what is obviously not really a game folder.
2015-08-30 02:08:26 +00:00
|
|
|
return {};
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
Update to v094r09 release.
byuu says:
This will easily be the biggest diff in the history of higan. And not in
a good way.
* target-higan and target-loki have been blown away completely
* nall and ruby massively updated
* phoenix replaced with hiro (pretty near a total rewrite)
* target-higan restarted using hiro (just a window for now)
* all emulation cores updated to compile again
* installation changed to not require root privileges (installs locally)
For the foreseeable future (maybe even permanently?), the new higan UI
will only build under Linux/BSD with GTK+ 2.20+. Probably the most
likely route for Windows/OS X will be to try and figure out how to build
hiro/GTK on those platforms, as awful as that would be. The other
alternative would be to produce new UIs for those platforms ... which
would actually be a good opportunity to make something much more user
friendly.
Being that I just started on this a few hours ago, that means that for
at least a few weeks, don't expect to be able to actually play any
games. Right now, you can pretty much just compile the binary and that's
it. It's quite possible that some nall changes didn't produce
compilation errors, but will produce runtime errors. So until the UI can
actually load games, we won't know if anything is broken. But we should
mostly be okay. It was mostly just trim<1> -> trim changes, moving to
Hash::SHA256 (much cleaner), and patching some reckless memory copy
functions enough to compile.
Progress isn't going to be like it was before: I'm now dividing my time
much thinner between studying and other hobbies.
My aim this time is not to produce a binary for everyone to play games
on. Rather, it's to keep the emulator alive. I want to be able to apply
critical patches again. And I would also like the base of the emulator
to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_foregroundColor(unsigned _row, unsigned _column) -> Color {
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto item = self().item(_row)) {
|
|
|
|
if(auto cell = item->cell(_column)) {
|
|
|
|
if(auto color = cell->foregroundColor()) return color;
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto color = item->foregroundColor()) return color;
|
Update to v094r09 release.
byuu says:
This will easily be the biggest diff in the history of higan. And not in
a good way.
* target-higan and target-loki have been blown away completely
* nall and ruby massively updated
* phoenix replaced with hiro (pretty near a total rewrite)
* target-higan restarted using hiro (just a window for now)
* all emulation cores updated to compile again
* installation changed to not require root privileges (installs locally)
For the foreseeable future (maybe even permanently?), the new higan UI
will only build under Linux/BSD with GTK+ 2.20+. Probably the most
likely route for Windows/OS X will be to try and figure out how to build
hiro/GTK on those platforms, as awful as that would be. The other
alternative would be to produce new UIs for those platforms ... which
would actually be a good opportunity to make something much more user
friendly.
Being that I just started on this a few hours ago, that means that for
at least a few weeks, don't expect to be able to actually play any
games. Right now, you can pretty much just compile the binary and that's
it. It's quite possible that some nall changes didn't produce
compilation errors, but will produce runtime errors. So until the UI can
actually load games, we won't know if anything is broken. But we should
mostly be okay. It was mostly just trim<1> -> trim changes, moving to
Hash::SHA256 (much cleaner), and patching some reckless memory copy
functions enough to compile.
Progress isn't going to be like it was before: I'm now dividing my time
much thinner between studying and other hobbies.
My aim this time is not to produce a binary for everyone to play games
on. Rather, it's to keep the emulator alive. I want to be able to apply
critical patches again. And I would also like the base of the emulator
to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
|
|
|
}
|
2018-08-05 09:00:15 +00:00
|
|
|
//if(auto column = self().column(_column)) {
|
|
|
|
// if(auto color = column->foregroundColor()) return color;
|
|
|
|
//}
|
2015-06-12 13:14:38 +00:00
|
|
|
if(auto color = self().foregroundColor()) return color;
|
|
|
|
return {0, 0, 0};
|
|
|
|
}
|
Update to v094r09 release.
byuu says:
This will easily be the biggest diff in the history of higan. And not in
a good way.
* target-higan and target-loki have been blown away completely
* nall and ruby massively updated
* phoenix replaced with hiro (pretty near a total rewrite)
* target-higan restarted using hiro (just a window for now)
* all emulation cores updated to compile again
* installation changed to not require root privileges (installs locally)
For the foreseeable future (maybe even permanently?), the new higan UI
will only build under Linux/BSD with GTK+ 2.20+. Probably the most
likely route for Windows/OS X will be to try and figure out how to build
hiro/GTK on those platforms, as awful as that would be. The other
alternative would be to produce new UIs for those platforms ... which
would actually be a good opportunity to make something much more user
friendly.
Being that I just started on this a few hours ago, that means that for
at least a few weeks, don't expect to be able to actually play any
games. Right now, you can pretty much just compile the binary and that's
it. It's quite possible that some nall changes didn't produce
compilation errors, but will produce runtime errors. So until the UI can
actually load games, we won't know if anything is broken. But we should
mostly be okay. It was mostly just trim<1> -> trim changes, moving to
Hash::SHA256 (much cleaner), and patching some reckless memory copy
functions enough to compile.
Progress isn't going to be like it was before: I'm now dividing my time
much thinner between studying and other hobbies.
My aim this time is not to produce a binary for everyone to play games
on. Rather, it's to keep the emulator alive. I want to be able to apply
critical patches again. And I would also like the base of the emulator
to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_setIcons() -> 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
|
|
|
ListView_SetImageList(hwnd, nullptr, LVSIL_SMALL);
|
2015-06-12 13:14:38 +00:00
|
|
|
if(imageList) ImageList_Destroy(imageList);
|
|
|
|
imageList = ImageList_Create(16, 16, ILC_COLOR32, 1, 0);
|
|
|
|
ListView_SetImageList(hwnd, imageList, LVSIL_SMALL);
|
|
|
|
|
2018-08-05 09:00:15 +00:00
|
|
|
for(auto column : range(self().columnCount())) {
|
|
|
|
image icon;
|
|
|
|
if(auto& sourceIcon = state().columns[column]->state.icon) {
|
|
|
|
icon.allocate(sourceIcon.width(), sourceIcon.height());
|
|
|
|
memory::copy(icon.data(), sourceIcon.data(), icon.size());
|
|
|
|
icon.scale(16, 16);
|
|
|
|
} else {
|
|
|
|
icon.allocate(16, 16);
|
|
|
|
icon.fill(0x00ffffff);
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2018-08-05 09:00:15 +00:00
|
|
|
auto bitmap = CreateBitmap(icon);
|
|
|
|
ImageList_Add(imageList, bitmap, nullptr);
|
|
|
|
DeleteObject(bitmap);
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
Update to v094r09 release.
byuu says:
This will easily be the biggest diff in the history of higan. And not in
a good way.
* target-higan and target-loki have been blown away completely
* nall and ruby massively updated
* phoenix replaced with hiro (pretty near a total rewrite)
* target-higan restarted using hiro (just a window for now)
* all emulation cores updated to compile again
* installation changed to not require root privileges (installs locally)
For the foreseeable future (maybe even permanently?), the new higan UI
will only build under Linux/BSD with GTK+ 2.20+. Probably the most
likely route for Windows/OS X will be to try and figure out how to build
hiro/GTK on those platforms, as awful as that would be. The other
alternative would be to produce new UIs for those platforms ... which
would actually be a good opportunity to make something much more user
friendly.
Being that I just started on this a few hours ago, that means that for
at least a few weeks, don't expect to be able to actually play any
games. Right now, you can pretty much just compile the binary and that's
it. It's quite possible that some nall changes didn't produce
compilation errors, but will produce runtime errors. So until the UI can
actually load games, we won't know if anything is broken. But we should
mostly be okay. It was mostly just trim<1> -> trim changes, moving to
Hash::SHA256 (much cleaner), and patching some reckless memory copy
functions enough to compile.
Progress isn't going to be like it was before: I'm now dividing my time
much thinner between studying and other hobbies.
My aim this time is not to produce a binary for everyone to play games
on. Rather, it's to keep the emulator alive. I want to be able to apply
critical patches again. And I would also like the base of the emulator
to live on, for use in other emulator frontends that utilize higan.
2015-02-26 10:10:46 +00:00
|
|
|
|
2015-06-12 13:14:38 +00:00
|
|
|
//empty icon used for ListViewItems (drawn manually via onCustomDraw)
|
2016-01-07 08:14:33 +00:00
|
|
|
image icon;
|
2015-06-12 13:14:38 +00:00
|
|
|
icon.allocate(16, 16);
|
|
|
|
icon.fill(0x00ffffff);
|
|
|
|
auto bitmap = CreateBitmap(icon);
|
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
|
|
|
ImageList_Add(imageList, bitmap, nullptr);
|
2015-06-12 13:14:38 +00:00
|
|
|
DeleteObject(bitmap);
|
|
|
|
}
|
|
|
|
|
2016-05-04 10:07:13 +00:00
|
|
|
auto pTableView::_width(unsigned column) -> unsigned {
|
2018-08-05 09:00:15 +00:00
|
|
|
if(auto width = self().column(column).width()) return width;
|
|
|
|
unsigned width = 1;
|
|
|
|
if(state().headered) width = max(width, _columnWidth(column));
|
|
|
|
for(auto row : range(state().items.size())) {
|
|
|
|
width = max(width, _cellWidth(row, column));
|
2015-06-12 13:14:38 +00:00
|
|
|
}
|
2018-08-05 09:00:15 +00:00
|
|
|
return width;
|
2013-11-28 10:29:01 +00:00
|
|
|
}
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
}
|
2015-06-12 13:14:38 +00:00
|
|
|
|
|
|
|
#endif
|