headers/bsd: Add sys/queue.h.
[haiku.git] / src / tests / add-ons / print / ppd / ui / PPDConfigView.h
blobd08b5c8c4b1290da8fb7a7a156d936433a7fbd8f
1 /*
2 * Copyright 2008, Haiku.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Michael Pfeiffer <laplace@users.sourceforge.net>
7 */
9 #ifndef _PPD_CONFIG_VIEW_H
10 #define _PPD_CONFIG_VIEW_H
12 #include "PPD.h"
14 #include <View.h>
15 #include <ListItem.h>
16 #include <OutlineListView.h>
18 class CategoryItem : public BStringItem
20 private:
21 Statement* fStatement;
23 public:
24 CategoryItem(const char* text, Statement* statement, uint32 level)
25 : BStringItem(text, level)
26 , fStatement(statement)
30 Statement* GetStatement() { return fStatement; }
33 class PPDConfigView : public BView {
34 private:
35 PPD* fPPD;
37 BView* fDetails;
38 BMessage fSettings;
40 void SetupSettings(const BMessage& settings);
42 void BooleanChanged(BMessage* msg);
43 void StringChanged(BMessage* msg);
45 public:
46 PPDConfigView(BRect rect, const char *name, uint32 resizeMask, uint32 flags);
48 // The view has to be attached to a window when this
49 // method is called.
50 void Set(const char* ppdFile, const BMessage& settings);
51 const BMessage& GetSettings();
53 void FillCategories();
54 void FillDetails(Statement* statement);
55 void MessageReceived(BMessage* msg);
57 #endif