D4CD_TIME - Gargy007/D4CD GitHub Wiki

D4CD_TIME user defined object is defined to show and set the time. The time object can show the hours, minutes and seconds and all this items could be individually showed or hided in any combination. The object also support setting of time with undo operation during setting phase.

Example:

  • (red - hours, green - minutes, blue - seconds)

D4CD_TIME

Declaration

D4CD_DECLARE_TIME(name, x, y, cx, flags, pUser, OnSet, pOnUsrMsg)

  • name - name of object
  • x,y - coordination of time
  • cx - full length of time object
  • flags - system flags of object
  • pUser - user data/pointer
  • OnSet - pointer on OnSet function
  • pOnUsrMsg - pointer on user message function

API functions

Function that sets the time value in runtime.

void D4CD_TimeSetValue(D4CD_OBJECT_PTR pThis, Byte hours, Byte minutes, Byte seconds)

The help function that simplify adding new second, just increment time by one second.

void D4CD_TimeAddSecond(D4CD_OBJECT_PTR pThis)

Function that returns current value of time object in runtime.

D4CD_TIME_VALUE* D4CD_TimeGetValue(D4CD_OBJECT_PTR pThis)

Function sets the visibility of individual items of time object.

void D4CD_TimeSetVisibility(D4CD_OBJECT_PTR pThis, D4CD_BOOL hours, D4CD_BOOL minutes, D4CD_BOOL seconds)

Function sets the mode(12/24) of time object.

void D4CD_TimeSetMode(D4CD_OBJECT_PTR pThis, D4CD_BOOL enable24mode)