2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1995 1996 Matthias Ettrich
10 *======================================================*/
12 // Misc. GUI specific routines
14 #ifndef _LYX_GUI_MISC_H
15 #define _LYX_GUI_MISC_H
17 #include FORMS_H_LOCATION
20 /// Prevents LyX from being killed when the close box is pressed in a popup.
21 extern "C" int CancelCloseBoxCB(FL_FORM *, void *);
22 /// Prevents LyX from being killed when the close box is pressed in a popup.
23 extern "C" int IgnoreCloseBoxCB(FL_FORM *, void *);
25 /// Prevents LyX from crashing when no buffers available
26 void CloseAllBufferRelatedPopups();
28 /// Ensures info in visible popups are always correct.
29 void updateAllVisibleBufferRelatedPopups();
31 /// Extract shortcut from <ident>|<shortcut> string
32 const char* flyx_shortcut_extract(const char*sc);
33 /// Make a shortnamed version of the above func
34 #define scex flyx_shortcut_extract
36 /// Extract shortcut from <ident>|<shortcut> string
37 const char* flyx_ident_extract(const char *sc);
38 /// Make a shortnamed versjon of the above func
39 #define idex flyx_ident_extract
42 void WriteAlert(LString const & s1, LString const & s2=LString(),
43 LString const & s3=LString());
45 /// Alarms user of something related to files
46 void WriteFSAlert(LString const & s1, LString const & s2=LString());
48 /// Asks "Yes" or "No". Returns true for yes, false for no
49 bool AskQuestion(LString const & s1, LString const & s2=LString(),
50 LString const & s3=LString());
52 /// Asks "Yes", "No" or "Cancel". Returns 1 for yes, 2 for no, 3 for cancel
53 int AskConfirmation(LString const & s1, LString const & s2=LString(),
54 LString const & s3=LString());
57 LString askForText(LString const & msg, LString const & dflt=LString());
59 /// Informs the user that changes in the coming form will be ignored
63 /// rings the audio bell.
66 // if (audio()) ON/OFF switch yet to be implemented