home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-07-28 | 1.8 KB | 44 lines | [TEXT/PJMM] |
- unit MovableModal;
-
- { Pascal interface to the MovableModal.Lib library }
-
- { The MovableModal.Lib library includes some simple routines }
- { to handle movable modal dialogs in much the same way as non-movable }
- { modal dialogs are handled, but following Apple HIGs on the subject }
-
- { Written by Marco Piovanelli (piovanel@dsi.unimi.it) }
- { ANTIĀ© 1993 Merzwaren }
-
- interface
-
- { Call DisableMenuBar soon after putting up your movable modal dialog }
- { (the frontmost window is assumed to be your dialog) }
- { Pass the menu ID of your Edit menu in editMenuID, or 0 if you don't have one }
- { DisableMenuBar disables all menus except the system menus (Help, Keyboard }
- { and Application).}
- { It enables Cut, Copy and Paste in the Edit menu if your dialog contains edit fields }
- { Pass the ID of a valid 'hmnu' resource in hmnuID if you want menu help string }
- { remapping to take place, as described in "Toolbox M.TB.MovableModalDialog"; }
- { otherwise pass -1 (if the Help Manager isn't available, nothing will happen anyway) }
-
- procedure DisableMenuBar (editMenuID: Integer;
- hmnuID: Integer);
-
- { call ReEnableMenuBar soon after bringing down your movable modal dialog box }
- { ReEnableMenuBar will restore the previous enableFlags for all menus in the menu bar }
-
- procedure ReEnableMenuBar;
-
- { MovableModalDialog is the routine that does most of the work }
- { it's very much like the Toolbox routine ModalDialog in system 7.x }
- { MovableModalDialog allows access to the menu bar (even under system 6.0.x) }
- { and major context switches }
- { you normally will want to know when a context switch takes place while }
- { your dialog is in front: to do this, you have to check for events of type osEvt }
- { from within your filter procedure }
-
- procedure MovableModalDialog (filterProc: ProcPtr;
- var itemHit: Integer);
-
- implementation
- end.