I'm not a huge fan of hardware shortcut keys... while they may be okay for you and me, for wide use I think it's better to have a few really simple shortcuts. Originally the fullscreen patch had a "show/hide the toolbar" shortcut: pressing a hardware button toggled toolbar visibility without re-zooming the document view. But in the new version this was eschewed in favor of a simpler interface.
I think it would be very easy to make a series of shortcut gestures for commonly used toolbar buttons; in fact, Rincewind has already done lots of work on this. The difficulty is obviously that the gestured would have to be more easy to use and intuitive than assigning hardware shortcut buttons.
Here's one (too complicated?) idea for a gesture library. With all these gestures we could eliminate a bunch of the toolbar buttons.
- Link select: tapping the pen on the screen, on top of a link, automatically follows the link, no matter what.
- Scribble: Scribble is the default behavior. Every gesture draws a line on the screen. Line width varies according to pressure between the current line width +/- 1. If an Erase, Pan, or Zoom gesture is used, the line is automatically erased.
- Erase: Scribble a line, and at the end of the stroke, hold the pen steady for half a second. An the "erase" icon appears in a corner of the screen, and any scribbles the stroke intersects will be erased.
- Pan: Place the pen on the screen and hold for half a second. A "hand" icon appears in a corner of the screen. Move the pen to a new location and release. The document will be panned.
- Zoom In: Place the pen on the screen and hold for half a second. A "hand" icon appears in a corner of the screen. Draw a box or other shape with the pen, returning the pen to its original position, and hold at the final position for half a second. The "hand" icon changes to a "zoom" icon. On releasing the pen, the document zooms.
- Zoom Out: A double-tap zooms out 50% from that point. A triple-tap zooms to page.
Some of these (especially zoom) are a little inelegant. I also thought about using a double-tap instead of "press-and-hold" to start a gesture. What do you think?
Nekokami, compiling at run-time is probably overkill (not to mention it would take forever!). You got me thinking, though...
A commonly used strategy is to implement command-line options for different features. We'd just have to augment whatever the current command-line interpreter is, which would be very easy. Then, when the command-line interpreter sees a command-line option "-useFullscreen" it sets a global variable value in the code, "useFullscreen = 1;". Everywhere within the code that the fullscreen fuctionality is implemented, it's in a wrapper like
Code:
if (!useFullscreen)
{
//do normal stuff
}
else
{
//do fulllscreen stuff
}
This way we can have a simple utility that runs with a bunch of checkboxes for different options. Running the utility makes a simple alias script for ipdf, so that when the contentLister calls /usr/bin/ipdf it's really calling a script that looks like
Code:
#!/bin/sh
/path/to/real/ipdf -useFullscreen -useColumns -useGestures
I think this would do the job. Writing the GUI option selector utility would be fairly straightforward. I think even I could do it!