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
25 /// LyXDirEntry internal structure definition
37 /// FileDlg class definition
44 /// sets file selector user button action
45 void SetButton(int iIndex, string const & pszName = string(),
46 string const & pszPath = string());
47 /// gets last dialog directory
48 string const GetDirectory() const;
49 /// launches dialog and returns selected file
50 string const Select(string const & pszTitle = string(),
51 string const & pszPath = string(),
52 string const & pszMask = string(),
53 string const & pszSuggested = string());
54 /// XForms objects callback (static)
55 static void FileDlgCB(FL_OBJECT *, long);
56 /// Callback for double click in list
57 static void DoubleClickCB(FL_OBJECT *, long);
58 /// Handle Cancel CB from WM close
59 static int CancelCB(FL_FORM *, void *);
62 static FD_FileDlg * pFileDlgForm;
64 static LyXFileDlg * pCurrentDlg;
84 typedef std::vector<LyXDirEntry> DirEntries;
86 DirEntries direntries;
92 /// updates dialog list to match class directory
94 /// sets dialog current directory
95 void SetDirectory(string const & pszPath);
96 /// sets dialog file mask
97 void SetMask(string const & pszNewMask);
98 /// sets dialog information line
99 void SetInfoLine(string const & pszLine);
100 /// handle dialog during file selection
102 /// Handle callback from list
103 void HandleListHit();
104 /// Handle double click from list
105 bool HandleDoubleClick();
106 /// Handle OK button call
108 /// Simulates a click on OK/Cancel