24#define GROUP_BORDER 12
25#define GROUP_TEXT_BORDER 2
27#define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
31 nStyle = ImplInitStyle( nStyle );
33 SetMouseTransparent(
true );
34 ImplInitSettings(
true );
54void GroupBox::ImplInitSettings(
bool bBackground )
64 !IsControlBackground())
66 EnableChildTransparentMode();
68 SetPaintTransparent(
true );
73 EnableChildTransparentMode(
false );
75 SetPaintTransparent(
false );
77 if ( IsControlBackground() )
78 SetBackground( GetControlBackground() );
87 ImplInit( pParent, nStyle );
91 const Point& rPos,
const Size& rSize,
bool bLayout )
95 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
96 OUString aText( GetText() );
120 aRect = pDev->
GetTextRect( aRect, aText, nTextStyle );
122 nTop += aRect.GetHeight() / 2;
163 std::vector< tools::Rectangle >* pVector = bLayout ? &mxLayoutData->m_aUnicodeBoundRects :
nullptr;
164 OUString* pDisplayText = bLayout ? &mxLayoutData->m_aDisplayText :
nullptr;
165 DrawControlText( *pDev, aRect, aText, nTextStyle, pVector, pDisplayText );
168void GroupBox::FillLayoutData()
const
170 mxLayoutData.emplace();
183 Size aSize = GetSizePixel();
184 vcl::Font aFont = GetDrawPixelFont( pDev );
195 ImplDraw( pDev, nFlags, aPos, aSize );
199void GroupBox::Resize()
213 if ( IsUpdateMode() )
218 SetStyle( ImplInitStyle( GetStyle() ) );
226 ImplInitSettings(
false );
231 ImplInitSettings(
false );
236 ImplInitSettings(
true );
250 ImplInitSettings(
true );
virtual void StateChanged(StateChangedType nStateChange) override
virtual void Resize() override
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void SetFont(const vcl::Font &rNewFont)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetTextColor(const Color &rColor)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
OutDevType GetOutDevType() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetGroupTextColor() const
const Color & GetShadowColor() const
StyleSettingsOptions GetOptions() const
const vcl::Font & GetGroupFont() const
const Color & GetLightColor() const
const Wallpaper & GetBackground() const
bool IsChildTransparentModeEnabled() const
virtual void DataChanged(const DataChangedEvent &rDCEvt)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
#define GROUP_TEXT_BORDER
Color GetTextColor(Color const &rColor, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
WinBits const WB_CLIPCHILDREN