Emergency 20 Dokumentation  4.2.0
ScalePlugin.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include <Rocket/Core/Context.h>
14 #include <Rocket/Core/Plugin.h>
15 
16 
17 //[-------------------------------------------------------]
18 //[ Namespace ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22 
23 
24  //[-------------------------------------------------------]
25  //[ Classes ]
26  //[-------------------------------------------------------]
34  class ScalePlugin : public Rocket::Core::Plugin
35  {
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public methods ]
40  //[-------------------------------------------------------]
41  public:
42  virtual ~ScalePlugin();
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public virtual Rocket::Core::Plugin methods ]
47  //[-------------------------------------------------------]
48  public:
53  virtual void OnElementCreate(Rocket::Core::Element* element) override;
54 
60  virtual void OnDocumentLoad(Rocket::Core::ElementDocument* document) override;
61 
66  virtual void OnInitialise() override;
67 
72  virtual void OnShutdown() override;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private methods ]
77  //[-------------------------------------------------------]
78  private:
83  void scaleElementsRecursive(Rocket::Core::Element& element);
84 
85 
86  };
87 
88 
89 //[-------------------------------------------------------]
90 //[ Namespace ]
91 //[-------------------------------------------------------]
92 } // em5
virtual void OnElementCreate(Rocket::Core::Element *element) override
Called when a new element is created.
Definition: ActionPriority.h:13
virtual ~ScalePlugin()
virtual void OnInitialise() override
Called when Rocket is initialised.
virtual void OnShutdown() override
Called when Rocket shuts down.
virtual void OnDocumentLoad(Rocket::Core::ElementDocument *document) override
Called when a document is successfully loaded from file or instanced, initialised and added to its co...
Librocket plugin.
Definition: ScalePlugin.h:34