1#ifndef __SDATETIMEPICKER__H__
2#define __SDATETIMEPICKER__H__
5#include <proxy/SWindowProxy.h>
6#include <interface/SCtrl-i.h>
7#include <control/SDropDown.h>
18 :
public TWindowProxy<IDateTimePicker>
20 DEF_SOBJECT(
SWindow, L
"dateTimePicker")
58 STDMETHOD_(
void, SetTime)
59 (THIS_ WORD wYear, WORD wMonth, WORD wDay, WORD wHour, WORD wMinute, WORD wSecond) OVERRIDE;
71 (THIS_ WORD *wYear, WORD *wMonth, WORD *wDay, WORD *wHour, WORD *wMinute, WORD *wSecond) SCONST OVERRIDE;
76 STDMETHOD_(
void,
CloseUp)(THIS) OVERRIDE;
81 STDMETHOD_(
void,
DropDown)(THIS) OVERRIDE;
86 STDMETHOD_(
void,
Clear)(THIS) OVERRIDE;
100 void SetTime(
const SYSTEMTIME &sysTime);
106 void GetTime(SYSTEMTIME &sysTime);
221 BOOL
OnMouseWheel(UINT nFlags,
short zDelta, CPoint pt);
229 void OnKeyDown(TCHAR nChar, UINT nRepCnt, UINT nFlags);
237 void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
269 void CircluNum(
bool bUp, WORD &wNum, WORD wMin, WORD wMax);
283 ATTR_COLOR(L
"cueColor",
m_crCue, TRUE)
Smart pointer class for managing COM-style reference-counted objects.
HRESULT OnAttrCueText(const SStringW &strValue, BOOL bLoading)
Handle custom attribute "cueText".
void CircluNum(bool bUp, WORD &wNum, WORD wMin, WORD wMax)
Handle circular number increment/decrement.
SAutoRefPtr< ISkinObj > m_pSkinBtn
EnDateType HitTest(CPoint pt)
Hit test to determine the date type at a given point.
void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
Handle character input event.
BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
Handle mouse wheel event.
void GetTime(WORD *wYear, WORD *wMonth, WORD *wDay, WORD *wHour, WORD *wMinute, WORD *wSecond) SCONST OVERRIDE
Get the time.
void SetTime(WORD wYear, WORD wMonth, WORD wDay, WORD wHour, WORD wMinute, WORD wSecond) OVERRIDE
Set the time.
bool CalcPopupRect(int nHeight, CRect &rcPopup)
Calculate the popup rectangle.
SDateTimePicker()
Constructor.
EnDateType
Enumeration for date types.
void Clear() OVERRIDE
Clear the selected date and time.
void OnKeyDown(TCHAR nChar, UINT nRepCnt, UINT nFlags)
Handle key down event.
void OnPaint(IRenderTarget *pRT)
Paint the control.
void OnMouseMove(UINT nFlags, CPoint pt)
Handle mouse move event.
void GetDropBtnRect(LPRECT pBtnRc, LPRECT pSkinRc=NULL)
Get the rectangle of the dropdown button.
void OnSetFocus(SWND wndOld)
Handle set focus event.
SDropDownWnd * m_pDropDownWnd
EnDateType m_eSelDateType
BOOL OnDateCmd(EventCmd *pEvt)
Handle date command event.
void OnKillFocus(SWND wndFocus)
Handle kill focus event.
void OnMouseLeave()
Handle mouse leave event.
void Draw(EnDateType eType, IRenderTarget *pRT, WORD wNum, CRect &rcText)
Draw the date/time component.
void OnLButtonDown(UINT nFlags, CPoint pt)
Handle left mouse button down event.
void DropDown() OVERRIDE
Drop down the list.
SStringT ToFormatText(EnDateType eType, WORD wNum)
Convert a number to formatted text based on the date type.
void OnDestroy()
Handle destroy event.
void TimeWheel(bool bUp)
Handle time wheel event.
BOOL OnDateChanged(EventCalendarExChanged *pEvt)
Handle date change event.
void CloseUp() OVERRIDE
Close the dropdown.
A class representing an ASCII string.
Class for handling text with translation support.
void OnMouseMove(UINT nFlags, CPoint pt)
Handles the mouse move event.
void OnDestroy()
Handles the destruction of the window.
int GetWindowText(TCHAR *pBuf, int nBufLen, BOOL bRawText) OVERRIDE
Retrieves the window text.
void OnKillFocus(SWND wndFocus)
Handles losing focus.
void OnPaint(IRenderTarget *pRT)
Handles the painting of the window.
void OnMouseLeave()
Handles the mouse leave event.
BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
Handles the mouse wheel event.
void OnLButtonDown(UINT nFlags, CPoint pt)
Handles the left mouse button down event.
virtual BOOL CreateChildren(SXmlNode xmlNode)
Create child windows from XML node.
void OnSetFocus(SWND wndOld)
Handles gaining focus.
Class representing an XML node.
Interface for rendering target objects.
Interface for Dropdown Owner.
virtual void OnDestroyDropDown(SDropDownWnd *pDropDown)=0
Notify that the dropdown window is being destroyed.
virtual SWindow * GetDropDownOwner()=0
Get the dropdown owner window.
virtual void OnCreateDropDown(SDropDownWnd *pDropDown)=0
Notify that the dropdown window has been created.
Interface for Skin Objects.