1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin III - PostgreSQL Tools
//
// Copyright (C) 2002 - 2014, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// ctlProgressStatusBar.h - Status bar indicating the current progress
//
//////////////////////////////////////////////////////////////////////////
//
#ifndef CTLPROGRESS_STATUSBAR_H
#define CTLPROGRESS_STATUSBAR_H
// wxWindows headers
#include <wx/wx.h>
#include <wx/gauge.h>
#include <wx/timer.h>
class ctlProgressStatusBar : public wxStatusBar
{
public:
ctlProgressStatusBar(wxWindow *parent, bool showProgressInitially = true, bool autoProgressive = true, int max = -1);
virtual ~ctlProgressStatusBar();
void ShowProgress(bool restart = true);
void StopProgress();
void SetProgress(int val);
virtual void SetFieldsCount(int number = 1, const int *widths = NULL);
virtual void SetStatusWidths(int n, const int widths_field[]);
static const unsigned short ms_increment,
ms_progressbar_width,
ms_progressstatus_width;
protected:
void OnTimer(wxTimerEvent &WXUNUSED(event));
void OnSize(wxSizeEvent &ev);
wxGauge *m_progress;
wxTimer m_timer;
bool m_progressStopped;
bool m_autoProgressive;
bool m_autoValIncrementing;
int m_hr, m_min, m_sec, m_mil;
int m_val;
enum
{
Status_field,
ProgressBar_field,
ProgressStatus_field,
Max_Field
};
DECLARE_EVENT_TABLE()
};
#endif // CTLPROGRESS_STATUSBAR_H
|