2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
AttachableScrollBar.h
|
|
|
|
|
|
|
|
James Crook
|
2014-06-03 20:30:19 +00:00
|
|
|
|
|
|
|
A scroll bar that can be attached to multiple items and so control
|
2010-01-23 19:44:49 +00:00
|
|
|
their scrolling.
|
|
|
|
|
|
|
|
Audacity is free software.
|
|
|
|
This file is licensed under the wxWidgets license, see License.txt
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_ATTACHABLE_SCROLL_BAR__
|
|
|
|
#define __AUDACITY_ATTACHABLE_SCROLL_BAR__
|
|
|
|
|
2018-11-14 20:23:25 +00:00
|
|
|
#include <wx/scrolbar.h> // to inherit
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-19 16:21:31 +00:00
|
|
|
class ViewInfo;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2016-02-24 06:06:39 +00:00
|
|
|
class AUDACITY_DLL_API AttachableScrollBar final :
|
2013-02-23 04:33:20 +00:00
|
|
|
public wxScrollBar
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-02-23 04:33:20 +00:00
|
|
|
AttachableScrollBar(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSB_HORIZONTAL);
|
2010-01-23 19:44:49 +00:00
|
|
|
public:
|
2013-02-23 04:33:20 +00:00
|
|
|
~AttachableScrollBar(void);
|
|
|
|
void OnScroll(wxScrollEvent & event);
|
|
|
|
void SetViewInfo( ViewInfo * view );
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
void SetScrollBarFromViewInfo();
|
|
|
|
void SetViewInfoFromScrollBar();
|
|
|
|
|
2013-02-23 04:33:20 +00:00
|
|
|
ViewInfo * mpViewInfo;
|
2016-09-18 14:26:29 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AUDACITY_ATTACHABLE_SCROLL_BAR__
|