Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gepetto-viewer-corba
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
gepetto-viewer-corba
Commits
e29a3ba2
Commit
e29a3ba2
authored
10 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add GraphicalInterface::getWindowID.
parent
7e0bb44d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
idl/gepetto/viewer/graphical-interface.idl
+1
-0
1 addition, 0 deletions
idl/gepetto/viewer/graphical-interface.idl
src/graphical-interface.impl.cpp
+15
-0
15 additions, 0 deletions
src/graphical-interface.impl.cpp
src/graphical-interface.impl.hh
+3
-0
3 additions, 0 deletions
src/graphical-interface.impl.hh
with
19 additions
and
0 deletions
idl/gepetto/viewer/graphical-interface.idl
+
1
−
0
View file @
e29a3ba2
...
@@ -36,6 +36,7 @@ typedef double Color [4];
...
@@ -36,6 +36,7 @@ typedef double Color [4];
/// \param input name : name of the new window.
/// \param input name : name of the new window.
/// return the ID of the newly create window.
/// return the ID of the newly create window.
unsigned long createWindow(in string name) raises (Error);
unsigned long createWindow(in string name) raises (Error);
unsigned long getWindowID (in string name) raises (Error);
/// Print names of nodes on the SceneViewer-corbaserver terminal.
/// Print names of nodes on the SceneViewer-corbaserver terminal.
...
...
This diff is collapsed.
Click to expand it.
src/graphical-interface.impl.cpp
+
15
−
0
View file @
e29a3ba2
...
@@ -180,6 +180,7 @@ namespace graphics {
...
@@ -180,6 +180,7 @@ namespace graphics {
std
::
string
windowName
(
windowNameCorba
);
std
::
string
windowName
(
windowNameCorba
);
WindowManagerPtr_t
newWindow
=
WindowManager
::
create
();
WindowManagerPtr_t
newWindow
=
WindowManager
::
create
();
WindowID
windowId
=
windowManagers_
.
size
();
WindowID
windowId
=
windowManagers_
.
size
();
windowIDmap_
[
windowNameCorba
]
=
windowId
;
windowManagers_
.
push_back
(
newWindow
);
windowManagers_
.
push_back
(
newWindow
);
boost
::
thread
refreshThread
(
boost
::
bind
boost
::
thread
refreshThread
(
boost
::
bind
(
&
GraphicalInterface
::
threadRefreshing
,
(
&
GraphicalInterface
::
threadRefreshing
,
...
@@ -190,6 +191,20 @@ namespace graphics {
...
@@ -190,6 +191,20 @@ namespace graphics {
}
}
}
}
GraphicalInterface
::
WindowID
GraphicalInterface
::
getWindowID
(
const
char
*
windowNameCorba
)
throw
(
Error
)
{
try
{
std
::
string
windowName
(
windowNameCorba
);
WindowIDMap_t
::
iterator
it
=
windowIDmap_
.
find
(
windowName
);
if
(
it
==
windowIDmap_
.
end
())
throw
Error
(
"There is no windows with that name"
);
return
it
->
second
;
}
catch
(
const
std
::
exception
&
exc
)
{
throw
Error
(
exc
.
what
());
}
}
void
GraphicalInterface
::
refresh
()
throw
(
Error
)
void
GraphicalInterface
::
refresh
()
throw
(
Error
)
{
{
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
src/graphical-interface.impl.hh
+
3
−
0
View file @
e29a3ba2
...
@@ -49,7 +49,9 @@ private:
...
@@ -49,7 +49,9 @@ private:
typedef
gepetto
::
Error
Error
;
typedef
gepetto
::
Error
Error
;
typedef
CORBA
::
ULong
WindowID
;
typedef
CORBA
::
ULong
WindowID
;
typedef
std
::
vector
<
WindowManagerPtr_t
>
WindowManagers_t
;
typedef
std
::
vector
<
WindowManagerPtr_t
>
WindowManagers_t
;
typedef
std
::
map
<
std
::
string
,
WindowID
>
WindowIDMap_t
;
WindowManagers_t
windowManagers_
;
WindowManagers_t
windowManagers_
;
WindowIDMap_t
windowIDmap_
;
std
::
map
<
std
::
string
,
NodePtr_t
>
nodes_
;
std
::
map
<
std
::
string
,
NodePtr_t
>
nodes_
;
std
::
map
<
std
::
string
,
GroupNodePtr_t
>
groupNodes_
;
std
::
map
<
std
::
string
,
GroupNodePtr_t
>
groupNodes_
;
corbaServer
::
Server
*
server_
;
corbaServer
::
Server
*
server_
;
...
@@ -85,6 +87,7 @@ public:
...
@@ -85,6 +87,7 @@ public:
virtual
void
refresh
()
throw
(
Error
);
virtual
void
refresh
()
throw
(
Error
);
virtual
WindowID
createWindow
(
const
char
*
windowNameCorba
)
throw
(
Error
);
virtual
WindowID
createWindow
(
const
char
*
windowNameCorba
)
throw
(
Error
);
virtual
WindowID
getWindowID
(
const
char
*
windowNameCorba
)
throw
(
Error
);
virtual
void
createScene
(
const
char
*
sceneNameCorba
)
throw
(
Error
);
virtual
void
createScene
(
const
char
*
sceneNameCorba
)
throw
(
Error
);
virtual
void
createSceneWithFloor
(
const
char
*
sceneNameCorba
)
throw
(
Error
);
virtual
void
createSceneWithFloor
(
const
char
*
sceneNameCorba
)
throw
(
Error
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment