OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [soft/] [linux/] [common/] [console/] [nctable.h] - Blame information for rev 21

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 v.karak
 
2
#ifndef __NCTABLE_H__
3
#define __NCTABLE_H__
4
 
5
#include <ncurses.h>
6
#include <vector>
7
 
8
struct row_t {
9
    int X0;
10
    int Y0;
11
    std::vector<WINDOW*> w;
12
};
13
 
14
struct header_t {
15
    int X0;
16
    int Y0;
17
    int W;
18
    int H;
19
    WINDOW *w;
20
};
21
 
22
class table {
23
 
24
public:
25
    table(int colomn_number, int cell_width, int cell_height);
26
    table(int row, int col, int cell_width, int cell_height);
27
    table(int cell_width, int cell_height);
28
    virtual ~table();
29
 
30
    int create_table(int nrow, int ncol);
31
    int add_row();
32
    bool create_header();
33
    int set_header_text(const char *fmt, ...);
34
    bool create_status();
35
    int set_status_text(unsigned id, const char *fmt, ...);
36
    int set_cell_text(unsigned nrow, unsigned ncol, const char *fmt, ...);
37
    int set_colomn_number(int col);
38
 
39
private:
40
 
41
    void init();
42
    void clear_table();
43
    void clear_status();
44
    void clear_header();
45
 
46
    int m_colomn;
47
    int m_row;
48
    int m_maxW;
49
    int m_maxH;
50
    int m_W0;
51
    int m_H0;
52
    int m_CW;
53
    int m_CH;
54
 
55
    header_t m_header;
56
    std::vector<struct row_t> m_table;
57
    std::vector<struct header_t> m_status;
58
};
59
 
60
#endif //__NCTABLE_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.