• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by wpyh - 2008-08-02
Last edited by teru - 2010-07-06

FS#9232 - Genericized help viewer for plugins

This is a generic help viewer for plugins, with basic scrolling and word wrapping features.

With this help viewer, I hope to make all plugins (or at least games) to get a main menu and move all the help messages into a submenu. This will make Rockbox plugins look much more professional rather than just some random code thrown together.

Attached is a very early draft; it lacks:
1. scrollbar support
2. continuous scrolling
3. background display
4. etc

Please try the patch with the test plugin (also attached) and comment. In particular, I need some suggestions on how to best implement the word wrapping feature – currently it’s very simplistic.

Closed by  teru
2010-07-06 15:17
Reason for closing:  Out of Date
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Similar codes, display_text and simple_viewer are in svn.

Why not just use existing code of the text viewer plugin? I mean, you baiscally only need to wipe out unneeded parts, but you gain scrolling, wordwrapping and scrollbar rather easily.

Anyway, I like the idea.

wpyh commented on 2008-08-02 07:44

Hey, thanks :)

I’ve briefly looked at the text viewer plugin, but I think that’s too complicated – I think we just need a simple text viewer. Since you mentioned it, I’ll take another look and see whether I can strip it down easily.

I’ve got a few (design) questions here:
1. For the quit button (the button used to exit from the help display), should it be hard-coded in the help viewer, or should it be configurable by plugins? The current implementation is configurable by plugins, but I find that it doesn’t elegantly allow for multiple buttons or button combinations.
2. Should we display the status bar, or not? Or should it be configurable like the scroll bar?

wpyh commented on 2008-08-03 19:16

OK, here’s an update. Now we support a scrollbar and continuous scrolling.

This is the status:
1. The word-wrapping feature looks for space characters and uses them to break lines.
2. Scrollbar is supported and the width must be set by the calling plugin.
3. Scroll keys and the quit action must be set by the calling plugin.
4. Continuous scrolling is supported.
5. Background image shows up on the simulator, but I have to confirm it on my iPod first.
6. The status bar is not drawn.

Please try and comment (suggestions, etc).

P.S. I looked at the text viewer code again, and I see that it needs a buffer to implement more flexible word wrapping. I think this is overkill for a help viewer :)
P.P.S. While implementing the scrollbar, I found that a potentially useful function (lcd_puts_offset) is not exported in the API. Shouldn’t it be exported so that plugins can use it too?

nls commented on 2008-08-18 09:30

Hi, i like the idea of this but haven’t tried it yet, some minor code nits though.
You have a couple of _very_ long lines, especially in your function definitions,
please keep them ⇐ 80 chars.
c++ style comments // in help.h
also might i suggest changing help.[ch] to something a little more descriptive like help_viewer.[ch] ?

wpyh commented on 2008-09-01 23:46

OK, I’ve made the requested / suggested changes.

wpyh commented on 2008-09-04 08:11

The previous version doesn’t work. Please use this one instead.


Available keyboard shortcuts


Task Details

Task Editing