home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lyx-0.13.2.tar.gz / lyx-0.13.2.tar / lyx-0.13.2 / src / lyx_gui_misc.h < prev    next >
C/C++ Source or Header  |  1998-04-23  |  2KB  |  71 lines

  1. // -*- C++ -*-
  2. /* This file is part of
  3. * ======================================================
  4. *           LyX, The Document Processor
  5. *        
  6. *           Copyright (C) 1995 1996 Matthias Ettrich
  7. *           and the LyX Team.
  8. *
  9. *======================================================*/
  10.  
  11. // Misc. GUI specific routines
  12.  
  13. #ifndef _LYX_GUI_MISC_H
  14. #define _LYX_GUI_MISC_H
  15.  
  16. #include FORMS_H_LOCATION
  17. #include "LString.h"
  18.  
  19. /// Prevents LyX from being killed when the close box is pressed in a popup.
  20. int CancelCloseBoxCB(FL_FORM *, void *);
  21. /// Prevents LyX from being killed when the close box is pressed in a popup.
  22. int IgnoreCloseBoxCB(FL_FORM *, void *);
  23.  
  24. /// Prevents LyX from crashing when no buffers available
  25. void CloseAllBufferRelatedPopups();
  26.  
  27. /// Ensures info in visible popups are always correct.
  28. void updateAllVisibleBufferRelatedPopups();
  29.  
  30. /// Extract shortcut from <ident>|<shortcut> string
  31. const char* flyx_shortcut_extract(char const *sc);
  32. /// Make a shortnamed version of the above func
  33. #define scex flyx_shortcut_extract
  34.  
  35. /// Extract shortcut from <ident>|<shortcut> string
  36. const char* flyx_ident_extract(char const *sc);
  37. /// Make a shortnamed versjon of the above func
  38. #define idex flyx_ident_extract
  39.  
  40. /// Show message
  41. void WriteAlert(LString const & s1, LString const & s2=LString(), 
  42.         LString const & s3=LString());
  43.  
  44. /// Alarms user of something related to files
  45. void WriteFSAlert(LString const & s1, LString const & s2=LString());
  46.  
  47. /// Asks "Yes" or "No". Returns true for yes, false for no
  48. bool AskQuestion(LString const & s1, LString const & s2=LString(),
  49.          LString const & s3=LString());
  50.  
  51. /// Asks "Yes", "No" or "Cancel". Returns 1 for yes, 2 for no, 3 for cancel
  52. int AskConfirmation(LString const & s1, LString const & s2=LString(), 
  53.             LString const & s3=LString());
  54.  
  55. /// returns a text
  56. LString askForText(LString const & msg, LString const & dflt=LString());
  57.  
  58. /// Informs the user that changes in the coming form will be ignored
  59. void WarnReadonly();
  60.  
  61. // inlined functions
  62. /// rings the audio bell.
  63. inline
  64. void LyXBell() {
  65.     // if (audio()) ON/OFF switch yet to be implemented
  66.     fl_ringbell(20);
  67. }
  68.  
  69. #endif
  70.