mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2026-01-02 04:17:19 +08:00
refactor folder
This commit is contained in:
33
workspace/widgets_include/table.h
Normal file
33
workspace/widgets_include/table.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef GUILITE_WIDGETS_INCLUDE_TABLE_H
|
||||
#define GUILITE_WIDGETS_INCLUDE_TABLE_H
|
||||
|
||||
#define MAX_COL_NUM 30
|
||||
#define MAX_ROW_NUM 30
|
||||
|
||||
class c_table: public c_wnd
|
||||
{
|
||||
public:
|
||||
virtual c_wnd* clone(){return new c_table();}
|
||||
void set_sheet_align(unsigned int align_type){ m_align_type = align_type;}
|
||||
void set_row_num(unsigned int row_num){ m_row_num = row_num;}
|
||||
void set_col_num(unsigned int col_num){ m_col_num = col_num;}
|
||||
void set_row_height(unsigned int height);
|
||||
void set_col_width(unsigned int width);
|
||||
int set_row_height(unsigned int index, unsigned int height);
|
||||
int set_col_width(unsigned int index, unsigned int width);
|
||||
|
||||
void set_item(int row, int col, char* str, unsigned int color);
|
||||
|
||||
unsigned int get_row_num(){ return m_row_num;}
|
||||
unsigned int get_col_num(){ return m_col_num;}
|
||||
c_rect get_item_rect(int row, int col);
|
||||
protected:
|
||||
void draw_item(int row, int col, const char* str, unsigned int color);
|
||||
|
||||
unsigned int m_align_type;
|
||||
unsigned int m_row_num;
|
||||
unsigned int m_col_num;
|
||||
unsigned int m_row_height[MAX_ROW_NUM];
|
||||
unsigned int m_col_width[MAX_COL_NUM];
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user