#ifndef PRINTDLG_H #define PRINTDLG_H #include "../include/osw-x.h" #include "../include/widget.h" #include "uetypes.h" /* * Draw amount codes: */ #define PRINT_DLG_DRAW_AMOUNT_COMPLETE 0 #define PRINT_DLG_DRAW_AMOUNT_PREVIEW 1 /* * Units codes: */ #define PRINT_DLG_UNITS_PIXELS 0 #define PRINT_DLG_UNITS_INCH 1 #define PRINT_DLG_UNITS_CM 2 /* * Print Dialog: */ struct _print_dlg_struct { bool_t map_state, has_focus; int x, y; unsigned int width, height; int units; win_t toplevel; win_t preview; pixmap_t preview_buf; image_t *preview_img; pixel_t paper_bg_pix, paper_fg_pix; radio_struct print_to_radio; prompt_struct print_cmd_prompt, print_file_prompt; popup_list_struct objects_pulist; prompt_struct x_prompt, y_prompt, width_prompt, height_prompt; check_button_struct obj_labels_cb, label_geometry_cb; radio_struct paper_size_radio, color_mode_radio, orientation_radio; push_button_struct print_btn, cancel_btn; /* Drag information */ int drag_op; /* One of PRINT_DLG_DRAG_OP_* */ int button_pressed; /* Currently pressed button */ int button_last_x, button_last_y; time_t button_pressed_time; /* In ms */ /* Pointer to the universe editor */ void *src; }; /* In printwin.cpp */ extern print_dlg_struct *PrintDlgNew(void *src_uew_ptr); extern void PrintDlgDraw(print_dlg_struct *pw, const int amount); extern void PrintDlgQueueDraw(print_dlg_struct *pw, const int amount); extern int PrintDlgManage(print_dlg_struct *pw, event_t *event); extern void PrintDlgMap(print_dlg_struct *pw); extern void PrintDlgMapValues(print_dlg_struct *pw); extern void PrintDlgUnmap(print_dlg_struct *pw); extern void PrintDlgDelete(print_dlg_struct *pw); #endif /* PRINTDLG_H */