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 23 24 class PrintersWindow : public BWindow { 25 public: 26 PrintersWindow(BRect frame); 27 28 void MessageReceived(BMessage* msg); 29 bool QuitRequested(); 30 31 void PrintTestPage(PrinterItem* printer); 32 33 void AddJob(SpoolFolder* folder, Job* job); 34 void RemoveJob(SpoolFolder* folder, Job* job); 35 void UpdateJob(SpoolFolder* folder, Job* job); 36 37 private: 38 void _BuildGUI(); 39 bool _IsSelected(PrinterItem* printer); 40 void _UpdatePrinterButtons(); 41 void _UpdateJobButtons(); 42 43 typedef BWindow Inherited; 44 45 PrinterListView* fPrinterListView; 46 BButton* fMakeDefault; 47 BButton* fRemove; 48 BButton* fPrintTestPage; 49 50 JobListView* fJobListView; 51 BButton* fRestart; 52 BButton* fCancel; 53 54 BBox* fJobsBox; 55 56 PrinterItem* fSelectedPrinter; 57 58 bool fAddingPrinter; 59 }; 60 61 #endif // _PRINTERS_WINDOW_H 62