1 /* 2 3 Preview printer driver. 4 5 Copyright (c) 2003 OpenBeOS. 6 Copyright (c) 2005 Haiku. 7 8 Authors: 9 Philippe Houdoin 10 Simon Gauvin 11 Michael Pfeiffer 12 Hartmut Reh 13 14 Permission is hereby granted, free of charge, to any person obtaining a copy of 15 this software and associated documentation files (the "Software"), to deal in 16 the Software without restriction, including without limitation the rights to 17 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 18 of the Software, and to permit persons to whom the Software is furnished to do 19 so, subject to the following conditions: 20 21 The above copyright notice and this permission notice shall be included in all 22 copies or substantial portions of the Software. 23 24 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 THE SOFTWARE. 31 32 */ 33 34 #ifndef PAGESETUPWINDOW_H 35 #define PAGESETUPWINDOW_H 36 37 #include <InterfaceKit.h> 38 #include <Message.h> 39 #include <Messenger.h> 40 #include <File.h> 41 #include <FindDirectory.h> 42 #include <Path.h> 43 #include <String.h> 44 #include "InterfaceUtils.h" 45 #include "Utils.h" 46 47 class MarginView; 48 49 class PageSetupWindow : public BlockingWindow 50 { 51 public: 52 // Constructors, destructors, operators... 53 54 PageSetupWindow(BMessage *msg, const char *printerName = NULL); 55 56 typedef BlockingWindow inherited; 57 58 // public constantes 59 enum { 60 OK_MSG = 'ok__', 61 CANCEL_MSG = 'cncl', 62 }; 63 64 // Virtual function overrides 65 public: 66 virtual void MessageReceived(BMessage *msg); 67 68 // From here, it's none of your business! ;-) 69 private: 70 BMessage * fSetupMsg; 71 BMenuField * fPageSizeMenu; 72 BMenuField * fOrientationMenu; 73 BTextControl * fScaleControl; 74 75 void UpdateSetupMessage(); 76 77 MarginView * fMarginView; 78 79 // used for saving settings 80 BString fPrinterDirName; 81 82 //private class constants 83 static const int kMargin = 10; 84 static const int kOffset = 200; 85 }; 86 87 #endif 88