\wxheading{Parameters}
\docparam{header}{HTML text to be used as header. You can use macros in it:
-
-\begin{itemize}\itemsep=0pt
-\item @PAGENUM@ is replaced by page number
-\item @PAGESCNT@ is replaced by total number of pages
-\end{itemize}
+\input htprintmacros.inc
}
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
\wxheading{Parameters}
\docparam{footer}{HTML text to be used as footer. You can use macros in it:
-
-\begin{itemize}\itemsep=0pt
-\item @PAGENUM@ is replaced by page number
-\item @PAGESCNT@ is replaced by total number of pages
-\end{itemize}
+\input htprintmacros.inc
}
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
\wxheading{Parameters}
\docparam{footer}{HTML text to be used as footer. You can use macros in it:
-\begin{itemize}
-\item @PAGENUM@ is replaced by page number
-\item @PAGESCNT@ is replaced by total number of pages
-\end{itemize}
+\input htprintmacros.inc
}
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
\wxheading{Parameters}
\docparam{header}{HTML text to be used as header. You can use macros in it:
-\begin{itemize}
-\item @PAGENUM@ is replaced by page number
-\item @PAGESCNT@ is replaced by total number of pages
-\end{itemize}
+\input htprintmacros.inc
}
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
--- /dev/null
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: htprint.inc
+%% Purpose: Macros which can be used with wxHtmlPrintout: this file is
+%% included from several locations where we list these macros
+%% Author: Vadim Zeitlin
+%% Created: 2006-07-29
+%% RCS-ID: $Id$
+%% Copyright: (c) 2006 Vadim Zeitlin
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{itemize}\itemsep=0pt
+\item @DATE@ is replaced by the current date in default format
+\item @PAGENUM@ is replaced by page number
+\item @PAGESCNT@ is replaced by total number of pages
+\item @TIME@ is replaced by the current time in default format
+\item @TITLE@ is replaced with the title of the document
+\end{itemize}
+
num.Printf(wxT("%lu"), (unsigned long)(m_PageBreaks.Count() - 1));
r.Replace(wxT("@PAGESCNT@"), num);
+ const wxDateTime now = wxDateTime::Now();
+ r.Replace(wxT("@DATE@"), now.FormatDate());
+ r.Replace(wxT("@TIME@"), now.FormatTime());
+
+ r.Replace(wxT("@TITLE@"), GetTitle());
+
return r;
}