29 :
InterimItemWindow(pEditWin,
"modules/swriter/ui/outlinebutton.ui",
"OutlineButton")
30 , m_xShowBtn(m_xBuilder->weld_button(
"show"))
31 , m_xHideBtn(m_xBuilder->weld_button(
"hide"))
32 , m_pEditWin(pEditWin)
34 , m_nDelayAppearing(0)
35 , m_aDelayTimer(
"SwOutlineContentVisibilityWin m_aDelayTimer")
44 auto nDim = std::max(aBtnsSize.
Width(), aBtnsSize.
Height());
126 OUString sQuickHelp(
SwResId(STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY));
130 sQuickHelp +=
" (" +
SwResId(STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT) +
")";
178 if (rMEvt.IsLeaveWindow())
186 = GetEditWin()->LogicToPixel(GetFrame()->getFrameArea().SVRect());
187 auto nY = GetPosPixel().
getY() + rMEvt.GetPosPixel().getY();
188 if (nY <= 0 || nY <= aFrameAreaPxRect.
Top() || nY >= aFrameAreaPxRect.
Bottom()
189 || nY >= GetEditWin()->GetSizePixel().
Height())
191 GetEditWin()->SetSavedOutlineFrame(
nullptr);
192 GetEditWin()->GetFrameControlsManager().RemoveControlsByType(
198 else if (rMEvt.IsEnterWindow())
203 if (GetFrame() != GetEditWin()->GetSavedOutlineFrame())
205 SwFrameControlPtr pFrameControl = GetEditWin()->GetFrameControlsManager().GetControl(
213 GetEditWin()->GetFrameControlsManager().RemoveControlsByType(
219 GetEditWin()->SetSavedOutlineFrame(
222 if (!m_bDestroyed && m_aDelayTimer.IsActive())
223 m_aDelayTimer.Stop();
225 SetZOrder(
this, ZOrderFlags::First);
234 GetEditWin()->ToggleOutlineContentVisibility(m_nOutlinePos, rMEvt.IsRight());
240 const int TICKS_BEFORE_WE_APPEAR = 3;
241 if (m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR)
244 m_aDelayTimer.Start();
247 if (GetEditWin()->GetSavedOutlineFrame() == GetFrame())
249 m_aDelayTimer.Stop();
std::shared_ptr< SwFrameControl > SwFrameControlPtr
IMPL_LINK_NOARG(SwOutlineContentVisibilityWin, DelayAppearHandler, Timer *, void)
IMPL_LINK(SwOutlineContentVisibilityWin, MouseMoveHdl, const MouseEvent &, rMEvt, bool)
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
virtual tSortedOutlineNodeList::size_type getOutlineNodesCount() const =0
virtual int getOutlineLevel(const tSortedOutlineNodeList::size_type nIdx) const =0
virtual void dispose() override
void InitControlBase(weld::Widget *pWidget)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long getY() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetFaceColor() const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
const SwView & GetView() const
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
bool IsRightToLeft() const
tools::Long GetTopMargin() const
Base class of the Writer document model elements.
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
virtual bool Contains(const Point &rDocPt) const override
VclPtr< SwEditWin > m_pEditWin
ButtonSymbol GetSymbol() const
virtual SwEditWin * GetEditWin() override
std::unique_ptr< weld::Button > m_xHideBtn
void SetSymbol(ButtonSymbol eTyle)
SwOutlineContentVisibilityWin(SwEditWin *pEditWin, const SwFrame *pFrame)
virtual void ShowAll(bool bShow) override
virtual const SwFrame * GetFrame() override
std::unique_ptr< weld::Button > m_xShowBtn
int m_nDelayAppearing
Before we show the control, wait a few timer ticks to avoid appearing with every mouse over.
virtual void dispose() override
bool Seek_Entry(SwNode *rP, size_type *pnPos) const
Of course Writer needs its own rectangles.
void AddTop(const tools::Long nAdd)
void Left(const tools::Long nLeft)
Represents the visualization of a paragraph.
SwTextNode * GetTextNodeFirst()
virtual bool GetCharRect(SwRect &rRect, const SwPosition &rPos, SwCursorMoveState *pCMS=nullptr, bool bAllowFarAway=true) const override
Returns the view rectangle for the rPos model position.
SwTextNode const * GetTextNodeForParaProps() const
SwTextNode is a paragraph in the document model.
bool HasVisibleNumberingOrBullet() const
Returns if the paragraph has a visible numbering or bullet.
bool IsTreatSubOutlineLevelsAsContent() const
const SwViewOption * GetViewOptions() const
const SwNodes & GetNodes() const
const IDocumentOutlineNodes * getIDocumentOutlineNodesAccess() const
SwWrtShell & GetWrtShell() const
Used by the UI to modify the document model.
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
std::vector< Value >::size_type size_type
Point LogicToPixel(const Point &rLogicPt) const
virtual void SetSizePixel(const Size &rNewSize)
Size get_preferred_size() const
virtual Point GetPosPixel() const
::OutputDevice const * GetOutDev() const
virtual Size GetSizePixel() const
void SetPaintTransparent(bool bTransparent)
virtual void SetPosPixel(const Point &rNewPos)
void SetQuickHelpText(const OUString &rHelpText)
#define LINK(Instance, Class, Member)
SwSpecialPos * m_pSpecialPos
for positions inside fields
Marks a position in the document model.
SwSPExtendRange nExtendRange
OUString SwResId(TranslateId aId)