Содержание

pb_ui_search_bk_create_search_menu

Синтаксис

void pb_ui_search_bk_create_search_menu( int BookID, int mode );

Описание

Функция предназначена для выбора номера из тел.книги. Используется в структуре страницы книги. См.пример.

Параметры

Пример

typedef struct
{
  void * unk;
  char * pnum_str;
}PB_SEARCH_DATA;
 
//----------------------------------------------------------------------------
 
 
int SearchPB_Page_Enter_Action(void * ,BOOK * book)
{
  pb_ui_search_bk_create_search_menu( BookObj_GetBookID( book ), MODE_PB | MODE_SIM | MODE_UNSAVED );
 
  return 1;
}
 
 
int SearchPB_Page_Accept_Action(void * data,BOOK * book)
{
  PB_SEARCH_DATA * pb_data = (PB_SEARCH_DATA*)data;
 
  MessageBox( EMPTY_TEXTID, TextID_Create( pb_data->pnum_str, ENC_BCD, TEXTID_ANY_LEN ), NOIMAGE, 0, 2000, book );
 
  return 1;
}
 
 
int SearchPB_Page_Prev_Action(void * data,BOOK * book)
{
  BookObj_ReturnPage( book, PREVIOUS_EVENT );
  return 1;
}
 
 
int SearchPB_Page_Cancel_Action(void * data,BOOK * book)
{
  BookObj_ReturnPage( book, CANCEL_EVENT );
  return 1;
}
 
 
//----------------------------------------------------------------------------
 
const PAGE_MSG searchpb_msglst[] @ "DYN_PAGE" =
{
  PAGE_ENTER_EVENT_TAG, SearchPB_Page_Enter_Action,
  ACCEPT_EVENT_TAG, SearchPB_Page_Accept_Action,
  PREVIOUS_EVENT_TAG, SearchPB_Page_Prev_Action,
  CANCEL_EVENT_TAG, SearchPB_Page_Cancel_Action,
  NIL_EVENT_TAG, 0
};
 
const PAGE_DESC SearchPB_Page = { "SearchPB_Page", 0, searchpb_msglst };