feat: add drag-down spreadsheet functions for numbers, fix click mapping issue
This commit is contained in:
@@ -118,21 +118,26 @@ struct UndoEntry {
|
||||
static constexpr int PATHBAR_H = 32;
|
||||
|
||||
// ============================================================================
|
||||
// Toolbar button positions
|
||||
// Toolbar button IDs (must match handle_toolbar_click and render order)
|
||||
// ============================================================================
|
||||
|
||||
static constexpr int TB_OPEN_X0 = 4, TB_OPEN_X1 = 40;
|
||||
static constexpr int TB_SAVE_X0 = 44, TB_SAVE_X1 = 80;
|
||||
static constexpr int TB_CUT_X0 = 92, TB_CUT_X1 = 120;
|
||||
static constexpr int TB_COPY_X0 = 124, TB_COPY_X1 = 160;
|
||||
static constexpr int TB_PASTE_X0 = 164, TB_PASTE_X1 = 200;
|
||||
static constexpr int TB_BOLD_X0 = 212, TB_BOLD_X1 = 236;
|
||||
static constexpr int TB_AL_X0 = 248, TB_AL_X1 = 272;
|
||||
static constexpr int TB_AC_X0 = 276, TB_AC_X1 = 300;
|
||||
static constexpr int TB_AR_X0 = 304, TB_AR_X1 = 328;
|
||||
static constexpr int TB_FMT_X0 = 340, TB_FMT_X1 = 404;
|
||||
static constexpr int TB_UNDO_X0 = 416, TB_UNDO_X1 = 452;
|
||||
static constexpr int TB_REDO_X0 = 456, TB_REDO_X1 = 492;
|
||||
enum ToolBtnId {
|
||||
TB_OPEN,
|
||||
TB_SAVE,
|
||||
TB_CUT,
|
||||
TB_COPY,
|
||||
TB_PASTE,
|
||||
TB_BOLD,
|
||||
TB_AL,
|
||||
TB_AC,
|
||||
TB_AR,
|
||||
TB_FMT,
|
||||
TB_UNDO,
|
||||
TB_REDO,
|
||||
TB_COUNT
|
||||
};
|
||||
int tb_btn_x0(ToolBtnId id);
|
||||
int tb_btn_x1(ToolBtnId id);
|
||||
|
||||
// ============================================================================
|
||||
// Global state (extern — defined in main.cpp)
|
||||
@@ -215,6 +220,9 @@ bool is_alpha(char c);
|
||||
char to_upper(char c);
|
||||
double str_to_double(const char* s, bool* ok);
|
||||
void double_to_str(char* buf, int max, double v);
|
||||
bool str_is_int(const char* s);
|
||||
int str_to_int(const char* s);
|
||||
void int_to_str(char* dst, int max, int v);
|
||||
|
||||
// ============================================================================
|
||||
// Function declarations — formula.cpp
|
||||
|
||||
Reference in New Issue
Block a user