1 /* 2 * Copyright 2001-2010, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Michael Pfeiffer 7 */ 8 #ifndef _PRINTERS_WINDOW_H 9 #define _PRINTERS_WINDOW_H 10 11 12 #include <Box.h> 13 #include <Window.h> 14 15 16 class PrintersWindow; 17 class PrinterListView; 18 class JobListView; 19 class Job; 20 class SpoolFolder; 21 class PrinterItem; 22 class ScreenSettings; 23 24 25 class PrintersWindow : public BWindow { 26 public: 27 PrintersWindow(ScreenSettings *settings); 28 virtual ~PrintersWindow(); 29 30 void MessageReceived(BMessage* msg); 31 bool QuitRequested(); 32 33 void PrintTestPage(PrinterItem* printer); 34 35 void AddJob(SpoolFolder* folder, Job* job); 36 void RemoveJob(SpoolFolder* folder, Job* job); 37 void UpdateJob(SpoolFolder* folder, Job* job); 38 39 private: 40 ScreenSettings* fSettings; 41 void _BuildGUI(); 42 bool _IsSelected(PrinterItem* printer); 43 void _UpdatePrinterButtons(); 44 void _UpdateJobButtons(); 45 46 typedef BWindow Inherited; 47 48 PrinterListView* fPrinterListView; 49 BButton* fMakeDefault; 50 BButton* fRemove; 51 BButton* fPrintTestPage; 52 53 JobListView* fJobListView; 54 BButton* fRestart; 55 BButton* fCancel; 56 57 BBox* fJobsBox; 58 59 PrinterItem* fSelectedPrinter; 60 61 bool fAddingPrinter; 62 }; 63 64 #endif // _PRINTERS_WINDOW_H 65