View previous topic :: View next topic |
Author |
Message |
BrokenBeta
Joined: 20 Aug 2008 Posts: 1
|
Posted: Wed Aug 20, 2008 5:04 am Post subject: ListView request: callback thingy |
|
|
Sorry for the vague title
I just looked through listview.d and if I've understood it correctly, it uses the LVN_GETDISPINFO callback feature of Windows to avoid having to give a copy of all the list items to Windows.
Ironically I actually want this feature exposed all the way. Is it possible to add a further callback so that I can actually use this feature myself outside of the class?
i.e. (and please do not call anything "Thingy" )
Code: |
listView.callbackThingy = &listView_callback;
void listView_callback(int row, Result result) {
result.text = something[row];
result.subitems[0] = somethingElse[row];
}
|
I'm requesting this because I have a list which will get *very* long and needs to be sorted in several ways, and it's easier for me to retain control of the data and do it myself.
Thanks muchly and good work on DFL in general. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Aug 21, 2008 3:53 pm Post subject: Re: ListView request: callback thingy |
|
|
If I recall correctly, DFL uses LVN_GETDISPINFO with strings that the OS uses natively, so nul-terminated wide Unicode or ANSI. If DFL was to provide you with this callback feature, it would probably cause a reallocation for every single callback (many per re-display). It doesn't sound very elegant. Let me know if you can think of a better solution. I guess you could just use wndProc and handle the notification yourself.
-Chris |
|
Back to top |
|
|
|