Patch level : 3.0 nopatch

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :

Documentazione modulo vendita al dettaglio


git-svn-id: svn://10.65.10.50/trunk@14152 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2006-07-11 14:59:08 +00:00
parent 7baaf5c916
commit 7d23c35655
2 changed files with 13 additions and 15 deletions

View File

@ -91,6 +91,7 @@ XVTDLL BOOLEAN xvt_dongle_sl_write_block(unsigned short reg, unsigned short size
XVTDLL void xvt_dwin_clear(WINDOW win, COLOR col); XVTDLL void xvt_dwin_clear(WINDOW win, COLOR col);
XVTDLL void xvt_dwin_draw_arc(WINDOW win, const RCT* r, int sx, int sy, int ex, int ey); XVTDLL void xvt_dwin_draw_arc(WINDOW win, const RCT* r, int sx, int sy, int ex, int ey);
XVTDLL void xvt_dwin_draw_icon(WINDOW win, int x, int y, int rid); XVTDLL void xvt_dwin_draw_icon(WINDOW win, int x, int y, int rid);
XVTDLL void xvt_dwin_draw_image_on_pdf(WINDOW win, const char* name, RCT* dest); // Added by AGA
XVTDLL void xvt_dwin_draw_image(WINDOW win, XVT_IMAGE image, RCT* dest, RCT* source); XVTDLL void xvt_dwin_draw_image(WINDOW win, XVT_IMAGE image, RCT* dest, RCT* source);
XVTDLL void xvt_dwin_draw_oval(WINDOW Win, const RCT* r); XVTDLL void xvt_dwin_draw_oval(WINDOW Win, const RCT* r);
XVTDLL void xvt_dwin_draw_pie(WINDOW win, const RCT *rctp, int start_x, int start_y, int stop_x, int stop_y); XVTDLL void xvt_dwin_draw_pie(WINDOW win, const RCT *rctp, int start_x, int start_y, int stop_x, int stop_y);
@ -225,6 +226,7 @@ XVTDLL BOOLEAN xvt_print_close_page(PRINT_RCD *precp);
XVTDLL PRINT_RCD* xvt_print_create(int *sizep); XVTDLL PRINT_RCD* xvt_print_create(int *sizep);
XVTDLL PRINT_RCD* xvt_print_create_by_name(int* sizep, const char* name); // Added by Aga XVTDLL PRINT_RCD* xvt_print_create_by_name(int* sizep, const char* name); // Added by Aga
XVTDLL int xvt_print_get_name(const PRINT_RCD *precp, char* name, int sz_s); // Added by Aga XVTDLL int xvt_print_get_name(const PRINT_RCD *precp, char* name, int sz_s); // Added by Aga
XVTDLL int xvt_print_set_name(PRINT_RCD* precp, const char* name); // Added by Aga
XVTDLL WINDOW xvt_print_create_win(PRINT_RCD *precp, const char* title); XVTDLL WINDOW xvt_print_create_win(PRINT_RCD *precp, const char* title);
XVTDLL void xvt_print_destroy(PRINT_RCD *precp); XVTDLL void xvt_print_destroy(PRINT_RCD *precp);

View File

@ -109,14 +109,14 @@ protected:
virtual bool OnPrintPage(int pageNum); virtual bool OnPrintPage(int pageNum);
void ResetDC(); void ResetDC();
#if wxCHECK_VERSION(2,6,1) #if wxCHECK_VERSION(2,6,1)
wxDC* CreateDC(const TPRINT_RCD* prcd); wxDC* CreateDC(const TPRINT_RCD* prcd, const char* title);
#endif #endif
public: public:
void SetBadDriver(bool bd) { m_bBadDriver = bd; } void SetBadDriver(bool bd) { m_bBadDriver = bd; }
bool HasBadDriver() const { return m_bBadDriver; } bool HasBadDriver() const { return m_bBadDriver; }
void InitDC(const TPRINT_RCD* prcd); void InitDC(const TPRINT_RCD* prcd, const char* title);
TwxPrintOut(const TPRINT_RCD* prcd = NULL); TwxPrintOut(const TPRINT_RCD* prcd = NULL);
virtual ~TwxPrintOut(); virtual ~TwxPrintOut();
@ -163,7 +163,7 @@ static void data2RCD(const wxPrintData& data, TPRINT_RCD* prcd)
#endif #endif
} }
wxDC* TwxPrintOut::CreateDC(const TPRINT_RCD* prcd) wxDC* TwxPrintOut::CreateDC(const TPRINT_RCD* prcd, const char* title)
{ {
m_prcd = prcd; m_prcd = prcd;
wxDC* dc = NULL; wxDC* dc = NULL;
@ -181,24 +181,20 @@ wxDC* TwxPrintOut::CreateDC(const TPRINT_RCD* prcd)
{ {
wxPrintData data; wxPrintData data;
RCD2data(prcd, data); RCD2data(prcd, data);
#ifdef WIN32
// E' assolutamente necessario risalire al nome "lungo" della stampante
char strName[MAX_PATH]; char strName[MAX_PATH];
xvt_print_get_name(prcd, strName, sizeof(strName)); xvt_print_get_name(prcd, strName, sizeof(strName));
data.SetPrinterName(strName); data.SetPrinterName(strName);
const bool ispdf = (xvt_str_compare_ignoring_case(strName, XVT_PDF_PRINTER_NAME) == 0);
// E' assolutamente necessario risalire al nome "lungo" della stampante
if (ispdf) if (ispdf)
dc = new TwxPDFDC(data, title); dc = new TwxPDFDC(data, title);
else else
#ifdef WIN32
dc = new wxPrinterDC(data); dc = new wxPrinterDC(data);
#else #else
if (ispdf) dc = new wxPostScriptDC(data);
dc = new TwxPDFDC(data, title);
else
dc = new wxPostScriptDC(data);
#endif #endif
} }
wxSize s = dc->GetPPI(); wxSize s = dc->GetPPI();
@ -216,11 +212,11 @@ wxDC* TwxPrintOut::CreateDC(const TPRINT_RCD* prcd)
} }
#endif #endif
void TwxPrintOut::InitDC(const TPRINT_RCD* prcd) void TwxPrintOut::InitDC(const TPRINT_RCD* prcd, const char* title)
{ {
ResetDC(); ResetDC();
#if wxCHECK_VERSION(2,6,1) #if wxCHECK_VERSION(2,6,1)
wxDC* dc = CreateDC(prcd); wxDC* dc = CreateDC(prcd, title);
#else #else
wxDC* dc = NULL; wxDC* dc = NULL;
@ -637,7 +633,7 @@ WINDOW xvt_print_create_win(PRINT_RCD* precp, const char* title)
else else
{ {
TwxPrintOut& po = m_PrintoutCache.Get(rcd); TwxPrintOut& po = m_PrintoutCache.Get(rcd);
po.InitDC(rcd); po.InitDC(rcd, title);
} }
return PRINTER_WIN; return PRINTER_WIN;