mwcxx/src/widget/clock.cc

38 lines
958 B
C++
Raw Normal View History

2026-09-14 03:22:51 +09:00
#include <MwCXX/Widget/Clock.h>
2026-09-15 12:00:07 +09:00
MwCXX::Clock::Clock(MwWidget widget, MwCXX::Base* parent)
: MwCXX::Base(widget, parent) {
2026-09-14 03:22:51 +09:00
this->RegisterHandlers();
}
2026-09-15 12:00:07 +09:00
MwCXX::Clock::Clock(MwCXX::String name, MwCXX::Base* parent, int x, int y, unsigned int width, unsigned int height)
: MwCXX::Base(MwClockClass, name, parent, x, y, width, height) {
2026-09-14 03:22:51 +09:00
this->RegisterHandlers();
}
int MwCXX::Clock::GetHour() {
return (int)MwGetInteger(this->widget, MwNhour);
}
void MwCXX::Clock::SetHour(int value) {
MwSetInteger(this->widget, MwNhour, (int)value);
}
int MwCXX::Clock::GetMinute() {
return (int)MwGetInteger(this->widget, MwNminute);
}
void MwCXX::Clock::SetMinute(int value) {
MwSetInteger(this->widget, MwNminute, (int)value);
}
int MwCXX::Clock::GetSecond() {
return (int)MwGetInteger(this->widget, MwNsecond);
}
void MwCXX::Clock::SetSecond(int value) {
MwSetInteger(this->widget, MwNsecond, (int)value);
}
void MwCXX::Clock::RegisterHandlers() {
}