23#include <rtl/ustring.hxx>
24#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
25#include <com/sun/star/sdbc/XConnection.hpp>
26#include <com/sun/star/ucb/XContent.hpp>
27#include <com/sun/star/container/XNameAccess.hpp>
42 class OAppBorderWindow;
43 class ODocumentInfoPreview;
79 std::unique_ptr<weld::Container>
m_xBox;
80 std::unique_ptr<weld::Widget>
m_xFL;
92 css::uno::Reference < css::frame::XFrame2 >
94 css::uno::Reference< css::awt::XWindow >
106 void sort(
int nPos,
bool bAscending);
122 void fillNames(
const css::uno::Reference< css::container::XNameAccess >& _xContainer,
124 const OUString& rImageId,
172 void createTablesPage(
const css::uno::Reference< css::sdbc::XConnection>& _xConnection);
180 void createPage(
ElementType _eType,
const css::uno::Reference< css::container::XNameAccess >& _xContainer);
212 css::uno::Sequence< css::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
219 css::uno::Sequence< css::sdb::application::NamedDatabaseObject >& _out_rSelectedObjects
231 void selectElements(
const css::uno::Sequence< OUString>& _aNames);
267 std::unique_ptr<weld::TreeIter>
getEntry(
const Point& rPosPixel)
const;
286 const OUString& rName,
287 const css::uno::Any& rObject);
300 ,
const OUString& _rOldName
301 ,
const OUString& _rNewName );
312 ,
const OUString& _rName );
332 void showPreview(
const css::uno::Reference< css::ucb::XContent >& _xContent);
343 void showPreview(
const OUString& _sDataSourceName,
344 const OUString& _sName,
void SetGraphic(const Graphic &rGraphic)
std::unique_ptr< weld::MenuButton > m_xMBPreview
void sortUp()
sorts all entries descending
void fillNames(const css::uno::Reference< css::container::XNameAccess > &_xContainer, const ElementType _eType, const OUString &rImageId, const weld::TreeIter *_pParent)
fills the names in the listbox
static bool isLeaf(const weld::TreeView &rTreeView, const weld::TreeIter &rEntry)
returns if an entry is a leaf
void sortDown()
sorts all entries ascending
bool isSortUp() const
returns <TRUE> if it sorts ascending
PreviewMode getPreviewMode() const
returns the preview mode
void sort(int nPos, bool bAscending)
sorts the entries in the tree list box.
std::unique_ptr< weld::CustomWeld > m_xDocumentInfoWin
std::unique_ptr< weld::Widget > m_xFL
virtual ~OAppDetailPageHelper() override
DECL_LINK(OnCopyEntry, LinkParamNone *, void)
OAppBorderWindow & m_rBorderWin
virtual bool HasChildPathFocus() const override
OUString getQualifiedName(const weld::TreeIter *_pEntry) const
return the qualified name.
std::unique_ptr< DBTreeViewBase > createSimpleTree(const OUString &rHelpId, ElementType eType)
creates the tree and sets all HandleCallbacks
std::unique_ptr< weld::Container > m_xTablePreview
DECL_LINK(OnDeleteEntry, LinkParamNone *, void)
DECL_LINK(MenuSelectHdl, const OUString &, void)
void elementReplaced(ElementType eType, const OUString &_rOldName, const OUString &_rNewName)
replaces an objects name with a new one
vcl::Window * getMenuParent() const
get the menu parent window for the given control
static OUString getElementIcons(ElementType _eType)
retrieves the resource ids of the images representing elements of the given type
DECL_LINK(OnDropdownClickHdl, weld::Toggleable &, void)
sal_Int32 getSelectionCount()
returns the count of selected entries
std::unique_ptr< weld::CustomWeld > m_xPreviewWin
bool isALeafSelected() const
returns if one of the selected entries is a leaf
int getVisibleControlIndex() const
returns the index of the visible control
void selectAll()
select all entries in the visible control
void setDetailPage(DBTreeViewBase &rTreeView)
sets the detail page
void setupTree(DBTreeViewBase &rTreeView)
sets all HandleCallbacks
std::unique_ptr< weld::TreeIter > getEntry(const Point &rPosPixel) const
bool isFilled() const
returns <TRUE> when a detail page was filled
css::uno::Reference< css::awt::XWindow > m_xWindow
DBTreeViewBase * getCurrentView() const
returns the current visible tree list box
virtual void GrabFocus() override
DECL_LINK(OnEntryDoubleClick, weld::TreeView &, bool)
std::unique_ptr< weld::Container > m_xBox
void adjustMenuPosition(const weld::TreeView &rControl, ::Point &rPos) const
std::unique_ptr< ODocumentInfoPreview > m_xDocumentInfo
void elementRemoved(ElementType _eType, const OUString &_rName)
removes an element from the detail page.
bool isPreviewEnabled() const
<TRUE> if the preview is enabled
PreviewMode m_ePreviewMode
DECL_LINK(OnEntrySelChange, LinkParamNone *, void)
sal_Int32 getElementCount() const
returns the count of entries
OAppBorderWindow & getBorderWin() const
std::unique_ptr< weld::TreeIter > elementAdded(ElementType eType, const OUString &rName, const css::uno::Any &rObject)
adds a new object to the detail page.
void getSelectionElementNames(std::vector< OUString > &_rNames) const
returns the element names which are selected
void createPage(ElementType _eType, const css::uno::Reference< css::container::XNameAccess > &_xContainer)
creates the page for the specific type.
css::uno::Reference< css::frame::XFrame2 > m_xFrame
void describeCurrentSelectionForType(const ElementType _eType, css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &_out_rSelectedObjects)
describes the current selection for the given ElementType
void selectElements(const css::uno::Sequence< OUString > &_aNames)
select all names on the currently selected container.
OAppDetailPageHelper(weld::Container *pParent, OAppBorderWindow &rBorderWin, PreviewMode ePreviewMode)
ElementType getElementType() const
return the element of currently select entry
void showPreview(const css::uno::Reference< css::ucb::XContent > &_xContent)
shows the Preview of the content when it is enabled.
std::unique_ptr< DBTreeViewBase > m_aLists[size_t(E_ELEMENT_TYPE_COUNT)]
void switchPreview(PreviewMode _eMode, bool _bForce=false)
switches to the given preview mode
void describeCurrentSelectionForControl(const weld::TreeView &rControl, css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &_out_rSelectedObjects)
describes the current selection for the given control
DECL_LINK(OnPasteEntry, LinkParamNone *, void)
void clearPages()
clears the detail pages
std::unique_ptr< OPreviewWindow > m_xPreview
void createTablesPage(const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
creates the tables page
GraphicObject m_aGraphicObj
void setGraphic(const Graphic &_rGraphic)
bool ImplGetGraphicCenterRect(const vcl::RenderContext &rRenderContext, const Graphic &rGraphic, tools::Rectangle &rResultRect) const
gets the graphic center rect
tools::Rectangle m_aPreviewRect
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)