fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / printers / JobListView.h
blob369e2d83e40561275021e860e594e3d773b45ada
1 /*
2 * Copyright 2001-2010, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Michael Pfeiffer
7 */
8 #ifndef _JOB_LISTVIEW_H
9 #define _JOB_LISTVIEW_H
12 #include <Bitmap.h>
13 #include <ListItem.h>
14 #include <ListView.h>
15 #include <String.h>
18 class Job;
19 class JobItem;
20 class SpoolFolder;
23 class JobListView : public BListView {
24 typedef BListView Inherited;
25 public:
26 JobListView(BRect frame);
27 ~JobListView();
29 void AttachedToWindow();
30 void SetSpoolFolder(SpoolFolder* folder);
32 void AddJob(Job* job);
33 void RemoveJob(Job* job);
34 void UpdateJob(Job* job);
36 JobItem* SelectedItem() const;
38 void RestartJob();
39 void CancelJob();
41 private:
42 JobItem* FindJob(Job* job) const;
46 class JobItem : public BListItem {
47 public:
48 JobItem(Job* job);
49 ~JobItem();
51 void Update();
53 void Update(BView *owner, const BFont *font);
54 void DrawItem(BView *owner, BRect bounds,
55 bool complete);
57 Job* GetJob() const { return fJob; }
59 private:
60 Job* fJob;
61 BBitmap* fIcon;
62 BString fName;
63 BString fPages;
64 BString fStatus;
65 BString fSize;
68 #endif // _JOB_LISTVIEW_H