2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
22 #include FORMS_H_LOCATION
28 /// LyXDirEntry internal structure definition
38 /// FileDlg class definition
45 /// sets file selector user button action
46 void SetButton(int iIndex, string const & pszName = string(),
47 string const & pszPath = string());
48 /// gets last dialog directory
49 string GetDirectory() const;
50 /// launches dialog and returns selected file
51 string Select(string const & pszTitle = string(),
52 string const & pszPath = string(),
53 string const & pszMask = string(),
54 string const & pszSuggested = string());
55 /// XForms objects callback (static)
56 static void FileDlgCB(FL_OBJECT *, long);
57 /// Callback for double click in list
58 static void DoubleClickCB(FL_OBJECT *, long);
59 /// Handle Cancel CB from WM close
60 static int CancelCB(FL_FORM *, void *);
63 static FD_FileDlg * pFileDlgForm;
65 static LyXFileDlg * pCurrentDlg;
85 typedef vector<LyXDirEntry> DirEntries;
87 DirEntries direntries;
93 /// updates dialog list to match class directory
95 /// sets dialog current directory
96 void SetDirectory(string const & pszPath);
97 /// sets dialog file mask
98 void SetMask(string const & pszNewMask);
99 /// sets dialog information line
100 void SetInfoLine(string const & pszLine);
101 /// handle dialog during file selection
103 /// Handle callback from list
104 void HandleListHit();
105 /// Handle double click from list
106 bool HandleDoubleClick();
107 /// Handle OK button call
109 /// Simulates a click on OK/Cancel