Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
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
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
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
8eeebdaf
Commit
8eeebdaf
authored
8 years ago
by
Cedric Roux
Browse files
Options
Downloads
Patches
Plain Diff
T: add function label_set_text
parent
0bb875d9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/utils/T/tracer/gui/gui.h
+1
-0
1 addition, 0 deletions
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/gui_defs.h
+1
-1
1 addition, 1 deletion
common/utils/T/tracer/gui/gui_defs.h
common/utils/T/tracer/gui/label.c
+18
-0
18 additions, 0 deletions
common/utils/T/tracer/gui/label.c
with
20 additions
and
1 deletion
common/utils/T/tracer/gui/gui.h
+
1
−
0
View file @
8eeebdaf
...
...
@@ -39,6 +39,7 @@ widget *new_space(gui *gui, int width, int height);
widget
*
new_image
(
gui
*
gui
,
unsigned
char
*
data
,
int
length
);
void
label_set_clickable
(
gui
*
gui
,
widget
*
label
,
int
clickable
);
void
label_set_text
(
gui
*
gui
,
widget
*
label
,
char
*
text
);
void
container_set_child_growable
(
gui
*
_gui
,
widget
*
_this
,
widget
*
child
,
int
growable
);
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/gui_defs.h
+
1
−
1
View file @
8eeebdaf
...
...
@@ -141,7 +141,7 @@ struct button_widget {
struct
label_widget
{
struct
widget
common
;
const
char
*
t
;
char
*
t
;
int
color
;
int
width
;
/* as given by the graphic's backend */
int
height
;
/* as given by the graphic's backend */
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/label.c
+
18
−
0
View file @
8eeebdaf
...
...
@@ -81,3 +81,21 @@ void label_set_clickable(gui *_g, widget *_this, int clickable)
gunlock
(
g
);
}
void
label_set_text
(
gui
*
_g
,
widget
*
_this
,
char
*
text
)
{
struct
gui
*
g
=
_g
;
struct
label_widget
*
this
=
_this
;
glock
(
g
);
free
(
this
->
t
);
this
->
t
=
strdup
(
text
);
if
(
this
->
t
==
NULL
)
OOM
;
x_text_get_dimensions
(
g
->
x
,
DEFAULT_FONT
,
text
,
&
this
->
width
,
&
this
->
height
,
&
this
->
baseline
);
send_event
(
g
,
REPACK
,
this
->
common
.
id
);
gunlock
(
g
);
}
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