Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
6dcc486a
Commit
6dcc486a
authored
4 years ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] Make selection controls global.
parent
490d4f56
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/src/renderer/ASTview.tsx
+0
-15
0 additions, 15 deletions
ivette/src/renderer/ASTview.tsx
ivette/src/renderer/Application.tsx
+30
-0
30 additions, 0 deletions
ivette/src/renderer/Application.tsx
with
30 additions
and
15 deletions
ivette/src/renderer/ASTview.tsx
+
0
−
15
View file @
6dcc486a
...
@@ -96,9 +96,6 @@ const ASTview = () => {
...
@@ -96,9 +96,6 @@ const ASTview = () => {
},
[
buffer
,
theMarker
]);
},
[
buffer
,
theMarker
]);
// Callbacks
// Callbacks
const
doPrevSelect
=
()
=>
{
updateSelection
(
'
GO_BACK
'
);
};
const
doNextSelect
=
()
=>
{
updateSelection
(
'
GO_FORWARD
'
);
};
const
zoomIn
=
()
=>
fontSize
<
48
&&
setFontSize
(
fontSize
+
2
);
const
zoomIn
=
()
=>
fontSize
<
48
&&
setFontSize
(
fontSize
+
2
);
const
zoomOut
=
()
=>
fontSize
>
4
&&
setFontSize
(
fontSize
-
2
);
const
zoomOut
=
()
=>
fontSize
>
4
&&
setFontSize
(
fontSize
-
2
);
...
@@ -134,18 +131,6 @@ const ASTview = () => {
...
@@ -134,18 +131,6 @@ const ASTview = () => {
return
(
return
(
<>
<>
<
TitleBar
>
<
TitleBar
>
<
IconButton
icon
=
"MEDIA.PREV"
onClick
=
{
doPrevSelect
}
disabled
=
{
!
selection
||
selection
.
prevSelections
.
length
===
0
}
title
=
"Previous location"
/>
<
IconButton
icon
=
"MEDIA.NEXT"
onClick
=
{
doNextSelect
}
disabled
=
{
!
selection
||
selection
.
nextSelections
.
length
===
0
}
title
=
"Next location"
/>
<
IconButton
<
IconButton
icon
=
"ZOOM.OUT"
icon
=
"ZOOM.OUT"
onClick
=
{
zoomOut
}
onClick
=
{
zoomOut
}
...
...
This diff is collapsed.
Click to expand it.
ivette/src/renderer/Application.tsx
+
30
−
0
View file @
6dcc486a
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
*
as
Dome
from
'
dome
'
;
import
*
as
Dome
from
'
dome
'
;
import
*
as
States
from
'
frama-c/states
'
;
import
{
Vfill
}
from
'
dome/layout/boxes
'
;
import
{
Vfill
}
from
'
dome/layout/boxes
'
;
import
{
Splitter
}
from
'
dome/layout/splitters
'
;
import
{
Splitter
}
from
'
dome/layout/splitters
'
;
import
*
as
Toolbar
from
'
dome/frame/toolbars
'
;
import
*
as
Toolbar
from
'
dome/frame/toolbars
'
;
...
@@ -18,6 +19,34 @@ import Properties from './Properties';
...
@@ -18,6 +19,34 @@ import Properties from './Properties';
import
ASTview
from
'
./ASTview
'
;
import
ASTview
from
'
./ASTview
'
;
import
ASTinfo
from
'
./ASTinfo
'
;
import
ASTinfo
from
'
./ASTinfo
'
;
// --------------------------------------------------------------------------
// --- Selection Controls
// --------------------------------------------------------------------------
const
SelectionControls
=
()
=>
{
const
[
selection
,
updateSelection
]
=
States
.
useSelection
();
const
doPrevSelect
=
()
=>
{
updateSelection
(
'
GO_BACK
'
);
};
const
doNextSelect
=
()
=>
{
updateSelection
(
'
GO_FORWARD
'
);
};
return
(
<
Toolbar
.
ButtonGroup
>
<
Toolbar
.
Button
icon
=
"MEDIA.PREV"
onClick
=
{
doPrevSelect
}
disabled
=
{
!
selection
||
selection
.
prevSelections
.
length
===
0
}
title
=
"Previous location"
/>
<
Toolbar
.
Button
icon
=
"MEDIA.NEXT"
onClick
=
{
doNextSelect
}
disabled
=
{
!
selection
||
selection
.
nextSelections
.
length
===
0
}
title
=
"Next location"
/>
</
Toolbar
.
ButtonGroup
>
);
};
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --- Main View
// --- Main View
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
...
@@ -42,6 +71,7 @@ export default (() => {
...
@@ -42,6 +71,7 @@ export default (() => {
onClick
=
{
flipSidebar
}
onClick
=
{
flipSidebar
}
/>
/>
<
Controller
.
Control
/>
<
Controller
.
Control
/>
<
SelectionControls
/>
<
Toolbar
.
Filler
/>
<
Toolbar
.
Filler
/>
<
Toolbar
.
Button
<
Toolbar
.
Button
icon
=
"ITEMS.GRID"
icon
=
"ITEMS.GRID"
...
...
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