2005-02-06 21:22:40 +03:00
|
|
|
/*
|
|
|
|
* AddPrinterDlg.cpp
|
|
|
|
* Copyright 1999-2000 Y.Takagi. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "DialogWindow.h"
|
|
|
|
|
|
|
|
#include <ListItem.h>
|
|
|
|
#include <View.h>
|
|
|
|
|
|
|
|
class BListView;
|
|
|
|
class BTextView;
|
|
|
|
|
|
|
|
class PrinterData;
|
|
|
|
class PrinterCap;
|
|
|
|
class ProtocolClassCap;
|
|
|
|
|
|
|
|
class ProtocolClassItem : public BStringItem {
|
|
|
|
public:
|
2010-10-30 13:43:26 +04:00
|
|
|
ProtocolClassItem(const ProtocolClassCap* cap);
|
2005-02-06 21:22:40 +03:00
|
|
|
|
2010-12-08 23:07:22 +03:00
|
|
|
int GetProtocolClass() const;
|
|
|
|
const char* GetDescription() const;
|
2005-02-06 21:22:40 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
const ProtocolClassCap *fProtocolClassCap;
|
|
|
|
};
|
|
|
|
|
|
|
|
class AddPrinterView : public BView {
|
|
|
|
public:
|
2010-10-30 13:43:26 +04:00
|
|
|
AddPrinterView(PrinterData* printerData,
|
2010-10-30 12:54:52 +04:00
|
|
|
const PrinterCap* printerCap);
|
|
|
|
~AddPrinterView();
|
|
|
|
virtual void AttachedToWindow();
|
|
|
|
void MessageReceived(BMessage* msg);
|
2005-02-06 21:22:40 +03:00
|
|
|
|
2010-10-30 13:43:26 +04:00
|
|
|
void Save();
|
|
|
|
|
2005-02-06 21:22:40 +03:00
|
|
|
private:
|
2010-10-30 12:54:52 +04:00
|
|
|
ProtocolClassItem* CurrentSelection();
|
2005-02-06 21:22:40 +03:00
|
|
|
|
2010-10-30 12:54:52 +04:00
|
|
|
PrinterData* fPrinterData;
|
|
|
|
const PrinterCap* fPrinterCap;
|
2005-02-06 21:22:40 +03:00
|
|
|
|
2010-10-30 12:54:52 +04:00
|
|
|
BListView* fProtocolClassList;
|
|
|
|
BTextView* fDescription;
|
2005-02-06 21:22:40 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class AddPrinterDlg : public DialogWindow {
|
|
|
|
public:
|
2010-10-30 12:54:52 +04:00
|
|
|
AddPrinterDlg(PrinterData *printerData,
|
|
|
|
const PrinterCap *printerCap);
|
|
|
|
void MessageReceived(BMessage *msg);
|
2005-02-06 21:22:40 +03:00
|
|
|
|
|
|
|
private:
|
2010-10-30 12:54:52 +04:00
|
|
|
AddPrinterView* fAddPrinterView;
|
2005-02-06 21:22:40 +03:00
|
|
|
};
|
|
|
|
|