printout.h

Go to the documentation of this file.
00001 /* Eliot                                                                     */
00002 /* Copyright (C) 1999  Antoine Fraboulet                                     */
00003 /*                                                                           */
00004 /* This file is part of Eliot.                                               */
00005 /*                                                                           */
00006 /* Eliot is free software; you can redistribute it and/or modify             */
00007 /* it under the terms of the GNU General Public License as published by      */
00008 /* the Free Software Foundation; either version 2 of the License, or         */
00009 /* (at your option) any later version.                                       */
00010 /*                                                                           */
00011 /* Eliot is distributed in the hope that it will be useful,                  */
00012 /* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
00013 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
00014 /* GNU General Public License for more details.                              */
00015 /*                                                                           */
00016 /* You should have received a copy of the GNU General Public License         */
00017 /* along with this program; if not, write to the Free Software               */
00018 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00019 
00020 #ifndef _PRINTOUT_H
00021 #define _PRINTOUT_H
00022 
00023 #include <ctype.h>
00024 #include "wx/print.h"
00025 
00026 class GamePrintout : public wxPrintout
00027 {
00028 private:
00029     Game& m_game;
00030     ConfigDB config;
00031 
00032     void SetSpaces(wxString*, int);
00033     void DrawStringJustif(wxDC*,wxString*,long,long,long,enum Justif, int);
00034     void DrawHeadingLine(wxDC*, long, float);
00035     void DrawTextLine(wxDC*, int, long, long, float);
00036     void DrawGameLines(wxDC*, long, long, float, float, float);
00037 public:
00038 
00039     GamePrintout(Game& iGame, char* title = APPNAME)
00040         : wxPrintout(wxU(title)), m_game(iGame) {}
00041 
00042     bool OnPrintPage(int);
00043     bool HasPage(int);
00044     bool OnBeginDocument(int startPage, int endPage);
00045     void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
00046     void DrawPage(wxDC *dc);
00047 };
00048 
00049 #endif
00050 
00051 /****************************************************************/
00052 /****************************************************************/
00053 
00054 /// Local Variables:
00055 /// mode: c++
00056 /// mode: hs-minor
00057 /// c-basic-offset: 4
00058 /// End:

Generated on Thu Dec 29 02:01:15 2005 for Eliot by  doxygen 1.4.5