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

ap_UnixToolbar_StyleCombo.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998 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., 59 Temple Place - Suite 330, Boston, MA
00019  * 02111-1307, USA.
00020  */
00021 
00022 #ifndef AP_UNIXTOOLBAR_STYLECOMBO_H
00023 #define AP_UNIXTOOLBAR_STYLECOMBO_H
00024 
00025 #include <map>
00026 #include <string>
00027 
00028 #include <gtk/gtk.h>
00029 #include "ut_hash.h"
00030 #include "xap_Types.h"
00031 #include "ev_Toolbar_Control.h"
00032 #include "pd_Document.h"
00033 #include "ap_UnixFrame.h"
00034 
00035 class EV_Toolbar;
00036 class PD_Style;
00037 
00038 /*****************************************************************/
00039 
00040 class AP_UnixToolbar_StyleCombo : public EV_Toolbar_Control
00041 {
00042 public:
00043     AP_UnixToolbar_StyleCombo(EV_Toolbar * pToolbar, XAP_Toolbar_Id id);
00044     virtual ~AP_UnixToolbar_StyleCombo(void);
00045 
00046     virtual bool        populate(void);
00047     bool                repopulate(void);
00048     const PangoFontDescription* getStyle (const gchar *name);
00049     static EV_Toolbar_Control *     static_constructor(EV_Toolbar *, XAP_Toolbar_Id id);
00050 
00051 protected:
00052     AP_UnixFrame                                * m_pFrame;
00053 
00054 private:
00055     void getPangoAttrs(PD_Style             *pStyle,
00056                        PangoFontDescription *desc);
00057     void freeStyles   (void);
00058 
00059     std::map<std::string, PangoFontDescription*>    m_mapStyles;
00060     PangoFontDescription *m_pDefaultDesc;
00061 };
00062 
00063 #endif /* AP_UNIXTOOLBAR_STYLECOMBO_H */
00064 
00065 
00066 
00067 
00068 
00069 

Generated on Sun May 27 2012 for AbiWord by  doxygen 1.7.1