30 #include <com/sun/star/i18n/Weekdays.hpp>
31 #include <com/sun/star/i18n/CalendarDisplayIndex.hpp>
32 #include <com/sun/star/i18n/CalendarFieldIndex.hpp>
37 #include <strings.hrc>
42 #define MONTH_BORDERX 4
44 #define WEEKDAY_OFFY 3
46 #define TITLE_BORDERY 2
48 #define SPIN_OFFY TITLE_BORDERY
50 #define CALENDAR_HITTEST_DAY (sal_uInt16(0x0001))
51 #define CALENDAR_HITTEST_MONTHTITLE (sal_uInt16(0x0004))
52 #define CALENDAR_HITTEST_PREV (sal_uInt16(0x0008))
53 #define CALENDAR_HITTEST_NEXT (sal_uInt16(0x0010))
55 #define MENU_YEAR_COUNT 3
62 pTable->insert( rDate.
GetDate() );
64 pTable->erase( rDate.
GetDate() );
84 OUString aGregorian(
"gregorian");
89 SAL_WARN(
"vcl.control",
"Calendar::ImplInit: No ``gregorian'' calendar available for locale ``"
91 <<
"'' and other calendars aren't supported. Using en-US fallback." );
108 for (sal_Int32
i = 0;
i < 31; ++
i)
135 maOldFormatFirstDate( 0, 0, 1900 ),
136 maOldFormatLastDate( 0, 0, 1900 ),
137 maFirstDate( 0, 0, 1900 ),
138 maOldFirstDate( 0, 0, 1900 ),
139 maCurDate(
Date::SYSTEM ),
140 maOldCurDate( 0, 0, 1900 )
164 case i18n::Weekdays::SUNDAY :
167 case i18n::Weekdays::MONDAY :
170 case i18n::Weekdays::TUESDAY :
173 case i18n::Weekdays::WEDNESDAY :
176 case i18n::Weekdays::THURSDAY :
179 case i18n::Weekdays::FRIDAY :
182 case i18n::Weekdays::SATURDAY :
186 SAL_WARN(
"vcl.control",
"Calendar::ImplGetWeekStart: broken i18n Gregorian calendar (getFirstDayOfWeek())");
201 if ( (aOutSize.
Width() <= 1) || (aOutSize.
Height() <= 1) )
245 for ( sal_Int16 nDayOfWeek = 0; nDayOfWeek < 7; nDayOfWeek++ )
249 i18n::CalendarDisplayIndex::DAY, nDay, 2));
272 nWeekDay =
static_cast<sal_uInt16
>(aTempDate.
GetDayOfWeek());
273 nWeekDay = (nWeekDay+(7-
static_cast<sal_uInt16
>(eStartDay))) % 7;
276 sal_uInt16 nDaysInMonth;
278 for ( sal_uInt16
i = 0;
i < nMonthCount;
i++ )
282 aTempDate.
AddDays( nDaysInMonth );
284 Date aTempDate2 = aTempDate;
287 aTempDate2.
AddDays( -(nDaysInMonth-1) );
288 nWeekDay =
static_cast<sal_uInt16
>(aTempDate2.
GetDayOfWeek());
289 nWeekDay = (nWeekDay+(7-
static_cast<sal_uInt16
>(eStartDay))) % 7;
354 if ( (rPos.X() < nX) && (rPos.Y() < nYMonth) )
360 if ( (rPos.X() > nX) && (rPos.Y() < nYMonth) &&
369 if ( rPos.Y() < nDayY )
371 sal_Int32 nDayIndex =
static_cast<sal_Int32
>(rDate.
GetDayOfWeek());
372 nDayIndex = (nDayIndex+(7-
static_cast<sal_Int32
>(eStartDay))) % 7;
373 if ( (
i == 0) && (j == 0) )
375 Date aTempDate = rDate;
376 aTempDate.
AddDays( -nDayIndex );
377 for ( nDay = 0; nDay < nDayIndex; nDay++ )
380 if ( (rPos.Y() >= nDayY) && (rPos.Y() < nDayY+
mnDayHeight) &&
381 (rPos.X() >= nOffX) && (rPos.X() < nOffX+
mnDayWidth) )
389 for ( nDay = 1; nDay <= nDaysInMonth; nDay++ )
391 if ( rPos.Y() < nDayY )
397 if ( (rPos.Y() >= nDayY) && (rPos.Y() < nDayY+
mnDayHeight) &&
398 (rPos.X() >= nOffX) && (rPos.X() < nOffX+
mnDayWidth) )
403 if ( nDayIndex == 6 )
411 if ( (
i == mnLines-1) && (j == mnMonthPerLine-1) )
413 sal_uInt16 nWeekDay =
static_cast<sal_uInt16
>(rDate.
GetDayOfWeek());
414 nWeekDay = (nWeekDay+(7-
static_cast<sal_uInt16
>(eStartDay))) % 7;
415 sal_Int32 nDayCount = 42-nDaysInMonth-nWeekDay;
416 Date aTempDate = rDate;
417 aTempDate.
AddDays( nDaysInMonth );
418 for ( nDay = 1; nDay <= nDayCount; nDay++ )
420 if ( rPos.Y() < nDayY )
426 if ( (rPos.Y() >= nDayY) && (rPos.Y() < nDayY+
mnDayHeight) &&
427 (rPos.X() >= nOffX) && (rPos.X() < nOffX+
mnDayWidth) )
433 if ( nDayIndex == 6 )
465 if (nWidth < nHeight)
474 rRect.
Top() + (nHeight / 2) ),
479 aRect.AdjustRight(nLines );
483 for (i = 0; i < nLines; i++)
487 aRect.AdjustLeft( 1 );
488 aRect.AdjustRight( 1 );
492 aRect.AdjustLeft( -1 );
493 aRect.AdjustRight( -1 );
495 aRect.AdjustTop( -1 );
496 aRect.AdjustBottom( 1 );
512 ImplDrawSpinArrow(rRenderContext, aOutRect,
true);
518 ImplDrawSpinArrow(rRenderContext, aOutRect,
false);
523 sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear,
524 bool bOther, sal_Int32 nToday )
526 Color const * pTextColor =
nullptr;
582 if ((nDay == aTodayDate.
GetDay()) &&
583 (nMonth == aTodayDate.
GetMonth()) &&
584 (nYear == aTodayDate.
GetYear()))
625 rRenderContext.
DrawRect(aTitleRect);
626 Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top());
627 Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1);
628 Point aBottomRight1(aTitleRect.Right(), aTitleRect.Bottom());
629 Point aBottomRight2(aTitleRect.Right(), aTitleRect.Bottom() - 1);
631 rRenderContext.
DrawLine(aTopLeft1,
Point(aBottomRight1.X(), aTopLeft1.Y()));
633 rRenderContext.
DrawLine(aTopLeft2,
Point(aBottomRight2.X(), aTopLeft2.Y()));
634 rRenderContext.
DrawLine(aTopLeft2,
Point(aTopLeft2.X(), aBottomRight2.Y()));
636 rRenderContext.
DrawLine(
Point(aTopLeft2.X(), aBottomRight2.Y()), aBottomRight2);
637 rRenderContext.
DrawLine(
Point(aBottomRight2.X(), aTopLeft2.Y()), aBottomRight2);
639 rRenderContext.
DrawLine(
Point(aTopLeft1.X(), aBottomRight1.Y()), aBottomRight1);
645 aSepPos2.setX( aSepPos1.X() );
647 rRenderContext.
DrawLine(aSepPos1, aSepPos2);
648 aSepPos1.AdjustX( 1 );
649 aSepPos2.setX( aSepPos1.X() );
651 rRenderContext.
DrawLine(aSepPos1, aSepPos2);
665 + OUString::number(nYear);
673 if (j == mnMonthPerLine - 1)
677 if (nMonthTextWidth > nMaxMonthWidth)
682 + OUString::number(nYear);
683 nMonthTextWidth = rRenderContext.
GetTextWidth(aMonthText);
686 if (nTempOff < nMonthOffX1)
687 nDeltaX += nMonthOffX1 + 1;
690 if (nTempOff + nMonthTextWidth >
mnMonthWidth - nMonthOffX2)
691 nDeltaX +=
mnMonthWidth - nMonthOffX2 - nMonthTextWidth;
696 rRenderContext.
DrawText(
Point(nDeltaX, nDeltaY), aMonthText);
704 Point aStartPos(nDayX, nDeltaY);
712 sal_uInt16 nDayIndex =
static_cast<sal_uInt16
>(aDate.
GetDayOfWeek());
713 nDayIndex = (nDayIndex + (7 -
static_cast<sal_uInt16
>(eStartDay))) % 7;
714 if (i == 0 && j == 0)
716 Date aTempDate = aDate;
717 aTempDate.
AddDays( -nDayIndex );
718 for (nDay = 0; nDay < nDayIndex; ++nDay)
726 for (nDay = 1; nDay <= nDaysInMonth; nDay++)
729 ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay, nMonth, nYear,
739 if ((i == mnLines - 1) && (j == mnMonthPerLine - 1))
741 sal_uInt16 nWeekDay =
static_cast<sal_uInt16
>(aDate.
GetDayOfWeek());
742 nWeekDay = (nWeekDay + (7 -
static_cast<sal_uInt16
>(eStartDay))) % 7;
743 sal_uInt16 nDayCount = 42 - nDaysInMonth - nWeekDay;
744 Date aTempDate = aDate;
745 aTempDate.
AddDays( nDaysInMonth );
746 for (nDay = 1; nDay <= nDayCount; ++nDay)
789 for (
auto const& nKey : *pOld)
791 if ( pNew->find(nKey) == pNew->end() )
793 Date aTempDate(nKey);
798 for (
auto const& nKey : *pNew)
800 if ( pOld->find(nKey) == pOld->end() )
802 Date aTempDate(nKey);
812 Date aTempDate = rDate;
817 if ( !(nHitTest & CALENDAR_HITTEST_DAY) )
827 if ( (
maCurDate != aOldDate) || bNewSel )
832 if ( !bNewSel || pOldSel->find( aOldDate.
GetDate() ) == pOldSel->end() )
879 sal_uInt16 nMonthOff;
880 sal_uInt16 nCurItemId;
881 sal_uInt16 nYear = rDate.
GetYear()-1;
884 sal_uInt16 nYearIdCount = 1000;
896 for ( j = 1; j <= 12; j++ )
899 i18n::CalendarDisplayIndex::MONTH, j-1, 1));
900 aPopupMenu->
InsertItem( 10+i, OUString::number( nYear+i ) );
902 nYearIdCount += 1000;
906 nCurItemId = aPopupMenu->
Execute(
this, rPos );
912 sal_uInt16 nTempMonthOff = nMonthOff % 12;
913 sal_uInt16 nTempYearOff = nMonthOff / 12;
914 sal_uInt16 nNewMonth = nCurItemId % 1000;
915 sal_uInt16 nNewYear = nYear+((nCurItemId-1000)/1000);
916 if ( nTempMonthOff < nNewMonth )
917 nNewMonth = nNewMonth - nTempMonthOff;
921 nNewMonth = 12-(nTempMonthOff-nNewMonth);
923 nNewYear = nNewYear - nTempYearOff;
930 sal_uInt16 nHitTest =
ImplHitTest( rPos, aTempDate );
948 bool bSelection =
false;
969 if ( pOldSel->find( aOldDate.
GetDate() ) == pOldSel->end() )
1094 Date aTempDate = aNewDate;
1160 aDateRect.
SetTop( aPt.Y() );
1169 sal_uInt16 nMonth = aDate.
GetMonth();
1176 + OUString::number(nWeek);
1178 if ( (nMonth == 12) && (nWeek == 1) )
1180 aStr +=
", " + OUString::number(aDate.
GetNextYear());
1182 else if ( (nMonth == 1) && (nWeek > 50) )
1184 aStr +=
", " + OUString::number(aDate.
GetYear()-1);
1216 if ( nNotchDelta < 0 )
1218 while ( nNotchDelta < 0 )
1226 while ( nNotchDelta > 0 )
1273 Date aDate( 0, 0, 0 );
1300 if ( nDateOff < 365 )
1305 while ( nDateOff > aTempDate.GetDaysInMonth() )
1308 sal_Int32 nDaysInMonth = aTempDate.GetDaysInMonth();
1309 aTempDate.AddDays( nDaysInMonth );
1310 nDateOff -= nDaysInMonth;
1354 for ( sal_uInt16 i = 0; i < nMonthCount; i++ )
1391 sal_uInt16 nDayIndex;
1394 if ( rDate < aDate )
1397 nDaysOff = aDate-rDate;
1406 if ( rDate > aLastDate )
1408 sal_Int32 nWeekDay =
static_cast<sal_Int32
>(aLastDate.
GetDayOfWeek());
1410 aLastDate.
AddDays( -nWeekDay );
1412 nDaysOff = rDate-aLastDate;
1414 for ( sal_Int32 i = 0; i <= nDaysOff; i++ )
1416 if ( aLastDate == rDate )
1422 if ( nDayIndex == 6 )
1449 nDayIndex =
static_cast<sal_uInt16
>(aDate.
GetDayOfWeek());
1450 nDayIndex = (nDayIndex+(7-
static_cast<sal_uInt16
>(
ImplGetWeekStart()))) % 7;
1451 for ( sal_uInt16 nDay = 1; nDay <= nDaysInMonth; nDay++ )
1453 if ( nDay == rDate.
GetDay() )
1461 if ( nDayIndex == 6 )
1471 aDate.
AddDays( nDaysInMonth );
1518 class ImplCFieldFloat final
1521 std::unique_ptr<weld::Builder> mxBuilder;
1523 std::unique_ptr<weld::Calendar> mxCalendar;
1524 std::unique_ptr<weld::Button> mxTodayBtn;
1525 std::unique_ptr<weld::Button> mxNoneBtn;
1529 : mxBuilder(
Application::CreateInterimBuilder(pContainer,
"svt/ui/calendar.ui", false))
1530 , mxContainer(mxBuilder->weld_container(
"Calendar"))
1531 , mxCalendar(mxBuilder->weld_calendar(
"date"))
1532 , mxTodayBtn(mxBuilder->weld_button(
"today"))
1533 , mxNoneBtn(mxBuilder->weld_button(
"none"))
1543 mxCalendar->grab_focus();
1551 virtual void dispose()
override;
1560 :
DockingWindow(pParent,
"InterimDockParent",
"svx/ui/interimdockparent.ui")
1587 weld::Button* ImplCFieldFloat::EnableTodayBtn(
bool bEnable)
1590 return bEnable ? mxTodayBtn.get() :
nullptr;
1593 weld::Button* ImplCFieldFloat::EnableNoneBtn(
bool bEnable)
1596 return bEnable ? mxNoneBtn.get() :
nullptr;
1601 , mpFloatWin(nullptr)
1602 , mpTodayBtn(nullptr)
1603 , mpNoneBtn(nullptr)
1624 Date aNewDate = rCalendar.get_date();
1627 mpFloatWin->EnableDocking(
false);
1630 if ( IsEmptyDate() || ( aNewDate != GetDate() ) )
1632 SetDate( aNewDate );
1641 mpFloatWin->EnableDocking(
false);
1645 if (&rBtn == mpTodayBtn)
1648 if ( (aToday != GetDate()) || IsEmptyDate() )
1655 else if (&rBtn == mpNoneBtn)
1657 if ( !IsEmptyDate() )
1679 Date aDate = GetDate();
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
virtual Point GetPosPixel() const
#define LINK(Instance, Class, Member)
const Color & GetTextColor() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
const Color & GetShadowColor() const
sal_Int16 GetNextYear() const
const Wallpaper & GetBackground() const
void setDeferredProperties()
virtual void LoseFocus() override
tools::Rectangle maNextRect
DayOfWeek GetDayOfWeek() const
void ImplDraw(vcl::RenderContext &rRenderContext)
virtual void MouseButtonDown(const MouseEvent &rMEvt)
const Color & GetHighlightTextColor() const
std::unique_ptr< ContentProperties > pData
Edit * GetSubEdit() const
sal_Int16 getValue(sal_Int16 nFieldIndex) const
Link< Calendar *, void > maActivateHdl
sal_Int16 getFirstDayOfWeek() const
const StyleSettings & GetStyleSettings() const
virtual ~CalendarField() override
const Color & GetFaceColor() const
virtual ~Calendar() override
#define CALENDAR_HITTEST_PREV
void ImplUpdate(bool bCalcNew=false)
std::unique_ptr< IntDateSet > mpOldSelectTable
virtual void StateChanged(StateChangedType nStateChange) override
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
virtual Size GetSizePixel() const
void ImplUpdateDate(const Date &rDate)
void SetPopupModeEndHdl(const vcl::Window *pWindow, const Link< FloatingWindow *, void > &rLink)
#define CALENDAR_HITTEST_NEXT
sal_uInt16 GetCode() const
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
DataChangedEventType GetType() const
virtual void GetFocus() override
std::unique_ptr< ImplCFieldFloat > mxWidget
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
Size CalcWindowSizePixel() const
const CommandWheelData * GetWheelData() const
tools::Long mnWeekDayOffY
virtual void StateChanged(StateChangedType nStateChange) override
void ImplUpdateSelection(IntDateSet *pOld)
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
CalendarWrapper maCalendarWrapper
HelpEventMode GetMode() const
const Color & GetFieldTextColor() const
CalendarField(vcl::Window *pParent, WinBits nWinStyle)
constexpr sal_uInt16 KEY_UP
void DrawTextArray(const Point &rStartPt, const OUString &rStr, const tools::Long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
const Color & GetHighlightColor() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
bool IsTrackingRepeat() const
constexpr sal_uInt16 KEY_END
bool IsValidAndGregorian() const
tools::Long mnMonthHeight
A construction helper for ScopedVclPtr.
sal_uInt16 GetClicks() const
bool GetDate(const Point &rPos, Date &rDate) const
void ImplShowMenu(const Point &rPos, const Date &rDate)
tools::Rectangle GetDateRect(const Date &rDate) const
sal_uInt16 GetMonth() const
virtual void GetFocus() override
bool IsMouseEvent() const
AllSettingsFlags GetFlags() const
constexpr sal_uInt16 KEY_PAGEUP
sal_uInt16 ImplHitTest(const Point &rPos, Date &rDate) const
const Color & GetLightColor() const
void setGregorianDateTime(const DateTime &rDateTime)
sal_Int32 GetDate() const
virtual Size GetOptimalSize() const override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetDate(sal_Int32 nNewDate)
void DrawRect(const tools::Rectangle &rRect)
static void ImplCalendarSelectDate(IntDateSet *pTable, const Date &rDate, bool bSelect)
Date GetFirstMonth() const
virtual void set_date(const Date &rDate)=0
const Point & GetMousePosPixel() const
sal_Int16 GetYear() const
std::set< sal_Int32 > IntDateSet
constexpr sal_uInt16 KEY_DOWN
const Color & GetDarkShadowColor() const
OUString getUniqueID() const
sal_uInt16 GetDaysInMonth() const
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
virtual void Tracking(const TrackingEvent &rMEvt) override
virtual bool ShowDropDown(bool bShow) override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void ImplMouseSelect(const Date &rDate, sal_uInt16 nHitTest)
void SetDay(sal_uInt16 nNewDay)
void ImplScroll(bool bPrev)
const vcl::Font & GetToolFont() const
std::unique_ptr< IntDateSet > mpSelectTable
static const LocaleDataWrapper & GetAppLocaleDataWrapper()
Get the application's locale data wrapper.
tools::Rectangle maPrevRect
constexpr sal_uInt16 KEY_HOME
Calendar(vcl::Window *pParent, WinBits nWinStyle)
ImplCFieldFloatWin(vcl::Window *pParent)
tools::Long GetNotchDelta() const
CommandWheelMode GetMode() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
sal_uInt16 GetMonthCount() const
bool IsUpdateMode() const
tools::Long Width() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_GRAY
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const Color & GetFieldColor() const
CommandEventId GetCommand() const
void SetTextColor(const Color &rColor)
constexpr sal_uInt16 KEY_PAGEDOWN
virtual void Resize() override
sal_uInt16 GetDay() const
tools::Long mnMonthPerLine
void AddDays(sal_Int32 nAddDays)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
const AllSettings & GetSettings() const
Size GetOutputSizePixel() const
void ImplDrawSpin(vcl::RenderContext &rRenderContext)
Base class used mainly for the LibreOffice Desktop class.
const LanguageTag & getLanguageTag()
Reference< XComponentContext > getComponentContext(Reference< XMultiServiceFactory > const &factory)
bool IsRGBEqual(const Color &rColor) const
Point ScreenToOutputPixel(const Point &rPos) const
virtual void KeyInput(const KeyEvent &rKEvt) override
DayOfWeek ImplGetWeekStart() const
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
virtual void ShowFocus(const tools::Rectangle &rRect)
vcl::Window * GetParent() const
IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl, FloatingWindow *, void)
void SetCurDate(const Date &rNewDate)
bool IsTrackingEnded() const
void SetStyle(WinBits nStyle)
constexpr sal_uInt16 KEY_RETURN
OUString getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) const
constexpr sal_uInt16 KEY_RIGHT
void SetPointFont(vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
const Point & GetMousePosPixel() const
void ImplDrawDate(vcl::RenderContext &rRenderContext, tools::Long nX, tools::Long nY, sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear, bool bOther, sal_Int32 nToday)
virtual void KeyInput(const KeyEvent &rKEvt)
const LanguageTag & getLocale()
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
void ImplInit(WinBits nWinStyle)
VclPtr< ImplCFieldFloatWin > mpFloatWin
A construction helper for a temporary VclPtr.
const vcl::KeyCode & GetKeyCode() const
void EnableDocking(bool bEnable=true)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
virtual void Resize() override
const Color & GetButtonTextColor() const
Date GetLastMonth() const
void ImplTracking(const Point &rPos, bool bRepeat)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Date maOldFormatFirstDate
void ImplEndTracking(bool bCancel)
void SetFirstDate(const Date &rNewFirstDate)
tools::Long AdjustWidth(tools::Long n)
virtual void RequestHelp(const HelpEvent &rHEvt) override
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
tools::Long Height() const
Date GetFirstSelectedDate() const
const Point & GetPosPixel() const
void EndPopupMode(const vcl::Window *pWin)
tools::Long AdjustHeight(tools::Long n)
weld::Button * mpTodayBtn
Link< Calendar *, void > maSelectHdl
void setHeight(tools::Long nHeight)
virtual ~ImplCFieldFloatWin() override
void connect_activated(const Link< Calendar &, void > &rLink)
tools::Long mnDayOfWeekAry[7]
reference_type * get() const
Get the body.
void StartPopupMode(const vcl::Window *pWin, const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
#define SAL_WARN(area, stream)
bool IsTrackingCanceled() const
OUString VclResId(const char *pId)
#define CALENDAR_HITTEST_DAY
#define CALENDAR_HITTEST_MONTHTITLE
constexpr sal_uInt16 KEY_LEFT
Point OutputToScreenPixel(const Point &rPos) const
VclPtr< vcl::Window > mxBox
sal_uInt16 GetDayOfYear() const
IMPL_LINK(CalendarField, ImplSelectHdl, weld::Calendar &, rCalendar, void)
virtual void Command(const CommandEvent &rCEvt)
const MouseEvent & GetMouseEvent() const
bool IsReallyVisible() const
virtual void RequestHelp(const HelpEvent &rHEvt)
void loadCalendar(const OUString &rUniqueID, const css::lang::Locale &rLocale, bool bTimeZoneUTC=true)
const Color & GetWindowTextColor() const
virtual void StateChanged(StateChangedType nType) override
static DockingManager * GetDockingManager()
virtual void DataChanged(const DataChangedEvent &rDCEvt)
virtual void StateChanged(StateChangedType nStateChange) override
virtual void Command(const CommandEvent &rCEvt) override