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(); 23 const char *getDescription(); 24 25 private: 26 const ProtocolClassCap *fProtocolClassCap; 27 }; 28 29 class AddPrinterView : public BView { 30 public: 31 AddPrinterView(BRect frame, PrinterData *printer_data, const PrinterCap *printer_cap); 32 ~AddPrinterView(); 33 virtual void AttachedToWindow(); 34 void FrameResized(float w, float h); 35 void MessageReceived(BMessage *msg); 36 37 void Save(); 38 private: 39 ProtocolClassItem *CurrentSelection(); 40 41 PrinterData *fPrinterData; 42 const PrinterCap *fPrinterCap; 43 44 BListView *fProtocolClassList; 45 BTextView *fDescription; 46 }; 47 48 49 class AddPrinterDlg : public DialogWindow { 50 public: 51 AddPrinterDlg(PrinterData *printerData, const PrinterCap *printerCap); 52 void MessageReceived(BMessage *msg); 53 54 private: 55 AddPrinterView *fAddPrinterView; 56 }; 57 58