feat: pdf export in word processor

This commit is contained in:
2026-04-02 18:40:45 +02:00
parent ee667e917b
commit 9afae08235
7 changed files with 1072 additions and 19 deletions
+19 -16
View File
@@ -44,25 +44,26 @@ static constexpr int WP_LIST_MARKER_W = 20;
static constexpr int WP_BTN_OPEN_X = 4;
static constexpr int WP_BTN_SAVE_X = 32;
static constexpr int WP_BTN_PRINT_X = 60;
static constexpr int WP_BTN_UNDO_X = 94;
static constexpr int WP_BTN_REDO_X = 122;
static constexpr int WP_BTN_BOLD_X = 156;
static constexpr int WP_BTN_ITALIC_X = 184;
static constexpr int WP_FONT_DD_X = 216;
static constexpr int WP_BTN_EXPORT_X = 88;
static constexpr int WP_BTN_UNDO_X = 122;
static constexpr int WP_BTN_REDO_X = 150;
static constexpr int WP_BTN_BOLD_X = 184;
static constexpr int WP_BTN_ITALIC_X = 212;
static constexpr int WP_FONT_DD_X = 244;
static constexpr int WP_FONT_DD_W = 74;
static constexpr int WP_SIZE_DD_X = 296;
static constexpr int WP_SIZE_DD_X = 324;
static constexpr int WP_SIZE_DD_W = 36;
static constexpr int WP_BTN_ALIGN_L_X = 344;
static constexpr int WP_BTN_ALIGN_C_X = 372;
static constexpr int WP_BTN_ALIGN_R_X = 400;
static constexpr int WP_BTN_BULLET_X = 432;
static constexpr int WP_BTN_NUMBER_X = 460;
static constexpr int WP_BTN_OUTDENT_X = 496;
static constexpr int WP_BTN_INDENT_X = 524;
static constexpr int WP_LINE_DD_X = 558;
static constexpr int WP_BTN_ALIGN_L_X = 372;
static constexpr int WP_BTN_ALIGN_C_X = 400;
static constexpr int WP_BTN_ALIGN_R_X = 428;
static constexpr int WP_BTN_BULLET_X = 460;
static constexpr int WP_BTN_NUMBER_X = 488;
static constexpr int WP_BTN_OUTDENT_X = 524;
static constexpr int WP_BTN_INDENT_X = 552;
static constexpr int WP_LINE_DD_X = 586;
static constexpr int WP_LINE_DD_W = 48;
static constexpr int WP_BTN_DIVIDER_X = 614;
static constexpr int WP_BTN_SECTION_X = 646;
static constexpr int WP_BTN_DIVIDER_X = 642;
static constexpr int WP_BTN_SECTION_X = 674;
static constexpr int WP_DIVIDER_ROW_H = 24;
static constexpr int WP_DIVIDER_FLYOUT_W = 216;
static constexpr int WP_SPECIAL_CHAR_ROW_H = 24;
@@ -371,6 +372,7 @@ extern WPFontTable g_wp_fonts;
extern SvgIcon g_icon_folder;
extern SvgIcon g_icon_save;
extern SvgIcon g_icon_print;
extern SvgIcon g_icon_export_pdf;
extern SvgIcon g_icon_undo;
extern SvgIcon g_icon_redo;
extern SvgIcon g_icon_align_left;
@@ -441,6 +443,7 @@ bool wp_undo(WordProcessorState* wp);
bool wp_redo(WordProcessorState* wp);
bool wp_print_document(WordProcessorState* wp, char* out_status, int out_status_len);
bool wp_export_pdf_document(WordProcessorState* wp, const char* path, char* out_status, int out_status_len);
void wp_render();
void wp_handle_mouse(const Montauk::WinEvent& ev);