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 AddJob(SpoolFolder* folder, Job* job); 32 void RemoveJob(SpoolFolder* folder, Job* job); 33 void UpdateJob(SpoolFolder* folder, Job* job); 34 35 private: 36 void BuildGUI(); 37 bool IsSelected(PrinterItem* printer); 38 void UpdatePrinterButtons(); 39 void UpdateJobButtons(); 40 41 typedef BWindow Inherited; 42 43 PrinterListView* fPrinterListView; 44 BButton* fMakeDefault; 45 BButton* fRemove; 46 47 JobListView* fJobListView; 48 BButton* fRestart; 49 BButton* fCancel; 50 51 BBox* fJobsBox; 52 53 PrinterItem* fSelectedPrinter; 54 55 bool fAddingPrinter; 56 }; 57 58 #endif // _PRINTERS_WINDOW_H 59