| 1 |
/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */ |
| 2 |
|
| 3 |
/* AbiSource Application Framework |
| 4 |
* Copyright (C) 1998 AbiSource, Inc. |
| 5 |
* Copyright (C) 2024 Hubert Figuière |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU General Public License |
| 9 |
* as published by the Free Software Foundation; either version 2 |
| 10 |
* of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 20 |
* 02110-1301 USA. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef XAP_UNIXDIALOG_FILEOPENSAVEAS_H |
| 24 |
#define XAP_UNIXDIALOG_FILEOPENSAVEAS_H |
| 25 |
#include <gtk/gtk.h> |
| 26 |
#include "xap_Dlg_FileOpenSaveAs.h" |
| 27 |
#include "xap_Strings.h" |
| 28 |
#include "ut_vector.h" |
| 29 |
#include <gdk-pixbuf/gdk-pixbuf.h> |
| 30 |
|
| 31 |
class XAP_Frame; |
| 32 |
class UT_ByteBuf; |
| 33 |
/*****************************************************************/ |
| 34 |
|
| 35 |
class XAP_UnixDialog_FileOpenSaveAs : public XAP_Dialog_FileOpenSaveAs |
| 36 |
{ |
| 37 |
public: |
| 38 |
XAP_UnixDialog_FileOpenSaveAs(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); |
| 39 |
virtual ~XAP_UnixDialog_FileOpenSaveAs(void); |
| 40 |
|
| 41 |
virtual void runModal(XAP_Frame * pFrame); |
| 42 |
|
| 43 |
static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); |
| 44 |
gint previewPicture (); |
| 45 |
|
| 46 |
void fileTypeChanged(GtkWidget * w); |
| 47 |
void onDeleteCancel (void); |
| 48 |
|
| 49 |
protected: |
| 50 |
GdkPixbuf * pixbufForByteBuf (UT_ByteBuf * pBB); |
| 51 |
|
| 52 |
bool _run_gtk_main(XAP_Frame * pFrame, |
| 53 |
GtkWidget * filetypes_pulldown); |
| 54 |
void _notifyError_OKOnly(XAP_Frame * pFrame, |
| 55 |
XAP_String_Id sid); |
| 56 |
void _notifyError_OKOnly(XAP_Frame * pFrame, |
| 57 |
XAP_String_Id sid, |
| 58 |
const char * sz1); |
| 59 |
bool _askOverwrite_YesNo(XAP_Frame * pFrame, |
| 60 |
const char * fileName); |
| 61 |
|
| 62 |
GtkFileChooser * m_FC; |
| 63 |
GtkWidget * m_preview; |
| 64 |
private: |
| 65 |
bool m_bSave; |
| 66 |
protected: |
| 67 |
XAP_Frame * m_pFrame; |
| 68 |
char * m_szFinalPathnameCandidate; |
| 69 |
private: |
| 70 |
GtkWidget * m_wFileTypes_PullDown; |
| 71 |
|
| 72 |
}; |
| 73 |
|
| 74 |
#endif /* XAP_UNIXDIALOG_FILEOPENSAVEAS_H */ |