Version: 0.6.0
progressor.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: wxGISProgressor class. Progress of some process
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009,2011 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgis/framework/framework.h"
24 #include "wx/gauge.h"
25 
32 class WXDLLIMPEXP_GIS_FRW wxGISProgressor :
33  public wxGauge,
34  public IProgressor
35 {
36  DECLARE_DYNAMIC_CLASS_NO_COPY(wxGISProgressor)
37  enum
38  {
39  SETVALUE_ID = 1050,
40  PULSE_ID,
41  SHOW_ID,
42  RANGE_ID
43  };
44 public:
45  wxGISProgressor(void);
46  wxGISProgressor(wxWindow * parent, wxWindowID id = wxID_ANY, int range = 100, const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize, long style = wxGA_HORIZONTAL | wxGA_SMOOTH, const wxString name = wxT("GISProgressor"));
47  virtual ~wxGISProgressor(void);
48  //IProgressor
49  virtual bool ShowProgress(bool bShow);
50  virtual void SetRange(int range);
51  virtual int GetRange() const;
52  virtual void SetValue(int value);
53  virtual int GetValue() const;
54  virtual void Play(void);
55  virtual void Stop(void);
56  virtual void SetYield(bool bYield = false);
57 //events
58  virtual void OnSetValue(wxCommandEvent &event);
59 protected:
60  int m_nValue;
61  bool m_bYield;
62 private:
63  DECLARE_EVENT_TABLE()
64 };
Definition: progressor.h:32
virtual void Stop(void)=0
Stop undefined progressor state.
virtual void SetValue(int value)=0
Set progressor position.
virtual void SetYield(bool bYield=false)=0
SetYield Yields control to pending messages in the windowing system.
virtual bool ShowProgress(bool bShow)=0
Show/hide progressor.
Definition: core.h:92
virtual void SetRange(int range)=0
Set progressor range.
virtual void Play(void)=0
Start undefined progressor state.
Definition: core.h:86
virtual int GetRange(void) const =0
Set progressor range.
virtual int GetValue(void) const =0
Get progressor position.