29#include <sptk5/DateTime.h>
30#include <sptk5/gui/CControl.h>
31#include <sptk5/gui/CLayoutClient.h>
32#include <sptk5/gui/CPopupWindow.h>
56 Fl_Group* m_headerBox;
57 Fl_Group* m_buttonBox;
58 Fl_Box* m_monthNameBox;
59 std::array<Fl_Box*, 7> m_dayNameBoxes;
60 std::array<Fl_Button*, 31> m_dayButtons;
61 std::array<Fl_Button*, 4> m_switchButtons;
63 std::string m_headerLabel;
64 int m_activeButtonIndex;
65 std::array<char, 14> m_weekDayLabels;
70 static void cbDayButtonClicked(Fl_Widget*,
void*);
75 static void cbSwitchButtonClicked(Fl_Widget*,
void*);
110 CCalendar(
int x,
int y,
int w,
int h,
const char* label =
nullptr);
119 void resize(
int x,
int y,
int w,
int h)
override;
161 Fl_Widget* m_dateControl;
181 m_dateControl = dateControl;
191 void resize(
int x,
int y,
int w,
int h)
override;
207 m_calendar->date(dt);
216 return m_calendar->
date();
Calendar widget.
Definition: CCalendar.h:55
CCalendar(int x, int y, int w, int h, const char *label=nullptr)
FLTK-style constructor.
void dayButtonClicked(uint32_t day)
The reaction function for the clicking on one of the day buttons.
CCalendar(const char *label, int layoutSize=20, CLayoutAlign layoutAlignment=CLayoutAlign::TOP)
SPTK-style constructor.
int maxHeight() const
Reports the maximum height of the calendar widget.
DateTime date() const
Reports the calendar date.
void autoHeight(int minHeight)
Resizes widget to the optimal height, considering minHeight.
void switchButtonClicked(int32_t monthChange)
The reaction function for the clicking on one of the month change buttonss.
void date(DateTime dt)
Sets the calendar date.
void resize(int x, int y, int w, int h) override
Widget resize.
Definition: CLayoutClient.h:82
Definition: DateTime.h:86
CLayoutAlign
Definition: CLayoutClient.h:44