ScummVM API documentation
vid_wnd.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
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 3 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  */
22 
23 #ifndef BAGEL_SPACEBAR_VID_WND_H
24 #define BAGEL_SPACEBAR_VID_WND_H
25 
26 #include "bagel/spacebar/main_window.h"
27 #include "bagel/baglib/button_object.h"
28 #include "bagel/baglib/character_object.h"
29 
30 namespace Bagel {
31 namespace SpaceBar {
32 
33 // ID's and INDEX of buttons
34 #define VID_PLAY_BUT 0
35 #define VID_STOP_BUT 100
36 #define VID_REW_BUT 2
37 #define VID_FF_BUT 3
38 
39 class SBarVidBut : public CBagButtonObject {
40 public:
42  }
43 
44  void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *pInfo = nullptr) override;
45 };
46 
47 
48 class SBarVidWnd : public CMainWindow {
49 protected:
50  CBagCharacterObject *_pMovie;
51 
52  CBagVar *_pTimerVar;
53  CBagVar *_pPlayingVar;
54  CBagVar *_pDiscVar;
55 
56  double _fTimerDiff;
57  double _fTimer;
58  int _nStartTime;
59 
60 public:
61  SBarVidWnd();
62  ~SBarVidWnd();
63 
64  void setPlayMode(int nMode);
65  void setInc(double fDiff) {
66  _fTimerDiff = fDiff;
67  }
68 
69  bool hasDisc();
70  int getFrame(double fTime, int nUseDisc);
71 
72  ErrorCode attach() override;
73  ErrorCode detach() override;
74 
75  ErrorCode onRender(CBofBitmap *pBmp, CBofRect *pRect) override;
76 
77  CBagObject *onNewButtonObject(const CBofString &sInit) override;
78 };
79 
80 } // namespace SpaceBar
81 } // namespace Bagel
82 
83 #endif
Definition: bitmap.h:55
Definition: vid_wnd.h:39
Definition: button_object.h:44
Definition: rect.h:36
Definition: object.h:85
Definition: string.h:38
Definition: bagel.h:31
Definition: point.h:34
Definition: var.h:32
Definition: vid_wnd.h:48
Definition: main_window.h:49
Definition: character_object.h:31