comparison anagram/vaclgui/agfiledialog.hpp @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 /*
2 * AnaGram, A System for Syntax Directed Programming
3 * Copyright 1997-2002 Parsifal Software. All Rights Reserved.
4 * See the file COPYING for license and usage terms.
5 *
6 * agfiledialog.hpp
7 */
8
9 #ifndef AGFILEDIALOG_HPP
10 #define AGFILEDIALOG_HPP
11
12 #include <iwindow.hpp>
13 #include <windows.h>
14
15 #include "agstring.h"
16
17
18 class AgFileDialog {
19 private:
20 OPENFILENAME ofn;
21 IWindow *owner;
22 char nameBuffer[256];
23
24 public:
25 AgFileDialog(IWindow *owner_);
26 AgFileDialog &setFilter(char *filter) {
27 ofn.lpstrFilter = filter;
28 return *this;
29 }
30 AgFileDialog &setTitle(char *title) {
31 ofn.lpstrTitle = title;
32 return *this;
33 }
34 AgFileDialog &setExt(char *ext) {
35 ofn.lpstrDefExt = ext;
36 return *this;
37 }
38 AgString fileName() {
39 return nameBuffer;
40 }
41 Boolean showModally() {
42 return GetOpenFileName(&ofn);
43 }
44 };
45
46
47 #endif /* AGFILEDIALOG_HPP */