#include "ut_compiler.h"#include <gtk/gtk.h>#include <gdk/gdkkeysyms.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/stat.h>#include <string.h>#include <vector>#include "ap_Features.h"#include "ut_string.h"#include "ut_types.h"#include "ut_assert.h"#include "ut_files.h"#include "ut_misc.h"#include "ut_sleep.h"#include "xap_ViewListener.h"#include "xap_UnixApp.h"#include "xap_UnixFrameImpl.h"#include "xap_Frame.h"#include "ev_UnixKeyboard.h"#include "ev_UnixMouse.h"#include "ev_UnixMenuBar.h"#include "ev_UnixMenuPopup.h"#include "ev_UnixToolbar.h"#include "ev_EditMethod.h"#include "xav_View.h"#include "fv_View.h"#include "fv_FrameEdit.h"#include "fl_DocLayout.h"#include "xad_Document.h"#include "gr_CairoGraphics.h"#include "xap_UnixDialogHelper.h"#include "xap_UnixClipboard.h"#include "xap_Strings.h"#include "xap_Prefs.h"#include "ap_FrameData.h"#include "ap_UnixFrame.h"#include "ev_Mouse.h"#include "ie_types.h"#include "ie_imp.h"#include "ie_impGraphic.h"#include "fg_Graphic.h"Classes | |
| struct | DragInfo |
| class | _ViewScroll |
Enumerations | |
| enum | { TARGET_DOCUMENT, TARGET_IMAGE, TARGET_URI_LIST, TARGET_URL, TARGET_UNKNOWN } |
Functions | |
| static DragInfo * | s_getDragInfo () |
| static int | s_mapMimeToUriType (const char *uri) |
| static void | s_loadImage (const UT_UTF8String &file, FV_View *pView, XAP_Frame *pF, gint x, gint y) |
| static void | s_loadImage (const UT_ConstByteBufPtr &bytes, FV_View *pView, XAP_Frame *pF, gint x, gint y) |
| static void | s_loadDocument (const UT_UTF8String &file, XAP_Frame *pFrame) |
| static void | s_pasteFile (const UT_UTF8String &file, XAP_Frame *pFrame) |
| static void | s_loadUri (XAP_Frame *pFrame, const char *uri, gint x, gint y) |
| static void | s_loadUriList (XAP_Frame *pFrame, const char *uriList, gint x, gint y) |
| static void | s_pasteText (XAP_Frame *pFrame, const char *target_name, const unsigned char *data, UT_uint32 data_length) |
| static void | s_drag_data_get_cb (GtkWidget *, GdkDragContext *, GtkSelectionData *selection, guint, guint, gpointer) |
| static void | s_dndDropEvent (GtkWidget *widget, GdkDragContext *, gint x, gint y, GtkSelectionData *selection_data, guint info, guint, XAP_UnixFrameImpl *pFrameImpl) |
| static void | s_dndRealDropEvent (GtkWidget *widget, GdkDragContext *context, gint, gint, guint time, gpointer) |
| static void | s_dndDragEnd (GtkWidget *, GdkDragContext *, gpointer) |
| static void | s_dndDragBegin (GtkWidget *, GdkDragContext *, gpointer) |
| static gboolean | _actualScroll (gpointer data) |
Variables | |
| static const GtkTargetEntry | XAP_UnixFrameImpl__knownDragTypes [] |
| static bool | bScrollWait = false |
| static gboolean _actualScroll | ( | gpointer | data | ) | [static] |
References _ViewScroll::m_amount, _ViewScroll::m_pView, AV_View::sendVerticalScrollEvent(), and xxx_UT_DEBUGMSG.
Referenced by XAP_UnixFrameImpl::_fe::vScrollChanged().
| static void s_dndDragBegin | ( | GtkWidget * | , | |
| GdkDragContext * | , | |||
| gpointer | ||||
| ) | [static] |
References UT_DEBUGMSG.
Referenced by XAP_UnixFrameImpl::_createTopLevelWindow().
| static void s_dndDragEnd | ( | GtkWidget * | , | |
| GdkDragContext * | , | |||
| gpointer | ||||
| ) | [static] |
References UT_DEBUGMSG.
Referenced by XAP_UnixFrameImpl::_createTopLevelWindow().
| static void s_dndDropEvent | ( | GtkWidget * | widget, | |
| GdkDragContext * | , | |||
| gint | x, | |||
| gint | y, | |||
| GtkSelectionData * | selection_data, | |||
| guint | info, | |||
| guint | , | |||
| XAP_UnixFrameImpl * | pFrameImpl | |||
| ) | [static] |
References FV_View::cmdInsertHyperlink(), XAP_Frame::getCurrentView(), XAP_FrameImpl::getFrame(), UT_UTF8String::length(), s_loadImage(), s_loadUriList(), s_pasteText(), UT_UTF8String::substr(), TARGET_DOCUMENT, TARGET_IMAGE, TARGET_URI_LIST, TARGET_URL, UT_DEBUGMSG, UT_pathSuffix(), UT_return_if_fail, and UT_UTF8String::utf8_str().
Referenced by XAP_UnixFrameImpl::_createTopLevelWindow().
| static void s_dndRealDropEvent | ( | GtkWidget * | widget, | |
| GdkDragContext * | context, | |||
| gint | , | |||
| gint | , | |||
| guint | time, | |||
| gpointer | ||||
| ) | [static] |
References UT_DEBUGMSG.
Referenced by XAP_UnixFrameImpl::_createTopLevelWindow().
| static void s_drag_data_get_cb | ( | GtkWidget * | , | |
| GdkDragContext * | , | |||
| GtkSelectionData * | selection, | |||
| guint | , | |||
| guint | , | |||
| gpointer | ||||
| ) | [static] |
References EV_EMC_IMAGE, EV_EMC_POSOBJECT, EV_EMC_VISUALTEXTDRAG, XAP_App::getApp(), XAP_UnixApp::getCurrentSelection(), XAP_Frame::getCurrentView(), FV_View::getFrameEdit(), XAP_App::getLastFocussedFrame(), FV_View::getLastMouseContext(), UT_ByteBuf::getLength(), FV_View::getLocalBuf(), FV_FrameEdit::getPNGImage(), UT_ByteBuf::getPointer(), XAP_UnixApp::getTmpFile(), szName, and UT_DEBUGMSG.
Referenced by XAP_UnixFrameImpl::_createTopLevelWindow().
| static DragInfo* s_getDragInfo | ( | ) | [static] |
Build targets table from supported mime types.
References DragInfo::addEntry(), flags, IE_ImpGraphic::getSupportedMimeTypes(), IE_Imp::getSupportedMimeTypes(), and XAP_UnixFrameImpl__knownDragTypes.
Referenced by XAP_UnixFrameImpl::_createTopLevelWindow(), and s_mapMimeToUriType().
| static void s_loadDocument | ( | const UT_UTF8String & | file, | |
| XAP_Frame * | pFrame | |||
| ) | [static] |
| static void s_loadImage | ( | const UT_ConstByteBufPtr & | bytes, | |
| FV_View * | pView, | |||
| XAP_Frame * | pF, | |||
| gint | x, | |||
| gint | y | |||
| ) | [static] |
| static void s_loadImage | ( | const UT_UTF8String & | file, | |
| FV_View * | pView, | |||
| XAP_Frame * | pF, | |||
| gint | x, | |||
| gint | y | |||
| ) | [static] |
References FV_View::cmdInsertPositionedGraphic(), abicollab::service::error(), FV_View::getGraphics(), IE_ImpGraphic::loadGraphic(), GR_Graphics::tlu(), UT_DEBUGMSG, UT_OK, and UT_UTF8String::utf8_str().
Referenced by s_dndDropEvent(), and s_loadUri().
| static void s_loadUri | ( | XAP_Frame * | pFrame, | |
| const char * | uri, | |||
| gint | x, | |||
| gint | y | |||
| ) | [static] |
| static void s_loadUriList | ( | XAP_Frame * | pFrame, | |
| const char * | uriList, | |||
| gint | x, | |||
| gint | y | |||
| ) | [static] |
References gchar, and s_loadUri().
Referenced by s_dndDropEvent().
| static int s_mapMimeToUriType | ( | const char * | uri | ) | [static] |
References DragInfo::count, DragInfo::entries, FREEP, gchar, IE_ImpGraphic::getMimeTypeForSuffix(), IE_Imp::getMimeTypeForSuffix(), s_getDragInfo(), UT_DEBUGMSG, UT_go_get_mime_type(), and UT_pathSuffix().
Referenced by s_loadUri().
| static void s_pasteFile | ( | const UT_UTF8String & | file, | |
| XAP_Frame * | pFrame | |||
| ) | [static] |
References FV_View::cmdCopy(), FV_View::cmdPaste(), FV_View::cmdSelect(), DELETEP, FL_DocLayout::fillLayouts(), FV_DOCPOS_BOD, FV_DOCPOS_EOD, XAP_App::getApp(), XAP_Frame::getCurrentView(), FV_View::getGraphics(), PD_Document::readFromFile(), FL_DocLayout::setView(), UNREFP, UT_OK, and UT_UTF8String::utf8_str().
Referenced by s_loadUri().
bool bScrollWait = false [static] |
const GtkTargetEntry XAP_UnixFrameImpl__knownDragTypes[] [static] |
{
{(gchar *)"text/uri-list", 0, TARGET_URI_LIST},
{(gchar *)"_NETSCAPE_URL", 0, TARGET_URL},
{(gchar *)"image/gif", 0, TARGET_IMAGE},
{(gchar *)"image/jpeg", 0, TARGET_IMAGE},
{(gchar *)"image/png", 0, TARGET_IMAGE},
{(gchar *)"image/tiff", 0, TARGET_IMAGE},
{(gchar *)"image/vnd", 0, TARGET_IMAGE},
{(gchar *)"image/bmp", 0, TARGET_IMAGE},
{(gchar *)"image/x-xpixmap", 0, TARGET_IMAGE},
{(gchar *)"text/x-vcard", 0, TARGET_DOCUMENT}
}
Referenced by s_getDragInfo().
1.7.1