#include <stdio.h>
#include <stdlib.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

extern int	DB_base ;
extern int	MJ_BASEOBJ ;
extern int	DB_baseTop ;
extern int	DB_menu ;
extern int	DB_menuI[4] ;
extern int	DB_menuM[4] ;
extern int	DB_menuI0[4] ;
extern int	DB_aboutFunc() ;
extern int	DB_menuI1[5] ;
extern int	DB_typedoc() ;
extern int	DB_quitFunc() ;
extern int	DB_menuI2[4] ;
extern int	DB_foutFunc() ;
extern int	DB_rcndFunc() ;
extern int	DB_pmodeFunc() ;
extern int	DB_sortmFunc() ;
extern int	DB_menuI3[6] ;
extern int	DB_menu_new() ;
extern int	DB_menu_mdfy() ;
extern int	DB_menu_dlt() ;
extern int	DB_dataDspFunc() ;
extern int	DB_baseDspFunc() ;
extern int	DB_baseTopBtns ;
extern int	DB_baseTopB[2] ;
extern int	DB_PltFunc() ;

#define ALIGN	4
#define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)

/*	MMI_init 用データ	*/

/*	ヘッダ	*/

MMIINIT	initDataMENU = { "MmiInit",  33, 0 } ;

/* DB_base */

static MMIPACKET d001 = {	&DB_base,
							&MJ_BASEOBJ,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d001d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							   0,   0, 639, 479, 0, 7, 0,
							MS_NONEL40,
							NULL,   0,   0
						} ;

/* DB_baseTop */

static MMIPACKET d002 = {	&DB_baseTop,
							&MJ_BASEOBJ,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d002d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							   0,   0, 639,  25,15, 1,15,
							MS_FRAMEL40,
							NULL,   0,   0
						} ;

/* DB_menu */

static MMIPACKET d003 = {	&DB_menu,
							&DB_baseTop,
							&MJ_MENUL40,
							OFFSET(MENUL40),
							MS_NONE
						} ;
static MENUL40	d003d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40 | MS_HORIL40,
							   1,   1, 433,  24,15, 8, 0,
							MS_NONEL40,
							NULL,   0
						} ;

/* DB_menuI[0] */

static MMIPACKET d004 = {	&DB_menuI[0],
							&DB_menu,
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d004d = {	MS_EVMOSONL40 | MS_LEFTL40,
							   1,   1, 126,  24, 1, 2,15,
							MS_PANELL40,
							   0,
							0x0000, 295,
							NULL,
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuM[0] */

static MMIPACKET d005 = {	&DB_menuM[0],
							&DB_menuI[0],
							&MJ_MENUL40,
							OFFSET(MENUL40),
							MS_NONE
						} ;
static MENUL40	d005d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40 | MS_SAVEL40,
							   0,  60, 165, 168, 0,15, 0,
							MS_SRECTL40 | MS_FRAMEL40,
							NULL,   0
						} ;

/* DB_menuI0[0] */

static MMIPACKET d006 = {	&DB_menuI0[0],
							&DB_menuM[0],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d006d = {	MS_EVMOSONL40 | MS_LEFTL40,
							   3,  62, 146,  85, 0,15, 0,
							MS_NONEL40,
							DB_aboutFunc,
							0x0041,  -1,
							"バージョン...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI0[1] */

static MMIPACKET d007 = {	&DB_menuI0[1],
							&DB_menuM[0],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d007d = {	MS_EVMOSONL40 | MS_LEFTL40,
							   6,  89, 149, 112, 0,15, 0,
							MS_NONEL40,
							0,
							0x0000,  -1,
							"ヘルプ",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuM[1] */

static MMIPACKET d008 = {	&DB_menuM[1],
							&DB_menuI0[1],
							&MJ_MENUL40,
							OFFSET(MENUL40),
							MS_NONE
						} ;
static MENUL40	d008d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40 | MS_SAVEL40,
							 129, 205, 302, 361, 0,15, 0,
							MS_SRECTL40 | MS_FRAMEL40,
							NULL,   0
						} ;

/* DB_menuI1[0] */

static MMIPACKET d009 = {	&DB_menuI1[0],
							&DB_menuM[1],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d009d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 135, 210, 294, 233, 0,15, 0,
							MS_NONEL40,
							DB_typedoc,
							0x0048,  -1,
							"ヘルプとは...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI1[1] */

static MMIPACKET d010 = {	&DB_menuI1[1],
							&DB_menuM[1],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d010d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 134, 239, 293, 262, 0,15, 0,
							MS_NONEL40,
							DB_typedoc,
							0x0000,  -1,
							"ファイル出力...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI1[2] */

static MMIPACKET d011 = {	&DB_menuI1[2],
							&DB_menuM[1],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d011d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 134, 265, 293, 288, 0,15, 0,
							MS_NONEL40,
							DB_typedoc,
							0x0000,  -1,
							"検索条件...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI1[3] */

static MMIPACKET d012 = {	&DB_menuI1[3],
							&DB_menuM[1],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d012d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 134, 295, 293, 318, 0,15, 0,
							MS_NONEL40,
							DB_typedoc,
							0x0000,  -1,
							"表示モード...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI1[4] */

static MMIPACKET d013 = {	&DB_menuI1[4],
							&DB_menuM[1],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d013d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 134, 326, 293, 349, 0,15, 0,
							MS_NONEL40,
							DB_typedoc,
							0x0000,  -1,
							"編集...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI0[2] */

static MMIPACKET d014 = {	&DB_menuI0[2],
							&DB_menuM[0],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d014d = {	MS_EVMOSONL40 | MS_LEFTL40,
							   1, 118, 161, 141, 0,15, 0,
							MS_NONEL40,
							0,
							0x0000,  -1,
							NULL,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI0[3] */

static MMIPACKET d015 = {	&DB_menuI0[3],
							&DB_menuM[0],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d015d = {	MS_EVMOSONL40 | MS_LEFTL40,
							   0, 140, 159, 163, 0,15, 0,
							MS_NONEL40,
							DB_quitFunc,
							0x0051,  -1,
							"終了",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI[1] */

static MMIPACKET d016 = {	&DB_menuI[1],
							&DB_menu,
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d016d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 127,   1, 255,  24, 1, 9,15,
							MS_PANELL40,
							   0,
							0x0000,  -1,
							"サイドワーク",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI[2] */

static MMIPACKET d017 = {	&DB_menuI[2],
							&DB_menu,
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d017d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 255,   1, 355,  24, 1, 9,15,
							MS_PANELL40,
							   0,
							0x0000,  -1,
							"補助機能",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuM[2] */

static MMIPACKET d018 = {	&DB_menuM[2],
							&DB_menuI[2],
							&MJ_MENUL40,
							OFFSET(MENUL40),
							MS_NONE
						} ;
static MENUL40	d018d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40 | MS_SAVEL40,
							 264,  62, 412, 169, 0,15, 0,
							MS_SRECTL40 | MS_FRAMEL40,
							NULL,   0
						} ;

/* DB_menuI2[0] */

static MMIPACKET d019 = {	&DB_menuI2[0],
							&DB_menuM[2],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d019d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 265,  63, 408,  86, 0,15, 0,
							MS_NONEL40,
							DB_foutFunc,
							0x0046,  -1,
							"ファイル出力...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI2[1] */

static MMIPACKET d020 = {	&DB_menuI2[1],
							&DB_menuM[2],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d020d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 266,  88, 404, 111, 0,15, 0,
							MS_NONEL40,
							DB_rcndFunc,
							0x0043,  -1,
							"検索条件設定...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI2[2] */

static MMIPACKET d021 = {	&DB_menuI2[2],
							&DB_menuM[2],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d021d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 266, 112, 401, 135, 0,15, 0,
							MS_NONEL40,
							DB_pmodeFunc,
							0x004c,  -1,
							"表示モード...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI2[3] */

static MMIPACKET d022 = {	&DB_menuI2[3],
							&DB_menuM[2],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d022d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 266, 137, 401, 160, 0,15, 0,
							MS_NONEL40,
							DB_sortmFunc,
							0x004b,  -1,
							"ソート種類...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI[3] */

static MMIPACKET d023 = {	&DB_menuI[3],
							&DB_menu,
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d023d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 356,   1, 429,  24, 1, 9,15,
							MS_PANELL40,
							0,
							0x0000,  -1,
							"編集",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuM[3] */

static MMIPACKET d024 = {	&DB_menuM[3],
							&DB_menuI[3],
							&MJ_MENUL40,
							OFFSET(MENUL40),
							MS_NONE
						} ;
static MENUL40	d024d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_SKEYL40 | MS_CHECKL40 | MS_SAVEL40,
							 372, 209, 520, 382, 0,15, 0,
							MS_SRECTL40 | MS_FRAMEL40,
							NULL,   0
						} ;

/* DB_menuI3[0] */

static MMIPACKET d025 = {	&DB_menuI3[0],
							&DB_menuM[3],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d025d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 373, 210, 497, 233, 0,15, 0,
							MS_NONEL40,
							DB_menu_new,
							0x004e,  -1,
							"新規作成...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI3[1] */

static MMIPACKET d026 = {	&DB_menuI3[1],
							&DB_menuM[3],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d026d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 374, 235, 484, 258, 0,15, 0,
							MS_NONEL40,
							DB_menu_mdfy,
							0x004d,  -1,
							"更新...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI3[2] */

static MMIPACKET d027 = {	&DB_menuI3[2],
							&DB_menuM[3],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d027d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 374, 259, 484, 282, 0,15, 0,
							MS_NONEL40,
							DB_menu_dlt,
							0x0044,  -1,
							"削除...",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI3[3] */

static MMIPACKET d028 = {	&DB_menuI3[3],
							&DB_menuM[3],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d028d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 374, 287, 484, 310, 0,15, 0,
							MS_NONEL40,
							0,
							0x0000,  -1,
							NULL,
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI3[4] */

static MMIPACKET d029 = {	&DB_menuI3[4],
							&DB_menuM[3],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d029d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 374, 313, 511, 336, 0,15, 0,
							MS_NONEL40,
							DB_dataDspFunc,
							0x0050,  -1,
							"データ表示する",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_menuI3[5] */

static MMIPACKET d030 = {	&DB_menuI3[5],
							&DB_menuM[3],
							&MJ_MITEML40,
							OFFSET(MITEML40),
							MS_NONE
						} ;
static MITEML40	d030d = {	MS_EVMOSONL40 | MS_LEFTL40,
							 374, 343, 507, 366, 0,15, 0,
							MS_NONEL40,
							DB_baseDspFunc,
							0x0052,  -1,
							"画面の再表示",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							   0
						} ;

/* DB_baseTopBtns */

static MMIPACKET d031 = {	&DB_baseTopBtns,
							&DB_baseTop,
							&MJ_HYPER,
							OFFSET(HYPER),
							MS_NONE
						} ;
static HYPER	d031d = {	MS_NONEL40,
							 417,   1, 639,  42, 0, 0, 0,
							MS_NONEL40,
						} ;

/* DB_baseTopB[0] */

static MMIPACKET d032 = {	&DB_baseTopB[0],
							&DB_baseTopBtns,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d032d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 590,   1, 614,  24, 0, 1,15,
							MS_PANELL40,
							DB_PltFunc,
							0x0000, 294
						} ;

/* DB_baseTopB[1] */

static MMIPACKET d033 = {	&DB_baseTopB[1],
							&DB_baseTopBtns,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d033d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 615,   1, 639,  24, 0, 1,15,
							MS_PANELL40,
							DB_quitFunc,
							0x0000, 290
						} ;

