mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-11 08:53:16 +08:00
Add wxTimePickerCtrl class.
Implement wxTimePickerCtrl natively for MSW and add a generic implementation (very loosely based on the original class by Paul Breen) for the other platforms. Also update the calendar sample to show the new control. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
+68
-10
File diff suppressed because it is too large
Load Diff
@@ -2974,6 +2974,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/generic/propdlg.cpp
|
||||
src/generic/sashwin.cpp
|
||||
src/generic/splash.cpp
|
||||
src/generic/timectrl.cpp
|
||||
src/generic/tipdlg.cpp
|
||||
src/generic/treelist.cpp
|
||||
src/generic/wizard.cpp
|
||||
@@ -3010,6 +3011,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/generic/propdlg.h
|
||||
wx/generic/sashwin.h
|
||||
wx/generic/splash.h
|
||||
wx/generic/timectrl.h
|
||||
wx/generic/wizard.h
|
||||
wx/grid.h
|
||||
wx/hyperlink.h
|
||||
@@ -3022,6 +3024,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/sound.h
|
||||
wx/splash.h
|
||||
wx/taskbar.h
|
||||
wx/timectrl.h
|
||||
wx/tipdlg.h
|
||||
wx/treelist.h
|
||||
wx/wizard.h
|
||||
@@ -3050,6 +3053,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/msw/datectrl.cpp
|
||||
src/msw/datetimectrl.cpp
|
||||
src/msw/hyperlink.cpp
|
||||
src/msw/timectrl.cpp
|
||||
</set>
|
||||
<set var="ADVANCED_MSW_NATIVE_HDR" hints="files">
|
||||
wx/generic/animate.h
|
||||
@@ -3059,6 +3063,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/msw/datectrl.h
|
||||
wx/msw/datetimectrl.h
|
||||
wx/msw/hyperlink.h
|
||||
wx/msw/timectrl.h
|
||||
</set>
|
||||
|
||||
<!-- not built on WindowsCE: -->
|
||||
|
||||
+64
-24
File diff suppressed because it is too large
Load Diff
+64
-24
File diff suppressed because it is too large
Load Diff
+64
-24
File diff suppressed because it is too large
Load Diff
+64
-24
File diff suppressed because it is too large
Load Diff
@@ -551,6 +551,41 @@ SOURCE=..\..\src\msw\taskbar.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\msw\timectrl.cpp
|
||||
|
||||
!IF "$(CFG)" == "adv - Win32 DLL Universal Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 DLL Universal Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 DLL Release"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 DLL Debug"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 Universal Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 Universal Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 Release"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "adv - Win32 Debug"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\msw\version.rc
|
||||
|
||||
!IF "$(CFG)" == "adv - Win32 DLL Universal Release"
|
||||
@@ -674,6 +709,10 @@ SOURCE=..\..\src\generic\splash.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\generic\timectrl.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\src\generic\tipdlg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -961,6 +1000,10 @@ SOURCE=..\..\include\wx\msw\sound.h
|
||||
|
||||
SOURCE=..\..\include\wx\msw\taskbar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\msw\timectrl.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Generic Headers"
|
||||
|
||||
@@ -1043,6 +1086,10 @@ SOURCE=..\..\include\wx\generic\splash.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\generic\timectrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\generic\wizard.h
|
||||
# End Source File
|
||||
# End Group
|
||||
@@ -1143,6 +1190,10 @@ SOURCE=..\..\include\wx\taskbar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\timectrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\tipdlg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -5404,6 +5404,10 @@ SOURCE=..\..\include\wx\msw\tglbtn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\msw\timectrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\msw\toolbar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -5676,6 +5680,10 @@ SOURCE=..\..\include\wx\generic\textdlgg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\generic\timectrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\generic\treectlg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -6884,6 +6892,10 @@ SOURCE=..\..\include\wx\tglbtn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\timectrl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\include\wx\tipdlg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -728,6 +728,45 @@
|
||||
RelativePath="..\..\src\msw\taskbar.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\timectrl.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswud\adv\msw_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswu\adv\msw_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Debug|Win32"
|
||||
ExcludedFromBuild="TRUE"/>
|
||||
<FileConfiguration
|
||||
Name="Universal Release|Win32"
|
||||
ExcludedFromBuild="TRUE"/>
|
||||
<FileConfiguration
|
||||
Name="DLL Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswuddll\adv\msw_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswudll\adv\msw_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
ExcludedFromBuild="TRUE"/>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Release|Win32"
|
||||
ExcludedFromBuild="TRUE"/>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\version.rc">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
@@ -810,6 +849,57 @@
|
||||
RelativePath="..\..\src\generic\splash.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\generic\timectrl.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswud\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswu\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivud\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivu\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswuddll\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswudll\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivuddll\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivudll\adv\generic_timectrl.obj"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\generic\tipdlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
@@ -1017,6 +1107,9 @@
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\taskbar.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\timectrl.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Generic Headers"
|
||||
@@ -1079,6 +1172,9 @@
|
||||
RelativePath="..\..\include\wx\generic\splash.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\timectrl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\wizard.h">
|
||||
</File>
|
||||
</Filter>
|
||||
@@ -1155,6 +1251,9 @@
|
||||
RelativePath="..\..\include\wx\taskbar.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\timectrl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\tipdlg.h">
|
||||
</File>
|
||||
<File
|
||||
|
||||
@@ -4625,6 +4625,9 @@
|
||||
RelativePath="..\..\include\wx\msw\tglbtn.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\timectrl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\toolbar.h">
|
||||
</File>
|
||||
<File
|
||||
@@ -4830,6 +4833,9 @@
|
||||
RelativePath="..\..\include\wx\generic\textdlgg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\timectrl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\treectlg.h">
|
||||
</File>
|
||||
<File
|
||||
@@ -5739,6 +5745,9 @@
|
||||
RelativePath="..\..\include\wx\tglbtn.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\timectrl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\tipdlg.h">
|
||||
</File>
|
||||
<File
|
||||
|
||||
@@ -1004,6 +1004,58 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\timectrl.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswud\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswu\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<FileConfiguration
|
||||
Name="Universal Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<FileConfiguration
|
||||
Name="DLL Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswuddll\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswudll\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\version.rc"
|
||||
>
|
||||
<FileConfiguration
|
||||
@@ -1113,6 +1165,74 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\generic\timectrl.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswud\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswu\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivud\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivu\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswuddll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswudll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivuddll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivudll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\generic\tipdlg.cpp"
|
||||
>
|
||||
</File>
|
||||
@@ -1378,6 +1498,10 @@
|
||||
RelativePath="..\..\include\wx\msw\taskbar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Generic Headers"
|
||||
@@ -1460,6 +1584,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\wizard.h"
|
||||
>
|
||||
</File>
|
||||
@@ -1561,6 +1689,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\tipdlg.h"
|
||||
>
|
||||
</File>
|
||||
|
||||
@@ -6188,6 +6188,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\toolbar.h"
|
||||
>
|
||||
</File>
|
||||
@@ -6461,6 +6465,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\treectlg.h"
|
||||
>
|
||||
</File>
|
||||
@@ -7672,6 +7680,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\tipdlg.h"
|
||||
>
|
||||
</File>
|
||||
|
||||
@@ -1000,6 +1000,58 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\timectrl.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswud\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswu\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<FileConfiguration
|
||||
Name="Universal Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<FileConfiguration
|
||||
Name="DLL Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswuddll\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswudll\adv\msw_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
/>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\version.rc"
|
||||
>
|
||||
<FileConfiguration
|
||||
@@ -1109,6 +1161,74 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\generic\timectrl.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswud\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswu\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivud\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Universal Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivu\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswuddll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswudll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivuddll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DLL Universal Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="vc_mswunivudll\adv\generic_timectrl.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\generic\tipdlg.cpp"
|
||||
>
|
||||
</File>
|
||||
@@ -1374,6 +1494,10 @@
|
||||
RelativePath="..\..\include\wx\msw\taskbar.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Generic Headers"
|
||||
@@ -1456,6 +1580,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\wizard.h"
|
||||
>
|
||||
</File>
|
||||
@@ -1557,6 +1685,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\tipdlg.h"
|
||||
>
|
||||
</File>
|
||||
|
||||
@@ -6184,6 +6184,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\msw\toolbar.h"
|
||||
>
|
||||
</File>
|
||||
@@ -6457,6 +6461,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\generic\treectlg.h"
|
||||
>
|
||||
</File>
|
||||
@@ -7668,6 +7676,10 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\timectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\tipdlg.h"
|
||||
>
|
||||
</File>
|
||||
|
||||
@@ -1870,6 +1870,7 @@ Optional Features:
|
||||
--enable-taskbaricon use wxTaskBarIcon class
|
||||
--enable-tbarnative use native wxToolBar class
|
||||
--enable-textctrl use wxTextCtrl class
|
||||
--enable-timepick use wxTimePickerCtrl class
|
||||
--enable-tipwindow use wxTipWindow class
|
||||
--enable-togglebtn use wxToggleButton class
|
||||
--enable-toolbar use wxToolBar class
|
||||
@@ -9911,6 +9912,7 @@ if test "$wxUSE_CONTROLS" = "no"; then
|
||||
DEFAULT_wxUSE_STATBOX=no
|
||||
DEFAULT_wxUSE_STATLINE=no
|
||||
DEFAULT_wxUSE_STATUSBAR=no
|
||||
DEFAULT_wxUSE_TIMEPICKCTRL=no
|
||||
DEFAULT_wxUSE_TIPWINDOW=no
|
||||
DEFAULT_wxUSE_TOGGLEBTN=no
|
||||
DEFAULT_wxUSE_TOOLBAR=no
|
||||
@@ -12608,6 +12610,50 @@ fi
|
||||
echo "${ECHO_T}$result" >&6; }
|
||||
|
||||
|
||||
enablestring=
|
||||
defaultval=$wxUSE_ALL_FEATURES
|
||||
if test -z "$defaultval"; then
|
||||
if test x"$enablestring" = xdisable; then
|
||||
defaultval=yes
|
||||
else
|
||||
defaultval=no
|
||||
fi
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-datepick" >&5
|
||||
echo $ECHO_N "checking for --${enablestring:-enable}-datepick... $ECHO_C" >&6; }
|
||||
# Check whether --enable-datepick was given.
|
||||
if test "${enable_datepick+set}" = set; then
|
||||
enableval=$enable_datepick;
|
||||
if test "$enableval" = yes; then
|
||||
wx_cv_use_datepick='wxUSE_TIMEPICKCTRL=yes'
|
||||
else
|
||||
wx_cv_use_datepick='wxUSE_TIMEPICKCTRL=no'
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
wx_cv_use_datepick='wxUSE_TIMEPICKCTRL=${'DEFAULT_wxUSE_TIMEPICKCTRL":-$defaultval}"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
eval "$wx_cv_use_datepick"
|
||||
|
||||
if test x"$enablestring" = xdisable; then
|
||||
if test $wxUSE_TIMEPICKCTRL = no; then
|
||||
result=yes
|
||||
else
|
||||
result=no
|
||||
fi
|
||||
else
|
||||
result=$wxUSE_TIMEPICKCTRL
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: result: $result" >&5
|
||||
echo "${ECHO_T}$result" >&6; }
|
||||
|
||||
|
||||
enablestring=
|
||||
defaultval=$wxUSE_ALL_FEATURES
|
||||
if test -z "$defaultval"; then
|
||||
@@ -47955,6 +48001,14 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
if test "$wxUSE_TIMEPICKCTRL" = "yes"; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define wxUSE_TIMEPICKCTRL 1
|
||||
_ACEOF
|
||||
|
||||
USES_CONTROLS=1
|
||||
fi
|
||||
|
||||
if test "$wxUSE_TOGGLEBTN" = "yes"; then
|
||||
if test "$wxUSE_OLD_COCOA" = 1 ; then
|
||||
{ echo "$as_me:$LINENO: WARNING: Toggle button not yet supported under Mac OS X... disabled" >&5
|
||||
|
||||
@@ -927,6 +927,7 @@ if test "$wxUSE_CONTROLS" = "no"; then
|
||||
DEFAULT_wxUSE_STATBOX=no
|
||||
DEFAULT_wxUSE_STATLINE=no
|
||||
DEFAULT_wxUSE_STATUSBAR=no
|
||||
DEFAULT_wxUSE_TIMEPICKCTRL=no
|
||||
DEFAULT_wxUSE_TIPWINDOW=no
|
||||
DEFAULT_wxUSE_TOGGLEBTN=no
|
||||
DEFAULT_wxUSE_TOOLBAR=no
|
||||
@@ -1002,6 +1003,7 @@ WX_ARG_FEATURE(statusbar, [ --enable-statusbar use wxStatusBar class], w
|
||||
WX_ARG_FEATURE(taskbaricon, [ --enable-taskbaricon use wxTaskBarIcon class], wxUSE_TASKBARICON)
|
||||
WX_ARG_FEATURE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE)
|
||||
WX_ARG_FEATURE(textctrl, [ --enable-textctrl use wxTextCtrl class], wxUSE_TEXTCTRL)
|
||||
WX_ARG_FEATURE(datepick, [ --enable-timepick use wxTimePickerCtrl class], wxUSE_TIMEPICKCTRL)
|
||||
WX_ARG_FEATURE(tipwindow, [ --enable-tipwindow use wxTipWindow class], wxUSE_TIPWINDOW)
|
||||
WX_ARG_FEATURE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN)
|
||||
WX_ARG_FEATURE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR)
|
||||
@@ -7110,6 +7112,11 @@ if test "$wxUSE_TEXTCTRL" = "yes"; then
|
||||
AC_DEFINE(wxUSE_RICHEDIT2)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_TIMEPICKCTRL" = "yes"; then
|
||||
AC_DEFINE(wxUSE_TIMEPICKCTRL)
|
||||
USES_CONTROLS=1
|
||||
fi
|
||||
|
||||
if test "$wxUSE_TOGGLEBTN" = "yes"; then
|
||||
if test "$wxUSE_OLD_COCOA" = 1 ; then
|
||||
AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled])
|
||||
|
||||
@@ -452,6 +452,7 @@ All:
|
||||
All (GUI):
|
||||
|
||||
- Added wxTreeListCtrl class.
|
||||
- Added wxTimePickerCtrl class.
|
||||
- Added documented, public wxNavigationEnabled<> class.
|
||||
- Added wxTextCtrl::PositionToCoords() (Navaneeth).
|
||||
- Added support for wxHELP button to wxMessageDialog.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
+11
-3
@@ -1101,6 +1101,14 @@
|
||||
# endif
|
||||
#endif /* !defined(wxUSE_TEXTCTRL) */
|
||||
|
||||
#ifndef wxUSE_TIMEPICKCTRL
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_TIMEPICKCTRL must be defined, please read comment near the top of this file."
|
||||
# else
|
||||
# define wxUSE_TIMEPICKCTRL 0
|
||||
# endif
|
||||
#endif /* !defined(wxUSE_TIMEPICKCTRL) */
|
||||
|
||||
#ifndef wxUSE_TIPWINDOW
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxUSE_TIPWINDOW must be defined, please read comment near the top of this file."
|
||||
@@ -1713,16 +1721,16 @@
|
||||
# endif
|
||||
#endif /* wxUSE_CALENDARCTRL */
|
||||
|
||||
#if wxUSE_DATEPICKCTRL
|
||||
#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
|
||||
# if !wxUSE_DATETIME
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxDatePickerCtrl requires wxUSE_DATETIME"
|
||||
# error "wxDatePickerCtrl and wxTimePickerCtrl requires wxUSE_DATETIME"
|
||||
# else
|
||||
# undef wxUSE_DATETIME
|
||||
# define wxUSE_DATETIME 1
|
||||
# endif
|
||||
# endif
|
||||
#endif /* wxUSE_DATEPICKCTRL */
|
||||
#endif /* wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL */
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
# if !wxUSE_LISTBOX
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "wx/window.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDateEvent: used by wxCalendarCtrl and wxDatePickerCtrl
|
||||
// wxDateEvent: used by wxCalendarCtrl, wxDatePickerCtrl and wxTimePickerCtrl.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent
|
||||
@@ -48,6 +48,7 @@ private:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent);
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_TIME_CHANGED, wxDateEvent);
|
||||
|
||||
typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
|
||||
|
||||
@@ -57,5 +58,8 @@ typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
|
||||
#define EVT_DATE_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
|
||||
|
||||
#define EVT_TIME_CHANGED(id, fn) \
|
||||
wx__DECLARE_EVT1(wxEVT_TIME_CHANGED, id, wxDateEventHandler(fn))
|
||||
|
||||
#endif // _WX_DATEEVT_H_
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_DATEPICKCTRL
|
||||
#if wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
|
||||
|
||||
#define wxNEEDS_DATETIMEPICKCTRL
|
||||
|
||||
@@ -43,6 +43,6 @@ public:
|
||||
typedef wxDateTimePickerCtrlBase wxDateTimePickerCtrl;
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_DATEPICKCTRL
|
||||
#endif // wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
|
||||
|
||||
#endif // _WX_DATETIME_CTRL_H_
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/timectrl.h
|
||||
// Purpose: Generic implementation of wxTimePickerCtrl.
|
||||
// Author: Paul Breen, Vadim Zeitlin
|
||||
// Created: 2011-09-22
|
||||
// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GENERIC_TIMECTRL_H_
|
||||
#define _WX_GENERIC_TIMECTRL_H_
|
||||
|
||||
#include "wx/containr.h"
|
||||
#include "wx/compositewin.h"
|
||||
|
||||
class WXDLLIMPEXP_ADV wxTimePickerCtrlGeneric
|
||||
: public wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> >
|
||||
{
|
||||
public:
|
||||
typedef wxCompositeWindow< wxNavigationEnabled<wxTimePickerCtrlBase> > Base;
|
||||
|
||||
// Creating the control.
|
||||
wxTimePickerCtrlGeneric() { Init(); }
|
||||
virtual ~wxTimePickerCtrlGeneric();
|
||||
wxTimePickerCtrlGeneric(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& date = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTimePickerCtrlNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, date, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& date = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTimePickerCtrlNameStr);
|
||||
|
||||
// Implement pure virtual wxTimePickerCtrlBase methods.
|
||||
virtual void SetValue(const wxDateTime& date);
|
||||
virtual wxDateTime GetValue() const;
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// This is a really ugly hack but to compile this class in wxMSW we must
|
||||
// define these functions even though they are never called because they're
|
||||
// only used by the native implementation.
|
||||
#ifdef __WXMSW__
|
||||
virtual wxLocaleInfo MSWGetFormat() const
|
||||
{
|
||||
wxFAIL_MSG( "Unreachable" );
|
||||
return wxLOCALE_TIME_FMT;
|
||||
}
|
||||
|
||||
virtual bool MSWAllowsNone() const
|
||||
{
|
||||
wxFAIL_MSG( "Unreachable" );
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& WXUNUSED(dtch))
|
||||
{
|
||||
wxFAIL_MSG( "Unreachable" );
|
||||
return false;
|
||||
}
|
||||
#endif // __WXMSW__
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
// Return the list of the windows composing this one.
|
||||
virtual wxWindowList GetCompositeWindowParts() const;
|
||||
|
||||
// Implementation data.
|
||||
class wxTimePickerGenericImpl* m_impl;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxTimePickerCtrlGeneric);
|
||||
};
|
||||
|
||||
#endif // _WX_GENERIC_TIMECTRL_H_
|
||||
@@ -867,6 +867,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -867,6 +867,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
@@ -1604,6 +1605,14 @@
|
||||
// Recommended setting: 0, this is mainly used for testing
|
||||
#define wxUSE_DATEPICKCTRL_GENERIC 0
|
||||
|
||||
// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the
|
||||
// native wxTimePickerCtrl for the platforms that have the latter (MSW).
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, this is mainly used for testing
|
||||
#define wxUSE_TIMEPICKCTRL_GENERIC 0
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Crash debugging helpers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -144,6 +144,14 @@
|
||||
// Recommended setting: 0, this is mainly used for testing
|
||||
#define wxUSE_DATEPICKCTRL_GENERIC 0
|
||||
|
||||
// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the
|
||||
// native wxTimePickerCtrl for the platforms that have the latter (MSW).
|
||||
//
|
||||
// Default is 0.
|
||||
//
|
||||
// Recommended setting: 0, this is mainly used for testing
|
||||
#define wxUSE_TIMEPICKCTRL_GENERIC 0
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Crash debugging helpers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/timectrl.h
|
||||
// Purpose: wxTimePickerCtrl for Windows.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-09-22
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_TIMECTRL_H_
|
||||
#define _WX_MSW_TIMECTRL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimePickerCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxTimePickerCtrl() { }
|
||||
|
||||
wxTimePickerCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTimePickerCtrlNameStr)
|
||||
{
|
||||
Create(parent, id, dt, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTimePickerCtrlNameStr)
|
||||
{
|
||||
return MSWCreateDateTimePicker(parent, id, dt,
|
||||
pos, size, style,
|
||||
validator, name);
|
||||
}
|
||||
|
||||
// Override MSW-specific functions used during control creation.
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
protected:
|
||||
virtual wxLocaleInfo MSWGetFormat() const;
|
||||
virtual bool MSWAllowsNone() const { return false; }
|
||||
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
|
||||
};
|
||||
|
||||
#endif // _WX_MSW_TIMECTRL_H_
|
||||
@@ -867,6 +867,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -867,6 +867,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -868,6 +868,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -867,6 +867,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -863,6 +863,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/timectrl.h
|
||||
// Purpose: Declaration of wxTimePickerCtrl class.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-09-22
|
||||
// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_TIMECTRL_H_
|
||||
#define _WX_TIMECTRL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_TIMEPICKCTRL
|
||||
|
||||
#include "wx/datetimectrl.h"
|
||||
|
||||
#define wxTimePickerCtrlNameStr wxS("timectrl")
|
||||
|
||||
// No special styles are currently defined for this control but still define a
|
||||
// symbolic constant for the default style for consistency.
|
||||
enum
|
||||
{
|
||||
wxTP_DEFAULT = 0
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimePickerCtrl: Allow the user to enter the time.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxTimePickerCtrlBase : public wxDateTimePickerCtrl
|
||||
{
|
||||
public:
|
||||
/*
|
||||
The derived classes should implement ctor and Create() method with the
|
||||
following signature:
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTimePickerCtrlNameStr);
|
||||
*/
|
||||
|
||||
/*
|
||||
We also inherit Set/GetValue() methods from the base class which define
|
||||
our public API. Notice that the date portion of the date passed as
|
||||
input is ignored and for the result date it's always today, but only
|
||||
the time part of wxDateTime objects is really significant here.
|
||||
*/
|
||||
};
|
||||
|
||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/msw/timectrl.h"
|
||||
|
||||
#define wxHAS_NATIVE_TIMEPICKERCTRL
|
||||
#else
|
||||
#include "wx/generic/timectrl.h"
|
||||
|
||||
class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlGeneric
|
||||
{
|
||||
public:
|
||||
wxTimePickerCtrl() { }
|
||||
wxTimePickerCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& date = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTimePickerCtrlNameStr)
|
||||
: wxTimePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_TIMEPICKCTRL
|
||||
|
||||
#endif // _WX_TIMECTRL_H_
|
||||
@@ -866,6 +866,7 @@
|
||||
#define wxUSE_STATTEXT 1 // wxStaticText
|
||||
#define wxUSE_STATBMP 1 // wxStaticBitmap
|
||||
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
|
||||
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
|
||||
#define wxUSE_TOGGLEBTN 1 // requires wxButton
|
||||
#define wxUSE_TREECTRL 1 // wxTreeCtrl
|
||||
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/timectrl.h
|
||||
// Purpose: interface of wxTimePickerCtrl
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-09-22
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
@class wxTimePickerCtrl
|
||||
|
||||
This control allows the user to enter time.
|
||||
|
||||
It is similar to wxDatePickerCtrl but is used for time, and not date,
|
||||
selection. While GetValue() and SetValue() still work with values of type
|
||||
wxDateTime (because wxWidgets doesn't provide a time-only class), their
|
||||
date part is ignored by this control.
|
||||
|
||||
It is only available if @c wxUSE_TIMEPICKCTRL is set to 1.
|
||||
|
||||
This control currently doesn't have any specific flags.
|
||||
|
||||
@beginEventEmissionTable{wxDateEvent}
|
||||
@event{EVT_TIME_CHANGED(id, func)}
|
||||
This event fires when the user changes the current selection in the
|
||||
control.
|
||||
@endEventTable
|
||||
|
||||
@library{wxadv}
|
||||
@category{pickers}
|
||||
@appearance{timepickerctrl.png}
|
||||
|
||||
@see wxDatePickerCtrl, wxDateEvent
|
||||
|
||||
@since 2.9.3
|
||||
*/
|
||||
class wxTimePickerCtrl : public wxControl
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Initializes the object and calls Create() with all the parameters.
|
||||
*/
|
||||
wxTimePickerCtrl(wxWindow* parent, wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTP_DEFAULT,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = "timectrl");
|
||||
|
||||
/**
|
||||
Create the control window.
|
||||
|
||||
This method should only be used for objects created using default
|
||||
constructor.
|
||||
|
||||
@param parent
|
||||
Parent window, must not be non-@NULL.
|
||||
@param id
|
||||
The identifier for the control.
|
||||
@param dt
|
||||
The initial value of the control, if an invalid date (such as the
|
||||
default value) is used, the control is set to current time.
|
||||
@param pos
|
||||
Initial position.
|
||||
@param size
|
||||
Initial size. If left at default value, the control chooses its own
|
||||
best size by using the height approximately equal to a text control
|
||||
and width large enough to show the time fully.
|
||||
@param style
|
||||
The window style, should be left at 0 as there are no special
|
||||
styles for this control in this version.
|
||||
@param validator
|
||||
Validator which can be used for additional checks.
|
||||
@param name
|
||||
Control name.
|
||||
|
||||
@return @true if the control was successfully created or @false if
|
||||
creation failed.
|
||||
*/
|
||||
bool Create(wxWindow* parent, wxWindowID id,
|
||||
const wxDateTime& dt = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = "timectrl");
|
||||
|
||||
/**
|
||||
Returns the currently entered time.
|
||||
|
||||
The date part of the returned wxDateTime object is always set to today
|
||||
and should be ignored, only the time part is relevant.
|
||||
*/
|
||||
virtual wxDateTime GetValue() const = 0;
|
||||
|
||||
/**
|
||||
Changes the current value of the control.
|
||||
|
||||
The date part of @a dt is ignored, only the time part is displayed in
|
||||
the control. The @a dt object must however be valid.
|
||||
|
||||
Calling this method does not result in a time change event.
|
||||
*/
|
||||
virtual void SetValue(const wxDateTime& dt) = 0;
|
||||
};
|
||||
+150
-49
File diff suppressed because it is too large
Load Diff
+13
-3
@@ -330,10 +330,17 @@
|
||||
|
||||
#define wxUSE_WEBVIEW 0
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define wxUSE_WEBVIEW_IE 0
|
||||
#else
|
||||
#define wxUSE_WEBVIEW_IE 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXGTK__) || defined(__WXOSX__)
|
||||
#define wxUSE_WEBVIEW_WEBKIT 0
|
||||
|
||||
#define wxUSE_WEBVIEW_IE 0
|
||||
|
||||
#else
|
||||
#define wxUSE_WEBVIEW_WEBKIT 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@@ -404,6 +411,7 @@
|
||||
#define wxUSE_STATTEXT 0
|
||||
#define wxUSE_STATBMP 0
|
||||
#define wxUSE_TEXTCTRL 0
|
||||
#define wxUSE_TIMEPICKCTRL 0
|
||||
#define wxUSE_TOGGLEBTN 0
|
||||
#define wxUSE_TREECTRL 0
|
||||
#define wxUSE_TREELISTCTRL 0
|
||||
@@ -671,6 +679,8 @@
|
||||
|
||||
#define wxUSE_DATEPICKCTRL_GENERIC 0
|
||||
|
||||
#define wxUSE_TIMEPICKCTRL_GENERIC 0
|
||||
|
||||
|
||||
#define wxUSE_CRASHREPORT 0
|
||||
/* --- end MSW options --- */
|
||||
|
||||
@@ -16,13 +16,14 @@
|
||||
#ifndef WX_PRECOMP
|
||||
#endif //WX_PRECOMP
|
||||
|
||||
#if wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL
|
||||
#if wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
|
||||
|
||||
#include "wx/dateevt.h"
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent)
|
||||
wxDEFINE_EVENT(wxEVT_DATE_CHANGED, wxDateEvent);
|
||||
wxDEFINE_EVENT(wxEVT_TIME_CHANGED, wxDateEvent);
|
||||
|
||||
#endif // wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL
|
||||
#endif // wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL || wxUSE_TIMEPICKCTRL
|
||||
|
||||
|
||||
#if wxUSE_CALENDARCTRL
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,60 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/msw/timectrl.cpp
|
||||
// Purpose: wxTimePickerCtrl implementation
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2005-01-09
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ============================================================================
|
||||
// declarations
|
||||
// ============================================================================
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_DATEPICKCTRL
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include "wx/timectrl.h"
|
||||
#include "wx/dateevt.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTimePickerCtrl, wxControl)
|
||||
|
||||
// ============================================================================
|
||||
// wxTimePickerCtrl implementation
|
||||
// ============================================================================
|
||||
|
||||
WXDWORD wxTimePickerCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||
{
|
||||
WXDWORD styleMSW = wxTimePickerCtrlBase::MSWGetStyle(style, exstyle);
|
||||
|
||||
styleMSW |= DTS_TIMEFORMAT;
|
||||
|
||||
return styleMSW;
|
||||
}
|
||||
|
||||
wxLocaleInfo wxTimePickerCtrl::MSWGetFormat() const
|
||||
{
|
||||
return wxLOCALE_TIME_FMT;
|
||||
}
|
||||
|
||||
bool wxTimePickerCtrl::MSWOnDateTimeChange(const NMDATETIMECHANGE& dtch)
|
||||
{
|
||||
m_date.SetFromMSWSysTime(dtch.st);
|
||||
|
||||
wxDateEvent event(this, m_date, wxEVT_TIME_CHANGED);
|
||||
return HandleWindowEvent(event);
|
||||
}
|
||||
#endif // wxUSE_DATEPICKCTRL
|
||||
Reference in New Issue
Block a user