コード例 #1
0
ファイル: demo.c プロジェクト: island-org/gui
static void
graph_panel(struct gui_panel_layout *panel, gui_size current)
{
    enum {COL, PLOT};
    static const gui_float values[]={8.0f,15.0f,20.0f,12.0f,30.0f,12.0f,35.0f,40.0f,20.0f};
    gui_panel_row(panel, 100, 1);
    if (current == COL) {
        gui_panel_graph(panel, GUI_GRAPH_COLUMN, values, LEN(values), 0);
    } else {
        gui_panel_graph(panel, GUI_GRAPH_LINES, values, LEN(values), 0);
    }
}
コード例 #2
0
ファイル: demo.c プロジェクト: serge-rgb/gui
static void
graph_panel(struct gui_panel_layout *panel, gui_size current)
{
    enum {COLUMNS, LINES};
    static const gui_float values[]={8.0f,15.0f,20.0f,12.0f,30.0f,12.0f,35.0f,40.0f,20.0f};
    gui_panel_row_dynamic(panel, 100, 1);
    switch (current) {
    case COLUMNS:
        gui_panel_graph(panel, GUI_GRAPH_COLUMN, values, LEN(values), 0); break;
    case LINES:
        gui_panel_graph(panel, GUI_GRAPH_LINES, values, LEN(values), 0); break;
    default: break;
    }
}