-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render PDF with Vello[WIP] #26
Conversation
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. |
Key::Named(NamedKey::ArrowLeft) => self.view_ctx.seek_backwards(1), | ||
_ => {} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my local copy I added a render_state.window.request_redraw()
here so that the page change shows up.
@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 |
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 |
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
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.
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.