Tab.cpp
Go to the documentation of this file.
1 #include "Tab.h"
2 
3 #include "Widgets.h"
4 #include "Impl.h"
5 
7 {
8  static void initializeTab(WidgetImpl& widget, RemoteGui::TabProxy* tab)
9  {
10  widget.tab = tab;
11  for (auto& child : widget.children)
12  {
13  initializeTab(*child, tab);
14  }
15  }
16 
18  : impl(new TabImpl)
19  {
20  }
21 
22  Tab::Tab(Tab&& other)
23  : impl(std::move(other.impl))
24  {
25  }
26 
28  {
29  }
30 
31  void Tab::create(const std::string& name, const Ice::ObjectPrx& remoteGuiObject, const Widget& rootWidget)
32  {
33  RemoteGuiInterfacePrx remoteGui = RemoteGuiInterfacePrx::checkedCast(remoteGuiObject);
34  remoteGui->createTab(name, rootWidget.impl->desc);
35 
36  impl->proxy = RemoteGui::TabProxy(remoteGui, name);
37  initializeTab(*rootWidget.impl, &impl->proxy);
38  }
39 
40  void Tab::remove()
41  {
42  impl->proxy.remove();
43  }
44 
46  {
47  impl->proxy.receiveUpdates();
48  }
49 
51  {
52  impl->proxy.sendUpdates();
53  }
54 
55 }
56 
armarx::RemoteGui::Client::Tab::~Tab
~Tab()
Definition: Tab.cpp:27
armarx::RemoteGui::Client::Tab::remove
void remove()
Definition: Tab.cpp:40
armarx::RemoteGui::Client::Tab
Definition: Tab.h:15
armarx::RemoteGui::Client::Tab::impl
std::unique_ptr< TabImpl > impl
Definition: Tab.h:33
armarx::RemoteGui::Client::Widget::impl
std::shared_ptr< WidgetImpl > impl
Definition: Widgets.h:28
armarx::RemoteGui::Client::Tab::sendUpdates
void sendUpdates()
Definition: Tab.cpp:50
Tab.h
armarx::RemoteGui::TabProxy
Definition: WidgetProxy.h:17
armarx::RemoteGui::Client::Widget
Definition: Widgets.h:21
armarx::RemoteGui::Client::Tab::create
void create(std::string const &name, Ice::ObjectPrx const &remoteGuiObject, Widget const &rootWidget)
Definition: Tab.cpp:31
armarx::RemoteGui::Client::Tab::Tab
Tab()
Definition: Tab.cpp:17
std
Definition: Application.h:66
armarx::RemoteGui::Client::TabImpl
Definition: Impl.h:59
Widgets.h
armarx::RemoteGui::Client::Tab::receiveUpdates
void receiveUpdates()
Definition: Tab.cpp:45
armarx::RemoteGui::Client
Definition: EigenWidgets.cpp:8
Impl.h