/* Authors: Arkeon */ /* Last update: 07.04.02 */ /* Version: 1.0 */ typeof class = S;; fun Changemode (o, from, action, param, reply)= let _GETengineState -> state in if (state==ENGINE_HARDWARE) then let lineextr param -> [wres [hres _]] in let if wres != nil && hres != nil then [(atoi wres) (atoi hres)] else nil -> ScreenRes in ( VIEW3D_ChangeScreenState w3d ScreenRes; _DMSevent this strcat ObName o ".Changed" nil nil; if VIEW3D_CheckFullScreen then _DMSevent this strcat ObName o ".Fullscreen" nil nil else _DMSevent this strcat ObName o ".Window" nil nil; ) else (_DMSevent this strcat ObName o ".Software" nil nil; _DMSevent this strcat ObName o ".Window" nil nil; ); 0 ;; fun Fullscreen (o, from, action, param, reply)= let _GETengineState -> state in if (state==ENGINE_HARDWARE) then let lineextr param -> [wres [hres _]] in let if wres != nil && hres != nil then [(atoi wres) (atoi hres)] else nil -> ScreenRes in ( if VIEW3D_CheckFullScreen then _DMSevent this strcat ObName o ".Fullscreen" nil nil else ( VIEW3D_ChangeScreenState w3d ScreenRes; _DMSevent this strcat ObName o ".Fullscreen" nil nil; _DMSevent this strcat ObName o ".Changed" nil nil; ) ) else (_DMSevent this strcat ObName o ".Software" nil nil; _DMSevent this strcat ObName o ".Window" nil nil; ); 0 ;; fun Windowmode (o, from, action, param, reply)= let _GETengineState -> state in if (state==ENGINE_HARDWARE) then ( if VIEW3D_CheckFullScreen then ( VIEW3D_ChangeScreenState w3d nil; _DMSevent this strcat ObName o ".Changed" nil nil; _DMSevent this strcat ObName o ".Window" nil nil; ) else _DMSevent this strcat ObName o ".Window" nil nil; ) else (_DMSevent this strcat ObName o ".Software" nil nil; _DMSevent this strcat ObName o ".Window" nil nil; ); 0 ;; fun Screenmode (o, from, action, param, reply)= if VIEW3D_CheckFullScreen then _DMSevent this strcat ObName o ".Fullscreen" nil nil else _DMSevent this strcat ObName o ".Window" nil nil; 0 ;; fun newOb(o) = let [o nil] -> z in if !strcmp "on" hd UgetParam ObUi o "init" then Fullscreen o nil nil nil nil else nil; ObRegisterAction o (strcatn (ObName o)::".ChangeMode"::nil) @Changemode; ObRegisterAction o (strcatn (ObName o)::".FullScreen"::nil) @Fullscreen; ObRegisterAction o (strcatn (ObName o)::".Window"::nil) @Windowmode; ObRegisterAction o (strcatn (ObName o)::".ScreenMode"::nil) @Screenmode; 0 ;; fun IniPlug(file)= /*_showconsole;*/ set class=getInfo strextr _getpack _checkpack file "name"; PLUGsetinfo thisplug PLUGIN_ONLINE_EDITING|PLUGIN_OBJECT|PLUGIN_NOTRESERVED; PlugRegister class @newOb nil; 0 ;;