Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, April 20, 2024

File: [Platon] / tucniak / api / t_menu.c (download)

Revision 1.1.1.1 (vendor branch), Fri Nov 11 16:08:29 2005 UTC (18 years, 5 months ago) by koli


Changes since 1.1: +0 -0 lines

Initial import

// Copyright (c) 2003 Juraj Kolesár (koli) <koli@koli.sk>               
#include "api.h"

int t_menu_main(WINDOW * win) {
    register int i;
    T_CELLIST * menu = NULL;
    T_CELL menu_item[10];
    struct tt_pos point;
    SET_POS(point, win, 0, 0);
    strcpy(menu_item[__TM_STORE].value,     "Sklad");
    strcpy(menu_item[__TM_CONTACTS].value,    "Adresy");
    strcpy(menu_item[__TM_ACCOUNTING].value,"Ucto");
    strcpy(menu_item[__TM_END].value,         "Koniec");
    for (i=0; i < 5; i++) {
        menu_item[i].width = strlen(menu_item[i].value) + 1;
        menu = g_list_append(menu, &menu_item[i]);    
    }
    return(tt_menu_horizontal(point, menu));
}

int t_menu_contacts(POS point) {
    register int i;
    T_CELLIST *menu = NULL;
    T_CELL menu_item[10];
    strcpy(menu_item[__TMS_PERSON].value, "Ľudia");
    strcpy(menu_item[__TMS_COMPANY].value, "Firmy");
    for (i=0; i < 3; i++) {
        menu_item[i].width = strlen(menu_item[i].value) + 1;
        menu = g_list_append(menu, &menu_item[i]);
    }
    return(tt_menu_vertical(point, menu, 7));
}

int t_menu_store(POS point) {
    register int i;
    T_CELLIST *menu = NULL;
    T_CELL menu_item[10];
    strcpy(menu_item[__TMS_INPUT].value,    "Príjem");
    strcpy(menu_item[__TMS_OUTPUT].value,    "Výdaj");
    strcpy(menu_item[__TMS_OVERVIEW].value,    "Inventúra");
    strcpy(menu_item[__TMS_FLOW].value,        "Pohyby");
    for (i=0; i < 5; i++) {
        menu_item[i].width = strlen(menu_item[i].value) + 1;
        menu = g_list_append(menu, &menu_item[i]);
    }
    return(tt_menu_vertical(point, menu, 10));
}

int t_submenu_flow(POS point) {
    register int i;
    T_CELLIST *menu = NULL;
    T_CELL menu_item[3];
    strcpy(menu_item[__TMSS_INPUTS].value,     "Príjmy");
    strcpy(menu_item[__TMSS_OUTPUTS].value,    "Výdaje");
    for (i=0; i < 3; i++) {
        menu_item[i].width = strlen(menu_item[i].value) + 1;
        menu = g_list_append(menu, &menu_item[i]);
    }
    return(tt_menu_vertical(point, menu, 10));
}


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top