Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
Esteban Blanc
proview
Commits
3feac8d9
Commit
3feac8d9
authored
Feb 16, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt collect graph updated, and added to collect menu
parent
0ec860ce
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
217 additions
and
190 deletions
+217
-190
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
+26
-0
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.h
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.h
+1
-0
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+8
-0
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+1
-0
xtt/lib/ge/src/ge_graph_object.cpp
xtt/lib/ge/src/ge_graph_object.cpp
+121
-189
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+10
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+16
-1
xtt/lib/glow/src/glow_growctx.cpp
xtt/lib/glow/src/glow_growctx.cpp
+3
-0
xtt/lib/glow/src/glow_growctx.h
xtt/lib/glow/src/glow_growctx.h
+10
-0
xtt/lib/xtt/gtk/xtt_ge_gtk.cpp
xtt/lib/xtt/gtk/xtt_ge_gtk.cpp
+21
-0
No files found.
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.cpp
View file @
3feac8d9
...
@@ -451,6 +451,27 @@ void XttGtk::activate_collect_clear( GtkWidget *w, gpointer data)
...
@@ -451,6 +451,27 @@ void XttGtk::activate_collect_clear( GtkWidget *w, gpointer data)
xtt
->
xnav
->
collect_clear
();
xtt
->
xnav
->
collect_clear
();
}
}
void
XttGtk
::
activate_collect_opengraph
(
GtkWidget
*
w
,
gpointer
data
)
{
Xtt
*
xtt
=
(
Xtt
*
)
data
;
pwr_tCmd
cmd
=
"open graph /collect"
;
if
(
!
xtt
->
xnav
->
is_authorized
())
return
;
int
showed
=
0
;
if
(
xtt
->
xnav
->
brow
->
ctx
!=
xtt
->
xnav
->
collect_brow
->
ctx
)
{
xtt
->
xnav
->
collect_show
();
showed
=
1
;
}
xtt
->
xnav
->
command
(
cmd
);
if
(
showed
)
// Hide
xtt
->
xnav
->
collect_show
();
}
void
XttGtk
::
activate_collect_window
(
GtkWidget
*
w
,
gpointer
data
)
void
XttGtk
::
activate_collect_window
(
GtkWidget
*
w
,
gpointer
data
)
{
{
Xtt
*
xtt
=
(
Xtt
*
)
data
;
Xtt
*
xtt
=
(
Xtt
*
)
data
;
...
@@ -868,6 +889,10 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
...
@@ -868,6 +889,10 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
g_signal_connect
(
functions_collect_clear
,
"activate"
,
g_signal_connect
(
functions_collect_clear
,
"activate"
,
G_CALLBACK
(
XttGtk
::
activate_collect_clear
),
this
);
G_CALLBACK
(
XttGtk
::
activate_collect_clear
),
this
);
GtkWidget
*
functions_collect_opengraph
=
gtk_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"O_pen Graph"
));
g_signal_connect
(
functions_collect_opengraph
,
"activate"
,
G_CALLBACK
(
XttGtk
::
activate_collect_opengraph
),
this
);
GtkWidget
*
functions_collect_window
=
gtk_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"_Copy to Window"
));
GtkWidget
*
functions_collect_window
=
gtk_menu_item_new_with_mnemonic
(
CoWowGtk
::
translate_utf8
(
"_Copy to Window"
));
g_signal_connect
(
functions_collect_window
,
"activate"
,
g_signal_connect
(
functions_collect_window
,
"activate"
,
G_CALLBACK
(
XttGtk
::
activate_collect_window
),
this
);
G_CALLBACK
(
XttGtk
::
activate_collect_window
),
this
);
...
@@ -901,6 +926,7 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
...
@@ -901,6 +926,7 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_show
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_show
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_remove
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_remove
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_clear
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_clear
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_opengraph
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_window
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_window
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_new_window
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_new_window
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_signals
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
functions_collect_menu
),
functions_collect_signals
);
...
...
xtt/exe/rt_xtt/gtk/rt_xtt_gtk.h
View file @
3feac8d9
...
@@ -108,6 +108,7 @@ class XttGtk : public Xtt {
...
@@ -108,6 +108,7 @@ class XttGtk : public Xtt {
static
void
activate_collect_show
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_show
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_remove
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_remove
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_clear
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_clear
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_opengraph
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_window
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_window
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_new_window
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_new_window
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_signals
(
GtkWidget
*
w
,
gpointer
data
);
static
void
activate_collect_signals
(
GtkWidget
*
w
,
gpointer
data
);
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
3feac8d9
...
@@ -659,6 +659,14 @@ void GeDyn::open( ifstream& fp)
...
@@ -659,6 +659,14 @@ void GeDyn::open( ifstream& fp)
}
}
}
}
void
GeDyn
::
update_dyntype
(
grow_tObject
object
)
{
total_dyn_type1
=
get_dyntype1
(
object
);
total_dyn_type2
=
get_dyntype2
(
object
);
total_action_type1
=
get_actiontype1
(
object
);
total_action_type2
=
get_actiontype2
(
object
);
}
ge_mDynType1
GeDyn
::
get_dyntype1
(
grow_tObject
object
)
ge_mDynType1
GeDyn
::
get_dyntype1
(
grow_tObject
object
)
{
{
if
(
object
&&
dyn_type1
&
ge_mDynType1_Inherit
)
{
if
(
object
&&
dyn_type1
&
ge_mDynType1_Inherit
)
{
...
...
xtt/lib/ge/src/ge_dyn.h
View file @
3feac8d9
...
@@ -869,6 +869,7 @@ class GeDyn {
...
@@ -869,6 +869,7 @@ class GeDyn {
//! Execute action after confirm.
//! Execute action after confirm.
int
confirmed_action
(
grow_tObject
object
,
glow_tEvent
event
);
int
confirmed_action
(
grow_tObject
object
,
glow_tEvent
event
);
int
change_value
(
grow_tObject
object
,
char
*
text
);
int
change_value
(
grow_tObject
object
,
char
*
text
);
void
update_dyntype
(
grow_tObject
object
);
ge_mDynType1
get_dyntype1
(
grow_tObject
object
);
ge_mDynType1
get_dyntype1
(
grow_tObject
object
);
ge_mDynType2
get_dyntype2
(
grow_tObject
object
);
ge_mDynType2
get_dyntype2
(
grow_tObject
object
);
ge_mActionType1
get_actiontype1
(
grow_tObject
object
);
ge_mActionType1
get_actiontype1
(
grow_tObject
object
);
...
...
xtt/lib/ge/src/ge_graph_object.cpp
View file @
3feac8d9
This diff is collapsed.
Click to expand it.
xtt/lib/glow/src/glow_growapi.cpp
View file @
3feac8d9
...
@@ -751,6 +751,10 @@ void grow_SetAttributes( grow_tCtx ctx, grow_sAttributes *attr,
...
@@ -751,6 +751,10 @@ void grow_SetAttributes( grow_tCtx ctx, grow_sAttributes *attr,
ctx
->
initial_position
=
attr
->
initial_position
;
ctx
->
initial_position
=
attr
->
initial_position
;
if
(
mask
&
grow_eAttr_environment
)
if
(
mask
&
grow_eAttr_environment
)
ctx
->
environment
=
attr
->
environment
;
ctx
->
environment
=
attr
->
environment
;
if
(
mask
&
grow_eAttr_tooltip_text_size
)
ctx
->
tiptext_size
=
attr
->
tooltip_text_size
;
if
(
mask
&
grow_eAttr_color_theme
)
strncpy
(
ctx
->
color_theme
,
attr
->
color_theme
,
sizeof
(
ctx
->
color_theme
));
}
}
void
grow_GetAttributes
(
grow_tCtx
ctx
,
grow_sAttributes
*
attr
,
void
grow_GetAttributes
(
grow_tCtx
ctx
,
grow_sAttributes
*
attr
,
...
@@ -4530,6 +4534,12 @@ void grow_SetLayout( grow_tCtx ctx, double x0, double y0, double x1,
...
@@ -4530,6 +4534,12 @@ void grow_SetLayout( grow_tCtx ctx, double x0, double y0, double x1,
ctx
->
set_layout
(
x0
,
y0
,
x1
,
y1
);
ctx
->
set_layout
(
x0
,
y0
,
x1
,
y1
);
}
}
void
grow_GetLayout
(
grow_tCtx
ctx
,
double
*
x0
,
double
*
y0
,
double
*
x1
,
double
*
y1
)
{
ctx
->
get_layout
(
x0
,
y0
,
x1
,
y1
);
}
void
grow_SetPath
(
grow_tCtx
ctx
,
int
path_cnt
,
const
char
*
path
)
void
grow_SetPath
(
grow_tCtx
ctx
,
int
path_cnt
,
const
char
*
path
)
{
{
ctx
->
set_path
(
path_cnt
,
path
);
ctx
->
set_path
(
path_cnt
,
path
);
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
3feac8d9
...
@@ -120,6 +120,8 @@ extern "C" {
...
@@ -120,6 +120,8 @@ extern "C" {
glow_eHotMode
hot_mode
;
glow_eHotMode
hot_mode
;
glow_eDirection
initial_position
;
glow_eDirection
initial_position
;
glow_eEnv
environment
;
glow_eEnv
environment
;
int
tooltip_text_size
;
char
color_theme
[
40
];
}
grow_sAttributes
;
}
grow_sAttributes
;
typedef
enum
{
typedef
enum
{
...
@@ -144,7 +146,9 @@ extern "C" {
...
@@ -144,7 +146,9 @@ extern "C" {
grow_eAttr_double_buffer_on
=
1
<<
18
,
grow_eAttr_double_buffer_on
=
1
<<
18
,
grow_eAttr_hot_mode
=
1
<<
19
,
grow_eAttr_hot_mode
=
1
<<
19
,
grow_eAttr_initial_position
=
1
<<
20
,
grow_eAttr_initial_position
=
1
<<
20
,
grow_eAttr_environment
=
1
<<
21
grow_eAttr_environment
=
1
<<
21
,
grow_eAttr_tooltip_text_size
=
1
<<
22
,
grow_eAttr_color_theme
=
1
<<
23
}
grow_eAttribute
;
}
grow_eAttribute
;
...
@@ -1907,6 +1911,17 @@ extern "C" {
...
@@ -1907,6 +1911,17 @@ extern "C" {
void
grow_SetLayout
(
grow_tCtx
ctx
,
double
x0
,
double
y0
,
double
x1
,
void
grow_SetLayout
(
grow_tCtx
ctx
,
double
x0
,
double
y0
,
double
x1
,
double
y1
);
double
y1
);
//! Get layout.
/*!
\param ctx Grow context.
\param x0 x coordinate for left border.
\param y0 y coordinate for low border.
\param x1 x coordinate for right border.
\param y1 y coordinate for high border.
*/
void
grow_GetLayout
(
grow_tCtx
ctx
,
double
*
x0
,
double
*
y0
,
double
*
x1
,
double
*
y1
);
//! Set search path for subgraphs and images.
//! Set search path for subgraphs and images.
/*!
/*!
\param ctx Grow context.
\param ctx Grow context.
...
...
xtt/lib/glow/src/glow_growctx.cpp
View file @
3feac8d9
...
@@ -4698,6 +4698,9 @@ int GrowCtx::read_customcolor_file( char *name)
...
@@ -4698,6 +4698,9 @@ int GrowCtx::read_customcolor_file( char *name)
if
(
environment
==
glow_eEnv_Runtime
&&
strcmp
(
color_theme
,
"$default"
)
!=
0
)
if
(
environment
==
glow_eEnv_Runtime
&&
strcmp
(
color_theme
,
"$default"
)
!=
0
)
return
0
;
return
0
;
if
(
name
==
0
&&
strcmp
(
default_color_theme
,
""
)
!=
0
)
name
=
default_color_theme
;
if
(
customcolors
)
{
if
(
customcolors
)
{
sts
=
customcolors
->
read_colorfile
(
this
,
name
);
sts
=
customcolors
->
read_colorfile
(
this
,
name
);
if
(
ODD
(
sts
))
{
if
(
ODD
(
sts
))
{
...
...
xtt/lib/glow/src/glow_growctx.h
View file @
3feac8d9
...
@@ -758,6 +758,16 @@ class GrowCtx : public GlowCtx {
...
@@ -758,6 +758,16 @@ class GrowCtx : public GlowCtx {
void
set_layout
(
double
nx0
,
double
ny0
,
double
nx1
,
double
ny1
)
void
set_layout
(
double
nx0
,
double
ny0
,
double
nx1
,
double
ny1
)
{
x0
=
nx0
;
y0
=
ny0
;
x1
=
nx1
;
y1
=
ny1
;
};
{
x0
=
nx0
;
y0
=
ny0
;
x1
=
nx1
;
y1
=
ny1
;
};
//! Get layout
/*!
\param nx0 x coordinate for left border.
\param ny0 y coordinate for low border.
\param nx1 x coordinate for right border.
\param ny1 y coordinate for high border.
*/
void
get_layout
(
double
*
nx0
,
double
*
ny0
,
double
*
nx1
,
double
*
ny1
)
{
*
nx0
=
x0
;
*
ny0
=
y0
;
*
nx1
=
x1
;
*
ny1
=
y1
;
};
//! Group the selected objects.
//! Group the selected objects.
/*!
/*!
\param group Created group.
\param group Created group.
...
...
xtt/lib/xtt/gtk/xtt_ge_gtk.cpp
View file @
3feac8d9
...
@@ -491,6 +491,27 @@ XttGeGtk::XttGeGtk( GtkWidget *xg_parent_wid, void *xg_parent_ctx, const char *x
...
@@ -491,6 +491,27 @@ XttGeGtk::XttGeGtk( GtkWidget *xg_parent_wid, void *xg_parent_ctx, const char *x
if
(
borders
)
if
(
borders
)
((
Graph
*
)
graph
)
->
set_borders
(
borders
);
((
Graph
*
)
graph
)
->
set_borders
(
borders
);
if
(
strcmp
(
filename
,
"_none_"
)
==
0
&&
xg_width
==
0
&&
xg_height
==
0
)
{
// Set size from current layout
double
x0
,
y0
,
x1
,
y1
,
zoom
;
float
rd
=
0.05
;
grow_GetLayout
(
graph
->
grow
->
ctx
,
&
x0
,
&
y0
,
&
x1
,
&
y1
);
grow_GetZoom
(
graph
->
grow
->
ctx
,
&
zoom
);
window_width
=
zoom
*
(
x1
-
x0
);
window_height
=
zoom
*
(
y1
-
y0
);
if
(
window_width
<
300
||
window_height
<
300
)
rd
=
0.2
;
geometry
.
min_aspect
=
gdouble
(
window_width
)
/
window_height
*
(
1.0
-
rd
);
geometry
.
max_aspect
=
gdouble
(
window_width
)
/
window_height
*
(
1.0
+
rd
);
gtk_window_set_geometry_hints
(
GTK_WINDOW
(
toplevel
),
GTK_WIDGET
(
toplevel
),
&
geometry
,
GDK_HINT_ASPECT
);
gtk_widget_set_size_request
(
toplevel
,
window_width
,
window_height
);
}
}
}
static
gint
confirm_delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
ge
)
static
gint
confirm_delete_event
(
GtkWidget
*
w
,
GdkEvent
*
event
,
gpointer
ge
)
...
...
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