/* * Copyright (c) 2007, Haiku, Inc. * Distributed under the terms of the MIT license. * * Author: * Ɓukasz 'Sil2100' Zemczak */ #ifndef PACKAGESTATUS_H #define PACKAGESTATUS_H #include #include #include #include enum { P_MSG_NEXT_STAGE = 'psne', P_MSG_STOP, P_MSG_RESET }; class StopButton : public BButton { public: StopButton(); virtual void Draw(BRect); }; class PackageStatus : public BWindow { public: PackageStatus(const char *title, const char *label = NULL, const char *trailing = NULL, BHandler *parent = NULL); ~PackageStatus(); void MessageReceived(BMessage *msg); void Reset(uint32 stages, const char *label = NULL, const char *trailing = NULL); void StageStep(uint32 count, const char *text = NULL, const char *trailing = NULL); bool Stopped(); private: BStatusBar *fStatus; StopButton *fButton; bool fIsStopped; BHandler *fParent; }; #endif