ARB
Macros | Enumerations | Functions
asciiprint.cxx File Reference
#include "asciiprint.hxx"
#include <aw_window.hxx>
#include <aw_root.hxx>
#include <aw_question.hxx>
#include <aw_awar.hxx>
#include <aw_msg.hxx>
#include <arbdbt.h>
Include dependency graph for asciiprint.cxx:

Go to the source code of this file.

Macros

#define AWAR_APRINT   "tmp/aprint/"
 
#define AWAR_APRINT_TITLE   AWAR_APRINT "title"
 
#define AWAR_APRINT_TEXT   AWAR_APRINT "text"
 
#define AWAR_APRINT_PAPER_SIZE   AWAR_APRINT "paper_size"
 
#define AWAR_APRINT_MAGNIFICATION   AWAR_APRINT "magnification"
 
#define AWAR_APRINT_SX   AWAR_APRINT "source_columns"
 
#define AWAR_APRINT_SY   AWAR_APRINT "source_rows"
 
#define AWAR_APRINT_DX   AWAR_APRINT "dest_cols"
 
#define AWAR_APRINT_DY   AWAR_APRINT "dest_rows"
 
#define AWAR_APRINT_ORIENTATION   AWAR_APRINT "orientation"
 
#define AWAR_APRINT_PAGES   AWAR_APRINT "pages"
 
#define AWAR_APRINT_PRINTTO   AWAR_APRINT "printto"
 
#define AWAR_APRINT_PRINTER   AWAR_APRINT "printer"
 
#define AWAR_APRINT_FILE   AWAR_APRINT "file"
 

Enumerations

enum  AWT_asciiprint_orientation { AWT_APRINT_ORIENTATION_PORTRAIT, AWT_APRINT_ORIENTATION_LANDSCAPE, AWT_APRINT_ORIENTATION_DOUBLE_PORTRAIT }
 
enum  AWT_asciiprint_paper_size { AWT_APRINT_PAPERSIZE_A4, AWT_APRINT_PAPERSIZE_US }
 
enum  AWT_asciiprint_destination { AWT_APRINT_DEST_PRINTER, AWT_APRINT_DEST_FILE_PS, AWT_APRINT_DEST_FILE_ASCII, AWT_APRINT_DEST_PREVIEW }
 

Functions

static double awt_aps_get_xy_ratio (AW_root *awr)
 
static int awt_aps_get_default_lines_per_page (AW_root *awr)
 
static void awt_aps_calc_pages_needed (AW_root *awr)
 
static void awt_aps_set_magnification_to_fit_xpage (AW_root *awr)
 
static void awt_aps_set_magnification_to_fit_ypage (AW_root *awr)
 
static void awt_aps_set_magnification_to_fit_xpage (AW_window *aww)
 
static void awt_aps_set_magnification_to_fit_ypage (AW_window *aww)
 
static void awt_aps_text_changed (AW_root *awr)
 
static void write_file (const char *filename, const char *file)
 
static charprintFile (AW_root *awr)
 
static void awt_aps_go (AW_window *aww)
 
static void cutExt (char *name, const char *removeExt)
 
static charcorrect_extension (const char *name, const char *newExt)
 
static void aps_correct_filename (AW_root *aw_root)
 
void AWT_create_ascii_print_window (AW_root *awr, const char *text_to_print, const char *title)
 
void AWT_show_file (AW_root *awr, const char *filename)
 

Macro Definition Documentation

#define AWAR_APRINT   "tmp/aprint/"

Definition at line 20 of file asciiprint.cxx.

#define AWAR_APRINT_TITLE   AWAR_APRINT "title"

Definition at line 21 of file asciiprint.cxx.

Referenced by awt_aps_go(), and AWT_create_ascii_print_window().

#define AWAR_APRINT_TEXT   AWAR_APRINT "text"

Definition at line 22 of file asciiprint.cxx.

Referenced by awt_aps_go(), awt_aps_text_changed(), and AWT_create_ascii_print_window().

#define AWAR_APRINT_PAPER_SIZE   AWAR_APRINT "paper_size"

Definition at line 23 of file asciiprint.cxx.

Referenced by AWT_create_ascii_print_window().

#define AWAR_APRINT_MAGNIFICATION   AWAR_APRINT "magnification"
#define AWAR_APRINT_SX   AWAR_APRINT "source_columns"
#define AWAR_APRINT_SY   AWAR_APRINT "source_rows"
#define AWAR_APRINT_DX   AWAR_APRINT "dest_cols"
#define AWAR_APRINT_DY   AWAR_APRINT "dest_rows"
#define AWAR_APRINT_ORIENTATION   AWAR_APRINT "orientation"
#define AWAR_APRINT_PAGES   AWAR_APRINT "pages"

Definition at line 30 of file asciiprint.cxx.

Referenced by awt_aps_calc_pages_needed(), and AWT_create_ascii_print_window().

#define AWAR_APRINT_PRINTTO   AWAR_APRINT "printto"

Definition at line 31 of file asciiprint.cxx.

Referenced by aps_correct_filename(), awt_aps_go(), and AWT_create_ascii_print_window().

#define AWAR_APRINT_PRINTER   AWAR_APRINT "printer"

Definition at line 32 of file asciiprint.cxx.

Referenced by awt_aps_go(), and AWT_create_ascii_print_window().

#define AWAR_APRINT_FILE   AWAR_APRINT "file"

Definition at line 33 of file asciiprint.cxx.

Referenced by aps_correct_filename(), AWT_create_ascii_print_window(), and printFile().

Enumeration Type Documentation

Enumerator
AWT_APRINT_ORIENTATION_PORTRAIT 
AWT_APRINT_ORIENTATION_LANDSCAPE 
AWT_APRINT_ORIENTATION_DOUBLE_PORTRAIT 

Definition at line 36 of file asciiprint.cxx.

Enumerator
AWT_APRINT_PAPERSIZE_A4 
AWT_APRINT_PAPERSIZE_US 

Definition at line 43 of file asciiprint.cxx.

Enumerator
AWT_APRINT_DEST_PRINTER 
AWT_APRINT_DEST_FILE_PS 
AWT_APRINT_DEST_FILE_ASCII 
AWT_APRINT_DEST_PREVIEW 

Definition at line 48 of file asciiprint.cxx.

Function Documentation

static double awt_aps_get_xy_ratio ( AW_root awr)
static
static int awt_aps_get_default_lines_per_page ( AW_root awr)
static
static void awt_aps_calc_pages_needed ( AW_root awr)
static
static void awt_aps_set_magnification_to_fit_xpage ( AW_root awr)
static
static void awt_aps_set_magnification_to_fit_ypage ( AW_root awr)
static
static void awt_aps_set_magnification_to_fit_xpage ( AW_window aww)
static
static void awt_aps_set_magnification_to_fit_ypage ( AW_window aww)
static
static void awt_aps_text_changed ( AW_root awr)
static
static void write_file ( const char filename,
const char file 
)
static

Definition at line 179 of file asciiprint.cxx.

References aw_message(), aw_question(), and GBS_global_string().

Referenced by awt_aps_go().

static char* printFile ( AW_root awr)
static
static void awt_aps_go ( AW_window aww)
static
static void cutExt ( char name,
const char removeExt 
)
static

Definition at line 355 of file asciiprint.cxx.

Referenced by correct_extension().

static char* correct_extension ( const char name,
const char newExt 
)
static

Definition at line 361 of file asciiprint.cxx.

References ARB_strdup(), cutExt(), and result.

Referenced by aps_correct_filename().

static void aps_correct_filename ( AW_root aw_root)
static
void AWT_create_ascii_print_window ( AW_root awr,
const char text_to_print,
const char title 
)
void AWT_show_file ( AW_root awr,
const char filename 
)

Definition at line 518 of file asciiprint.cxx.

References aw_message(), AWT_create_ascii_print_window(), GB_await_error(), and GB_read_file().

Referenced by ARB_main().