summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-02-16 16:03:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-03-09 16:42:54 +0000
commit5813660e7bfe128ac076e592fe31de64a6863780 (patch)
treec61a2a0ac0f8b5420ee0e53260423b5b812c4eed /include/svtools
parent1de73e4ddfff3a67c9470e8434c2bb2cb3f43dd5 (diff)
icon view for RemoteFilesDialog
New view type can be accessed in: Start Center > Remote Files > Icon View Cloud service for testing purposes: 1. Start Center > Remote Files > Add service 2. Set type to: Alfresco 4 3. Set host to: http://cmis.alfresco.com/cmisatom 4. Click refresh icon and enter login:admin pass:admin 5. Click OK and open this service Change-Id: I3d4674bb84d1df1b678111adffe2f835d2bb2356 Reviewed-on: https://gerrit.libreoffice.org/22437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/fileview.hxx8
-rw-r--r--include/svtools/iconview.hxx42
-rw-r--r--include/svtools/treelistbox.hxx14
3 files changed, 62 insertions, 2 deletions
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index fb36255e2be5..eb570cef88ef 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -48,6 +48,12 @@ enum FileViewResult
eStillRunning
};
+enum FileViewMode
+{
+ eDetailedList,
+ eIcon
+};
+
/// describes parameters for doing an action on the FileView asynchronously
struct FileViewAsyncAction
{
@@ -81,6 +87,8 @@ public:
virtual Size GetOptimalSize() const override;
+ void SetViewMode( FileViewMode eMode );
+
const OUString& GetViewURL() const;
static OUString GetURL( SvTreeListEntry* pEntry );
OUString GetCurrentURL() const;
diff --git a/include/svtools/iconview.hxx b/include/svtools/iconview.hxx
new file mode 100644
index 000000000000..28dc92255c02
--- /dev/null
+++ b/include/svtools/iconview.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVTOOLS_ICONVIEW_HXX
+#define INCLUDED_SVTOOLS_ICONVIEW_HXX
+
+#include <svtools/svtdllapi.h>
+#include <svtools/treelistbox.hxx>
+
+class IconView : public SvTreeListBox
+{
+public:
+ IconView( vcl::Window* pParent, WinBits nBits );
+
+ virtual void Resize() SAL_OVERRIDE;
+
+ virtual Rectangle GetFocusRect( SvTreeListEntry*, long nEntryPos ) SAL_OVERRIDE;
+
+ void ClearAll();
+
+ void PaintEntry( SvTreeListEntry&, long nX, long nY, vcl::RenderContext& rRenderContext);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 4671cadf8f3f..5e75a2f53fae 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -228,10 +228,10 @@ class SVT_DLLPUBLIC SvTreeListBox
,public vcl::ISearchableStringList
{
friend class SvImpLBox;
+ friend class IconViewImpl;
friend class TreeControlPeer;
SvTreeListBoxImpl* mpImpl;
- SvImpLBox* pImp;
Link<SvTreeListBox*,void> aCheckButtonHdl;
Link<SvTreeListBox*,void> aScrolledHdl;
Link<SvTreeListBox*,void> aExpandedHdl;
@@ -245,7 +245,6 @@ class SVT_DLLPUBLIC SvTreeListBox
Image aCurInsertedColBmp;
short nContextBmpWidthMax;
- short nEntryHeight;
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
@@ -269,6 +268,12 @@ class SVT_DLLPUBLIC SvTreeListBox
SvLBoxItem* pEdItem;
protected:
+ SvImpLBox* pImp;
+ short nColumns;
+ short nEntryHeight;
+ short nEntryWidth;
+ bool mbCenterAndClipText;
+
Link<SvTreeListBox*,bool> aDoubleClickHdl;
SvTreeListEntry* pTargetEntry;
SvLBoxButtonData* pCheckButtonData;
@@ -443,6 +448,8 @@ public:
void EnableEntryMnemonics();
bool IsEntryMnemonicsEnabled() const;
+ bool TextCenterAndClipEnabled() const { return mbCenterAndClipText; }
+
/** Handles the given key event.
At the moment this merely checks for accelerator keys, if entry mnemonics
@@ -710,8 +717,11 @@ public:
void ShowTargetEmphasis( SvTreeListEntry*, bool bShow );
void ScrollOutputArea( short nDeltaEntries );
+ short GetColumnsCount() const { return nColumns; }
short GetEntryHeight() const { return nEntryHeight; }
void SetEntryHeight( short nHeight );
+ short GetEntryWidth() const { return nEntryWidth; }
+ void SetEntryWidth( short nWidth );
Size GetOutputSizePixel() const;
short GetIndent() const { return nIndent; }
void SetIndent( short nIndent );