Closed videni closed 2 weeks ago
Thanks for doing all this work! It seems like this is well on the way to becoming the best (fastest) open source PDF viewer! I'd like to contribute if possible (I'm a Rust newbie, but I have C++ experience). What (if any) UI framework were you thinking of using? My initial assumption was Xilem due to its relationship with Vello, but it seems like it's currently very early in its development. I would personally love to implement the basic UI of Evince: a scrolling list of pages in the main view and a smaller one as thumbnails. I think the key here would be to have a facility for lazily loading the pages according to what's currently in view.
@mermerico , Xilem is not GUI yet, currently we have to wait, otherwise, we will do lots of duplicate works. I am evaluating the Iced GUI recently, I checked its source code, build a home page to show a list of PDF files on my local, it is well structured, high quality code, it seems very future proving. so I prefer the Iced GUI at the moment.
By the way, I really dislike the phylosophy of Elm
that Iced used to structure application logic, it results in lots of boilerplate codes, you can check this real project hecrj/icebreaker) from the founder of the Iced GUI. basically, it needs a big message tree you must define for all your views also a view tree to handle these message, and we have to dispatch the massage to its view from top to bottom manually. Comparing with the example from Xilem TodoMvc, Xilem is a great relief to me after experiment with Iced for 3 weeks.
Iced looks like a good choice (although I agree it seems like you have to do a lot of boilerplate work). It looks like they haven't implemented a lazy view / infinite scrolling functionality so I think I might just roll my own. I'm thinking that for the pages and thumbnails view panes we can basically ignore the GUI library and render everything directly in Vello.
@mermerico They have a list widget, but not in the master branch. Check branch feature/list-widget-reloaded
instead.
Oh, very cool! I missed that. Okay, it'll take me a bit to get fully acquainted with how Iced works. I'll let you know when I have a prototype!
This Pull Request is currently under progress and is not ready for merging, here are what this PR focuses on:
PDF
UI
What GUI libraries I checked
[x] Iced Simple in concept, but not practical for complex projects, the Elm philosophy in Iced forces users to create a big message tree and a view tree associated with these messages, lots of boilerplate codes. I spent 3 weeks to build a demo on top of Iced. But the source code of Iced is structured very well, with clear separation for each layer, high-quality code. It may evolve rapidly to figure out a better way to mitigate the pain I just mentioned. I might be wrong about this, please correct me if it is not this case.
[x] Xilem More natural than Iced, but not ready to use, lots of essential widgets are missing.
Goal
After evaluating all these features above, we will start to implement a full version of modern PDF note-taking, reader app that will be available for ALL platforms including MacOS, Linux, Windows, Android, IOS, also the web.