1 /* 2 * AddPrinterDlg.cpp 3 * Copyright 1999-2000 Y.Takagi. All Rights Reserved. 4 */ 5 6 #include "DialogWindow.h" 7 8 #include <ListItem.h> 9 #include <View.h> 10 11 class BListView; 12 class BTextView; 13 14 class PrinterData; 15 class PrinterCap; 16 class ProtocolClassCap; 17 18 class ProtocolClassItem : public BStringItem { 19 public: 20 ProtocolClassItem(const ProtocolClassCap* cap); 21 22 int GetProtocolClass() const; 23 const char* GetDescription() const; 24 25 private: 26 const ProtocolClassCap *fProtocolClassCap; 27 }; 28 29 class AddPrinterView : public BView { 30 public: 31 AddPrinterView(PrinterData* printerData, 32 const PrinterCap* printerCap); 33 ~AddPrinterView(); 34 virtual void AttachedToWindow(); 35 void MessageReceived(BMessage* msg); 36 37 void Save(); 38 39 private: 40 ProtocolClassItem* CurrentSelection(); 41 42 PrinterData* fPrinterData; 43 const PrinterCap* fPrinterCap; 44 45 BListView* fProtocolClassList; 46 BTextView* fDescription; 47 }; 48 49 50 class AddPrinterDlg : public DialogWindow { 51 public: 52 AddPrinterDlg(PrinterData *printerData, 53 const PrinterCap *printerCap); 54 void MessageReceived(BMessage *msg); 55 56 private: 57 AddPrinterView* fAddPrinterView; 58 }; 59 60