Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
484cad24
Commit
484cad24
authored
Nov 25, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T: add function xy_plot_set_title
parent
8eeebdaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/gui.h
+1
-0
common/utils/T/tracer/gui/xy_plot.c
common/utils/T/tracer/gui/xy_plot.c
+19
-0
No files found.
common/utils/T/tracer/gui/gui.h
View file @
484cad24
...
...
@@ -50,6 +50,7 @@ void xy_plot_set_range(gui *gui, widget *this,
void
xy_plot_set_points
(
gui
*
gui
,
widget
*
this
,
int
plot
,
int
npoints
,
float
*
x
,
float
*
y
);
void
xy_plot_get_dimensions
(
gui
*
gui
,
widget
*
this
,
int
*
width
,
int
*
height
);
void
xy_plot_set_title
(
gui
*
gui
,
widget
*
this
,
char
*
label
);
void
textlist_add
(
gui
*
gui
,
widget
*
this
,
const
char
*
text
,
int
position
,
int
color
);
...
...
common/utils/T/tracer/gui/xy_plot.c
View file @
484cad24
...
...
@@ -290,3 +290,22 @@ void xy_plot_get_dimensions(gui *_gui, widget *_this, int *width, int *height)
gunlock
(
g
);
}
void
xy_plot_set_title
(
gui
*
_gui
,
widget
*
_this
,
char
*
label
)
{
struct
gui
*
g
=
_gui
;
struct
xy_plot_widget
*
this
=
_this
;
glock
(
g
);
free
(
this
->
label
);
this
->
label
=
strdup
(
label
);
if
(
this
->
label
==
NULL
)
OOM
;
/* TODO: be sure calling X there is valid wrt "global model" (we are
* not in the "gui thread") */
x_text_get_dimensions
(
g
->
x
,
DEFAULT_FONT
,
label
,
&
this
->
label_width
,
&
this
->
label_height
,
&
this
->
label_baseline
);
send_event
(
g
,
REPACK
,
this
->
common
.
id
);
gunlock
(
g
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment