Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
TDT4102
Documentation
Commits
35d85071
Commit
35d85071
authored
1 year ago
by
Eila Aurora Huru Bergene
Browse files
Options
Downloads
Patches
Plain Diff
Fix callback example
parent
6715a8f4
No related branches found
No related tags found
No related merge requests found
Pipeline
#231114
passed
1 year ago
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/animationwindow/gui.md
+5
-4
5 additions, 4 deletions
docs/animationwindow/gui.md
with
5 additions
and
4 deletions
docs/animationwindow/gui.md
+
5
−
4
View file @
35d85071
...
...
@@ -105,8 +105,8 @@ class SuperManWindow : public AnimationWindow {
void
superCallbackFunction
();
void
fly
();
private:
Button
flyButton
()
;
}
Button
flyButton
;
}
;
void
SuperManWindow
::
superCallbackFunction
()
{
std
::
cout
<<
"Thanks for clicking, im going to fly
\n
"
;
...
...
@@ -115,11 +115,12 @@ void SuperManWindow::superCallbackFunction() {
}
SuperManWindow
::
SuperManWindow
()
:
AnimationWindow
(
10
0
,
10
0
,
1
00
,
1
00
,
"Super man window"
),
flyButton
{{
10
,
10
},
5
,
5
,
"fly"
}
{
:
AnimationWindow
(
5
0
,
5
0
,
5
00
,
5
00
,
"Super man window"
),
flyButton
{{
10
0
,
10
0
},
5
0
,
5
0
,
"fly"
}
{
// Here we convert the class method to a void function
// by binding this instance of the class to the function
flyButton
.
setCallback
(
std
::
bind
(
&
SuperManWindow
::
superCallbackFunction
,
this
));
add
(
flyButton
);
}
```
...
...
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