From: George H. <geo...@us...> - 2013-12-09 19:42:03
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23016 Modified Files: Calendar.f RESOURCES.F task.f Log Message: Minor mods and tidy up Index: task.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/task.f,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** task.f 28 Nov 2013 20:51:56 -0000 1.21 --- task.f 9 Dec 2013 19:42:00 -0000 1.22 *************** *** 198,202 **** call LeaveCriticalSection drop ; ! winver winnt4 < [if] \ sorry, TryEnterCriticalSection() is only avaible for NT4 and later !!! --- 198,203 ---- call LeaveCriticalSection drop ; ! version# ((version)) 0. 2swap >number 3drop 7 < dup [if] winver winnt4 < and [then] ! [if] \ For V6.xx.xx older OSs \ sorry, TryEnterCriticalSection() is only avaible for NT4 and later !!! *************** *** 209,213 **** call InitializeCriticalSection drop ; ! [else] : trylock ( lock -- fl ) \ W32F Lock --- 210,214 ---- call InitializeCriticalSection drop ; ! [else] \ For future V7.xx.xx and above and newer OSs made conditional for now. : trylock ( lock -- fl ) \ W32F Lock Index: RESOURCES.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/RESOURCES.F,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RESOURCES.F 6 Nov 2013 21:56:29 -0000 1.10 --- RESOURCES.F 9 Dec 2013 19:42:00 -0000 1.11 *************** *** 54,62 **** internal ! winver winnt4 < [if] cr .( Sorry the Resources Utility requires Windows NT4, 2K or better.) ! [else] 5 proc EnumResourceLanguages --- 54,63 ---- internal ! version# ((version)) 0. 2swap >number 3drop 7 < dup [if] winver winnt4 < and [then] ! [if] \ For V6.xx.xx older OSs cr .( Sorry the Resources Utility requires Windows NT4, 2K or better.) ! [else] \ For future V7.xx.xx and above made conditional for now. 5 proc EnumResourceLanguages *************** *** 354,359 **** external ! winver winnt4 < [if] ! \ Add the Icon filename1 to the Application filename2 : AddAppIcon ( s" filename1" s" filename2" -- ) --- 355,360 ---- external ! version# ((version)) 0. 2swap >number 3drop 7 < dup [if] winver winnt4 < and [then] ! [if] \ For V6.xx.xx older OSs \ Add the Icon filename1 to the Application filename2 : AddAppIcon ( s" filename1" s" filename2" -- ) Index: Calendar.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Calendar.f,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Calendar.f 15 Mar 2013 00:23:07 -0000 1.8 --- Calendar.f 9 Dec 2013 19:42:00 -0000 1.9 *************** *** 12,58 **** cr .( Loading Calendar Classes...) ! INTERNAL ! EXTERNAL ! ! synonym DateTimeControl Control ! ! #IFNDEF wYear ! \ Because _SystemTime is a user variable The following need to be set at run time ! 0 value wyear ! 0 value wmonth ! 0 value wDayOfWeek ! 0 value wDay ! 0 value wHour ! 0 value wMinute ! 0 value wSecond ! 0 value wMilliSeconds ! 16 Constant sizeof(_systemTime) ! ! : set-time-pointers ( -- ) ! _SystemTime ! dup to wYear ! 2 + dup to wMonth ! 2 + dup to wDayOfWeek ! 2 + dup to wDay ! 2 + dup to wHour ! 2 + dup to wMinute ! 2 + dup to wSecond ! 2 + to wMilliSeconds ; ! initialization-chain chain-add set-time-pointers ! set-time-pointers ! ! #then ! ! \ TODO: Move the SystemTime-struct into class. So that every instance of the ! \ control becomes his own set of values. ! ! \ *P The MonthCalendar and TimeDatePicker controls both use the _SystemTime structure ! \ ** defined in the file ANSFILE.F , the members of which are; ! \ *Q wYear \ ** The year (1601 - 30827). \ ** ! \ ** wMonth ! \ ** The month. \ ** \ ** January = 1 --- 12,22 ---- cr .( Loading Calendar Classes...) ! \ *P The MonthCalendar and TimeDatePicker controls both use a structure, the members ! \ ** of which are; ! \ *Q Year \ ** The year (1601 - 30827). \ ** ! \ ** Month \ ** \ ** January = 1 *************** *** 69,74 **** \ ** December = 12 \ ** ! \ ** wDayOfWeek ! \ ** The day of the week. \ ** \ ** Sunday = 0 --- 33,37 ---- \ ** December = 12 \ ** ! \ ** DayOfWeek \ ** \ ** Sunday = 0 *************** *** 80,94 **** \ ** Saturday = 6 \ ** ! \ ** wDay \ ** The day of the month (0-31). ! \ ** wHour \ ** The hour (0-23). ! \ ** wMinute \ ** The minute(s) (0-59). ! \ ** wSecond \ ** The second(s) (0-59). ! \ ** wMilliseconds \ ** The millisecond(s) (0-999). \ ------------------------------------------------------------------------ \ *W <a name="MonthCalendar"></a> --- 43,85 ---- \ ** Saturday = 6 \ ** ! \ ** Day \ ** The day of the month (0-31). ! \ ** Hour \ ** The hour (0-23). ! \ ** Minute \ ** The minute(s) (0-59). ! \ ** Second \ ** The second(s) (0-59). ! \ ** Milliseconds \ ** The millisecond(s) (0-999). + in-system + + |Class DateTimeControl <super Control + + in-previous + + Record: Time + short year + short month + short DayOfWeek + short Day + short Hour + short Minute + short Second + short MilliSeconds + ;RecordSize: SizeOfTime + + : SendTimeMessage ( message -- ) + >r Time 0 r> SendMessage:Self ?Win-Error ; + + : Date> ( -- day month year ) + day month year ; + + : >Date ( day month year -- ) + to day to month to year ; + + ;Class + \ ------------------------------------------------------------------------ \ *W <a name="MonthCalendar"></a> *************** *** 120,125 **** \ *P \i Month \d is the month (January = 1; December = 12) \ *P \i year \d is the year (1601 - 30827). ! _SystemTime 0 MCM_GETCURSEL SendMessage:SelfDrop ! wday w@ wmonth w@ wyear w@ ;M :M GetToday: ( -- day month year ) --- 111,118 ---- \ *P \i Month \d is the month (January = 1; December = 12) \ *P \i year \d is the year (1601 - 30827). ! \ _SystemTime 0 MCM_GETCURSEL SendMessage:SelfDrop ! \ wday w@ wmonth w@ wyear w@ ;M ! MCM_GETCURSEL SendTimeMessage ! date> ;M :M GetToday: ( -- day month year ) *************** *** 128,133 **** \ *P \i Month \d is the month (January = 1; December = 12) \ *P \i year \d is the year (1601 - 30827). ! _systemtime 0 MCM_GETTODAY SendMessage:Self ?Win-Error ! wday w@ wmonth w@ wyear w@ ;M ;Class \ *G End of MonthCalendar class --- 121,129 ---- \ *P \i Month \d is the month (January = 1; December = 12) \ *P \i year \d is the year (1601 - 30827). ! \ MCM_GETTODAY SendMessage:Self ?Win-Error ! \ wday w@ wmonth w@ wyear w@ ;M ! MCM_GETTODAY SendTimeMessage ! date> ;M ! ;Class \ *G End of MonthCalendar class *************** *** 251,270 **** :M GetTime: ( -- hrs min secs ) \ *G get user selected time ! _SystemTime 0 DTM_GETSYSTEMTIME SendMessage:Self GDT_VALID = ! if wHour w@ wMinute w@ wSecond w@ ! else 0 0 0 ! then ;M :M SetTime: ( hr min sec -- ) \ *G set time for user to edit ! wSecond w! wMinute w! wHour w! ! 0 wMilliSeconds w! ! _SystemTime GDT_VALID DTM_SETSYSTEMTIME SendMessage:Self ?Win-Error ;M :M GetDate: ( -- day month year ) \ *G get user selected date GetTime: self 3dup or or 0<> ! if 3drop wDay w@ wMonth w@ wYear w@ then ;M --- 247,275 ---- :M GetTime: ( -- hrs min secs ) \ *G get user selected time ! \ _SystemTime 0 DTM_GETSYSTEMTIME SendMessage:Self GDT_VALID = ! \ if wHour w@ wMinute w@ wSecond w@ ! \ else 0 0 0 ! \ then ;M ! 0 DTM_GETSYSTEMTIME SendTimeMessage ! Hour Minute Second ;M :M SetTime: ( hr min sec -- ) \ *G set time for user to edit ! \ wSecond w! wMinute w! wHour w! ! \ 0 wMilliSeconds w! ! \ _SystemTime GDT_VALID DTM_SETSYSTEMTIME SendMessage:Self ?Win-Error ! \ ;M ! to Second to Minute to Hour ! 0 to MilliSeconds ! DTM_SETSYSTEMTIME SendTimeMessage ;M :M GetDate: ( -- day month year ) \ *G get user selected date + \ GetTime: self 3dup or or 0<> + \ if 3drop wDay w@ wMonth w@ wYear w@ + \ then ;M GetTime: self 3dup or or 0<> ! if 3drop Date> then ;M *************** *** 272,276 **** \ *G End of DateTimePicker class - MODULE - \ *Z --- 277,279 ---- |