#include <xap_UnixDlg_FileOpenSaveAs.h>
Public Member Functions | |
XAP_UnixDialog_FileOpenSaveAs (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id) | |
virtual | ~XAP_UnixDialog_FileOpenSaveAs (void) |
virtual void | runModal (XAP_Frame *pFrame) |
gint | previewPicture () |
void | fileTypeChanged (GtkWidget *w) |
void | onDeleteCancel (void) |
Static Public Member Functions | |
static XAP_Dialog * | static_constructor (XAP_DialogFactory *, XAP_Dialog_Id id) |
Protected Member Functions | |
GdkPixbuf * | pixbufForByteBuf (UT_ByteBuf *pBB) |
GdkPixbuf * | _loadXPM (UT_ByteBuf *pBB) |
bool | _run_gtk_main (XAP_Frame *pFrame, GtkWidget *filetypes_pulldown) |
void | _notifyError_OKOnly (XAP_Frame *pFrame, XAP_String_Id sid) |
void | _notifyError_OKOnly (XAP_Frame *pFrame, XAP_String_Id sid, const char *sz1) |
bool | _askOverwrite_YesNo (XAP_Frame *pFrame, const char *fileName) |
Protected Attributes | |
GtkFileChooser * | m_FC |
GtkWidget * | m_preview |
XAP_Frame * | m_pFrame |
std::string | m_finalPathnameCandidate |
Private Attributes | |
bool | m_bSave |
GtkWidget * | m_wFileTypes_PullDown |
XAP_UnixDialog_FileOpenSaveAs::XAP_UnixDialog_FileOpenSaveAs | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
Referenced by static_constructor().
XAP_UnixDialog_FileOpenSaveAs::~XAP_UnixDialog_FileOpenSaveAs | ( | void | ) | [virtual] |
bool XAP_UnixDialog_FileOpenSaveAs::_askOverwrite_YesNo | ( | XAP_Frame * | pFrame, | |
const char * | fileName | |||
) | [protected] |
References XAP_Dialog_MessageBox::a_NO, XAP_Dialog_MessageBox::b_YN, and XAP_Frame::showMessageBox().
Referenced by _run_gtk_main().
GdkPixbuf * XAP_UnixDialog_FileOpenSaveAs::_loadXPM | ( | UT_ByteBuf * | pBB | ) | [protected] |
void XAP_UnixDialog_FileOpenSaveAs::_notifyError_OKOnly | ( | XAP_Frame * | pFrame, | |
XAP_String_Id | sid, | |||
const char * | sz1 | |||
) | [protected] |
References XAP_Dialog_MessageBox::a_OK, XAP_Dialog_MessageBox::b_O, and XAP_Frame::showMessageBox().
void XAP_UnixDialog_FileOpenSaveAs::_notifyError_OKOnly | ( | XAP_Frame * | pFrame, | |
XAP_String_Id | sid | |||
) | [protected] |
References XAP_Dialog_MessageBox::a_OK, XAP_Dialog_MessageBox::b_O, and XAP_Frame::showMessageBox().
Referenced by _run_gtk_main().
bool XAP_UnixDialog_FileOpenSaveAs::_run_gtk_main | ( | XAP_Frame * | pFrame, | |
GtkWidget * | filetypes_pulldown | |||
) | [protected] |
References _askOverwrite_YesNo(), _notifyError_OKOnly(), XAP_Dialog_FileOpenSaveAs::a_CANCEL, XAP_Dialog_FileOpenSaveAs::a_OK, XAP_Dialog_MessageBox::a_YES, FREEP, XAP_Dialog::getApp(), XAP_Dialog::getDialogId(), XAP_App::getPrefs(), XAP_Prefs::getPrefsValueBool(), XAP_App::getStringSet(), XAP_StringSet::getValueUTF8(), XAP_Dialog_FileOpenSaveAs::m_answer, XAP_Dialog_FileOpenSaveAs::m_appendDefaultSuffixFunctor, m_bSave, m_FC, m_finalPathnameCandidate, XAP_Dialog_FileOpenSaveAs::m_nTypeList, XAP_Dialog::m_pApp, IE_ExpSniffer::recognizeSuffix(), XAP_Frame::showMessageBox(), IE_Exp::snifferForFileType(), UT_ASSERT, UT_DEBUGMSG, UT_go_file_exists(), UT_pathSuffix(), XAP_comboBoxGetActiveInt(), XAP_DIALOG_ID_FILE_SAVE_IMAGE, and XAP_PREF_KEY_UseSuffix.
Referenced by runModal().
void XAP_UnixDialog_FileOpenSaveAs::fileTypeChanged | ( | GtkWidget * | w | ) |
void XAP_UnixDialog_FileOpenSaveAs::onDeleteCancel | ( | void | ) |
References XAP_Dialog_FileOpenSaveAs::m_answer, and m_FC.
Referenced by s_delete_clicked().
GdkPixbuf * XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf | ( | UT_ByteBuf * | pBB | ) | [protected] |
References _loadXPM(), UT_ByteBuf::getLength(), UT_ByteBuf::getPointer(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by previewPicture().
gint XAP_UnixDialog_FileOpenSaveAs::previewPicture | ( | void | ) |
References UT_ByteBuf::append(), GR_Painter::clearArea(), DELETEP, GR_Painter::drawChars(), GR_Painter::drawImage(), IE_ImpGraphic::fileTypeForContents(), GR_Graphics::findFont(), FREEP, gchar, XAP_App::getApp(), GR_CairoGraphics::getFontHeight(), XAP_StringSet::getLanguageName(), XAP_App::getStringSet(), XAP_StringSet::getValueUTF8(), IEGFT_Bogus, IEGFT_Unknown, m_FC, XAP_Dialog::m_pApp, m_preview, XAP_App::newGraphics(), pixbufForByteBuf(), s, GR_CairoGraphics::setFont(), UT_UTF8String::size(), GR_Graphics::tlu(), UT_UCS4String::ucs4_str(), UT_UTF8String::ucs4_str(), UT_ASSERT, UT_DEBUGMSG, UT_go_file_open(), UT_MIN, and UT_return_val_if_fail.
Referenced by file_selection_changed(), and s_preview_draw().
void XAP_UnixDialog_FileOpenSaveAs::runModal | ( | XAP_Frame * | pFrame | ) | [virtual] |
Implements XAP_Dialog_FileOpenSaveAs.
References _run_gtk_main(), abiSetupModalDialog(), centerDialog(), convertMnemonics(), dialog_response(), file, file_selection_changed(), FREEP, fsel_key_event(), gchar, XAP_Frame::getFrameImpl(), XAP_App::getStringSet(), XAP_UnixFrameImpl::getTopLevelWindow(), XAP_StringSet::getValueUTF8(), XAP_Dialog_FileOpenSaveAs::m_answer, m_bSave, XAP_Dialog_FileOpenSaveAs::m_bSuggestName, m_FC, XAP_Dialog_FileOpenSaveAs::m_finalPathname, m_finalPathnameCandidate, XAP_Dialog::m_id, XAP_Dialog_FileOpenSaveAs::m_initialPathname, XAP_Dialog_FileOpenSaveAs::m_nDefaultFileType, XAP_Dialog_FileOpenSaveAs::m_nFileType, XAP_Dialog_FileOpenSaveAs::m_nTypeList, XAP_Dialog::m_pApp, XAP_Dialog_FileOpenSaveAs::m_persistPathname, m_preview, XAP_Dialog_FileOpenSaveAs::m_szDescriptions, XAP_Dialog_FileOpenSaveAs::m_szSuffixes, m_wFileTypes_PullDown, IE_Exp::preferredSuffixForFileType(), PREVIEW_HEIGHT, PREVIEW_WIDTH, s, s_delete_clicked(), s_file_activated(), s_filetypechanged(), s_preview_draw(), UT_ASSERT, UT_go_dirname_from_uri(), UT_go_filename_to_uri(), UT_go_path_is_path(), UT_go_path_is_uri(), UT_pathSuffix(), UT_SHOULD_NOT_HAPPEN, UT_UTF8String::utf8_str(), XAP_appendComboBoxTextAndInt(), XAP_comboBoxGetActiveInt(), XAP_DIALOG_ID_FILE_EXPORT, XAP_DIALOG_ID_FILE_IMPORT, XAP_DIALOG_ID_FILE_OPEN, XAP_DIALOG_ID_FILE_SAVE_IMAGE, XAP_DIALOG_ID_FILE_SAVEAS, XAP_DIALOG_ID_INSERT_FILE, XAP_DIALOG_ID_INSERT_PICTURE, XAP_DIALOG_ID_INSERTMATHML, XAP_DIALOG_ID_INSERTOBJECT, XAP_DIALOG_ID_PRINTTOFILE, XAP_DIALOG_ID_RECORDTOFILE, XAP_DIALOG_ID_REPLAYFROMFILE, XAP_makeGtkComboBoxText(), and xxx_UT_DEBUGMSG.
XAP_Dialog * XAP_UnixDialog_FileOpenSaveAs::static_constructor | ( | XAP_DialogFactory * | pFactory, | |
XAP_Dialog_Id | id | |||
) | [static] |
References XAP_UnixDialog_FileOpenSaveAs().
bool XAP_UnixDialog_FileOpenSaveAs::m_bSave [private] |
Referenced by _run_gtk_main(), fileTypeChanged(), and runModal().
GtkFileChooser* XAP_UnixDialog_FileOpenSaveAs::m_FC [protected] |
Referenced by _run_gtk_main(), fileTypeChanged(), onDeleteCancel(), previewPicture(), and runModal().
std::string XAP_UnixDialog_FileOpenSaveAs::m_finalPathnameCandidate [protected] |
Referenced by _run_gtk_main(), and runModal().
XAP_Frame* XAP_UnixDialog_FileOpenSaveAs::m_pFrame [protected] |
GtkWidget* XAP_UnixDialog_FileOpenSaveAs::m_preview [protected] |
Referenced by previewPicture(), and runModal().
GtkWidget* XAP_UnixDialog_FileOpenSaveAs::m_wFileTypes_PullDown [private] |
Referenced by runModal().