|
This file contains some suggestions for the xdvik GUI to accomodate
some new elements (such as page selector and some new dialogs). As of
version 22.84, some of the suggestions have already been implemented in xdvik.
Main Window layout
- Here's how the current CVS HEAD (xdvik-22.84) looks:
Xaw version, Motif version
-
We should change the way the page boundaries are marked in the
drawing area.
-
Use a separate widget for the drawing canvas
(similar to gv); then the
drawing area should be centered on a differently colored background, as shown in
this mockup. The absence of borders
would also allow to make the background use the same color, to have a continuous
canvas which could be useful for presentations or if you don't care about the page
borders.
-
Set off the drawing area with some kind of 3d-effect,
similar to how it's done in Acroread 3.x, as shown in this mockup.
-
We need to think about what should happen with stuff that exceeds the drawing region
(e.g. when viewing a landscape document without proper `paper' settings). The two
possibilities are
- Letting stuff overdraw the background, similar to how it is currently (stuff may
exceed the page boundaries arbitrarily).
However that won't be possible if the background can use a different color, because doing
2 different types of anti-aliasing for the different GC's would be rather
silly. Also, text will become illegible anyway if the background is rather dark.
See this mockup on how this might look like (the mockup doesn't
show `proper' anti-aliasing for the background; it uses a medium dark background).
- Clipping everything to the drawing region; this seems a much cleaner (and also visually better)
solution; shown here (with 3d-border) and
here (centered and without a border).
Together with the implementation of dvips papersize specials (see
this feature request) and a GUI
page size selector (see below) this seems to be the best solution.
Menu layout
Clicking on the hyperlinks jumps to details about the menu entries (below).
Between the buttons and the page selector, one could position some buttons
to switch pages, like in gv:
The reason for having these buttons is that the user doesn't need to move the
mouse in order to page quickly through the file.
- Currenlty the page selector uses ascii-representations for marks and
current page, as shown on the screenshots (`*' for a marked page; the same is used by xdvik-22.15-j1.03 and
ghostview). It would be nicer to use use special widgets
for the marks (like rectangular buttons with 3D-shape), as in gv.
- Maybe it would be useful to have additional run-time options for
positioning the menus; like
-menubar-left, -menubar-right, -menubar-top
(with page selector only changing between left/right).
Otherwise, one could have compile-time options for the positioning.
- It seems the buttons are best located on the right-hand side,
because it doesn't conflict (visually, and operation-wise) with
the current position of the scroll bar left of the canvas.
(Most users probably wouldn't appreciate a change in the
scrollbar position.) Also this way there's the least difference
to the current layout. Here are some alternatives: Another mockup with the buttons on the
left and the scrollbar on the right, and another one with both scrollbar and
buttons on the left. However IMHO the latter looks rather
cluttered/unbalanced: Too many GUI elements on the
left, and none on the right.
Details of menu entries:
File -> Open:
Invokes the existing file selection dialog.
File -> Reload:
Same as `R' keystroke, reloads file.
File -> Recent Files:
Pops up a menu with recently opened files (as in kdvi). (Or a window, as in Netscape?)
This can be used to open/browse several files (also passed via the command line, e.g.:
`xdvi *.dvi'). Additional frills:
- use a callback: recent-files(n) where n is the maximum
number of files to display. Maybe: If the callback is bound to a mouse
action, display a popup window, else (bound to a menu item) display a
submenu.
- If it's an extra window, the list could be sorted either alphabetically or by access time
(as in Netscape's History).
- The list shows the full path name of each file.
- A non-ambiguous path component (if two filenames are the same) is
displayed in the title bar.
- In Motif, this could also be a tear-off menu for easy access.
File -> Find:
Pops up a dialog box to search for a string or regular expression in the
DVI file.
File -> Save:
Pops up a dialog box to save a DVI file in one of the following formats
(selectable via a selection box): DVI, PS, PDF, Plain Text.
Additional button with `Advanced options' to specify paper size,
orientation, Type1 vs. PK fonts etc.
File -> Print:
Remarks:
File -> Info:
Pops up a window with infos on the current .dvi file, fonts used (like
in Acroread); e.g.:
The lising in `fonts used' would be a GUI equivalent to the `-l' option.
Info might eventually be extended to: info on specials used, included
external files (.eps) etc.
File -> View Logs:
Pops up a window that shows the current log buffer in a scrollable window and
has the following additional controls:
- a button `Save to file' that pops up a file selector
- a button `Clear' that erases the log buffer
- a text field for customizing the log buffer size (default size: 1000).
File -> Quit:
Same as `q' keystroke, quits xdvi.
Navigate -> various navigation commands:
Provides a list of navigation commands: First page, -10 pages, -5 pages, prev, next, +5 pages, +10 pages, Last page.
Navigate -> Back Hyperlink:
Jumps back to the last link anchor clicked, and updates the list of recent hyperlinks (see following menu item).
Navigate -> Recent Hyperlinks:
Pops up a list of recently browsed links (think Netscape's History window):
target | page | file |
section.3.1 | 95 | test.dvi |
chapter.1 | 104 | baz.dvi |
Functionality for this is not yet implemented: Recently opened files
could be kept in an X property at runtime (so that different xdvik
processes share same list), and saved to a resource file on exit (see
`Preferences' below); at startup, check whether propery exists (will
if another xdvi is running), if so, use it, else read from file.
Mark -> Toggle current:
Toggles mark for current page, i.e. marks it if currently unmarked, unmarks else.
Alternative name: (Un)mark current.
Or 2 entries: `Mark current' - `Unmark current'.
Mark -> Toggle all:
Toggles marks for all pages, i.e. marks all pages currently unmarked.
Alternative name: (Un)mark all.
Or 2 entries: `Mark all' - `Unmark all'.
Mark -> Toggle odd:
Toggles marks for odd pages.
Alternative name: (Un)mark odd.
Or 2 entries, as above.
Mark -> Toggle even:
Toggles marks for even pages.
Alternative name: (Un)mark even.
Or 2 entries, as above.
Notes:
This menu offers zooming to distinct magsteps, just like the `x s' key binding does.
In addition, it would be nice to have three special pushbuttons, as in
Acrobat reader: `Fit to page', `Fit width' and `Fit visible'. (TODO: Evaluate
whether it would make sense to have hotkeys for this as well, and which keys
would make sense).
Implementing this will require these additional features, the
feasibility of which hasn't been evaluated yet:
- shinking to arbitrary floating-point values, instead of integer values
(otherwise it wouldn't be precise enough)
- recognize bounding box of the entire page (for the `Fit visible' option).
We probably could re-use code from forward search for this (which also records
bounding boxes, but only for certain glyhphs).
The purpose of this menu is to provide new users easy access to the many `keystroke'
commands in xdvi. Options that are likely to be used (repeatedly) while running the
program should be put as items into this menu; other options that function as more persistent
user preferences (e.g. color of hyperlinks, fonts) should go into the separate
`Preferences' window.
Same as `v' keystroke.
Options -> Keep position:
Same as `k' keystroke.
Options -> Use TeX pages for goto-page():
Same as `T' keystroke.
Options -> Fonts darker():
Increases the density, same as Alt-Ctrl-+.
Options -> Fonts lighter():
Decreases the density, same as Alt-Ctrl--.
Options -> Fonts lighter():
Decreases the density, same as Alt-Ctrl--.
Options -> Page size ...:
Opens a popup window that lets the user select a page size, similar to the `Default paper type'
preferences setting. There's also a feature request for this
here.
Options -> Preferences:
Opens a preferences dialog with a list of the categories on the
left and the single pages of options on the right, similar to the current
layout of the `help' dialog (in xdvik-22.74-beta). A mockup of the layout
can be found here.
The following mockups show the separate help windows, i.e. the stuff to appear
in the right pane. Options must be preserved when switching the categories,
i.e. the panes should not be destroyed, and the current values be remembered.
Notes:
- Need code to query server for the list of suitable fonts.
- It would be desirable to set `paper type' at runtime. Is that possible?
Remarks
- The colored button next to the `Link' labels displays
the currently selected color; clicking on it
opens a popup that lets you pick another color
(similar to Netscape 4.x).
Remarks
- The functionality for `watch .dvi file for changes' isn't
implemented yet: This would mean that the .dvi file is stat()ed
every n seconds, and automatically reloaded even if the window is
not exposed, similar to what gv does.
- Turning off automatic reloading is more for completeness; but it
prevents blanking out xdvi while compiling the .tex file, which
might be useful for some people.
- The `custom ...' entry in the color selection box could fire up a
color dialog with some CMY-values + some pre-selected colors,
similar to Netscape's `color links' dialog. (Won't be easy to
implement in Xlib/Xt - definitely something `for later' ;-).
- Open question: How are the user-set values saved? We could
probably use something like a `.xdvirc' file with a syntax like
.Xdefaults; e.g.:
!!! created automatically by xdvi vXX.YY on DATE - do not edit this file!
!!! Instead, put all personal customizations into ~/.Xdefaults, where
!!! they will be merged with the stuff here.
xdvi.keepPostion: True
... etc. ...
Check Xlib functions like XrmPutFileDatabase or XResourceManagerString
for creating this file.
This file could be a dump of the entire X resources used by xdvik, so
that it always reflects the state after merging of global with personal
resources (~/.Xdefaults, command-line switches, ...). Check how the options
are merged in gv, where a similar file (.gv) is used.
Misc Ideas
Have a customization page that lets user select action and keybindings:
Implemented in xdvik-22.74-beta.
Miscellaneous suggestions/ideas
|