5 * Created by Toshi Nagata on 08/11/15.
6 * Copyright 2008 Toshi Nagata. All rights reserved.
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.
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.
18 #ifndef __MySlider_h__
19 #define __MySlider_h__
21 #include "wx/tglbtn.h"
22 #include "wx/string.h"
23 #include "wx/slider.h"
25 extern const wxEventType MySliderEvent;
27 class MySlider: public wxToggleButton
31 int mouseStatus; /* 0: mouseUp, 1: mouseDown, 2: dragging */
32 wxPoint mouseDownPoint;
33 wxPoint mouseDragPoint;
35 MySlider(wxWindow* parent, wxWindowID id, int direction, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("slider"));
36 void OnPaint(wxPaintEvent &event);
37 void OnMouseEvent(wxMouseEvent &event);
38 int GetMouseStatus() { return mouseStatus; }
39 float GetFloatValue();
40 void OnCaptureLost(wxMouseCaptureLostEvent &event);
46 #endif /* __MySlider_h__ */