From 1c921c1e060212c71fa39640d664cd7b5999dae1 Mon Sep 17 00:00:00 2001 From: Michael Pfeiffer Date: Sun, 9 Jan 2005 17:39:30 +0000 Subject: [PATCH] Added class PagesView for visualization of the options Reverse and Collate. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10618 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/print/libprint/JobSetupDlg.h | 2 ++ headers/private/print/libprint/PagesView.h | 31 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 headers/private/print/libprint/PagesView.h diff --git a/headers/private/print/libprint/JobSetupDlg.h b/headers/private/print/libprint/JobSetupDlg.h index 215fa2c172..880c32d106 100644 --- a/headers/private/print/libprint/JobSetupDlg.h +++ b/headers/private/print/libprint/JobSetupDlg.h @@ -21,6 +21,7 @@ class JobData; class PrinterData; class PrinterCap; class HalftoneView; +class PagesView; class JobSetupView : public BView { public: @@ -51,6 +52,7 @@ private: BRadioButton *fAll; BCheckBox *fCollate; BCheckBox *fReverse; + PagesView *fPages; BPopUpMenu *fPaperFeed; BCheckBox *fDuplex; BPopUpMenu *fNup; diff --git a/headers/private/print/libprint/PagesView.h b/headers/private/print/libprint/PagesView.h new file mode 100644 index 0000000000..7b7027656d --- /dev/null +++ b/headers/private/print/libprint/PagesView.h @@ -0,0 +1,31 @@ +/* + * PagesView.h + * Copyright 2005 Michael Pfeiffer. All Rights Reserved. + */ + +#ifndef _PAGES_VIEW_H +#define _PAGES_VIEW_H + +#include + +class PagesView : public BView +{ +public: + PagesView(BRect frame, const char* name, uint32 resizeMask, uint32 flags); + + void GetPreferredSize(float *width, float *height); + void Draw(BRect rect); + + void setCollate(bool collate); + void setReverse(bool reverse); + +private: + void DrawPages(BPoint position, int number, int count); + void DrawPage(BPoint position, int number); + + bool fCollate; + bool fReverse; +}; + +#endif +