]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/generic/timectrl.h
activating DrawRectangle optimization
[wxWidgets.git] / include / wx / generic / timectrl.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/timectrl.h
3// Purpose: Generic implementation of wxTimePickerCtrl.
4// Author: Paul Breen, Vadim Zeitlin
5// Created: 2011-09-22
6// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
7// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_GENERIC_TIMECTRL_H_
12#define _WX_GENERIC_TIMECTRL_H_
13
14#include "wx/containr.h"
15#include "wx/compositewin.h"
16
17class WXDLLIMPEXP_ADV wxTimePickerCtrlGeneric
18 : public wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> >
19{
20public:
21 typedef wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> > Base;
22
23 // Creating the control.
24 wxTimePickerCtrlGeneric() { Init(); }
25 virtual ~wxTimePickerCtrlGeneric();
26 wxTimePickerCtrlGeneric(wxWindow *parent,
27 wxWindowID id,
28 const wxDateTime& date = wxDefaultDateTime,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = wxTP_DEFAULT,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxTimePickerCtrlNameStr)
34 {
35 Init();
36
37 (void)Create(parent, id, date, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent,
41 wxWindowID id,
42 const wxDateTime& date = wxDefaultDateTime,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = wxTP_DEFAULT,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxTimePickerCtrlNameStr);
48
49 // Implement pure virtual wxTimePickerCtrlBase methods.
50 virtual void SetValue(const wxDateTime& date);
51 virtual wxDateTime GetValue() const;
52
53protected:
54 virtual wxSize DoGetBestSize() const;
55
56 virtual void DoMoveWindow(int x, int y, int width, int height);
57
58private:
59 void Init();
60
61 // Return the list of the windows composing this one.
62 virtual wxWindowList GetCompositeWindowParts() const;
63
64 // Implementation data.
65 class wxTimePickerGenericImpl* m_impl;
66
67 wxDECLARE_NO_COPY_CLASS(wxTimePickerCtrlGeneric);
68};
69
70#endif // _WX_GENERIC_TIMECTRL_H_