1/* 2 * Copyright 2008, Haiku. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Michael Pfeiffer <laplace@users.sourceforge.net> 7 */ 8 9#ifndef _PRINTER_SELECTION_H 10#define _PRINTER_SELECTION_H 11 12#include "PPD.h" 13 14#include <Invoker.h> 15#include <View.h> 16#include <ListItem.h> 17#include <ListView.h> 18 19class FileItem : public BStringItem 20{ 21private: 22 BString fFile; 23 24public: 25 FileItem(const char* label, const char* file) 26 : BStringItem(label) 27 , fFile(file) 28 { 29 } 30 31 const char* GetFile() { return fFile.String(); } 32}; 33 34class PrinterSelectionView : public BView, public BInvoker 35{ 36private: 37 BListView* fVendors; 38 BListView* fPrinters; 39 40public: 41 PrinterSelectionView(BRect rect, const char *name, uint32 resizeMask, uint32 flags); 42 43 void AttachedToWindow(); 44 45 void FillVendors(); 46 void FillPrinters(const char* vendor); 47 void MessageReceived(BMessage* msg); 48}; 49#endif 50