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