31 #include <com/sun/star/i18n/Weekdays.hpp>
32 #include <com/sun/star/i18n/CalendarDisplayIndex.hpp>
33 #include <com/sun/star/i18n/CalendarFieldIndex.hpp>
38 #include <strings.hrc>
43 #define MONTH_BORDERX 4
45 #define WEEKDAY_OFFY 3
47 #define TITLE_BORDERY 2
49 #define SPIN_OFFY TITLE_BORDERY
51 #define CALENDAR_HITTEST_DAY (sal_uInt16(0x0001))
52 #define CALENDAR_HITTEST_MONTHTITLE (sal_uInt16(0x0004))
53 #define CALENDAR_HITTEST_PREV (sal_uInt16(0x0008))
54 #define CALENDAR_HITTEST_NEXT (sal_uInt16(0x0010))
56 #define MENU_YEAR_COUNT 3
63 pTable->insert( rDate.
GetDate() );
65 pTable->erase( rDate.
GetDate() );
85 OUString aGregorian(
"gregorian");
90 SAL_WARN(
"vcl.control",
"Calendar::ImplInit: No ``gregorian'' calendar available for locale ``"
92 <<
"'' and other calendars aren't supported. Using en-US fallback." );
109 for (sal_Int32
i = 0;
i < 31; ++
i)
136 maOldFormatFirstDate( 0, 0, 1900 ),
137 maOldFormatLastDate( 0, 0, 1900 ),
138 maFirstDate( 0, 0, 1900 ),
139 maOldFirstDate( 0, 0, 1900 ),
140 maCurDate(
Date::SYSTEM ),
141 maOldCurDate( 0, 0, 1900 )
165 case i18n::Weekdays::SUNDAY :
168 case i18n::Weekdays::MONDAY :
171 case i18n::Weekdays::TUESDAY :
174 case i18n::Weekdays::WEDNESDAY :
177 case i18n::Weekdays::THURSDAY :
180 case i18n::Weekdays::FRIDAY :
183 case i18n::Weekdays::SATURDAY :
187 SAL_WARN(
"vcl.control",
"Calendar::ImplGetWeekStart: broken i18n Gregorian calendar (getFirstDayOfWeek())");
202 if ( (aOutSize.
Width() <= 1) || (aOutSize.
Height() <= 1) )
246 for ( sal_Int16 nDayOfWeek = 0; nDayOfWeek < 7; nDayOfWeek++ )
250 i18n::CalendarDisplayIndex::DAY, nDay, 2));
273 nWeekDay =
static_cast<sal_uInt16
>(aTempDate.
GetDayOfWeek());
274 nWeekDay = (nWeekDay+(7-
static_cast<sal_uInt16
>(eStartDay))) % 7;
277 sal_uInt16 nDaysInMonth;
279 for ( sal_uInt16
i = 0;
i < nMonthCount;
i++ )
283 aTempDate.
AddDays( nDaysInMonth );
285 Date aTempDate2 = aTempDate;
288 aTempDate2.
AddDays( -(nDaysInMonth-1) );
289 nWeekDay =
static_cast<sal_uInt16
>(aTempDate2.
GetDayOfWeek());
290 nWeekDay = (nWeekDay+(7-
static_cast<sal_uInt16
>(eStartDay))) % 7;
355 if ( (rPos.X() < nX) && (rPos.Y() < nYMonth) )
361 if ( (rPos.X() > nX) && (rPos.Y() < nYMonth) &&
370 if ( rPos.Y() < nDayY )
372 sal_Int32 nDayIndex =
static_cast<sal_Int32
>(rDate.
GetDayOfWeek());
373 nDayIndex = (nDayIndex+(7-
static_cast<sal_Int32
>(eStartDay))) % 7;
374 if ( (
i == 0) && (j == 0) )
376 Date aTempDate = rDate;
377 aTempDate.
AddDays( -nDayIndex );
378 for ( nDay = 0; nDay < nDayIndex; nDay++ )
381 if ( (rPos.Y() >= nDayY) && (rPos.Y() < nDayY+
mnDayHeight) &&
382 (rPos.X() >= nOffX) && (rPos.X() < nOffX+
mnDayWidth) )
390 for ( nDay = 1; nDay <= nDaysInMonth; nDay++ )
392 if ( rPos.Y() < nDayY )
398 if ( (rPos.Y() >= nDayY) && (rPos.Y() < nDayY+
mnDayHeight) &&
399 (rPos.X() >= nOffX) && (rPos.X() < nOffX+
mnDayWidth) )
404 if ( nDayIndex == 6 )
412 if ( (
i == mnLines-1) && (j == mnMonthPerLine-1) )
414 sal_uInt16 nWeekDay =
static_cast<sal_uInt16
>(rDate.
GetDayOfWeek());
415 nWeekDay = (nWeekDay+(7-
static_cast<sal_uInt16
>(eStartDay))) % 7;
416 sal_Int32 nDayCount = 42-nDaysInMonth-nWeekDay;
417 Date aTempDate = rDate;
418 aTempDate.
AddDays( nDaysInMonth );
419 for ( nDay = 1; nDay <= nDayCount; nDay++ )
421 if ( rPos.Y() < nDayY )
427 if ( (rPos.Y() >= nDayY) && (rPos.Y() < nDayY+
mnDayHeight) &&
428 (rPos.X() >= nOffX) && (rPos.X() < nOffX+
mnDayWidth) )
434 if ( nDayIndex == 6 )
466 if (nWidth < nHeight)
475 rRect.
Top() + (nHeight / 2) ),
480 aRect.AdjustRight(nLines );
484 for (i = 0; i < nLines; i++)
488 aRect.AdjustLeft( 1 );
489 aRect.AdjustRight( 1 );
493 aRect.AdjustLeft( -1 );
494 aRect.AdjustRight( -1 );
496 aRect.AdjustTop( -1 );
497 aRect.AdjustBottom( 1 );
513 ImplDrawSpinArrow(rRenderContext, aOutRect,
true);
519 ImplDrawSpinArrow(rRenderContext, aOutRect,
false);
524 sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear,
525 bool bOther, sal_Int32 nToday )
527 Color const * pTextColor =
nullptr;
583 if ((nDay == aTodayDate.
GetDay()) &&
584 (nMonth == aTodayDate.
GetMonth()) &&
585 (nYear == aTodayDate.
GetYear()))
626 rRenderContext.
DrawRect(aTitleRect);
627 Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top());
628 Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1);
629 Point aBottomRight1(aTitleRect.Right(), aTitleRect.Bottom());
630 Point aBottomRight2(aTitleRect.Right(), aTitleRect.Bottom() - 1);
632 rRenderContext.
DrawLine(aTopLeft1,
Point(aBottomRight1.X(), aTopLeft1.Y()));
634 rRenderContext.
DrawLine(aTopLeft2,
Point(aBottomRight2.X(), aTopLeft2.Y()));
635 rRenderContext.
DrawLine(aTopLeft2,
Point(aTopLeft2.X(), aBottomRight2.Y()));
637 rRenderContext.
DrawLine(
Point(aTopLeft2.X(), aBottomRight2.Y()), aBottomRight2);
638 rRenderContext.
DrawLine(
Point(aBottomRight2.X(), aTopLeft2.Y()), aBottomRight2);
640 rRenderContext.
DrawLine(
Point(aTopLeft1.X(), aBottomRight1.Y()), aBottomRight1);
646 aSepPos2.setX( aSepPos1.X() );
648 rRenderContext.
DrawLine(aSepPos1, aSepPos2);
649 aSepPos1.AdjustX( 1 );
650 aSepPos2.setX( aSepPos1.X() );
652 rRenderContext.
DrawLine(aSepPos1, aSepPos2);
666 + OUString::number(nYear);
674 if (j == mnMonthPerLine - 1)
678 if (nMonthTextWidth > nMaxMonthWidth)
683 + OUString::number(nYear);
684 nMonthTextWidth = rRenderContext.
GetTextWidth(aMonthText);
687 if (nTempOff < nMonthOffX1)
688 nDeltaX += nMonthOffX1 + 1;
691 if (nTempOff + nMonthTextWidth >
mnMonthWidth - nMonthOffX2)
692 nDeltaX +=
mnMonthWidth - nMonthOffX2 - nMonthTextWidth;
697 rRenderContext.
DrawText(
Point(nDeltaX, nDeltaY), aMonthText);
705 Point aStartPos(nDayX, nDeltaY);
707 std::vector<sal_Int32> aTmp;
708 for (
int k=0; k<6; ++k)
716 sal_uInt16 nDayIndex =
static_cast<sal_uInt16
>(aDate.
GetDayOfWeek());
717 nDayIndex = (nDayIndex + (7 -
static_cast<sal_uInt16
>(eStartDay))) % 7;
718 if (i == 0 && j == 0)
720 Date aTempDate = aDate;
721 aTempDate.
AddDays( -nDayIndex );
722 for (nDay = 0; nDay < nDayIndex; ++nDay)
730 for (nDay = 1; nDay <= nDaysInMonth; nDay++)
733 ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay, nMonth, nYear,
743 if ((i == mnLines - 1) && (j == mnMonthPerLine - 1))
745 sal_uInt16 nWeekDay =
static_cast<sal_uInt16
>(aDate.
GetDayOfWeek());
746 nWeekDay = (nWeekDay + (7 -
static_cast<sal_uInt16
>(eStartDay))) % 7;
747 sal_uInt16 nDayCount = 42 - nDaysInMonth - nWeekDay;
748 Date aTempDate = aDate;
749 aTempDate.
AddDays( nDaysInMonth );
750 for (nDay = 1; nDay <= nDayCount; ++nDay)
793 for (
auto const& nKey : *pOld)
795 if ( pNew->find(nKey) == pNew->end() )
797 Date aTempDate(nKey);
802 for (
auto const& nKey : *pNew)
804 if ( pOld->find(nKey) == pOld->end() )
806 Date aTempDate(nKey);
816 Date aTempDate = rDate;
821 if ( !(nHitTest & CALENDAR_HITTEST_DAY) )
831 if ( (
maCurDate != aOldDate) || bNewSel )
836 if ( !bNewSel || aOldSel.find( aOldDate.
GetDate() ) == aOldSel.end() )
883 sal_uInt16 nMonthOff;
884 sal_uInt16 nCurItemId;
885 sal_uInt16 nYear = rDate.
GetYear()-1;
888 sal_uInt16 nYearIdCount = 1000;
900 for ( j = 1; j <= 12; j++ )
903 i18n::CalendarDisplayIndex::MONTH, j-1, 1));
904 aPopupMenu->
InsertItem( 10+i, OUString::number( nYear+i ) );
906 nYearIdCount += 1000;
910 nCurItemId = aPopupMenu->
Execute(
this, rPos );
916 sal_uInt16 nTempMonthOff = nMonthOff % 12;
917 sal_uInt16 nTempYearOff = nMonthOff / 12;
918 sal_uInt16 nNewMonth = nCurItemId % 1000;
919 sal_uInt16 nNewYear = nYear+((nCurItemId-1000)/1000);
920 if ( nTempMonthOff < nNewMonth )
921 nNewMonth = nNewMonth - nTempMonthOff;
925 nNewMonth = 12-(nTempMonthOff-nNewMonth);
927 nNewYear = nNewYear - nTempYearOff;
952 bool bSelection =
false;
973 if ( aOldSel.find( aOldDate.
GetDate() ) == aOldSel.end() )
1098 Date aTempDate = aNewDate;
1164 aDateRect.
SetTop( aPt.Y() );
1173 sal_uInt16 nMonth = aDate.
GetMonth();
1180 + OUString::number(nWeek);
1182 if ( (nMonth == 12) && (nWeek == 1) )
1184 aStr +=
", " + OUString::number(aDate.
GetNextYear());
1186 else if ( (nMonth == 1) && (nWeek > 50) )
1188 aStr +=
", " + OUString::number(aDate.
GetYear()-1);
1220 if ( nNotchDelta < 0 )
1222 while ( nNotchDelta < 0 )
1230 while ( nNotchDelta > 0 )
1277 Date aDate( 0, 0, 0 );
1304 if ( nDateOff < 365 )
1309 while ( nDateOff > aTempDate.GetDaysInMonth() )
1312 sal_Int32 nDaysInMonth = aTempDate.GetDaysInMonth();
1313 aTempDate.AddDays( nDaysInMonth );
1314 nDateOff -= nDaysInMonth;
1358 for ( sal_uInt16 i = 0; i < nMonthCount; i++ )
1395 sal_uInt16 nDayIndex;
1398 if ( rDate < aDate )
1401 nDaysOff = aDate-rDate;
1410 if ( rDate > aLastDate )
1412 sal_Int32 nWeekDay =
static_cast<sal_Int32
>(aLastDate.
GetDayOfWeek());
1414 aLastDate.
AddDays( -nWeekDay );
1416 nDaysOff = rDate-aLastDate;
1418 for ( sal_Int32 i = 0; i <= nDaysOff; i++ )
1420 if ( aLastDate == rDate )
1426 if ( nDayIndex == 6 )
1453 nDayIndex =
static_cast<sal_uInt16
>(aDate.
GetDayOfWeek());
1454 nDayIndex = (nDayIndex+(7-
static_cast<sal_uInt16
>(
ImplGetWeekStart()))) % 7;
1455 for ( sal_uInt16 nDay = 1; nDay <= nDaysInMonth; nDay++ )
1457 if ( nDay == rDate.
GetDay() )
1465 if ( nDayIndex == 6 )
1475 aDate.
AddDays( nDaysInMonth );
1522 class ImplCFieldFloat final
1525 std::unique_ptr<weld::Builder> mxBuilder;
1527 std::unique_ptr<weld::Calendar> mxCalendar;
1528 std::unique_ptr<weld::Button> mxTodayBtn;
1529 std::unique_ptr<weld::Button> mxNoneBtn;
1533 : mxBuilder(
Application::CreateInterimBuilder(pContainer,
"svt/ui/calendar.ui",
false))
1534 , mxContainer(mxBuilder->weld_container(
"Calendar"))
1535 , mxCalendar(mxBuilder->weld_calendar(
"date"))
1536 , mxTodayBtn(mxBuilder->weld_button(
"today"))
1537 , mxNoneBtn(mxBuilder->weld_button(
"none"))
1547 mxCalendar->grab_focus();
1555 virtual void dispose()
override;
1588 weld::Button* ImplCFieldFloat::EnableTodayBtn(
bool bEnable)
1591 return bEnable ? mxTodayBtn.get() :
nullptr;
1594 weld::Button* ImplCFieldFloat::EnableNoneBtn(
bool bEnable)
1597 return bEnable ? mxNoneBtn.get() :
nullptr;
1602 , mpFloatWin(nullptr)
1603 , mpTodayBtn(nullptr)
1604 , mpNoneBtn(nullptr)
1625 Date aNewDate = rCalendar.get_date();
1628 mpFloatWin->EnableDocking(
false);
1631 if ( IsEmptyDate() || ( aNewDate != GetDate() ) )
1633 SetDate( aNewDate );
1642 mpFloatWin->EnableDocking(
false);
1646 if (&rBtn == mpTodayBtn)
1649 if ( (aToday != GetDate()) || IsEmptyDate() )
1656 else if (&rBtn == mpNoneBtn)
1658 if ( !IsEmptyDate() )
1680 Date aDate = GetDate();
virtual Point GetPosPixel() const
#define LINK(Instance, Class, Member)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
const Color & GetTextColor() const
const Color & GetShadowColor() const
sal_Int16 GetNextYear() 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
Edit * GetSubEdit() const
sal_Int16 getValue(sal_Int16 nFieldIndex) const
Link< Calendar *, void > maActivateHdl
sal_Int16 getFirstDayOfWeek() const
std::unique_ptr< sal_Int32[]> pData
const StyleSettings & GetStyleSettings() const
virtual ~CalendarField() override
const Color & GetFaceColor() const
virtual ~Calendar() override
#define CALENDAR_HITTEST_PREV
void ImplUpdate(bool bCalcNew=false)
sal_Int32 mnDayOfWeekAry[7]
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
void SetTextColor(const Color &rColor)
CalendarField(vcl::Window *pParent, WinBits nWinStyle)
constexpr sal_uInt16 KEY_UP
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
constexpr tools::Long Width() 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
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
OUString VclResId(TranslateId aId)
void DrawTextArray(const Point &rStartPt, const OUString &rStr, o3tl::span< const sal_Int32 > pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
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 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...
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
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)
VclPtr< vcl::Window > m_xBox
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
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_GRAY
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
const AllSettings & GetSettings() const
const Color & GetFieldColor() const
CommandEventId GetCommand() const
sal_uInt16 ImplDoHitTest(const Point &rPos, Date &rDate) 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
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
constexpr tools::Long Height() const
Date GetLastMonth() const
void ImplTracking(const Point &rPos, bool bRepeat)
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Date maOldFormatFirstDate
void ImplEndTracking(bool bCancel)
::OutputDevice const * GetOutDev() const
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.
Date GetFirstSelectedDate() const
const Point & GetPosPixel() const
void EndPopupMode(const vcl::Window *pWin)
tools::Long AdjustHeight(tools::Long n)
weld::Button * mpTodayBtn
Size GetOutputSizePixel() const
Link< Calendar *, void > maSelectHdl
void setHeight(tools::Long nHeight)
virtual ~ImplCFieldFloatWin() override
void connect_activated(const Link< Calendar &, void > &rLink)
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
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
#define CALENDAR_HITTEST_DAY
#define CALENDAR_HITTEST_MONTHTITLE
constexpr sal_uInt16 KEY_LEFT
Point OutputToScreenPixel(const Point &rPos) const
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
const Wallpaper & GetBackground() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
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)
bool m_bDetectedRangeSegmentation false
virtual void StateChanged(StateChangedType nStateChange) override
virtual void Command(const CommandEvent &rCEvt) override