2 * Copyright 2008 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Julun, <host.haiku@gmx.de
8 #ifndef _PRINT_PANEL_H_
9 #define _PRINT_PANEL_H_
12 #include <MessageFilter.h>
28 class BPrintPanel
: public BWindow
{
30 BPrintPanel(const BString
& title
);
31 virtual ~BPrintPanel();
33 BPrintPanel(BMessage
* data
);
34 static BArchivable
* Instantiate(BMessage
* data
);
35 virtual status_t
Archive(BMessage
* data
, bool deep
= true) const;
37 virtual status_t
Go() = 0;
40 void AddPanel(BView
* panel
);
41 bool RemovePanel(BView
* child
);
43 virtual void MessageReceived(BMessage
* message
);
44 virtual void FrameResized(float newWidth
, float newHeight
);
46 virtual BHandler
* ResolveSpecifier(BMessage
* message
, int32 index
,
47 BMessage
* specifier
, int32 form
,
48 const char* property
);
49 virtual status_t
GetSupportedSuites(BMessage
* data
);
50 virtual status_t
Perform(perform_code d
, void* arg
);
53 virtual bool QuitRequested();
54 virtual void DispatchMessage(BMessage
* message
, BHandler
* handler
);
57 virtual status_t
ShowPanel();
60 void AddChild(BView
* child
, BView
* before
= NULL
);
61 bool RemoveChild(BView
* child
);
62 BView
* ChildAt(int32 index
) const;
64 class _BPrintPanelFilter_
: public BMessageFilter
{
66 _BPrintPanelFilter_(BPrintPanel
* panel
);
67 filter_result
Filter(BMessage
* msg
, BHandler
** target
);
70 BPrintPanel
* fPrintPanel
;
74 virtual void _ReservedBPrintPanel1();
75 virtual void _ReservedBPrintPanel2();
76 virtual void _ReservedBPrintPanel3();
77 virtual void _ReservedBPrintPanel4();
78 virtual void _ReservedBPrintPanel5();
82 sem_id fPrintPanelSem
;
83 status_t fPrintPanelResult
;
90 } // namespace BPrivate
93 #endif // _PRINT_PANEL_H_