Debian Codegraph @

src/af/xap/gtk/hildon/xap_UnixHildonDlg_FontChooser.h

raw
1 /* AbiSource Application Framework
2 * Copyright (C) 1998-2000 AbiSource, Inc.
3 * Copyright (C) 2005 INdT
4 * Author: Renato Araujo <[email protected]>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301 USA.
20 */
21
22
23
24 #ifndef XAP_UNIXHILDONDIALOG_FONTCHOOSER_H
25 #define XAP_UNIXHILDONDIALOG_FONTCHOOSER_H
26
27 #include "xap_App.h"
28 //#include "xap_UnixFontManager.h"
29 #include "xap_Dlg_FontChooser.h"
30 #include "ut_misc.h"
31
32 class XAP_Frame;
33
34 /*****************************************************************/
35
36 class XAP_UnixHildonDialog_FontChooser : public XAP_Dialog_FontChooser
37 {
38 public:
39 XAP_UnixHildonDialog_FontChooser(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
40 virtual ~XAP_UnixHildonDialog_FontChooser(void);
41
42 static XAP_Dialog * static_constructor(XAP_DialogFactory * pFactory,
43 XAP_Dialog_Id id);
44
45 virtual void runModal(XAP_Frame * pFrame);
46
47 // the state of what data is hidden and what is public is
48 // pretty grave here.
49 //XAP_UnixFontManager * m_fontManager;
50
51 GtkWidget* m_Widget;
52
53 bool m_blockUpdate;
54 bool m_doneFirstFont;
55
56 protected:
57
58
59 virtual void fillFontInfo();
60 virtual void loadFontInfo();
61
62 // Gtk sets up escape key to close a GtkDialog only when
63 // the one of the button responses is GTK_RESPONSE_CANCEL
64 typedef enum
65 {
66 BUTTON_OK = GTK_RESPONSE_OK,
67 BUTTON_CANCEL = GTK_RESPONSE_CANCEL
68 } ResponseId ;
69
70 // careful, these must be in the order the
71 // list box will show them (Windows order)
72 typedef enum
73 {
74 LIST_STYLE_NONE = -1,
75 LIST_STYLE_NORMAL = 0,
76 LIST_STYLE_ITALIC,
77 LIST_STYLE_BOLD,
78 LIST_STYLE_BOLD_ITALIC
79 } listStyle;
80
81 // a temporary font to hold dynamically allocated "rented"
82 // fonts between style changes
83 //XAP_UnixFontHandle * m_lastFont;
84
85 // parent frame
86 XAP_Frame * m_pFrame;
87 gdouble m_currentFGColor[4];
88 gdouble m_currentBGColor[4];
89 gdouble m_funkyColor[4];
90
91
92 };
93
94 #endif /* XAP_UNIXHILDONDIALOG_FONTCHOOSER_H
95 */