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

xap_UnixDlg_FileOpenSaveAs.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 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 XAP_UNIXDIALOG_FILEOPENSAVEAS_H
00023 #define XAP_UNIXDIALOG_FILEOPENSAVEAS_H
00024 #include <gtk/gtk.h>
00025 #include <gtk/gtkfilesel.h>
00026 #include "xap_Dlg_FileOpenSaveAs.h"
00027 #include "xap_Strings.h"
00028 #include "ut_vector.h"
00029 #include <gdk-pixbuf/gdk-pixbuf.h>
00030 
00031 class XAP_Frame;
00032 class UT_ByteBuf;
00033 /*****************************************************************/
00034 
00035 class XAP_UnixDialog_FileOpenSaveAs : public XAP_Dialog_FileOpenSaveAs
00036 {
00037 public:
00038     XAP_UnixDialog_FileOpenSaveAs(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00039     virtual ~XAP_UnixDialog_FileOpenSaveAs(void);
00040 
00041     virtual void            runModal(XAP_Frame * pFrame);
00042 
00043     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00044     gint previewPicture (void);
00045 
00046     void fileTypeChanged(GtkWidget * w);
00047     void onDeleteCancel (void);
00048 
00049 protected:
00050     GdkPixbuf *            pixbufForByteBuf (UT_ByteBuf * pBB);
00051     GdkPixbuf *            _loadXPM(UT_ByteBuf * pBB);
00052 
00053     bool                    _run_gtk_main(XAP_Frame * pFrame,
00054                                           GtkWidget * filetypes_pulldown);
00055     void                    _notifyError_OKOnly(XAP_Frame * pFrame,
00056                                                 XAP_String_Id sid);
00057     void                    _notifyError_OKOnly(XAP_Frame * pFrame,
00058                                                 XAP_String_Id sid,
00059                                                 const char * sz1);
00060     bool                _askOverwrite_YesNo(XAP_Frame * pFrame,
00061                                                 const char * fileName);
00062 
00063     GtkFileChooser * m_FC;
00064     GtkWidget * m_preview;
00065 private:
00066     bool                m_bSave;
00067 protected:
00068     XAP_Frame *         m_pFrame;
00069     char *                  m_szFinalPathnameCandidate;
00070 private:
00071     GtkWidget *         m_wFileTypes_PullDown;
00072 
00073 };
00074 
00075 #endif /* XAP_UNIXDIALOG_FILEOPENSAVEAS_H */

Generated on Sat Dec 3 2011 for AbiWord by  doxygen 1.7.1