comparison Applications/Generic/NativeStoneApplicationContext.h @ 418:c23df8b3433b

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Nov 2018 18:32:48 +0100
parents 6cc3ce74dc05
children 8999823db8b8 b70e9be013e4
comparison
equal deleted inserted replaced
417:aee3d7941c9b 418:c23df8b3433b
35 { 35 {
36 private: 36 private:
37 static void UpdateThread(NativeStoneApplicationContext* that); 37 static void UpdateThread(NativeStoneApplicationContext* that);
38 38
39 boost::mutex globalMutex_; 39 boost::mutex globalMutex_;
40 MessageBroker& broker_;
41 WidgetViewport centralViewport_; 40 WidgetViewport centralViewport_;
42 boost::thread updateThread_; 41 boost::thread updateThread_;
43 bool stopped_; 42 bool stopped_;
44 unsigned int updateDelayInMs_; 43 unsigned int updateDelayInMs_;
45 44
57 { 56 {
58 } 57 }
59 58
60 IWidget& SetCentralWidget(IWidget* widget); // Takes ownership 59 IWidget& SetCentralWidget(IWidget* widget); // Takes ownership
61 60
62 MessageBroker& GetMessageBroker() const
63 {
64 return that_.broker_;
65 }
66
67 IViewport& GetCentralViewport() 61 IViewport& GetCentralViewport()
68 { 62 {
69 return that_.centralViewport_; 63 return that_.centralViewport_;
70 } 64 }
71 65
72 void SetUpdateDelay(unsigned int delayInMs) 66 void SetUpdateDelay(unsigned int delayInMs)
73 { 67 {
74 that_.updateDelayInMs_ = delayInMs; 68 that_.updateDelayInMs_ = delayInMs;
69 }
70
71 MessageBroker& GetMessageBroker()
72 {
73 return that_.GetMessageBroker();
75 } 74 }
76 }; 75 };
77 76
78 NativeStoneApplicationContext(MessageBroker& broker); 77 NativeStoneApplicationContext(MessageBroker& broker);
79 78