Re: [bme-develop] icon loading
Status: Planning
Brought to you by:
sirmik
|
From: Simon T. <sim...@ga...> - 2004-04-02 08:19:37
|
> Hello guys, sorry I have not reply till now, it's been a busy week. No problem > > > maybe also write a BHandler to handle the > > > icons...IconManager or something...My idea is this: the handler > > > will > > > be > > > owned by the main application object and the windows will send > > > messages to > > > that app to request for: > > > -the entire list of emoticon objects > > > -a message item representing an entire text with emoticons in it > > > -a bitmap for one part of text(can be used when typing text in a > > > textbox and > > > instantly changing that to emoticons) > > > > > > what do you guys think? > > > > I agree with a BHandler owned by the be_app, that sounds fine. I > > think > > we need a class to parse text that is passed a simple char * or > > BString > > of a bit of text, and returns some kind of custom structure > > containing > > processed text - ie the raw characters along with emoticons and > > thier > > offsets, plus maybe url detection and things like that. > > > It sounds ok, but does it really need to be a BHandler, why not just > a > Class with some methods to do the parsing, load the images, convert > strings to icon enabled messages, etc. What are the benefits of using > a > BHandler instead of just regular class? > Don't get me wrong, I am not saying it's a bad idea, just want to > know > the reasons why either approach would be better. The BHandler should help with multithreading issues - the protocol handlers or the conversation windows can simply target a BHandler with a message, the BHandler can pick up the messages in order and parse them in it's own thread (which owns all the icon data), then send a parsed-text message back to the window. The other approach would be to have a shared pointer passed around all the time, and I'm not too keen on that approach - also I'm not sure how thread-safe it would be. > > > > > > > >Where the number after each frame represents the number of > > > > hundreths > > > > of > > > >seconds to display the frame for, and the final 0 means to loop > > > >forever. > > > > > > > We can do it like this....but why? If we do it like this we > > > better > > > use the > > > gifs(get some gif animation code from the web)...I think > > > converting > > > gifs to > > > a file like this is a lot of work, and we're just working around > > > the > > > problem, introducing another file format in stead of the > > > gifs....anyway it > > > can be done, but it's a lot of work... > > > > How else are we going to load the animated images? The translation > > kit > > doesn't support animated images, and I couldn't find a free library > > on > > the web to handle reading GIFs (probably due to patent restrictions > > of > > the GIF format). If you have easier ideas that will work, by all > > means > > implement them! > > > I thought there was a translator for GIFs, isn't there? But I don't > know how we are going to paint animated gifs into the views, there > should be some code out there we could use as examples, I never dealt > with animated gifs before. All the animations I have worked on have > always involved threads looping through a bunch of images. The GIF translator only decodes the first frame of any animated images. Actually drawing them shouldn't be a problem (I have a few ideas on that), once we have a list of BBitmaps for each of the frames in the animation. > > > >Other news: > > > > > > > >I've finally got a BListItem class that does proper automatic > > > > text > > > >wrapping, performance seems similar to a BTextView on resizing a > > > > lot > > > > of > > > >items. > > > > > > > Nice work! have a screenshot? > > > > http://si-msn.port5.com/bme2.png > > > Great work! It looks good. I've also just made it much more lightweight, so resize performance far exceeds BTextView (I've tested a BListView with 15000 NetListItems like in the screenshot - still resizes in real time). Memory usuage is high though (the width of every character is cached), so I might try a compromise. > > > P.s. Daniel did you upload your latest code into cvs? > > > Not yet... mmm... I have made some changes in the Network handlers > code, change some things to get p2p messages again (somehow it got > broken when I changed to BLoopers), and a few other changes. So far.. > looks good! There might be an improvement on stability ... maybe.. > je, > I need you guys to test it because you do a better work on testing > than > I :D . lol no problem. I had a problem with the CVS version before, where whenever I built the code, the deskbar replicant didn't work. I think I may have been using an old beta of the OBOS translation kit; moved to beta 3 now, and it works well. That means I can be a bit more active in development. > I promise I will get it up there on friday evening (my time). > > Good work team!! Yay! > Regards, > Daniel > Simon |