Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InexorAppLayer.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <string> // for string
3 
4 #include "include/cef_app.h"
5 #include "include/cef_base.h" // for CefString
6 #include "include/cef_v8.h" // for CefV8Value (p...
7 #include "inexor/network/SharedVar.hpp" // for SharedVar
8 #include "inexor/ui/context/InexorContextProvider.hpp" // for InexorContext...
9 #include "inexor/ui/layer/InexorLayerProvider.hpp" // for AbstractInexo...
10 
11 namespace inexor {
12 namespace ui {
13 namespace layer {
14 
16 
22 {
23 
24  public:
26  : AbstractInexorLayerProvider(name, url),
27  _name(name),
28  _url(url) {};
29 
30  // InexorCefContextProvider
31  void InitializeContext() override;
32  bool Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception) override;
33  bool Get(const CefString& name, const CefRefPtr<CefV8Value> object, CefRefPtr<CefV8Value>& retval, CefString& exception) override;
34  bool Set(const CefString& name, const CefRefPtr<CefV8Value> object, const CefRefPtr<CefV8Value> value, CefString& exception) override;
35  std::string GetContextName() override { return _name; };
36 
37  // User interface resize handling
38  void Reload();
39  void Resize(int x, int y, int width, int height);
40  void AutoResize(int width, int height);
41 
42  // Intercept setters for event handling
43  void SetVisibility(bool _is_visible) override;
44  void SetAcceptingKeyInput(bool _is_accepting_key_input) override;
45  void SetAcceptingMouseInput(bool _is_accepting_mouse_input) override;
46 
47  // Event handling
48  void FireUiEvent(std::string name, bool value);
50 
51  private:
54 
55  // Include the default reference counting implementation.
57 };
58 
59 }
60 }
61 }
std::string _name
Definition: InexorAppLayer.hpp:52
void AutoResize(int width, int height)
Definition: InexorAppLayer.cpp:49
GLenum GLsizei GLsizei height
Definition: glexts.hpp:291
The application layer of the inexor user interface.
Definition: InexorAppLayer.hpp:20
void FireUiEvent(std::string name, bool value)
Definition: InexorAppLayer.cpp:82
InexorAppLayer(std::string &name, std::string &url)
Definition: InexorAppLayer.hpp:25
std::string name
Definition: InexorLayerProvider.hpp:114
GLenum GLsizei width
Definition: glexts.hpp:291
bool Get(const CefString &name, const CefRefPtr< CefV8Value > object, CefRefPtr< CefV8Value > &retval, CefString &exception) override
Definition: InexorAppLayer.cpp:118
Definition: InexorContextProvider.hpp:16
bool Set(const CefString &name, const CefRefPtr< CefV8Value > object, const CefRefPtr< CefV8Value > value, CefString &exception) override
Definition: InexorAppLayer.cpp:124
std::string _url
Definition: InexorAppLayer.hpp:53
Definition: InexorLayerProvider.hpp:60
std::string url
Definition: InexorLayerProvider.hpp:115
SharedVar< int > showapplayer
void InitializeContext() override
Definition: InexorAppLayer.cpp:108
char string[MAXSTRLEN]
cube-strings (char arrays of fixed size).
Definition: cube_types.hpp:18
std::string GetContextName() override
Definition: InexorAppLayer.hpp:35
bool Execute(const CefString &name, CefRefPtr< CefV8Value > object, const CefV8ValueList &arguments, CefRefPtr< CefV8Value > &retval, CefString &exception) override
Definition: InexorAppLayer.cpp:112
GLsizei GLboolean const GLfloat * value
Definition: glexts.hpp:57
void SetAcceptingKeyInput(bool _is_accepting_key_input) override
Definition: InexorAppLayer.cpp:66
SharedVar wrapper for primitive/immutable objects.
Definition: SharedVar.hpp:55
void Reload()
Definition: InexorAppLayer.cpp:33
void SetVisibility(bool _is_visible) override
Definition: InexorAppLayer.cpp:58
void Resize(int x, int y, int width, int height)
Definition: InexorAppLayer.cpp:39
void SetAcceptingMouseInput(bool _is_accepting_mouse_input) override
Definition: InexorAppLayer.cpp:74