summaryrefslogtreecommitdiffstats
path: root/dia_video.inc
diff options
context:
space:
mode:
Diffstat (limited to 'dia_video.inc')
-rw-r--r--dia_video.inc85
1 files changed, 85 insertions, 0 deletions
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