1*4b7da592SKarsten Heimrich /* 2*4b7da592SKarsten Heimrich * Copyright 2008 Haiku Inc. All rights reserved. 3*4b7da592SKarsten Heimrich * Distributed under the terms of the MIT License. 4*4b7da592SKarsten Heimrich * 5*4b7da592SKarsten Heimrich * Authors: 6*4b7da592SKarsten Heimrich * Julun, <host.haiku@gmx.de 7*4b7da592SKarsten Heimrich */ 8*4b7da592SKarsten Heimrich #ifndef _PRINT_PANEL_H_ 9*4b7da592SKarsten Heimrich #define _PRINT_PANEL_H_ 10*4b7da592SKarsten Heimrich 11*4b7da592SKarsten Heimrich 12*4b7da592SKarsten Heimrich #include <MessageFilter.h> 13*4b7da592SKarsten Heimrich #include <String.h> 14*4b7da592SKarsten Heimrich #include <Window.h> 15*4b7da592SKarsten Heimrich 16*4b7da592SKarsten Heimrich 17*4b7da592SKarsten Heimrich class BArchivable; 18*4b7da592SKarsten Heimrich class BGroupView; 19*4b7da592SKarsten Heimrich class BHandler; 20*4b7da592SKarsten Heimrich class BMessage; 21*4b7da592SKarsten Heimrich class BView; 22*4b7da592SKarsten Heimrich 23*4b7da592SKarsten Heimrich 24*4b7da592SKarsten Heimrich namespace BPrivate { 25*4b7da592SKarsten Heimrich namespace Print { 26*4b7da592SKarsten Heimrich 27*4b7da592SKarsten Heimrich 28*4b7da592SKarsten Heimrich class BPrintPanel : public BWindow { 29*4b7da592SKarsten Heimrich public: 30*4b7da592SKarsten Heimrich BPrintPanel(const BString& title); 31*4b7da592SKarsten Heimrich virtual ~BPrintPanel(); 32*4b7da592SKarsten Heimrich 33*4b7da592SKarsten Heimrich BPrintPanel(BMessage* data); 34*4b7da592SKarsten Heimrich static BArchivable* Instantiate(BMessage* data); 35*4b7da592SKarsten Heimrich virtual status_t Archive(BMessage* data, bool deep = true) const; 36*4b7da592SKarsten Heimrich 37*4b7da592SKarsten Heimrich virtual status_t Go() = 0; 38*4b7da592SKarsten Heimrich 39*4b7da592SKarsten Heimrich BView* Panel() const; 40*4b7da592SKarsten Heimrich void AddPanel(BView* panel); 41*4b7da592SKarsten Heimrich bool RemovePanel(BView* child); 42*4b7da592SKarsten Heimrich 43*4b7da592SKarsten Heimrich virtual void MessageReceived(BMessage* message); 44*4b7da592SKarsten Heimrich virtual void FrameResized(float newWidth, float newHeight); 45*4b7da592SKarsten Heimrich 46*4b7da592SKarsten Heimrich virtual BHandler* ResolveSpecifier(BMessage* message, int32 index, 47*4b7da592SKarsten Heimrich BMessage* specifier, int32 form, 48*4b7da592SKarsten Heimrich const char* property); 49*4b7da592SKarsten Heimrich virtual status_t GetSupportedSuites(BMessage* data); 50*4b7da592SKarsten Heimrich virtual status_t Perform(perform_code d, void* arg); 51*4b7da592SKarsten Heimrich 52*4b7da592SKarsten Heimrich virtual void Quit(); 53*4b7da592SKarsten Heimrich virtual bool QuitRequested(); 54*4b7da592SKarsten Heimrich virtual void DispatchMessage(BMessage* message, BHandler* handler); 55*4b7da592SKarsten Heimrich 56*4b7da592SKarsten Heimrich protected: 57*4b7da592SKarsten Heimrich virtual status_t ShowPanel(); 58*4b7da592SKarsten Heimrich 59*4b7da592SKarsten Heimrich private: 60*4b7da592SKarsten Heimrich void AddChild(BView* child, BView* before = NULL); 61*4b7da592SKarsten Heimrich bool RemoveChild(BView* child); 62*4b7da592SKarsten Heimrich BView* ChildAt(int32 index) const; 63*4b7da592SKarsten Heimrich 64*4b7da592SKarsten Heimrich class _BPrintPanelFilter_ : public BMessageFilter { 65*4b7da592SKarsten Heimrich public: 66*4b7da592SKarsten Heimrich _BPrintPanelFilter_(BPrintPanel* panel); 67*4b7da592SKarsten Heimrich filter_result Filter(BMessage* msg, BHandler** target); 68*4b7da592SKarsten Heimrich 69*4b7da592SKarsten Heimrich private: 70*4b7da592SKarsten Heimrich BPrintPanel* fPrintPanel; 71*4b7da592SKarsten Heimrich }; 72*4b7da592SKarsten Heimrich 73*4b7da592SKarsten Heimrich private: 74*4b7da592SKarsten Heimrich virtual void _ReservedBPrintPanel1(); 75*4b7da592SKarsten Heimrich virtual void _ReservedBPrintPanel2(); 76*4b7da592SKarsten Heimrich virtual void _ReservedBPrintPanel3(); 77*4b7da592SKarsten Heimrich virtual void _ReservedBPrintPanel4(); 78*4b7da592SKarsten Heimrich virtual void _ReservedBPrintPanel5(); 79*4b7da592SKarsten Heimrich 80*4b7da592SKarsten Heimrich private: 81*4b7da592SKarsten Heimrich BGroupView* fPanel; 82*4b7da592SKarsten Heimrich sem_id fPrintPanelSem; 83*4b7da592SKarsten Heimrich status_t fPrintPanelResult; 84*4b7da592SKarsten Heimrich 85*4b7da592SKarsten Heimrich uint32 _reserved[5]; 86*4b7da592SKarsten Heimrich }; 87*4b7da592SKarsten Heimrich 88*4b7da592SKarsten Heimrich 89*4b7da592SKarsten Heimrich } // namespace Print 90*4b7da592SKarsten Heimrich } // namespace BPrivate 91*4b7da592SKarsten Heimrich 92*4b7da592SKarsten Heimrich 93*4b7da592SKarsten Heimrich #endif // _PRINT_PANEL_H_ 94