FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ListView request: callback thingy

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
BrokenBeta



Joined: 20 Aug 2008
Posts: 1

PostPosted: Wed Aug 20, 2008 5:04 am    Post subject: ListView request: callback thingy Reply with quote

Sorry for the vague title Very Happy

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" Very Happy )

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Aug 21, 2008 3:53 pm    Post subject: Re: ListView request: callback thingy Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group