/* -*- 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/.
*/
// don't export to avoid duplicate WeakImplHelper definitions with MSVC class SAL_DLLPUBLIC_TEMPLATE WidgetStatusListener_Base
: public cppu::WeakImplHelper<css::frame::XStatusListener>
{
};
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) WidgetStatusListener final : public WidgetStatusListener_Base
{ public:
WidgetStatusListener(weld::Widget* widget, const OUString& rCommand);
private:
weld::Widget* mWidget; /** The widget on which actions are performed */
/** Dispatcher. Need to keep a reference to it as long as this StatusListener exists. */
css::uno::Reference<css::frame::XDispatch> mxDispatch;
css::util::URL maCommandURL;
css::uno::Reference<css::frame::XFrame> mxFrame;
/* EntryFormatter will set listeners to "changed" and "focus-out" of the Entry so users that want to add their own listeners to those must set them through this formatter and not directly on that entry.
If EntryFormatter is used with a weld::FormattedSpinButton this is handled transparently by the FormattedSpinButton for the user and the handlers can be set on the FormattedSpinButton
*/ void connect_changed(const Link<weld::Entry&, void>& rLink) { m_aModifyHdl = rLink; } void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_aFocusOutHdl = rLink; }
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) DoubleNumericFormatter final : public EntryFormatter
{ public:
DoubleNumericFormatter(weld::Entry& rEntry);
DoubleNumericFormatter(weld::FormattedSpinButton& rSpinButton);
class VCL_DLLPUBLIC LongCurrencyFormatter final : public EntryFormatter
{ public:
LongCurrencyFormatter(weld::Entry& rEntry);
LongCurrencyFormatter(weld::FormattedSpinButton& rSpinButton);
class VCL_DLLPUBLIC TimeFormatter final : public EntryFormatter
{ public:
TimeFormatter(weld::Entry& rEntry);
TimeFormatter(weld::FormattedSpinButton& rSpinButton);
/* PatternFormatter will set listeners to "changed", "focus-out", "focus-in" and "key-press" of the Entry so users that want to add their own listeners to those must set them through this formatter and not directly on that entry.
*/ void connect_changed(const Link<weld::Entry&, void>& rLink) { m_aModifyHdl = rLink; } void connect_focus_out(const Link<weld::Widget&, void>& rLink) { m_aFocusOutHdl = rLink; } void connect_focus_in(const Link<weld::Widget&, void>& rLink) { m_aFocusInHdl = rLink; } void connect_key_press(const Link<const KeyEvent&, bool>& rLink) { m_aKeyPressHdl = rLink; }
/* If a TreeView is used as a list, rather than a tree, and DnD should just reorder rows, then this can be used to implement that.
Because the TreeView doesn't want or need subnodes, the drop target can be simply visually indicated as being between rows (the issue of a final drop location of a child of the drop target doesn't arise), and the meaning of what a drop before or after the last row should do is unambiguous.
*/ class VCL_DLLPUBLIC ReorderingDropTarget : public DropTargetHelper
{ protected:
weld::TreeView& m_rTreeView;
// get the row the iterator is on
VCL_DLLPUBLIC size_t GetAbsPos(const weld::TreeView& rTreeView, const weld::TreeIter& rIter);
// an entry is visible if all parents are expanded
VCL_DLLPUBLIC bool IsEntryVisible(const weld::TreeView& rTreeView, const weld::TreeIter& rIter);
// A Parent's Children are turned into Children of the Parent which comes next in hierarchy
VCL_DLLPUBLIC void RemoveParentKeepChildren(weld::TreeView& rTreeView, const weld::TreeIter& rParent);
// return the weld::Window of the SalFrame rOutWin is in, and convert rRect // from relative to rOutWin to relative to that weld::Window suitable for use // with popup_at_rect
VCL_DLLPUBLIC weld::Window* GetPopupParent(vcl::Window& rOutWin, tools::Rectangle& rRect);
// Use Application::GetDefaultDevice to set the PointFont rFont to the OutputDevice
VCL_DLLPUBLIC void SetPointFont(OutputDevice& rDevice, const vcl::Font& rFont, bool bUseDeviceDPI = false);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.