home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epmtfe30.zip
/
source.zip
/
source
/
MYMNUINI.ADD
< prev
next >
Wrap
Text File
|
2000-02-29
|
4KB
|
116 lines
/*************************************************/
/* */
/* This is file mymnuini.add, version 2.7 */
/* the menu control code for the */
/* EPM with built in TeX Front End */
/* */
/* Rename this file to mymniuni.e or */
/* add its contents to an existing mymnuini.e */
/* */
/*************************************************/
-- since this file is included at the end of PROCESSMENUINIT we cannot put any
-- global declarations here. We need to use a procedure call to get the
-- value of universal variables.
if menuid=9 then -- TeX menu ID is 9
if tex_is_doc() then
SetMenuAttribute( 901, 16384, 1) -- enable TeX Document
SetMenuAttribute( 908, 16384, 1) -- enable TeX/PS
compile if defined (vtex)
SetMenuAttribute( 925, 16384, 1) -- enable quick TeX
compile endif
else
SetMenuAttribute( 901, 16384, 0) -- disable TeX Document
SetMenuAttribute( 908, 16384, 0) -- disable TeX & dvips
compile if defined (vtex)
SetMenuAttribute( 925, 16384, 0) -- disable quick TeX
compile endif
endif
if tex_more_errors() then
SetMenuAttribute( 924, 16384, 1) -- enable Locate Error
else
SetMenuAttribute( 924, 16384, 0) -- disable Locate Error
endif
if tex_current_log() then
SetMenuAttribute( 905, 16384, 1) -- enable LOG file view
else
SetMenuAttribute( 905, 16384, 0) -- disable LOG file view
endif
compile if not defined (vtex)
if tex_check_print_exec() then
if tex_check_exist('.DVI') then
SetMenuAttribute( 904, 16384, 0) -- disable TeX Print Document
else
SetMenuAttribute( 904, 16384, 1) -- enable TeX Print Document
endif
endif
if tex_check_exist('.DVI') then
SetMenuAttribute( 903, 16384, 0) -- disable TeX Preview Document
SetMenuAttribute( 944, 16384, 0) -- disable dvips
else
SetMenuAttribute( 903, 16384, 1) -- enable TeX Preview Document
SetMenuAttribute( 944, 16384, 1) -- enable dvips
endif
compile endif
if tex_check_exist('.PS') then
SetMenuAttribute( 943, 16384, 0) -- disable PS Preview
else
SetMenuAttribute( 943, 16384, 1) -- enable PS Preview
endif
if tex_check_exist('.PDF') then
SetMenuAttribute( 923, 16384, 0) -- disable PDF Preview
else
SetMenuAttribute( 923, 16384, 1) -- enable PDF Preview
endif
if tex_check_user_exec(1) then
if tex_check_exist(get_tex_user_ext(1)) then
SetMenuAttribute( 911, 16384, 0) -- disable
else
SetMenuAttribute( 911, 16384, 1) -- enable
endif
endif
if tex_check_user_exec(2) then
if tex_check_exist(get_tex_user_ext(2)) then
SetMenuAttribute( 921, 16384, 0) -- disable
else
SetMenuAttribute( 921, 16384, 1) -- enable
endif
endif
if tex_check_user_exec(3) then
if tex_check_exist(get_tex_user_ext(3)) then
SetMenuAttribute( 930, 16384, 0) -- disable
else
SetMenuAttribute( 930, 16384, 1) -- enable
endif
endif
if tex_check_user_exec(4) then
if tex_check_exist(get_tex_user_ext(4)) then
SetMenuAttribute( 933, 16384, 0) -- disable
else
SetMenuAttribute( 933, 16384, 1) -- enable
endif
endif
-- Master file support
SetMenuAttribute( 940, 8192, not check_tex_master())
/*
-- Menu always on?
SetMenuAttribute( 916, 8192, not check_tex_menuon())
*/
endif -- menuid=9
/* finis */