Ejemplo n.º 1
0
static void GUIMakeWinIn() {
    hWinIn = WINDOW_CreateEx(
        20, 140, 200, 150,
        0,
        WM_CF_SHOW,
        0,
        ++curId,
        0
    );
    TEXT_CreateEx(
        40, 50, 120, 50,
        hWinIn,
        WM_CF_SHOW,
        TEXT_CF_HCENTER, 
        ++curId,
        "Please put in\r\nyour clothes!"
    );
}
Ejemplo n.º 2
0
void run_db(void)
{
/*	
	printf("Database name : %s\n", db->name);
	printf("Database nb children : %i\n", (int)db->nb_motifs);
	for (uint32_t i = 0; i < db->nb_motifs; i++)
	{
		motif_t * m = db->motifs;
		printf("    motif %i:\n", (int)i);
		printf("        name : %s\n", m->name);
		printf("        desc : %s\n", m->desc);
		printf("        img  : %s\n", m->image);
	}
*/
	char error_404[] = "No Motifs Found in Database!";


	if (db->motifs == NULL)
	{
		strcpy(current_motif_title, error_404);
	} else {
		current_motif_index = 1;
		//sprintf(current_motif_title, "%i/%i -- %s", (int)current_motif_index, (int)db->nb_motifs, db->motifs->name);
		//current_motif_desc = db->motifs->desc;
		update_motif();
	}

	WM_HWIN		db_nav_win = WINDOW_CreateEx(	0, 0,
												800, 480,
												WM_HBKWIN, WM_CF_SHOW,
												0, GUI_ID_USER+0,
												_cbrundb);

	WINDOW_SetBkColor(db_nav_win, GUI_WHITE);

	motif_name_widget = TEXT_CreateEx(	0, 0,
													800, 100,
													db_nav_win, WM_CF_SHOW,
													TEXT_CF_HCENTER | TEXT_CF_VCENTER, GUI_ID_TEXT0,
													(const char *)current_motif_title);

	
	motif_desc_widget = MULTIEDIT_CreateEx(	100, 100,
																600, 380,
																db_nav_win, WM_CF_SHOW,
																MULTIEDIT_CF_AUTOSCROLLBAR_V, GUI_ID_MULTIEDIT1,
																5000,
																(const char *) current_motif_desc
															);

	BUTTON_Handle bt_prev_widget = BUTTON_CreateEx(	0, 100,
													100, 380,
													db_nav_win, WM_CF_SHOW,
													0,  GUI_ID_BUTTON0);


	BUTTON_Handle bt_next_widget = BUTTON_CreateEx(	700, 100,
													100, 380,
													db_nav_win, WM_CF_SHOW,
													0,  GUI_ID_BUTTON1);
	
	TEXT_SetFont(motif_name_widget, GUI_FONT_24_1);
	BUTTON_SetFont(bt_prev_widget, GUI_FONT_24_1);
	BUTTON_SetFont(bt_next_widget, GUI_FONT_24_1);
	MULTIEDIT_SetFont(motif_desc_widget, GUI_FONT_24_1);
	MULTIEDIT_SetWrapWord(motif_desc_widget);

	BUTTON_SetBitmap(bt_prev_widget, BUTTON_BI_UNPRESSED, &bmarrowdefault);
	BUTTON_SetBitmap(bt_next_widget, BUTTON_BI_UNPRESSED, &bmarrowrdefault);
	BUTTON_SetBitmap(bt_prev_widget, BUTTON_BI_PRESSED  , &bmarrowclicked);
	BUTTON_SetBitmap(bt_next_widget, BUTTON_BI_PRESSED  , &bmarrowrclicked);

}
Ejemplo n.º 3
0
static void GUIMakeWinOut() {
    hWinOut = WINDOW_CreateEx(
        20, 140, 200, 150,
        0,
        WM_CF_SHOW,
        0,
        ++curId,
        0
    );
    hMultipage = MULTIPAGE_CreateEx(
        10, 10, 180, 130,
        hWinOut,
        WM_CF_SHOW,
        0,
        ++curId
    );
    MULTIPAGE_SetSkin(hMultipage, MULTIPAGE_SKIN_FLEX);

    WM_HWIN hMultipageWindow1 = WINDOW_CreateEx(
        0, 0, 180, 110,
        hMultipage,
        0,
        0,
        ++curId,
        _cbPage1
    );
    WINDOW_SetBkColor(hMultipageWindow1, GUI_RED);
    MULTIPAGE_AddPage(hMultipage, hMultipageWindow1, "Custom");

    hListview = LISTVIEW_CreateEx(0, 0, 180, 130,
        hMultipageWindow1,
        WM_CF_SHOW,
        0,
        ++curId
    );
    LISTVIEW_AddColumn( hListview, 120 ,
            "Cloth",
            GUI_TA_HCENTER | GUI_TA_VCENTER );
    LISTVIEW_AddColumn( hListview, 60 ,
            "Position",
            GUI_TA_HCENTER | GUI_TA_VCENTER );

    const char* name[][2] = {
        {"Polka dot long dress", "40"},
        {"White Shirt", "60"}
    };
    LISTVIEW_AddRow( hListview, (GUI_ConstString*)name[0] );
    LISTVIEW_AddRow( hListview, (GUI_ConstString*)name[1] );


    WM_HWIN hMultipageWindow2 = WINDOW_CreateEx(
        0, 0, 180, 110,
        hMultipage,
        0,
        0,
        ++curId,
        NULL
    );
    WINDOW_SetBkColor(hMultipageWindow2, GUI_BLUE);
    MULTIPAGE_AddPage(hMultipage, hMultipageWindow2, "Suggest");
}