D4CD_LABEL - Gargy007/D4CD GitHub Wiki

D4CD_LABEL object is defined for simple show of one line text on display. The main feature of the label object (extension to original D4D) is new fixed pretext and posttext part of label. So this part allows create the labels there is first and last part of text constant and middle can be changed. For example the preText/postText parts can be very nicely used to show temperature: “Temp: 26 °C” And this label takes only in RAm memory string “26“and rest text can be in NVM.

D4CD_LABEL

Declaration

D4CD_DECLARE_LABEL(name, preText, text, postText, x, y, cx, flags, pUser, pOnUsrMsg)

  • name - name of object
  • preText - pointer on pre text part of label
  • text - pointer to main text of label
  • postText - pointer to post text part of label
  • x,y - coordination of label
  • cx - full length of label
  • flags - system flags of object
  • pUser - user data/pointer
  • pOnUsrMsg - pointer on user message function

API functions

Only standard function to runtime change text of label - D4CD_SetText.