summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwl <wl>2007-06-05 19:40:30 +0000
committerwl <wl>2007-06-05 19:40:30 +0000
commit2994ceef46fdfef186f04308b788ff2bfad70bfc (patch)
treea786fd79fab75ec1f257cf3044334e8708739131
parent96b23d7aa72aba5720e3b92c8c7d458fe3fbc0db (diff)
downloadgroff-2994ceef46fdfef186f04308b788ff2bfad70bfc.tar.gz
* src/devices/xditview/xditview.c (main): Add support for
accelerators. * src/devices/xditview/GXditview.ad: Updated. Make widget more colourful.
-rw-r--r--ChangeLog8
-rw-r--r--src/devices/xditview/GXditview.ad104
-rw-r--r--src/devices/xditview/xditview.c1
3 files changed, 78 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index 55dce4df..e0642269 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-06-05 Tadziu Hoffmann <hoffmann@usm.uni-muenchen.de>
+
+ * src/devices/xditview/xditview.c (main): Add support for
+ accelerators.
+
+ * src/devices/xditview/GXditview.ad: Updated.
+ Make widget more colourful.
+
2007-05-30 Werner LEMBERG <wl@gnu.org>
* tmac/groff_mdoc.man: Convert `-' to `\-' where appropriate.
diff --git a/src/devices/xditview/GXditview.ad b/src/devices/xditview/GXditview.ad
index bf7ad933..37070afa 100644
--- a/src/devices/xditview/GXditview.ad
+++ b/src/devices/xditview/GXditview.ad
@@ -1,46 +1,80 @@
-GXditview.height: 840
-GXditview.paned.allowResize: true
-GXditview.paned.viewport.allowVert: true
-GXditview.paned.viewport.allowHoriz: true
-GXditview.paned.viewport.skipAdjust: false
-GXditview.paned.viewport.width: 600
-GXditview.paned.viewport.height: 800
-GXditview.paned.viewport.showGrip: false
-GXditview.paned.label.skipAdjust: true
+GXditview*shapeStyle: rectangle
+
+GXditview.paned.allowResize: true
+GXditview.paned.label.skipAdjust: true
+GXditview.paned.viewport.skipAdjust: false
+GXditview.paned.viewport.showGrip: false
+GXditview.paned.viewport.allowVert: true
+GXditview.paned.viewport.allowHoriz: true
+GXditview.paned.viewport.forceBars: true
+! viewport size = papersize * resol + scrollbarthickness + 1
+! letter size paper
+!GXditview.paned.viewport.width: 652
+!GXditview.paned.viewport.height: 840
+! a4 size paper
+GXditview.paned.viewport.width: 635
+GXditview.paned.viewport.height: 892
+GXditview.paned.viewport.Scrollbar.thickness: 14
+
+GXditview.paned.viewport.Scrollbar.background: Thistle
+GXditview.paned.viewport.Scrollbar.foreground: Orchid
+GXditview.paned.viewport.Scrollbar.thumb: None
+GXditview.paned.viewport.dvi.background: LemonChiffon
+GXditview.paned.viewport.background: Thistle
+GXditview.paned.label.background: PeachPuff
+GXditview.menu.background: Gold
+GXditview.promptShell.promptDialog*background: Gold
+GXditview.promptShell.promptDialog.accept.background: DarkOliveGreen1
+GXditview.promptShell.promptDialog.cancel.background: RosyBrown1
+GXditview.promptShell.promptDialog.value.background: Khaki
GXditview.paned.translations: #augment \
- <Key>Next: NextPage()\n\
- <Key>n: NextPage()\n\
- <Key>space: NextPage()\n\
- <Key>Return: NextPage()\n\
- <Key>Prior: PreviousPage()\n\
- <Key>p: PreviousPage()\n\
- <Key>BackSpace: PreviousPage()\n\
- <Key>Delete: PreviousPage()\n\
- <Key>Select: SelectPage()\n\
- <Key>Find: OpenFile()\n\
- <Key>r: Rerasterize()\n\
- <Key>q: Quit()
-GXditview.paned.viewport.dvi.translations: #augment \
- <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)
+ <Key>Next: NextPage()\n\
+ <Key>n: NextPage()\n\
+ <Key>space: NextPage()\n\
+ <Key>Return: NextPage()\n\
+ <Key>Prior: PreviousPage()\n\
+ <Key>p: PreviousPage()\n\
+ <Key>b: PreviousPage()\n\
+ <Key>BackSpace: PreviousPage()\n\
+ <Key>Delete: PreviousPage()\n\
+ <Key>g: SelectPage()\n\
+ <Key>o: OpenFile()\n\
+ <Key>r: Rerasterize()\n\
+ <Key>q: Quit()
+GXditview.paned.viewport.clip.translations: #augment \
+ <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)
GXditview.paned.label.translations: #augment \
- <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)
-GXditview.menu.nextPage.label: Next Page
-GXditview.menu.previousPage.label: Previous Page
-GXditview.menu.selectPage.label: Select Page
-GXditview.menu.print.label: Print
-GXditview.menu.openFile.label: Open
-GXditview.menu.quit.label: Quit
-
-GXditview.promptShell.allowShellResize: true
+ <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)
+GXditview.paned.viewport.vertical.accelerators: #override \
+ <Key>k: StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
+ <Key>j: StartScroll(Forward) NotifyScroll(FullLength) EndScroll()\n\
+ <Key>Up: StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
+ <Key>Down: StartScroll(Forward) NotifyScroll(FullLength) EndScroll()
+GXditview.paned.viewport.horizontal.accelerators: #override \
+ <Key>h: StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
+ <Key>l: StartScroll(Forward) NotifyScroll(FullLength) EndScroll()\n\
+ <Key>Left: StartScroll(Backward) NotifyScroll(FullLength) EndScroll()\n\
+ <Key>Right: StartScroll(Forward) NotifyScroll(FullLength) EndScroll()
+
+GXditview.menu.nextPage.label: Next Page
+GXditview.menu.previousPage.label: Previous Page
+GXditview.menu.selectPage.label: Goto Page
+GXditview.menu.print.label: Print
+GXditview.menu.openFile.label: Open
+GXditview.menu.quit.label: Quit
+
+GXditview.promptShell.allowShellResize: true
GXditview.promptShell.promptDialog.value.translations: #override \
- <Key>Return: Accept()
+ <Key>Return: Accept() \n\
+ <Key>Escape: Cancel()
GXditview.promptShell.promptDialog.accept.label: Accept
GXditview.promptShell.promptDialog.accept.translations: #override \
- <BtnUp>: Accept() unset()
+ <BtnUp>: Accept() unset()
GXditview.promptShell.promptDialog.cancel.label: Cancel
GXditview.promptShell.promptDialog.cancel.translations: #override \
- <BtnUp>: Cancel() unset()
+ <BtnUp>: Cancel() unset()
+
diff --git a/src/devices/xditview/xditview.c b/src/devices/xditview/xditview.c
index 7afdb47f..3a993d89 100644
--- a/src/devices/xditview/xditview.c
+++ b/src/devices/xditview/xditview.c
@@ -262,6 +262,7 @@ int main(int argc, char **argv)
XtRealizeWidget (toplevel);
if (file_name)
SetPageNumber (page_number);
+ XtInstallAllAccelerators(paned,paned);
XtAppMainLoop(xtcontext);
return 0;
}