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