All Window Function Documentation

TAP_Win_Create

Topfield Documentation

void TAP_Win_Create(TYPE_Window *win, word rgn, dword x, dword y, dword w, dword h, byte save, byte bScr);

It sets the basic parameters of window and draws it on the screen.

  • save : It decides to save the background image before the window is drawn.
  • bScr : It decides to show the scroll bar.

Additional Documentation


TAP_Win_SetTitle

Topfield Documentation

void TAP_Win_SetTitle(TYPE_Window *win, const char *str, byte fntType, byte fntSize);

It draws the title of window.

Additional Documentation


TAP_Win_SetColor

Topfield Documentation

void TAP_Win_SetColor(TYPE_Window * win, word titleBack, word titleText, word bodyBack, word bodyText, word border, word shadow, word dark, word light);

It sets the color of window.

  • titleBack : the background color of Title Bar
  • titleText : the text color of Title Bar
  • bodyBack : the background color of Body
  • bodyText : the text color of Body
  • shadow : It decides to show the shadow effect of the window.
  • dark : the color of the dark side to effect 3D
  • light : the color of the bright side to effect 3D
CAUTION : This function SHOULD be called before TAP_Win_Create() is called.

Additional Documentation


TAP_Win_SetDefaultColor

Topfield Documentation

void TAP_Win_SetDefaultColor(TYPE_Window *win);

It sets the color LUT of window to default one.

CAUTION : This function SHOULD be called before TAP_Win_Create() is called if you want the default CLUT.

Additional Documentation

LUT = Look-Up Table, CLUT = Color Look-Up Table


TAP_Win_Draw

Topfield Documentation

void TAP_Win_Draw(TYPE_Window *win);

It draws the window.

Additional Documentation


TAP_Win_Delete

Topfield Documentation

dword TAP_Win_Delete(TYPE_Window *win);

It deletes the window.

Additional Documentation


TAP_Win_SetFont

Topfield Documentation

void TAP_Win_SetFont(TYPE_Window *win, byte fntType, byte fntSize);

It selects the font for list mode.

Additional Documentation


TAP_Win_AddItem

Topfield Documentation

void TAP_Win_AddItem(TYPE_Window *win, char *str);

It adds the optional strings after changing to the list mode.

Additional Documentation

str can contain additional control characters:

| acts as an absolute 100 pixel tab. Text after the first | is placed at 100 pixels and coloured blue. Text after the second | is places at 200 pixels and coloured teal.

@ positions and colours text with the same rules as |, but only shows the text when the item is selected.

Note that you can manipulate the TYPE_Window structure directly once the items have been added, which allows values to be changed. To refresh the screen use

TAP_Win_SetSelection(win, TAP_Win_GetSelection(win));

TAP_Win_GetSelection

Topfield Documentation

dword TAP_Win_GetSelection(TYPE_Window *win);

It gets the selected item number in the list mode.

return value : the index of the selected item

Additional Documentation


TAP_Win_SetSelection

Topfield Documentation

void TAP_Win_SetSelection(TYPE_Window *win, dword pos);

It changes the item to be selected in the list mode.

  • pos : the index of the item to be selected

Additional Documentation


TAP_Win_Action

Topfield Documentation

void TAP_Win_Action(TYPE_Window *win, dword key);

The window works by the remote controller key in the list mode.

  • key : remote controller key

Additional Documentation