From 534f2f4437093bd78411126ef45de41fc6b93bf3 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 7 Jun 2007 18:54:11 +0000 Subject: reimport my latest checkout --- dia_video.inc | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 dia_video.inc (limited to 'dia_video.inc') diff --git a/dia_video.inc b/dia_video.inc new file mode 100644 index 0000000..298ebbf --- /dev/null +++ b/dia_video.inc @@ -0,0 +1,85 @@ +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% +% Video mode selection dialog. +% +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Some global vars. +% +% video mode array fields + +/video.default 2 def +/video.modes.list [ 0 785 788 791 ] def +/video.modes.text [ "Text" "640 x 480" "800 x 600" "1024 x 768" ] def + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Build video mode list. +% +% ( ) ==> ( ) +% +/video.init { + /xmenu.video .xm_size array def + + /xmenu xmenu.video def + + xmenu .xm_list video.modes.text put + xmenu .xm_current video.default put + + pmenu.init +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Update video mode. +% +% ( ) ==> ( ) +% +/video.update { + /xmenu xmenu.video def + + /window.action actRedrawPanel def + + pmenu.update +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Show video menu. +% +% ( ) => ( ) +% +/panel.video { + "videomode" help.setcontext + + window.xmenu + dup .xmenu xmenu.video put + dup .xmenu.update /video.update put + dup window.init + window.show +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Return width of video entry. +% +% ( ) => ( width ) +% +/panel.video.width { + /xmenu xmenu.video def + + pmenu.width +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Redraw panel entry. +% +% ( panel ) => ( ) +% +/panel.video.update { + /xmenu xmenu.video def + + pmenu.panel.update +} def -- cgit v1.2.1