2002-11-27 02:03:14 +03:00
|
|
|
/*
|
|
|
|
* JobSetupDlg.cpp
|
|
|
|
* Copyright 1999-2000 Y.Takagi. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __JOBSETUPDLG_H
|
|
|
|
#define __JOBSETUPDLG_H
|
|
|
|
|
|
|
|
#include <View.h>
|
2004-11-28 22:05:01 +03:00
|
|
|
#include "DialogWindow.h"
|
2002-11-27 02:03:14 +03:00
|
|
|
|
2004-02-14 02:56:14 +03:00
|
|
|
#include "JobData.h"
|
|
|
|
#include "Halftone.h"
|
2004-11-28 22:05:01 +03:00
|
|
|
#include "JSDSlider.h"
|
2004-02-14 02:56:14 +03:00
|
|
|
|
2002-11-27 02:03:14 +03:00
|
|
|
class BTextControl;
|
2005-01-16 19:12:41 +03:00
|
|
|
class BTextView;
|
2002-11-27 02:03:14 +03:00
|
|
|
class BRadioButton;
|
|
|
|
class BCheckBox;
|
|
|
|
class BPopUpMenu;
|
|
|
|
class JobData;
|
|
|
|
class PrinterData;
|
|
|
|
class PrinterCap;
|
2004-02-14 02:56:14 +03:00
|
|
|
class HalftoneView;
|
2005-01-09 20:39:30 +03:00
|
|
|
class PagesView;
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
class JobSetupView : public BView {
|
|
|
|
public:
|
|
|
|
JobSetupView(BRect frame, JobData *job_data, PrinterData *printer_data, const PrinterCap *printer_cap);
|
|
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual void MessageReceived(BMessage *msg);
|
2007-01-20 18:52:37 +03:00
|
|
|
bool UpdateJobData(bool showPreview);
|
2002-11-27 02:03:14 +03:00
|
|
|
|
|
|
|
private:
|
2005-01-16 19:12:41 +03:00
|
|
|
void UpdateButtonEnabledState();
|
|
|
|
BRadioButton* AddPageSelectionItem(BView* parent, BRect rect, const char* name, const char* label,
|
|
|
|
JobData::PageSelection pageSelection);
|
|
|
|
void AllowOnlyDigits(BTextView* textView, int maxDigits);
|
2004-02-14 02:56:14 +03:00
|
|
|
JobData::Color getColor();
|
|
|
|
Halftone::DitherType getDitherType();
|
|
|
|
float getGamma();
|
|
|
|
float getInkDensity();
|
|
|
|
|
2005-01-16 19:12:41 +03:00
|
|
|
BTextControl *fCopies;
|
|
|
|
BTextControl *fFromPage;
|
|
|
|
BTextControl *fToPage;
|
2004-01-30 20:10:36 +03:00
|
|
|
JobData *fJobData;
|
|
|
|
PrinterData *fPrinterData;
|
|
|
|
const PrinterCap *fPrinterCap;
|
2004-02-14 02:56:14 +03:00
|
|
|
BPopUpMenu *fColorType;
|
|
|
|
BPopUpMenu *fDitherType;
|
2004-11-28 22:05:01 +03:00
|
|
|
JSDSlider *fGamma;
|
|
|
|
JSDSlider *fInkDensity;
|
2004-02-14 02:56:14 +03:00
|
|
|
HalftoneView *fHalftone;
|
2004-01-30 20:10:36 +03:00
|
|
|
BRadioButton *fAll;
|
|
|
|
BCheckBox *fCollate;
|
|
|
|
BCheckBox *fReverse;
|
2005-01-09 20:39:30 +03:00
|
|
|
PagesView *fPages;
|
2004-01-30 20:10:36 +03:00
|
|
|
BPopUpMenu *fPaperFeed;
|
|
|
|
BCheckBox *fDuplex;
|
|
|
|
BPopUpMenu *fNup;
|
2005-01-16 19:12:41 +03:00
|
|
|
BRadioButton *fAllPages;
|
|
|
|
BRadioButton *fOddNumberedPages;
|
|
|
|
BRadioButton *fEvenNumberedPages;
|
2002-11-27 02:03:14 +03:00
|
|
|
};
|
|
|
|
|
2004-11-28 22:05:01 +03:00
|
|
|
class JobSetupDlg : public DialogWindow {
|
2002-11-27 02:03:14 +03:00
|
|
|
public:
|
|
|
|
JobSetupDlg(JobData *job_data, PrinterData *printer_data, const PrinterCap *printer_cap);
|
|
|
|
virtual void MessageReceived(BMessage *message);
|
|
|
|
|
|
|
|
private:
|
2005-01-16 19:12:41 +03:00
|
|
|
JobSetupView *fJobSetup;
|
2002-11-27 02:03:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __JOBSETUPDLG_H */
|