OSDN Git Service

Handling key and mouse events in listctrl is improved
[molby/Molby.git] / wxSources / MyProgressIndicator.h
1 /*
2  *  MyProgressIndicator.h
3  *  Molby
4  *
5  *  Created by Toshi Nagata on 13/06/26.
6  *  Copyright 2013 Toshi Nagata. All rights reserved.
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 version 2 of the License.
11  
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  GNU General Public License for more details.
16  */
17
18 #ifndef __MyProgressIndicator_h__
19 #define __MyProgressIndicator_h__
20
21 #include "wx/window.h"
22
23 class MyProgressIndicator: public wxWindow
24 {
25 public:
26         bool enabled;
27         bool pressed;
28         signed char indicatorState;
29         
30     MyProgressIndicator(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
31     void OnPaint(wxPaintEvent &event);
32     void OnMouseEvent(wxMouseEvent &event);
33         void OnCaptureLost(wxMouseCaptureLostEvent &event);
34         void SetEnabled(bool flag);
35         bool IsEnabled() { return enabled; }
36         void SetPressed(bool flag);
37         bool IsPressed() { return pressed; }
38         void SetIndicatorState(int state);
39         int IndicatorState() { return indicatorState; }
40         void ProceedIndicatorState();
41
42 private:
43     DECLARE_EVENT_TABLE()       
44 };
45
46 #endif  /*  MyProgressIndicator  */
47