LibreOffice Module svx (master) 1
|
#include <galbrws2.hxx>
Public Member Functions | |
GalleryBrowser2 (weld::Builder &rBuilder, Gallery *pGallery) | |
~GalleryBrowser2 () | |
void | SelectTheme (std::u16string_view rThemeName) |
GalleryBrowserMode | GetMode () const |
void | SetMode (GalleryBrowserMode eMode) |
weld::Widget * | GetViewWindow () const |
void | Travel (GalleryBrowserTravel eTravel) |
INetURLObject | GetURL () const |
OUString | GetFilterName () const |
sal_Int8 | AcceptDrop (const DropTargetHelper &rTarget) |
sal_Int8 | ExecuteDrop (const ExecuteDropEvent &rEvt) |
bool | StartDrag () |
void | TogglePreview () |
bool | ShowContextMenu (const CommandEvent &rCEvt) |
bool | KeyInput (const KeyEvent &rEvt) |
bool | ViewBoxHasFocus () const |
const css::uno::Reference< css::util::XURLTransformer > & | GetURLTransformer () const |
void | Execute (std::u16string_view rIdent) |
void | DispatchAdd (const css::uno::Reference< css::frame::XDispatch > &rxDispatch, const css::util::URL &rURL) |
DECL_STATIC_LINK (GalleryBrowser2, AsyncDispatch_Impl, void *, void) | |
Public Member Functions inherited from SfxListener | |
SfxListener () | |
SfxListener (const SfxListener &rCopy) | |
virtual | ~SfxListener () COVERITY_NOEXCEPT_FALSE |
void | StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected) |
void | EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false) |
void | EndListeningAll () |
bool | IsListening (SfxBroadcaster &rBroadcaster) const |
sal_uInt16 | GetBroadcasterCount () const |
SfxBroadcaster * | GetBroadcasterJOE (sal_uInt16 nNo) const |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) |
void | RemoveBroadcaster_Impl (SfxBroadcaster &rBC) |
virtual bool | IsSdrView () const |
Static Public Member Functions | |
static OUString | GetItemText (const SgaObject &rObj, GalleryItemFlags nItemTextFlags) |
static css::uno::Reference< css::frame::XFrame > | GetFrame () |
Private Member Functions | |
void | ImplUpdateViews (sal_uInt16 nSelectionId) |
void | ImplUpdateInfoBar () |
sal_uInt32 | ImplGetSelectedItemId (const Point *pSelPosPixel, Point &rSelPos) |
void | ImplSelectItemId (sal_uInt32 nItemId) |
void | ImplUpdateSelection () |
void | UpdateRows (bool bVisibleOnly) |
virtual void | Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override |
DECL_LINK (SelectObjectHdl, weld::TreeView &, void) | |
DECL_LINK (SelectObjectValueSetHdl, ValueSet *, void) | |
DECL_LINK (SelectTbxHdl, weld::Toggleable &, void) | |
DECL_LINK (PopupMenuHdl, const CommandEvent &, bool) | |
DECL_LINK (KeyInputHdl, const KeyEvent &, bool) | |
DECL_LINK (RowActivatedHdl, weld::TreeView &, bool) | |
DECL_LINK (DragBeginHdl, bool &, bool) | |
DECL_LINK (VisRowsScrolledHdl, weld::TreeView &, void) | |
DECL_LINK (SizeAllocHdl, const Size &, void) | |
Private Attributes | |
Gallery * | mpGallery |
GalleryTheme * | mpCurTheme |
std::unique_ptr< GalleryIconView > | mxIconView |
std::unique_ptr< weld::CustomWeld > | mxIconViewWin |
std::unique_ptr< weld::TreeView > | mxListView |
std::unique_ptr< GalleryDragDrop > | mxDragDropTargetHelper |
std::unique_ptr< GalleryPreview > | mxPreview |
std::unique_ptr< weld::CustomWeld > | mxPreviewWin |
std::unique_ptr< weld::ToggleButton > | mxIconButton |
std::unique_ptr< weld::ToggleButton > | mxListButton |
std::unique_ptr< weld::Label > | mxInfoBar |
Size | maPreviewSize |
rtl::Reference< GalleryTransferable > | m_xHelper |
sal_uInt32 | mnCurActionPos |
GalleryBrowserMode | meMode |
GalleryBrowserMode | meLastMode |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::util::XURLTransformer > | m_xTransformer |
Static Private Attributes | |
static GalleryBrowserMode | meInitMode = GALLERYBROWSERMODE_ICON |
Friends | |
class | GalleryBrowser |
class | svx::sidebar::GalleryControl |
Definition at line 70 of file galbrws2.hxx.
GalleryBrowser2::GalleryBrowser2 | ( | weld::Builder & | rBuilder, |
Gallery * | pGallery | ||
) |
Definition at line 333 of file galbrws2.cxx.
References GALLERYBROWSERMODE_ICON, GALLERYBROWSERMODE_PREVIEW, HID_GALLERY_ICONVIEW, HID_GALLERY_LISTVIEW, HID_GALLERY_WINDOW, LINK, m_xContext, m_xTransformer, meInitMode, meMode, mxDragDropTargetHelper, mxIconButton, mxIconView, mxListButton, mxListView, and SetMode().
GalleryBrowser2::~GalleryBrowser2 | ( | ) |
Definition at line 400 of file galbrws2.cxx.
References mpCurTheme, mpGallery, and Gallery::ReleaseTheme().
sal_Int8 GalleryBrowser2::AcceptDrop | ( | const DropTargetHelper & | rTarget | ) |
Definition at line 426 of file galbrws2.cxx.
References DND_ACTION_COPY, DND_ACTION_NONE, GalleryTheme::IsDragging(), GalleryTheme::IsReadOnly(), mpCurTheme, and rTarget.
Referenced by GalleryDragDrop::AcceptDrop().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
GalleryBrowser2::DECL_STATIC_LINK | ( | GalleryBrowser2 | , |
AsyncDispatch_Impl | , | ||
void * | , | ||
void | |||
) |
void GalleryBrowser2::DispatchAdd | ( | const css::uno::Reference< css::frame::XDispatch > & | rxDispatch, |
const css::util::URL & | rURL | ||
) |
Definition at line 1003 of file galbrws2.cxx.
References Animation, aSeq, aURL, Bitmap, svx::EMPTY, GetFilterName(), GetFrame(), GalleryTheme::GetGraphic(), GalleryTheme::GetObjectKind(), Graphic::GetXGraphic(), ImplGetSelectedItemId(), Inet, Graphic::IsNone(), LINK, m_xTransformer, comphelper::makePropertyValue(), mnCurActionPos, mpCurTheme, nType, Application::PostUserEvent(), Sound, SvDraw, SVXGALLERYITEM_ARGNAME, SVXGALLERYITEM_DRAWING, SVXGALLERYITEM_FILTER, SVXGALLERYITEM_GRAPHIC, SVXGALLERYITEM_PARAMS, SVXGALLERYITEM_TYPE, SVXGALLERYITEM_URL, and xDispatch.
Referenced by KeyInput().
void GalleryBrowser2::Execute | ( | std::u16string_view | rIdent | ) |
Definition at line 1090 of file galbrws2.cxx.
References GalleryTheme::AcquireObject(), GalleryTheme::CopyToClipboard(), SvxAbstractDialogFactory::Create(), Application::CreateBuilder(), TransferableDataHelper::CreateFromClipboard(), SvxAbstractDialogFactory::CreateTitleDialog(), GALLERYBROWSERMODE_PREVIEW, weld::Widget::get_clipboard(), GetItemText(), GetMode(), TransferableDataHelper::GetTransferable(), GetViewWindow(), ImplGetSelectedItemId(), GalleryTheme::InsertObject(), GalleryTheme::InsertTransferable(), GalleryTheme::IsReadOnly(), meLastMode, mnCurActionPos, mpCurTheme, GalleryTheme::RemoveObject(), RET_OK, RET_YES, SetMode(), Title, and u.
Referenced by KeyInput().
sal_Int8 GalleryBrowser2::ExecuteDrop | ( | const ExecuteDropEvent & | rEvt | ) |
Definition at line 451 of file galbrws2.cxx.
References GalleryTheme::ChangeObjectPos(), DND_ACTION_NONE, GalleryTheme::GetDragPos(), GalleryTheme::GetObjectCount(), ImplGetSelectedItemId(), GalleryTheme::InsertTransferable(), GalleryTheme::IsDragging(), ExecuteDropEvent::maDropEvent, ExecuteDropEvent::maPosPixel, and mpCurTheme.
Referenced by GalleryDragDrop::ExecuteDrop().
OUString GalleryBrowser2::GetFilterName | ( | ) | const |
Definition at line 1202 of file galbrws2.cxx.
References Animation, aURL, Bitmap, GraphicFilter::GetGraphicFilter(), GraphicFilter::GetImportFormatName(), GraphicFilter::GetImportFormatNumberForShortName(), GalleryTheme::GetObjectKind(), GalleryTheme::GetURL(), GRFILTER_FORMAT_DONTKNOW, mnCurActionPos, and mpCurTheme.
Referenced by DispatchAdd().
|
static |
Definition at line 990 of file galbrws2.cxx.
References SfxViewFrame::Current(), SfxBindings::GetActiveFrame(), SfxViewFrame::GetBindings(), and xFrame.
Referenced by DispatchAdd(), and ShowContextMenu().
|
static |
Definition at line 1154 of file galbrws2.cxx.
References aURL, INetURLObject::LAST_SEGMENT, Path, Title, and INetURLObject::Unambiguous.
Referenced by Execute(), UpdateRows(), and GalleryIconView::UserDraw().
|
inline |
Definition at line 132 of file galbrws2.hxx.
References meMode.
Referenced by Execute(), GetViewWindow(), ImplGetSelectedItemId(), ImplUpdateSelection(), ImplUpdateViews(), KeyInput(), Notify(), SelectTheme(), SetMode(), ShowContextMenu(), TogglePreview(), and Travel().
INetURLObject GalleryBrowser2::GetURL | ( | ) | const |
Definition at line 1192 of file galbrws2.cxx.
References aURL, GalleryTheme::GetObjectURL(), mnCurActionPos, and mpCurTheme.
|
inline |
Definition at line 151 of file galbrws2.hxx.
References m_xTransformer.
weld::Widget * GalleryBrowser2::GetViewWindow | ( | ) | const |
Definition at line 710 of file galbrws2.cxx.
References GALLERYBROWSERMODE_LIST, GALLERYBROWSERMODE_PREVIEW, GetMode(), mxIconView, mxListView, and mxPreview.
Referenced by Execute(), ShowContextMenu(), and TogglePreview().
|
private |
Definition at line 923 of file galbrws2.cxx.
References GALLERYBROWSERMODE_ICON, GALLERYBROWSERMODE_PREVIEW, GetMode(), GalleryTheme::GetObjectCount(), Size::Height(), meLastMode, mpCurTheme, mxIconView, mxListView, mxPreview, and Size::Width().
Referenced by DispatchAdd(), Execute(), ExecuteDrop(), KeyInput(), SetMode(), ShowContextMenu(), and Travel().
|
private |
Definition at line 979 of file galbrws2.cxx.
References ImplUpdateSelection(), mxIconView, and mxListView.
Referenced by ImplUpdateViews(), ShowContextMenu(), and Travel().
|
private |
Definition at line 908 of file galbrws2.cxx.
References GalleryTheme::GetName(), mpCurTheme, and mxInfoBar.
Referenced by ImplUpdateViews(), and Travel().
|
private |
Definition at line 915 of file galbrws2.cxx.
References GALLERYBROWSERMODE_ICON, GetMode(), m_xHelper, mpCurTheme, mxIconView, and mxListView.
Referenced by ImplSelectItemId().
|
private |
Definition at line 776 of file galbrws2.cxx.
References GALLERYBROWSERMODE_ICON, GALLERYBROWSERMODE_LIST, GALLERYBROWSERMODE_PREVIEW, GetMode(), GalleryTheme::GetObjectCount(), i, ImplSelectItemId(), ImplUpdateInfoBar(), mpCurTheme, mxIconView, mxListView, mxPreview, nCount, and UpdateRows().
Referenced by Notify(), and SelectTheme().
bool GalleryBrowser2::KeyInput | ( | const KeyEvent & | rEvt | ) |
Definition at line 522 of file galbrws2.cxx.
References aURL, DispatchAdd(), Execute(), GALLERYBROWSERMODE_PREVIEW, vcl::KeyCode::GetCode(), KeyEvent::GetKeyCode(), GetMode(), GalleryTheme::GetObjectCount(), GalleryTheme::GetURL(), ImplGetSelectedItemId(), GalleryTheme::IsReadOnly(), KEY_D, KEY_DELETE, KEY_I, KEY_INSERT, KEY_P, KEY_RETURN, KEY_SPACE, KEY_T, mpCurTheme, TogglePreview(), and ViewBoxHasFocus().
Referenced by GalleryPreview::KeyInput(), and GalleryIconView::KeyInput().
|
overrideprivatevirtual |
Reimplemented from SfxListener.
Definition at line 406 of file galbrws2.cxx.
References GALLERYBROWSERMODE_PREVIEW, GalleryHint::GetData1(), GetMode(), GalleryHint::GetType(), ImplUpdateViews(), meLastMode, SetMode(), and THEME_UPDATEVIEW.
void GalleryBrowser2::SelectTheme | ( | std::u16string_view | rThemeName | ) |
Definition at line 601 of file galbrws2.cxx.
References Gallery::AcquireTheme(), DND_ACTION_COPY, DND_ACTION_LINK, GALLERYBROWSERMODE_ICON, GALLERYBROWSERMODE_PREVIEW, GetMode(), ImplUpdateViews(), m_xHelper, meLastMode, meMode, mpCurTheme, mpGallery, mxIconButton, mxIconView, mxListButton, mxListView, mxPreview, and Gallery::ReleaseTheme().
void GalleryBrowser2::SetMode | ( | GalleryBrowserMode | eMode | ) |
Definition at line 629 of file galbrws2.cxx.
References eMode, GALLERYBROWSERMODE_ICON, GALLERYBROWSERMODE_LIST, GALLERYBROWSERMODE_PREVIEW, GalleryTheme::GetGraphic(), GetMode(), GalleryTheme::GetObjectKind(), GalleryTheme::GetObjectURL(), ImplGetSelectedItemId(), meInitMode, meLastMode, meMode, mpCurTheme, mxIconButton, mxIconView, mxListButton, mxListView, mxPreview, nPos, GalleryPreview::PreviewMedia(), Sound, and UpdateRows().
Referenced by Execute(), GalleryBrowser2(), Notify(), and TogglePreview().
bool GalleryBrowser2::ShowContextMenu | ( | const CommandEvent & | rCEvt | ) |
Definition at line 489 of file galbrws2.cxx.
References GALLERYBROWSERMODE_PREVIEW, GetFrame(), GetMode(), CommandEvent::GetMousePosPixel(), GetViewWindow(), ImplGetSelectedItemId(), ImplSelectItemId(), CommandEvent::IsMouseEvent(), mnCurActionPos, mpCurTheme, and xFrame.
Referenced by GalleryPreview::Command(), and GalleryIconView::Command().
bool GalleryBrowser2::StartDrag | ( | ) |
Definition at line 470 of file galbrws2.cxx.
References m_xHelper, and mpCurTheme.
Referenced by GalleryPreview::StartDrag(), and GalleryIconView::StartDrag().
void GalleryBrowser2::TogglePreview | ( | ) |
Definition at line 483 of file galbrws2.cxx.
References GALLERYBROWSERMODE_PREVIEW, GetMode(), GetViewWindow(), weld::Widget::grab_focus(), meLastMode, and SetMode().
Referenced by KeyInput(), GalleryPreview::KeyInput(), GalleryPreview::MouseButtonDown(), and GalleryIconView::MouseButtonDown().
void GalleryBrowser2::Travel | ( | GalleryBrowserTravel | eTravel | ) |
Definition at line 727 of file galbrws2.cxx.
References First, GALLERYBROWSERMODE_PREVIEW, GalleryTheme::GetGraphic(), GetMode(), GalleryTheme::GetObjectCount(), GalleryTheme::GetObjectKind(), GalleryTheme::GetObjectURL(), ImplGetSelectedItemId(), ImplSelectItemId(), ImplUpdateInfoBar(), Last, mpCurTheme, mxPreview, Next, nPos, GalleryPreview::PreviewMedia(), Previous, and Sound.
Referenced by GalleryPreview::KeyInput().
|
private |
Definition at line 825 of file galbrws2.cxx.
References GalleryTheme::AcquireObject(), GalleryIconView::drawTransparenceBackground(), GetItemText(), GalleryTheme::GetPreviewBitmapExAndStrings(), BitmapEx::GetSizePixel(), Size::Height(), i, BitmapEx::IsAlpha(), BitmapEx::IsEmpty(), maPreviewSize, mpCurTheme, mxListView, Path, GalleryTheme::SetPreviewBitmapExAndStrings(), sId, Title, and Size::Width().
Referenced by ImplUpdateViews(), and SetMode().
bool GalleryBrowser2::ViewBoxHasFocus | ( | ) | const |
Definition at line 517 of file galbrws2.cxx.
References mxIconButton, and mxListButton.
Referenced by KeyInput().
|
friend |
Definition at line 72 of file galbrws2.hxx.
|
friend |
Definition at line 73 of file galbrws2.hxx.
|
private |
Definition at line 94 of file galbrws2.hxx.
Referenced by GalleryBrowser2().
|
private |
Definition at line 89 of file galbrws2.hxx.
Referenced by ImplUpdateSelection(), SelectTheme(), and StartDrag().
|
private |
Definition at line 95 of file galbrws2.hxx.
Referenced by DispatchAdd(), GalleryBrowser2(), and GetURLTransformer().
|
private |
Definition at line 88 of file galbrws2.hxx.
Referenced by UpdateRows().
|
staticprivate |
Definition at line 119 of file galbrws2.hxx.
Referenced by GalleryBrowser2(), and SetMode().
|
private |
Definition at line 92 of file galbrws2.hxx.
Referenced by Execute(), ImplGetSelectedItemId(), Notify(), SelectTheme(), SetMode(), and TogglePreview().
|
private |
Definition at line 91 of file galbrws2.hxx.
Referenced by GetMode(), SelectTheme(), and SetMode().
|
private |
Definition at line 90 of file galbrws2.hxx.
Referenced by DispatchAdd(), Execute(), GetFilterName(), GetURL(), and ShowContextMenu().
|
private |
Definition at line 78 of file galbrws2.hxx.
Referenced by AcceptDrop(), DispatchAdd(), Execute(), ExecuteDrop(), GetFilterName(), GetURL(), ImplGetSelectedItemId(), ImplUpdateInfoBar(), ImplUpdateSelection(), ImplUpdateViews(), KeyInput(), SelectTheme(), SetMode(), ShowContextMenu(), StartDrag(), Travel(), UpdateRows(), and ~GalleryBrowser2().
|
private |
Definition at line 77 of file galbrws2.hxx.
Referenced by SelectTheme(), and ~GalleryBrowser2().
|
private |
Definition at line 82 of file galbrws2.hxx.
Referenced by GalleryBrowser2().
|
private |
Definition at line 85 of file galbrws2.hxx.
Referenced by GalleryBrowser2(), SelectTheme(), SetMode(), and ViewBoxHasFocus().
|
private |
Definition at line 79 of file galbrws2.hxx.
Referenced by GalleryBrowser2(), GetViewWindow(), ImplGetSelectedItemId(), ImplSelectItemId(), ImplUpdateSelection(), ImplUpdateViews(), SelectTheme(), and SetMode().
|
private |
Definition at line 80 of file galbrws2.hxx.
|
private |
Definition at line 87 of file galbrws2.hxx.
Referenced by ImplUpdateInfoBar().
|
private |
Definition at line 86 of file galbrws2.hxx.
Referenced by GalleryBrowser2(), SelectTheme(), SetMode(), and ViewBoxHasFocus().
|
private |
Definition at line 81 of file galbrws2.hxx.
Referenced by GalleryBrowser2(), GetViewWindow(), ImplGetSelectedItemId(), ImplSelectItemId(), ImplUpdateSelection(), ImplUpdateViews(), SelectTheme(), SetMode(), and UpdateRows().
|
private |
Definition at line 83 of file galbrws2.hxx.
Referenced by GetViewWindow(), ImplGetSelectedItemId(), ImplUpdateViews(), SelectTheme(), SetMode(), and Travel().
|
private |
Definition at line 84 of file galbrws2.hxx.