XenevaOS
Loading...
Searching...
No Matches
sheet_model.h
Go to the documentation of this file.
1
6#ifndef __SHEET_MODEL_H__
7#define __SHEET_MODEL_H__
8
9#include "sheet_types.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15/* Initialize an existing workbook structure */
17
18/* Retrieve currently active tab */
20
21/* Add a new sheet tab to the workbook. Returns tab index, or -1 if at max capacity */
22int SheetModelAddTab(SheetWorkbook* wb, const char* name);
23
24/* Switch active tab to target index. Returns true on success */
26
27/* Rename sheet tab. Returns true on success */
28bool SheetModelRenameTab(SheetWorkbook* wb, int index, const char* newName);
29
30/* Delete sheet tab. Always keeps at least 1 tab. Returns true on success */
32
33/* Get cell pointer for active sheet */
34SheetCell* SheetModelGetActiveCell(SheetWorkbook* wb, int col, int row);
35
36/* Set raw cell text for active sheet, triggering formula evaluation */
37void SheetModelSetCellText(SheetWorkbook* wb, int col, int row, const char* text);
38
39/* Apply or toggle format flag on a specific cell or range */
40void SheetModelToggleFormat(SheetWorkbook* wb, int col, int row, uint16_t fmtFlag);
41void SheetModelSetRangeFormat(SheetWorkbook* wb, const SheetRange* range, uint16_t fmtFlag, bool enable);
42
43/* Clear content and formatting in range */
44void SheetModelClearRange(SheetWorkbook* wb, const SheetRange* range);
45
46/* Sort rows in range according to specified column */
47void SheetModelSortRange(SheetWorkbook* wb, const SheetRange* range, int keyCol, bool ascending);
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif /* __SHEET_MODEL_H__ */
#define index(str, chr)
Definition string.h:66
unsigned short int uint16_t
Definition acefiex.h:162
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
void SheetModelSortRange(SheetWorkbook *wb, const SheetRange *range, int keyCol, bool ascending)
Definition sheet_model.cpp:169
int SheetModelAddTab(SheetWorkbook *wb, const char *name)
Definition sheet_model.cpp:52
void SheetModelClearRange(SheetWorkbook *wb, const SheetRange *range)
Definition sheet_model.cpp:147
void SheetModelInit(SheetWorkbook *wb)
Definition sheet_model.cpp:34
bool SheetModelDeleteTab(SheetWorkbook *wb, int index)
Definition sheet_model.cpp:83
SheetTab * SheetModelGetActiveTab(SheetWorkbook *wb)
Definition sheet_model.cpp:45
bool SheetModelSwitchTab(SheetWorkbook *wb, int index)
Definition sheet_model.cpp:69
void SheetModelSetRangeFormat(SheetWorkbook *wb, const SheetRange *range, uint16_t fmtFlag, bool enable)
Definition sheet_model.cpp:131
void SheetModelSetCellText(SheetWorkbook *wb, int col, int row, const char *text)
Definition sheet_model.cpp:106
bool SheetModelRenameTab(SheetWorkbook *wb, int index, const char *newName)
Definition sheet_model.cpp:75
SheetCell * SheetModelGetActiveCell(SheetWorkbook *wb, int col, int row)
Definition sheet_model.cpp:98
void SheetModelToggleFormat(SheetWorkbook *wb, int col, int row, uint16_t fmtFlag)
Definition sheet_model.cpp:122
Core types, constants, and limits for XESheets spreadsheet application.
Definition sheet_types.h:51
Definition sheet_types.h:87
Definition sheet_types.h:63
Definition sheet_types.h:72