Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
displayinfo.h
1 // * This file is part of the COLOBOT source code
2 // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
3 // * Copyright (C) 2012, Polish Portal of Colobot (PPC)
4 // *
5 // * This program is free software: you can redistribute it and/or modify
6 // * it under the terms of the GNU General Public License as published by
7 // * the Free Software Foundation, either version 3 of the License, or
8 // * (at your option) any later version.
9 // *
10 // * This program is distributed in the hope that it will be useful,
11 // * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // * GNU General Public License for more details.
14 // *
15 // * You should have received a copy of the GNU General Public License
16 // * along with this program. If not, see http://www.gnu.org/licenses/.
17 
18 // displayinfo.h
19 
20 #pragma once
21 
22 #include <string>
23 
24 #include "common/event.h"
25 
26 #include "graphics/engine/camera.h"
27 
28 #include "app/pausemanager.h"
29 
30 class CRobotMain;
31 class CObject;
32 class CEventQueue;
33 
34 struct Event;
35 
36 namespace Gfx {
37 class CEngine;
38 class CParticle;
39 class CLightManager;
40 }
41 
42 namespace Ui {
43 
44 class CInterface;
45 
47 {
48 public:
49  CDisplayInfo();
50  ~CDisplayInfo();
51 
52  bool EventProcess(const Event &event);
53 
54  void StartDisplayInfo(std::string filename, int index, bool bSoluce);
55  void StopDisplayInfo();
56 
57  void SetPosition(int pos);
58  int GetPosition();
59 
60 protected:
61  bool EventFrame(const Event &event);
62  void HyperUpdate();
63  void AdjustDisplayInfo(Math::Point wpos, Math::Point wdim);
64  void ChangeIndexButton(int index);
65  void UpdateIndexButton();
66  void UpdateCopyButton();
67  void ViewDisplayInfo();
68  CObject* SearchToto();
69  void CreateObjectsFile();
70 
71 protected:
72  Gfx::CEngine* m_engine;
73  CEventQueue* m_event;
74  CRobotMain* m_main;
75  Gfx::CCamera* m_camera;
76  CInterface* m_interface;
77  Gfx::CParticle* m_particle;
78  Gfx::CLightManager* m_light;
79  CPauseManager* m_pause;
80 
81  bool m_bInfoMaximized;
82  bool m_bInfoMinimized;
83 
84  int m_index;
85  Gfx::CameraType m_infoCamera;
86  Math::Point m_infoNormalPos;
87  Math::Point m_infoNormalDim;
88  Math::Point m_infoActualPos;
89  Math::Point m_infoActualDim;
90  Math::Point m_infoFinalPos;
91  Math::Point m_infoFinalDim;
92  int m_lightSuppl;
93  bool m_bEditLock;
94  PauseType m_bInitPause;
95  bool m_bSoluce;
96  CObject* m_toto;
97 };
98 
99 
100 } // namespace Ui
101 
CameraType
Type of camera.
Definition: camera.h:42
Camera handling - CCamera class.
Global event queue.
Definition: event.h:764
Manager for dynamic lights in 3D scene.
Definition: lightman.h:142
Definition: robotmain.h:196
Particle engine.
Definition: particle.h:266
2D point
Definition: point.h:46
Camera moving in 3D scene.
Definition: camera.h:130
Management of pause modes.
The graphics engine.
Definition: engine.h:682
Event types, structs and event queue.
Definition: displayinfo.h:46
Event sent by system, interface or game.
Definition: event.h:686
Definition: pausemanager.h:42
Definition: interface.h:56
Definition: object.h:352