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

xap_Win32Dlg_Insert_Symbol.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2000 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00017  * 02111-1307, USA.
00018  */
00019 
00020 #ifndef XAP_Win32Dialog_Insert_Symbol_H
00021 #define XAP_Win32Dialog_Insert_Symbol_H
00022 
00023 #include "xap_Dlg_Insert_Symbol.h"
00024 #include "xap_Draw_Symbol.h"
00025 #include "xap_Win32DialogBase.h"
00026 
00027 class XAP_Frame;
00028 class XAP_Win32PreviewWidget;
00029 
00030 /*****************************************************************/
00031 
00032 static UT_UCSChar m_CurrentSymbol = UCS_SPACE;
00033 static UT_UCSChar m_PreviousSymbol = UCS_SPACE;
00034 
00035 static char Symbol_font_selected[32] = "Symbol";
00036 
00037 
00038 class ABI_EXPORT XAP_Draw_Symbol_sample : public XAP_Preview
00039 {
00040 public:
00041 
00042     XAP_Draw_Symbol_sample(XAP_Draw_Symbol *pSymbolDraw, GR_Graphics * gc) : XAP_Preview(gc)
00043         {
00044         m_pSymbolDraw = pSymbolDraw;
00045         }
00046     virtual ~XAP_Draw_Symbol_sample(void)
00047         {
00048         }
00049 
00050     void    draw(const UT_Rect *clip=NULL)
00051         {
00052         m_pSymbolDraw->drawarea(m_CurrentSymbol, m_PreviousSymbol);
00053         }
00054 
00055 //protected:
00056 
00057     XAP_Draw_Symbol *m_pSymbolDraw;
00058 };
00059 
00060 
00061 
00062 class ABI_EXPORT XAP_Win32Dialog_Insert_Symbol: public XAP_Win32DialogBase, public XAP_Dialog_Insert_Symbol
00063 {
00064 public:
00065     XAP_Win32Dialog_Insert_Symbol(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00066     virtual ~XAP_Win32Dialog_Insert_Symbol(void);
00067 
00068     virtual void            runModal(XAP_Frame * pFrame);
00069     virtual void            runModeless(XAP_Frame * pFrame);
00070     virtual void            notifyActiveFrame(XAP_Frame *pFrame);
00071     virtual void            notifyCloseFrame(XAP_Frame *pFrame);
00072     virtual void            destroy(void);
00073     virtual void            activate(void);
00074 
00075     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00076     static int CALLBACK     fontEnumProcedure(const LOGFONTW *pLogFont, const TEXTMETRICW *pTextMetric, DWORD Font_type, LPARAM lParam);
00077 
00078     virtual void *          pGetWindowHandle(void) { return (void *) m_hDlg; }
00079     void                    doInsertSymbol( void );
00080 
00081 protected:
00082     BOOL                    _onInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam);
00083     BOOL                    _onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
00084     BOOL                    _onDeltaPos(NM_UPDOWN * pnmud);
00085     int                     _enumFont(const LOGFONTW *pLogFont, const TEXTMETRICW *pTextMetric, DWORD Font_type);
00086     void                        _setFontFromCombo(UT_sint32 Index);
00087 
00088 
00089     XAP_Win32PreviewWidget *    m_pSymbolPreviewWidget;
00090     XAP_Win32PreviewWidget *    m_pSamplePreviewWidget;
00091     XAP_Draw_Symbol_sample *    m_DrawSymbolSample;
00092 
00093     HWND m_hDlg;
00094 };
00095 
00096 #endif /* XAP_Win32Dialog_Insert_Symbol_H */

Generated on Mon May 28 2012 for AbiWord by  doxygen 1.7.1