• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_UnixDlg_FontChooser.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiSource Application Framework
00004  * Copyright (C) 1998-2000 AbiSource, Inc.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef XAP_UNIXDIALOG_FONTCHOOSER_H
00023 #define XAP_UNIXDIALOG_FONTCHOOSER_H
00024 
00025 #include "xap_App.h"
00026 #include "xap_Dlg_FontChooser.h"
00027 #include "ut_misc.h"
00028 
00029 class XAP_Frame;
00030 class GR_CairoGraphics;
00031 
00032 /*****************************************************************/
00033 
00034 class XAP_UnixDialog_FontChooser : public XAP_Dialog_FontChooser
00035 {
00036 public:
00037     XAP_UnixDialog_FontChooser(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00038     virtual ~XAP_UnixDialog_FontChooser(void);
00039 
00040     virtual void            runModal(XAP_Frame * pFrame);
00041 
00042     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00043     void                    underlineChanged(void);
00044     void                    overlineChanged(void);
00045     void                    subscriptChanged(void);
00046     void                    superscriptChanged(void);
00047     void                    strikeoutChanged(void);
00048     void                    hiddenChanged(void);
00049     void                    transparencyChanged(void);
00050     void                    updatePreview(void);
00051     void                    fontRowChanged(void);
00052     void                    styleRowChanged(void);
00053     void                    sizeRowChanged(void);
00054     void                    fgColorChanged(void);
00055     void                    bgColorChanged(void);
00056     void                    textTransformChanged(void);
00057 
00058     // the state of what data is hidden and what is public is
00059     // pretty grave here.
00060     GtkWidget *             m_fontList;
00061     GtkWidget *             m_styleList;
00062     GtkWidget *             m_sizeList;
00063     GtkWidget *             m_checkStrikeOut;
00064     GtkWidget *             m_checkUnderline;
00065     GtkWidget *             m_checkOverline;
00066     GtkWidget *             m_checkHidden;
00067     GtkWidget *             m_checkTransparency;
00068     GtkWidget *             m_checkSubScript;
00069     guint                   m_iSubScriptId;
00070     GtkWidget *             m_checkSuperScript;
00071     guint                   m_iSuperScriptId;
00072     GtkWidget *             m_colorSelector;
00073     GtkWidget *             m_bgcolorSelector;
00074     GtkWidget *             m_preview;
00075     bool                    getEntryString(char ** string);
00076     GR_CairoGraphics *      m_gc;
00077 
00078     bool                    m_blockUpdate;
00079     bool                    m_doneFirstFont;
00080 
00081 protected:
00082 
00083     // Gtk sets up escape key to close a GtkDialog only when
00084     // the one of the button responses is GTK_RESPONSE_CANCEL
00085     typedef enum
00086       {
00087         BUTTON_OK = GTK_RESPONSE_OK,
00088         BUTTON_CANCEL = GTK_RESPONSE_CANCEL
00089       } ResponseId ;
00090 
00091     // careful, these must be in the order the
00092     // list box will show them (Windows order)
00093     typedef enum
00094     {
00095         LIST_STYLE_NONE = -1,
00096         LIST_STYLE_NORMAL = 0,
00097         LIST_STYLE_ITALIC,
00098         LIST_STYLE_BOLD,
00099         LIST_STYLE_BOLD_ITALIC
00100     } listStyle;
00101 
00102     virtual GtkWidget *             constructWindow(void);
00103     GtkWidget *                     constructWindowContents(GtkWidget *);
00104 
00105     // parent frame
00106     XAP_Frame *         m_pFrame;
00107     GdkRGBA m_currentFGColor;
00108     GdkRGBA m_currentBGColor;
00109     GdkRGBA m_funkyColor;
00110     bool m_currentBGColorTransparent;
00111 };
00112 
00113 #endif /* XAP_UNIXDIALOG_FONTCHOOSER_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1