Laxkit  0.0.7.1
simpleprint.h
1 //
2 //
3 // The Laxkit, a windowing toolkit
4 // Please consult http://laxkit.sourceforge.net about where to send any
5 // correspondence about this software.
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Library General Public
9 // License as published by the Free Software Foundation; either
10 // version 2 of the License, or (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Library General Public License for more details.
16 //
17 // You should have received a copy of the GNU Library General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //
21 // Copyright (C) 2004-2007,2010 by Tom Lechner
22 //
23 #ifndef _LAX_SIMPLEPRINT_H
24 #define _LAX_SIMPLEPRINT_H
25 
26 #include <lax/lineedit.h>
27 #include <lax/checkbox.h>
28 #include <lax/messagebox.h>
29 
30 namespace Laxkit {
31 
32 #define SIMPP_SEND_TO_PRINTER (1<<16)
33 #define SIMPP_DEL_PRINTTHIS (1<<17)
34 #define SIMPP_PRINTRANGE (1<<18)
35 
36 class SimplePrint : public MessageBox
37 {
38  protected:
39  char *printthis;
40  int tofile;
41  LineEdit *fileedit,*commandedit,*printstart,*printend;
42  CheckBox *filecheck,*commandcheck;
43  CheckBox *printall,*printcurrent,*printrange;
44  int min,max,cur;
45  virtual void changeTofile(int t);
46  public:
47  SimplePrint(unsigned long nstyle,unsigned long nowner,const char *nsend,
48  const char *file="output.ps", const char *command="lp",
49  const char *thisfile=NULL,
50  int ntof=1,int pmin=-1,int pmax=-1,int pcur=-1);
51  virtual ~SimplePrint() { delete[] printthis; }
52  virtual int init();
53  virtual int CharInput(unsigned int ch,const char *buffer,int len,unsigned int state,const LaxKeyboard *d);
54  virtual int Event(const EventData *e,const char *mes);
55  virtual int Print();
56 };
57 
58 } // namespace Laxkit
59 
60 
61 #endif
62 

Mon Feb 17 2014 11:52:57, Laxkit