37#include <bitmaps.hlst>
44#include <unordered_map>
49#define TAB_ITEM_OFFSET_X 10
51#define TAB_ITEM_OFFSET_Y 3
52#define TAB_EXTRASPACE_X 6
53#define TAB_BORDER_LEFT 1
54#define TAB_BORDER_TOP 1
55#define TAB_BORDER_RIGHT 2
56#define TAB_BORDER_BOTTOM 2
85 , mbFullVisible(false)
98#define TAB_PAGERECT 0xFFFF
203 if (pParent && pParent->IsDialog())
217 if (item.id() ==
nId)
228 Size aImageSize( 0, 0 );
249 aBoundingRgn, aContentRgn ) )
260 if ( aSize.
Width()+4 >= nMaxWidth )
262 OUString aAppendStr(
"...");
266 if (pItem->
maFormatText.getLength() > aAppendStr.getLength())
272 while ( (aSize.
Width()+4 >= nMaxWidth) && (pItem->
maFormatText.getLength() > aAppendStr.getLength()) );
273 if ( aSize.
Width()+4 >= nMaxWidth )
295 static std::deque<size_t>
GetEndOfLineIndexes(
const std::vector<sal_Int32>& rWidthsOf, sal_Int32 nLineWidth)
299 size_t nWidthsCount = rWidthsOf.size();
300 std::vector<sal_Int32> aCosts(nWidthsCount * nWidthsCount);
304 for (
size_t i = 0;
i < nWidthsCount; ++
i)
306 for (
size_t j = 0; j < nWidthsCount; ++j)
311 for (
size_t k =
i; k <= j; ++k)
314 aCosts[j * nWidthsCount +
i] = c;
323 std::vector<sal_Int32> aFunction(nWidthsCount);
324 std::vector<sal_Int32> aWrapPoints(nWidthsCount);
327 for (
size_t j = 0; j < nWidthsCount; ++j)
329 aFunction[j] = aCosts[j * nWidthsCount];
332 for (
size_t k = 0; k < j; ++k)
338 s = aFunction[k] + aCosts[j * nWidthsCount + k + 1];
339 if (aFunction[j] > s)
342 aWrapPoints[j] = k + 1;
348 std::deque<size_t> aSolution;
355 size_t j = nWidthsCount - 1;
358 aSolution.push_front(j);
361 j = aWrapPoints[j] - 1;
373 int nRightSpace = nMaxWidth;
374 for (
auto const& item : pTabCtrlData->
maItemList)
376 if (!item.m_bVisible)
378 nRightSpace -= item.maRect.GetWidth();
384 if (!item.m_bVisible)
386 item.maRect.AdjustLeft(nRightSpace);
387 item.maRect.AdjustRight(nRightSpace);
407 std::vector<sal_Int32> aWidths;
410 if (!item.m_bVisible)
421 sal_uInt16 nLines = 0;
422 sal_uInt16 nCurLine = 0;
425 sal_uInt16 nLinePosAry[101];
426 nLineWidthAry[0] = 0;
433 if (!item.m_bVisible)
438 bool bNewLine =
false;
439 if (!aBreakIndexes.empty() &&
nIndex > aBreakIndexes.front())
441 aBreakIndexes.pop_front();
445 if ( bNewLine && (nWidth > 2+nOffsetX) )
453 nLineWidthAry[nLines] = 0;
454 nLinePosAry[nLines] =
nIndex;
460 item.maRect = aNewRect;
461 item.mnLine = nLines;
462 item.mbFullVisible =
true;
464 nLineWidthAry[nLines] += aSize.
Width();
479 if (!item.m_bVisible)
481 nIH = item.maRect.Bottom() - 1;
485 for ( sal_uInt16
i = 0;
i < nLines+1;
i++ )
488 nLineHeightAry[
i] = nIH*(nLines-(nCurLine-
i));
490 nLineHeightAry[
i] = nIH*(
i-nCurLine-1);
493 nLinePosAry[nLines+1] =
static_cast<sal_uInt16
>(
mpTabCtrlData->maItemList.size());
504 if (!item.m_bVisible)
507 if (
i == nLinePosAry[
n] )
513 if( nLinePosAry[
n+1]-
i > 0 )
515 nDX = ( nWidth - nOffsetX - nLineWidthAry[
n] ) / ( nLinePosAry[
n+1] -
i );
516 nModDX = ( nWidth - nOffsetX - nLineWidthAry[
n] ) % ( nLinePosAry[
n+1] -
i );
527 item.maRect.AdjustLeft(nIDX );
528 item.maRect.AdjustRight(nIDX + nDX );
529 item.maRect.SetTop( nLineHeightAry[
n-1] );
530 item.maRect.SetBottom(nLineHeightAry[
n-1] + nIH - 1);
536 item.maRect.AdjustRight( 1 );
553 nWidth = aWinSize.
Width();
555 nHeight = aWinSize.
Height();
561 return (nW > 0 && nH > 0)
585 return (nW > 0 && nH > 0)
597 if ((nWidth <= 1) || (nHeight <= 0) || !pItem || !pItem->
m_bVisible)
633 if ( !pOldItem || !pItem || (pOldItem->
mnLine != pItem->
mnLine) )
654 if ( pOldPage == pPage )
758 Size aImageSize( 0, 0 );
792 aRect.
SetTop( nYPos - 2 );
800 bool bFirstInGroup,
bool bLastInGroup )
809 bool bLeftBorder =
true;
810 bool bRightBorder =
true;
812 bool bNativeOK =
false;
814 sal_uInt16 nOff2 = 0;
815 sal_uInt16 nOff3 = 0;
833 if (aLeftTestPos.
Y() == rCurRect.
Bottom())
836 if (rCurRect.
Contains(aLeftTestPos))
839 if (rCurRect.
Contains(aRightTestPos))
840 bRightBorder =
false;
844 if (rCurRect.
Contains(aLeftTestPos))
846 if (rCurRect.
Contains(aRightTestPos))
866 if ((&item != pItem) && item.m_bVisible && item.maRect.Contains(
GetPointerPosPixel()))
893 aCtrlRegion,
nState, tiValue, OUString() );
905 Point(aRect.
Left() - nOff2, nLeftBottom - 1));
914 Point(aRect.
Right() + nOff2 - 2, nRightBottom - 1));
918 Point(aRect.
Right() + nOff2 - 1, nRightBottom - 1));
929 Point(aRect.
Left() - nOff2, nLeftBottom - 1));
936 Point(aRect.
Right() + nOff2 - 1, nRightBottom - 1));
948 Size aImageSize(0, 0);
975 nXPos + aImageSize.
Width() + nTextWidth, nYPos + nTextHeight);
998 sal_uInt16 nKeyCode = aKeyCode.
GetCode();
1026 SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectedEntryPos() ) );
1034 if ( !IsWindowOrChild( rEvent.GetWindow() ) )
1037 ImplHandleKeyEvent( *pKeyEvent );
1059 sal_uInt16 nKeyCode = aKeyCode.
GetCode();
1116 bool bNoTabPage =
false;
1118 if (!pCurPage || !pCurPage->
IsVisible())
1136 if (!item.m_bVisible)
1138 nRight = std::max(nRight, item.maRect.Right());
1139 nLeft = std::min(nLeft, item.maRect.Left());
1145 if (bPaneWithHeader)
1158 aRect,
nState, aTabPaneValue, OUString());
1163 aHeaderRect,
nState, aTabPaneValue, OUString());
1174 aCurRect = pCurItem->
maRect;
1228 pLastTab = pFirstTab +
mpTabCtrlData->maItemList.size() - 1;
1234 pFirstTab = pLastTab +
mpTabCtrlData->maItemList.size() - 1;
1238 while (idx < mpTabCtrlData->maItemList.size())
1243 ImplDrawItem(rRenderContext, pItem, aCurRect, pItem == pFirstTab, pItem == pLastTab);
1252 ImplDrawItem(rRenderContext, pCurItem, aCurRect, pCurItem == pFirstTab, pCurItem == pLastTab);
1271 if( nPrefWidth > aTabCtrlSize.
Width() )
1272 nPrefWidth = aTabCtrlSize.
Width();
1274 Point aNewPos( (aTabCtrlSize.
Width() - nPrefWidth) / 2, 0 );
1275 mpTabCtrlData->mpListBox->SetPosSizePixel( aNewPos, aNewSize );
1284 Size aNewSize = rAllocation;
1288 if (!item.m_bVisible)
1290 if (!item.mbFullVisible || (item.maRect.Right()-2 >= nNewWidth))
1323 Window::SetPosSizePixel(rNewPos, rNewSize);
1331 Window::SetSizePixel(rNewSize);
1339 Window::SetPosPixel(rPos);
1395 if ( !
aStr.isEmpty() )
1413 const OUString& rStr = pItem->
maText;
1423 if ( !rStr.isEmpty() )
1437 const OUString& rHelpText = pItem->
maHelpText;
1438 if (!rHelpText.isEmpty())
1480 aMenu->CheckItem(item.id());
1481 aMenu->SetHelpId(item.id(), {});
1484 sal_uInt16
nId = aMenu->Execute(
this, aMenuPos );
1547 if (item.m_bVisible && item.maRect.Contains(rPt))
1555 assert(nFound <= 1);
1556 return nFound == 1 ? pFoundItem :
nullptr;
1583 aClipRgn.
Union( aRect );
1595 aClipRgn.
Union( aRect );
1630 Size aNewSize( rSize );
1635 Window::SetOutputSizePixel( aNewSize );
1643 "TabControl::InsertPage(): PageId already exists" );
1656 std::vector< ImplTabItem >::iterator new_it =
1696 std::vector< ImplTabItem >::iterator it =
mpTabCtrlData->maItemList.begin() +
nPos;
1706 if ( bIsCurrentPage )
1735 if (!pItem || pItem->
m_bEnabled == i_bEnable)
1779 return static_cast<sal_uInt16
>(
mpTabCtrlData->maItemList.size());
1791 sal_uInt16
nPos = 0;
1806 const auto it = std::find_if(rList.begin(), rList.end(), [&rPos, &winSize,
this](
const auto &item) {
1807 return const_cast<TabControl*>(this)->ImplGetTabRect(&item, winSize.Width(), winSize.Height()).Contains(rPos); });
1808 return (it != rList.end()) ? it->id() : 0;
1814 const auto it = std::find_if(rList.begin(), rList.end(), [&rName](
const auto &item) {
1815 return item.maTabName == rName; });
1816 return (it != rList.end()) ? it->id() : 0;
1921 if ( !pItem || pItem->
maText == rText )
2038 Size aOptimalPageSize(0, 0);
2043 const TabPage *pPage = item.mpTabPage;
2051 pPage = item.mpTabPage;
2059 if (aPageSize.
Width() > aOptimalPageSize.
Width())
2075 tools::Long nTabLabelsBottom = 0, nTabLabelsRight = 0;
2078 for (sal_uInt16
nPos(0), sizeList(
static_cast <sal_uInt16
> (
mpTabCtrlData->maItemList.size()));
2084 if (aTabRect.
Bottom() > nTabLabelsBottom)
2086 nTabLabelsBottom = aTabRect.
Bottom();
2087 nHeaderHeight = nTabLabelsBottom;
2089 if (!aTabRect.
IsEmpty() && aTabRect.
Right() > nTabLabelsRight)
2090 nTabLabelsRight = aTabRect.
Right();
2094 Size aOptimalSize(aOptimalPageSize);
2096 aOptimalSize.
setWidth( std::max(nTabLabelsRight, aOptimalSize.
Width()) );
2101 return aOptimalSize;
2106 sal_uInt16 nHeaderHeight;
2118 Window::queue_resize(eReason);
2123 std::vector<sal_uInt16> aIDs;
2126 aIDs.push_back(item.id());
2134 if (rKey ==
"show-tabs")
2152 rJsonWriter.
put(
"type",
"tabcontrol");
2156 auto childrenNode = rJsonWriter.
startArray(
"children");
2167 rJsonWriter.
put(
"hidden",
true);
2172 auto tabsNode = rJsonWriter.
startArray(
"tabs");
2177 rJsonWriter.
put(
"id",
id);
2183sal_uInt16 NotebookbarTabControlBase::m_nHeaderHeight = 0;
2187 m_aIconClickHdl.Call(
static_cast<NotebookBar*
>(GetParent()->GetParent()));
2190NotebookbarTabControlBase::NotebookbarTabControlBase(
vcl::Window* pParent)
2192 , bLastContextWasSupported(true)
2193 , eLastContext(
vcl::EnumContext::Context::
Any)
2196 m_pOpenMenu->SetClickHdl(
LINK(
this, NotebookbarTabControlBase, OpenMenu));
2198 m_pOpenMenu->SetSizePixel(m_pOpenMenu->GetOptimalSize());
2199 m_pOpenMenu->Show();
2202NotebookbarTabControlBase::~NotebookbarTabControlBase()
2209 if (eLastContext == eContext)
2212 bool bHandled =
false;
2214 TabPage* pPage = GetTabPage(mnCurPageId);
2222 for (
int nChild = 0; nChild < GetPageCount(); ++nChild)
2225 pPage = GetTabPage(nPageId);
2234 && pPage->HasContext(eContext))
2238 bLastContextWasSupported =
true;
2241 if (!bHandled && bLastContextWasSupported
2249 bLastContextWasSupported =
false;
2250 eLastContext = eContext;
2258void NotebookbarTabControlBase::dispose()
2260 m_pShortcuts.disposeAndClear();
2261 m_pOpenMenu.disposeAndClear();
2265void NotebookbarTabControlBase::SetToolBox(
ToolBox* pToolBox )
2267 m_pShortcuts.set( pToolBox );
2272 m_aIconClickHdl = aHdl;
2282void NotebookbarTabControlBase::ImplActivateTabPage(
bool bNext )
2284 const sal_uInt16 nOldPos = GetPagePos(GetCurPageId());
2285 bool bFound =
false;
2286 sal_Int32 nCurPos = nOldPos;
2290 for (nCurPos++; nCurPos < GetPageCount(); nCurPos++)
2296 for (nCurPos--; nCurPos >= 0; nCurPos--)
2306sal_uInt16 NotebookbarTabControlBase::GetHeaderHeight()
2308 return m_nHeaderHeight;
2311bool NotebookbarTabControlBase::ImplPlaceTabs(
tools::Long nWidth )
2315 if ( mpTabCtrlData->maItemList.empty() )
2317 if (!m_pOpenMenu || m_pOpenMenu->isDisposed())
2320 const tools::Long nHamburgerWidth = m_pOpenMenu->GetSizePixel().Width();
2322 tools::Long nShortcutsWidth = m_pShortcuts !=
nullptr ? m_pShortcuts->GetSizePixel().getWidth() + 1 : 0;
2331 for (
auto & item : mpTabCtrlData->maItemList)
2334 if (item.m_bVisible)
2336 nTabWidth = ImplGetItemSize(&item, nMaxWidth).getWidth();
2337 if (!item.maText.isEmpty() && nTabWidth < 100)
2340 nFullWidth += nTabWidth;
2347 nLineWidthAry[0] = 0;
2349 for (
auto & item : mpTabCtrlData->maItemList)
2351 if (!item.m_bVisible)
2354 Size aSize = ImplGetItemSize( &item, nMaxWidth );
2357 if( nFullWidth < nMaxWidth && !item.maText.isEmpty() && aSize.
getWidth() < 100)
2360 if( !item.maText.isEmpty() && aSize.
getHeight() < 28 )
2364 if ( mbSmallInvalidate && (item.maRect != aNewRect) )
2365 mbSmallInvalidate =
false;
2367 item.maRect = aNewRect;
2369 item.mbFullVisible =
true;
2371 nLineWidthAry[0] += aSize.
Width();
2372 nX += aSize.
Width();
2381 tools::Long nPosY = (m_nHeaderHeight - m_pShortcuts->GetSizePixel().getHeight()) / 2;
2382 m_pShortcuts->SetPosPixel(
Point(0, nPosY));
2385 tools::Long nPosY = (m_nHeaderHeight - m_pOpenMenu->GetSizePixel().getHeight()) / 2;
2387 m_pOpenMenu->SetPosPixel(
Point(nWidth - nHamburgerWidth, nPosY));
2392Size NotebookbarTabControlBase::calculateRequisition()
const
2397Control* NotebookbarTabControlBase::GetOpenMenu()
static bool toBool(std::string_view rValue)
const StyleSettings & GetStyleSettings() const
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
bool IsMouseEvent() const
tools::Rectangle DrawControlText(OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, std::vector< tools::Rectangle > *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
draws the given text onto the given device
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void StateChanged(StateChangedType nStateChange) override
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
HelpEventMode GetMode() const
bool KeyboardActivated() const
const Point & GetMousePosPixel() const
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
static void ShowBalloon(vcl::Window *pParent, const Point &rScreenPos, const tools::Rectangle &, const OUString &rHelpText)
Size GetSizePixel() const
ImplTabItem(sal_uInt16 nId)
OUString maAccessibleName
bool m_bVisible
the tab / page can be visible
VclPtr< TabPage > mpTabPage
bool m_bEnabled
the tab / page is selectable
OUString maAccessibleDescription
const vcl::KeyCode & GetKeyCode() const
A widget used to choose from a list of items and which has no entry.
bool IsEnterWindow() const
bool IsLeaveWindow() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
bool IsModifierChanged() const
This implements Widget Layout-based notebook-like menu bar.
const KeyEvent * GetKeyEvent() const
const MouseEvent * GetMouseEvent() const
NotifyEventType GetType() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual vcl::Region GetActiveClipRegion() const
tools::Long GetCtrlTextWidth(const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rNewFont)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetTextColor(const Color &rColor)
void DrawPixel(const Point &rPt)
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
const Color & GetTextColor() const
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
const AllSettings & GetSettings() const
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
A construction helper for ScopedVclPtr.
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetDarkShadowColor() const
const Color & GetShadowColor() const
StyleSettingsOptions GetOptions() const
const Color & GetTabRolloverTextColor() const
const Color & GetTabTextColor() const
const vcl::Font & GetTabFont() const
const Color & GetLightColor() const
const Color & GetDialogColor() const
const Color & GetTabHighlightTextColor() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
sal_uInt16 GetPageCount() const
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual Size calculateRequisition() const
virtual void RequestHelp(const HelpEvent &rHEvt) override
tools::Rectangle GetTabBounds(sal_uInt16 nPageId) const
SAL_DLLPRIVATE Size ImplGetItemSize(ImplTabItem *pItem, tools::Long nMaxWidth)
virtual void GetFocus() override
Link< TabControl *, bool > maDeactivateHdl
void setAllocation(const Size &rAllocation)
std::vector< sal_uInt16 > GetPageIDs() const
virtual void StateChanged(StateChangedType nType) override
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const override
TabControl(vcl::Window *pParent, WinBits nStyle=WB_STDTABCONTROL)
void SetAccessibleDescription(sal_uInt16 nItemId, const OUString &rStr)
void SetTabPage(sal_uInt16 nPageId, TabPage *pPage)
virtual ~TabControl() override
SAL_DLLPRIVATE void ImplChangeTabPage(sal_uInt16 nId, sal_uInt16 nOldId)
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const override
virtual bool set_property(const OUString &rKey, const OUString &rValue) override
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize) override
void SetAccessibleName(sal_uInt16 nItemId, const OUString &rStr)
std::unique_ptr< ImplTabCtrlData > mpTabCtrlData
virtual void SetSizePixel(const Size &rNewSize) override
virtual void Resize() override
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
void SetPageVisible(sal_uInt16 nPageId, bool bVisible=true)
OUString GetPageName(sal_uInt16 nPageId) const
SAL_DLLPRIVATE tools::Rectangle ImplGetTabRect(sal_uInt16 nPos, tools::Long nWidth=-1, tools::Long nHeight=-1)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
SAL_DLLPRIVATE Size ImplCalculateRequisition(sal_uInt16 &nHeaderHeight) const
void SetPageName(sal_uInt16 nPageId, const OUString &rName) const
TabPage * GetTabPage(sal_uInt16 nPageId) const
virtual void ImplActivateTabPage(bool bNext)
void SetPageEnabled(sal_uInt16 nPageId, bool bEnable=true)
void SetCurPageId(sal_uInt16 nPageId)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void SetTabPageSizePixel(const Size &rSize)
virtual void SetPosPixel(const Point &rPos) override
virtual void LoseFocus() override
SAL_DLLPRIVATE bool ImplPosCurTabPage()
virtual Size GetOptimalSize() const override
void SelectTabPage(sal_uInt16 nPageId)
virtual void KeyInput(const KeyEvent &rKEvt) override
void SetPageImage(sal_uInt16 nPageId, const Image &rImage)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent &rKeyEvent)
void InsertPage(sal_uInt16 nPageId, const OUString &rText, sal_uInt16 nPos=TAB_APPEND)
sal_uInt16 GetCurPageId() const
SAL_DLLPRIVATE ImplTabItem * ImplGetItem(sal_uInt16 nId) const
OUString const & GetPageText(sal_uInt16 nPageId) const
virtual bool ImplPlaceTabs(tools::Long nWidth)
sal_uInt16 GetPageId(sal_uInt16 nPos) const
SAL_DLLPRIVATE void ImplShowFocus()
void SetHelpText(sal_uInt16 nPageId, const OUString &rText)
virtual void Command(const CommandEvent &rCEvt) override
Link< TabControl *, void > maActivateHdl
void SetPageText(sal_uInt16 nPageId, const OUString &rText)
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual FactoryFunction GetUITestFactory() const override
virtual void DumpAsPropertyTree(tools::JsonWriter &) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
SAL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext &rRenderContext, ImplTabItem const *pItem, const tools::Rectangle &rCurRect, bool bFirstInGroup, bool bLastInGroup)
void RemovePage(sal_uInt16 nPageId)
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize) override
static Size getLayoutRequisition(const vcl::Window &rWindow)
reference_type * get() const
Get the body.
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
void SetTransparent(bool bTransparent)
sal_uInt16 GetCode() const
void Intersect(const tools::Rectangle &rRegion)
void Union(const tools::Rectangle &rRegion)
Point OutputToScreenPixel(const Point &rPos) const
const Wallpaper & GetBackground() const
void SetFont(const vcl::Font &rNewFont)
void SetInputContext(const InputContext &rInputContext)
bool IsReallyVisible() const
vcl::Window * GetParent() const
virtual void RequestHelp(const HelpEvent &rHEvt)
SAL_DLLPRIVATE vcl::Window * ImplGetDlgWindow(sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart=0, sal_uInt16 nEnd=0xFFFF, sal_uInt16 *pIndex=nullptr)
bool HasChildPathFocus(bool bSystemWindow=false) const
Point LogicToPixel(const Point &rLogicPt) const
const OUString & get_id() const
Get the ID of the window.
virtual void Command(const CommandEvent &rCEvt)
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
bool IsUpdateMode() const
bool IsChildTransparentModeEnabled() const
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
Point GetLastPointerPosPixel()
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
const AllSettings & GetSettings() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
virtual void KeyInput(const KeyEvent &rKEvt)
bool IsReallyShown() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
const OUString & GetHelpId() const
virtual bool PreNotify(NotifyEvent &rNEvt)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
::OutputDevice const * GetOutDev() const
const vcl::Font & GetFont() const
SAL_DLLPRIVATE WindowImpl * ImplGetWindowImpl() const
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual void ShowFocus(const tools::Rectangle &rRect)
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
bool IsControlBackground() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
Point GetPointerPosPixel()
const Color & GetControlBackground() const
OUString GetAccessibleName() const
void SetPaintTransparent(bool bTransparent)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
bool IsDefaultSize() const
virtual bool set_property(const OUString &rKey, const OUString &rValue)
Point ScreenToOutputPixel(const Point &rPos) const
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
OUString GetAccessibleDescription() const
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
const OUString & GetHelpText() const
void EnableChildTransparentMode(bool bEnable=true)
void SetHelpId(const OUString &)
SAL_DLLPRIVATE void ImplControlFocus(GetFocusFlags nFlags=GetFocusFlags::NONE)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
virtual void SetCurPageId(const OUString &rName) override
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_PAGEUP
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
@ DrawDisabled
this flags lets the item be drawn disabled (e.g.
@ DisableSelection
this flag disables a selection of an entry completely.
static std::deque< size_t > GetEndOfLineIndexes(const std::vector< sal_Int32 > &rWidthsOf, sal_Int32 nLineWidth)
VclPtr< ListBox > mpListBox
std::vector< ImplTabItem > maItemList
ImplSVData * ImplGetSVData()
#define TAB_ITEM_OFFSET_X
Space to the left and right of the tabitem.
IMPL_LINK_NOARG(TabControl, ImplListBoxSelectHdl, ListBox &, void)
static bool lcl_canPaint(const vcl::RenderContext &rRenderContext, const tools::Rectangle &rDrawRect, const tools::Rectangle &rItemRect)
IMPL_LINK(TabControl, ImplWindowEventListener, VclWindowEvent &, rEvent, void)
static bool lcl_isValidPage(const ImplTabItem &rItem, bool &bFound)
static void lcl_AdjustSingleLineTabs(tools::Long nMaxWidth, ImplTabCtrlData *pTabCtrlData)
#define TAB_ITEM_OFFSET_Y
Space to the top and bottom of the tabitem.
#define TAB_BORDER_BOTTOM
#define TAB_PAGE_NOTFOUND
OUString removeMnemonicFromString(OUString const &rStr)
@ NoChildren
The child windows are not invalidated.
WinBits const WB_DIALOGCONTROL
WinBits const WB_DROPDOWN
WinBits const WB_STDTABCONTROL
WinBits const WB_NOTABSTOP
WinBits const WB_NODIALOGCONTROL
WinBits const WB_NOBORDER