ALBA
albaGUIMovieCtrl.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIMovieCtrl
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaGUIMovieCtrl_H__
18#define __albaGUIMovieCtrl_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaEvent.h"
24#include "albaObserver.h"
25#include "albaGUIPanel.h"
26
27//----------------------------------------------------------------------------
28// forward references :
29//----------------------------------------------------------------------------
30class albaGUIPicButton;
31class albaGUIValidator;
32
33//----------------------------------------------------------------------------
34// Constants :
35//----------------------------------------------------------------------------
36#define ID_TIMER 702
37#define MOVIE_BUTTONS_NUM 6
38
39//----------------------------------------------------------------------------
40// albaGUIMovieCtrl :
42//----------------------------------------------------------------------------
44{
45public:
46 albaGUIMovieCtrl(wxWindow* parent,wxWindowID id = -1);
48 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
49
50 void OnEvent(albaEventBase *alba_event);
51
53 void SetFrameBounds(double min, double max, double step = 1);
54
56 void Loop(bool enable = true) {m_Loop = enable;};
57
58protected:
59 double m_Frame;
60 double m_FrameMin;
61 double m_FrameMax;
63 int m_Loop;
64 wxCheckBox *m_LoopCheck;
65
66 //----------------------------------------------------------------------------
67 // constant
68 //----------------------------------------------------------------------------
70 {
77 };
78
79 wxBoxSizer *m_Sizer;
81 wxTimer m_Timer;
82
84
86 void Update();
87
89 void OnTimer(wxTimerEvent &event);
90DECLARE_EVENT_TABLE()
91};
92#endif
#define MOVIE_BUTTONS_NUM
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUIMovieCtrl is a wxPanel with a set of widget to handle time.
albaObserver * m_Listener
wxCheckBox * m_LoopCheck
void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
void SetFrameBounds(double min, double max, double step=1)
Set the frames bounds for the movie.
virtual ~albaGUIMovieCtrl()
void OnTimer(wxTimerEvent &event)
Update the time and send the TIME_SET event to synchronize all the application.
albaGUIMovieCtrl(wxWindow *parent, wxWindowID id=-1)
void Update()
Update the movie ctrl interface.
albaGUIPicButton * m_TimeBarButtons[MOVIE_BUTTONS_NUM]
void SetListener(albaObserver *Listener)
void Loop(bool enable=true)
Enable/Disable loop.
wxBoxSizer * m_Sizer
class name: albaGUIPanel Inherits directly from wxPanel and adds the pointer to the next panel
Definition: albaGUIPanel.h:27
albaGUIPicButton inherit from wxBitmapButton.
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36