Debian Codegraph @

src/af/xap/cocoa/xap_CocoaDlg_Encoding.h

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 2001 AbiSource, Inc.
3 * Copyright (C) 2001, 2003 Hubert Figuiere
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301 USA.
19 */
20
21 #ifndef XAP_COCOADIALOG_ENCODING_H
22 #define XAP_COCOADIALOG_ENCODING_H
23
24
25 #include "ut_types.h"
26 #include "ut_xml.h"
27 #include "ut_assert.h"
28 #include "ut_debugmsg.h"
29
30 #include "xap_Dialog.h"
31 #include "ut_Encoding.h"
32 #include "xap_Dlg_Encoding.h"
33 #import "xap_Cocoa_NSTableUtils.h"
34 #import "xap_GenericListChooser_Controller.h"
35
36 /********************************************************************
37 INSTRUCTIONS FOR DESIGN OF THE PLATFORM VERSIONS OF THIS DIALOGUE
38
39 (1) implement runModal(); at the moment we display a single listbox
40
41 (2) m_iEncCount will tell you how many list entries there will be;
42 the encoding strings are then in m_ppEncodings (already sorted)
43
44 (3) use _setEncoding() to set the member variables in response
45 to the user selection when the dialog is closing.
46 *********************************************************************/
47
48
49
50 class XAP_CocoaDialog_Encoding : public XAP_Dialog_Encoding
51 {
52 public:
53 XAP_CocoaDialog_Encoding(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid);
54 virtual ~XAP_CocoaDialog_Encoding(void);
55
56 virtual void runModal(XAP_Frame * pFrame);
57 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id dlgid);
58
59 // callbacks can fire these events
60
61 virtual void event_OK(void);
62 virtual void event_Cancel(void);
63
64 private:
65 void _populateWindowData(void);
66 XAP_StringListDataSource* m_dataSource;
67 XAP_GenericListChooser_Controller* m_dlg;
68 };
69 #endif /* XAP_COCOADIALOG_ENCODING_H */
70
71
72
73
74