// ************************************************************************************************************
// Author: Marcin Załęczny
// Release Date: 2010-11-10
// Licence: The GNU Lesser General Public License, version 3.0 (LGPLv3)
// ************************************************************************************************************
#ifndef __MZSTDXPSBLANKETS_KPRED_FORM_H__
#define __MZSTDXPSBLANKETS_KPRED_FORM_H__

#include "mzTransferForm.h"

#define     TRANSFER_TYPE_KPRED          4

class DECLSPEC_MZSTDXPSBLANKETS CKPRedForm : public CTransferForm {
public:
    CString day;
    CString month;
    CString year;
    CString nr;
    
    WINAPI CKPRedForm(CString day, CString month, CString year, CString nr) : CTransferForm()
    {
        this->_commonInit(day, month, year, nr);
    };
    WINAPI CKPRedForm(CString day, CString month, CString year, CString nr,
                      CString receiver, CString receiver2, CString receiverAccount, CString amount,
                      CString senderAccount, CString sender, CString sender2,
                      CString title, CString title2);
    WINAPI CKPRedForm(CString day, CString month, CString year, CString nr,
                      CString receiver, CString receiver2, CString receiverAccount, CString receiverBank,
                      CString amount,
                      CString senderAccount, CString sender, CString sender2,
                      CString title, CString title2, CString kasPlanSymbol, CString amountByWords);
    virtual WINAPI ~CKPRedForm();

    virtual CXmlNode* WINAPI generateBlanket(CXpsPackage* xps, CXpsDocument* xpsDoc, CXpsPage* page, CString fontName, float pageWidth, float pageHeight, float paddingTop = 0);
    
protected:
    float _blanketWidth;
    float _blanketHeight;
    float _mainFormLeftTopX;
    float _mainFormLeftTopY;
    float _gapDash;

    VOID WINAPI _drawBlanket(CXpsPage* page, CXmlNode* mainCanvas, CString fontName, float topX, float topY);
    VOID WINAPI _drawTextContent(CXpsPage* page, CXmlNode* mainCanvas, CString fontName, float topX, float topY,
                            CString day, CString month, CString year, CString nr,
                            CString sender, CString sender2,
                            CString title, CString title2, CString title3,
                            CString amount, CString amountByWords);
    VOID WINAPI _commonInit(CString day, CString month, CString year, CString nr);
};

#endif
