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
Michael Black
OpenXG-RAN
Commits
50c00218
Commit
50c00218
authored
May 23, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
space widget, to add some space in the gui
parent
25546ae9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
4 deletions
+47
-4
common/utils/T/tracer/gui/Makefile
common/utils/T/tracer/gui/Makefile
+1
-1
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/gui.h
+1
-0
common/utils/T/tracer/gui/gui_defs.h
common/utils/T/tracer/gui/gui_defs.h
+7
-1
common/utils/T/tracer/gui/space.c
common/utils/T/tracer/gui/space.c
+36
-0
common/utils/T/tracer/gui/widget.c
common/utils/T/tracer/gui/widget.c
+2
-2
No files found.
common/utils/T/tracer/gui/Makefile
View file @
50c00218
...
...
@@ -3,7 +3,7 @@ CFLAGS=-Wall -g -pthread
OBJS
=
init.o loop.o toplevel_window.o x.o container.o widget.o
\
gui.o label.o event.o xy_plot.o textlist.o notify.o positioner.o
\
timeline.o
timeline.o
space.o
gui.a
:
$(OBJS)
ar cr gui.a
$(OBJS)
...
...
common/utils/T/tracer/gui/gui.h
View file @
50c00218
...
...
@@ -33,6 +33,7 @@ widget *new_xy_plot(gui *gui, int width, int height, char *label,
widget
*
new_textlist
(
gui
*
gui
,
int
width
,
int
nlines
,
int
background_color
);
widget
*
new_timeline
(
gui
*
gui
,
int
width
,
int
number_of_sublines
,
int
subline_height
);
widget
*
new_space
(
gui
*
gui
,
int
width
,
int
height
);
void
label_set_clickable
(
gui
*
gui
,
widget
*
label
,
int
clickable
);
...
...
common/utils/T/tracer/gui/gui_defs.h
View file @
50c00218
...
...
@@ -31,7 +31,7 @@ extern int volatile gui_logd;
enum
widget_type
{
TOPLEVEL_WINDOW
,
CONTAINER
,
POSITIONER
,
TEXT_LIST
,
XY_PLOT
,
BUTTON
,
LABEL
,
TIMELINE
TIMELINE
,
SPACE
};
struct
widget_list
;
...
...
@@ -148,6 +148,12 @@ struct label_widget {
int
baseline
;
/* as given by the graphic's backend */
};
struct
space_widget
{
struct
widget
common
;
int
wanted_width
;
int
wanted_height
;
};
/*************************************************************************/
/* events */
/*************************************************************************/
...
...
common/utils/T/tracer/gui/space.c
0 → 100644
View file @
50c00218
#include "gui.h"
#include "gui_defs.h"
#include <stdio.h>
static
void
paint
(
gui
*
_gui
,
widget
*
_w
)
{
/* nothing */
}
static
void
hints
(
gui
*
_gui
,
widget
*
_w
,
int
*
width
,
int
*
height
)
{
struct
space_widget
*
w
=
_w
;
LOGD
(
"HINTS space %p
\n
"
,
w
);
*
width
=
w
->
wanted_width
;
*
height
=
w
->
wanted_height
;
}
widget
*
new_space
(
gui
*
_gui
,
int
width
,
int
height
)
{
struct
gui
*
g
=
_gui
;
struct
space_widget
*
w
;
glock
(
g
);
w
=
new_widget
(
g
,
SPACE
,
sizeof
(
struct
space_widget
));
w
->
wanted_width
=
width
;
w
->
wanted_height
=
height
;
w
->
common
.
paint
=
paint
;
w
->
common
.
hints
=
hints
;
gunlock
(
g
);
return
w
;
}
common/utils/T/tracer/gui/widget.c
View file @
50c00218
...
...
@@ -265,12 +265,11 @@ void widget_dirty(gui *_gui, widget *_this)
static
const
char
*
names
[]
=
{
"TOPLEVEL_WINDOW"
,
"CONTAINER"
,
"POSITIONER"
,
"TEXT_LIST"
,
"XY_PLOT"
,
"BUTTON"
,
"LABEL"
,
"TIMELINE"
"XY_PLOT"
,
"BUTTON"
,
"LABEL"
,
"TIMELINE"
,
"SPACE"
};
const
char
*
widget_name
(
enum
widget_type
type
)
{
switch
(
type
)
{
default:
break
;
case
TOPLEVEL_WINDOW
:
case
CONTAINER
:
case
POSITIONER
:
...
...
@@ -279,6 +278,7 @@ const char *widget_name(enum widget_type type)
case
BUTTON
:
case
LABEL
:
case
TIMELINE
:
case
SPACE
:
return
names
[
type
];
}
return
"UNKNOWN (error)"
;
...
...
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