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

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1