Mercurial > hg > xemacs-beta
comparison src/device-msw.c @ 506:39ccc7dd8077
[xemacs-hg @ 2001-05-05 08:39:59 by ben]
Add Page Setup for Windows, take out Pretty Print.
Implement Page Setup. Handle errors properly.
Change top/bottom margin defaults to 0.5 inches.
author | ben |
---|---|
date | Sat, 05 May 2001 08:40:06 +0000 |
parents | 1ccc32a20af4 |
children | 5bdbc721d46a |
comparison
equal
deleted
inserted
replaced
505:6495d35ba9df | 506:39ccc7dd8077 |
---|---|
790 keys); | 790 keys); |
791 | 791 |
792 return print_dialog_worker (!UNBOUNDP (device) ? device : settings, 1); | 792 return print_dialog_worker (!UNBOUNDP (device) ? device : settings, 1); |
793 } | 793 } |
794 | 794 |
795 int | |
796 mswindows_get_default_margin (Lisp_Object prop) | |
797 { | |
798 if (EQ (prop, Qleft_margin)) return 1440; | |
799 if (EQ (prop, Qright_margin)) return 1440; | |
800 if (EQ (prop, Qtop_margin)) return 720; | |
801 if (EQ (prop, Qbottom_margin)) return 720; | |
802 abort (); | |
803 return 0; | |
804 } | |
805 | |
795 static int | 806 static int |
796 plist_get_margin (Lisp_Object plist, Lisp_Object prop) | 807 plist_get_margin (Lisp_Object plist, Lisp_Object prop) |
797 { | 808 { |
798 Lisp_Object val = Fplist_get (plist, prop, make_int (1440)); | 809 Lisp_Object val = |
810 Fplist_get (plist, prop, make_int (mswindows_get_default_margin (prop))); | |
799 if (!INTP (val)) | 811 if (!INTP (val)) |
800 invalid_argument ("Margin value must be an integer", val); | 812 invalid_argument ("Margin value must be an integer", val); |
801 | 813 |
802 return MulDiv (XINT (val), 100, 144); | 814 return MulDiv (XINT (val), 100, 144); |
803 } | 815 } |