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
859097a5
Commit
859097a5
authored
Jun 28, 2017
by
Claes Sjofors
Committed by
Christoffer Ackelman
Jul 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge object navigator filtering added
parent
f7ae8e53
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
144 additions
and
4 deletions
+144
-4
src/doc/man/en_us/man_geref.dat
src/doc/man/en_us/man_geref.dat
+22
-0
src/doc/man/sv_se/man_geref.dat
src/doc/man/sv_se/man_geref.dat
+21
-0
xtt/lib/ge/gtk/ge_gtk.cpp
xtt/lib/ge/gtk/ge_gtk.cpp
+2
-2
xtt/lib/ge/src/ge_attr.h
xtt/lib/ge/src/ge_attr.h
+1
-0
xtt/lib/ge/src/ge_attrnav.cpp
xtt/lib/ge/src/ge_attrnav.cpp
+26
-1
xtt/lib/ge/src/ge_attrnav.h
xtt/lib/ge/src/ge_attrnav.h
+9
-0
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+5
-1
xtt/lib/ge/src/ge_graph_command.cpp
xtt/lib/ge/src/ge_graph_command.cpp
+58
-0
No files found.
src/doc/man/en_us/man_geref.dat
View file @
859097a5
...
@@ -5211,6 +5211,7 @@ create <link>gecmd_create
...
@@ -5211,6 +5211,7 @@ create <link>gecmd_create
<t>create subgraph <link>gecmd_create_subgraph
<t>create subgraph <link>gecmd_create_subgraph
<t>create bar <link>gecmd_create_bar
<t>create bar <link>gecmd_create_bar
exit <link>gecmd_exit
exit <link>gecmd_exit
filter navigator <link>gecmd_filter_navigator
group <link>gecmd_group
group <link>gecmd_group
move <link>gecmd_move
move <link>gecmd_move
<t>move currentobject <link>gecmd_move_currentobject
<t>move currentobject <link>gecmd_move_currentobject
...
@@ -5428,6 +5429,27 @@ Save the current graph and close Ge.
...
@@ -5428,6 +5429,27 @@ Save the current graph and close Ge.
<c>ge> exit ['filename']
<c>ge> exit ['filename']
</topic>
</topic>
<topic>gecmd_filter_navigator
filter navigator
Filter objects in the object navigator.
Filtering can be made on object name or subgraph with
wildcard pattern.
<b>Syntax
<c>ge> filter navigator /type= /pattern=
<c>ge> filter navigator /reset
/reset <t>Reset filter and show all objects.
/type <t>'name' or 'class'. Name will filter on object name
<t>and class on subgraph.
/pattern <t>Filter pattern. Can contain wildcard (*).
<b>Example
<c>ge> filter navigator /type=class /pattern=*button*
</topic>
<topic>gecmd_group <style>function
<topic>gecmd_group <style>function
group
group
...
...
src/doc/man/sv_se/man_geref.dat
View file @
859097a5
...
@@ -5156,6 +5156,7 @@ create <link>gecmd_create
...
@@ -5156,6 +5156,7 @@ create <link>gecmd_create
<t>create text <link>gecmd_create_text
<t>create text <link>gecmd_create_text
<t>create subgraph <link>gecmd_create_subgraph
<t>create subgraph <link>gecmd_create_subgraph
exit <link>gecmd_exit
exit <link>gecmd_exit
filter navigator <link>gecmd_filter_navigator
group <link>gecmd_group
group <link>gecmd_group
move <link>gecmd_move
move <link>gecmd_move
<t>move currentobject <link>gecmd_move_currentobject
<t>move currentobject <link>gecmd_move_currentobject
...
@@ -5345,6 +5346,26 @@ Avsluta ge och spara aktuell graf f
...
@@ -5345,6 +5346,26 @@ Avsluta ge och spara aktuell graf f
<c>ge> exit ['filename']
<c>ge> exit ['filename']
</topic>
</topic>
<topic>gecmd_filter_navigator
filter navigator
Filtrera objekt i objektsnavigatorn.
Filtrering kan göras på objektsnamn eller subgraf med wildcard.
<b>Syntax
<c>ge> filter navigator /type= /pattern=
<c>ge> filter navigator /reset
/reset <t>Återställer filtreringen och visar alla objekt.
/type <t>'name' eller 'class'. Name filtrerar på objektsnamn
<t>och class på subgraf.
/pattern <t>Filter mönster. Kan innehålla wildcard (*).
<b>Exempel
<c>ge> filter navigator /type=class /pattern=*button*
</topic>
<topic>gecmd_group <style>function
<topic>gecmd_group <style>function
group
group
...
...
xtt/lib/ge/gtk/ge_gtk.cpp
View file @
859097a5
...
@@ -1719,7 +1719,7 @@ GeGtk::GeGtk( void *x_parent_ctx,
...
@@ -1719,7 +1719,7 @@ GeGtk::GeGtk( void *x_parent_ctx,
int
path_cnt
;
int
path_cnt
;
char
*
path
;
char
*
path
;
char
systemname
[
80
];
char
systemname
[
80
];
const
int
window_width
=
9
0
0
;
const
int
window_width
=
9
8
0
;
const
int
window_height
=
800
;
const
int
window_height
=
800
;
const
int
palette_width
=
200
;
const
int
palette_width
=
200
;
pwr_tFileName
fname
;
pwr_tFileName
fname
;
...
@@ -3305,7 +3305,7 @@ GeGtk::GeGtk( void *x_parent_ctx,
...
@@ -3305,7 +3305,7 @@ GeGtk::GeGtk( void *x_parent_ctx,
g_object_set
(
hpaned3
,
"visible"
,
FALSE
,
NULL
);
g_object_set
(
hpaned3
,
"visible"
,
FALSE
,
NULL
);
gtk_paned_set_position
(
GTK_PANED
(
hpaned2
),
150
);
gtk_paned_set_position
(
GTK_PANED
(
hpaned2
),
150
);
gtk_paned_set_position
(
GTK_PANED
(
hpaned
),
window_width
-
palette_width
-
4
5
);
gtk_paned_set_position
(
GTK_PANED
(
hpaned
),
window_width
-
palette_width
-
17
5
);
gtk_paned_set_position
(
GTK_PANED
(
vpaned1
),
window_height
-
380
);
gtk_paned_set_position
(
GTK_PANED
(
vpaned1
),
window_height
-
380
);
gtk_paned_set_position
(
GTK_PANED
(
vpaned2
),
window_height
-
290
);
gtk_paned_set_position
(
GTK_PANED
(
vpaned2
),
window_height
-
290
);
...
...
xtt/lib/ge/src/ge_attr.h
View file @
859097a5
...
@@ -105,6 +105,7 @@ class Attr {
...
@@ -105,6 +105,7 @@ class Attr {
void
set_graph
(
Graph
*
g
)
{
attrnav
->
graph
=
g
;}
void
set_graph
(
Graph
*
g
)
{
attrnav
->
graph
=
g
;}
void
set_inputfocus
(
int
focus
)
{
if
(
focus
)
attrnav
->
set_inputfocus
();}
void
set_inputfocus
(
int
focus
)
{
if
(
focus
)
attrnav
->
set_inputfocus
();}
int
set_attr_value
(
char
*
value_str
);
int
set_attr_value
(
char
*
value_str
);
void
filter
(
int
type
,
char
*
pattern
)
{
attrnav
->
filter
(
type
,
pattern
);}
static
int
get_plant_select_c
(
void
*
attr_ctx
,
char
*
value
,
int
size
);
static
int
get_plant_select_c
(
void
*
attr_ctx
,
char
*
value
,
int
size
);
static
int
get_current_colors_c
(
void
*
attr_ctx
,
glow_eDrawType
*
fill_color
,
static
int
get_current_colors_c
(
void
*
attr_ctx
,
glow_eDrawType
*
fill_color
,
glow_eDrawType
*
border_color
,
glow_eDrawType
*
border_color
,
...
...
xtt/lib/ge/src/ge_attrnav.cpp
View file @
859097a5
...
@@ -1567,7 +1567,8 @@ AttrNav::AttrNav( void *xn_parent_ctx,
...
@@ -1567,7 +1567,8 @@ AttrNav::AttrNav( void *xn_parent_ctx,
parent_ctx
(
xn_parent_ctx
),
type
(
xn_type
),
parent_ctx
(
xn_parent_ctx
),
type
(
xn_type
),
itemlist
(
xn_itemlist
),
item_cnt
(
xn_item_cnt
),
itemlist
(
xn_itemlist
),
item_cnt
(
xn_item_cnt
),
trace_started
(
0
),
graph
(
0
),
last_selected
(
0
),
last_selected_id
(
0
),
trace_started
(
0
),
graph
(
0
),
last_selected
(
0
),
last_selected_id
(
0
),
message_cb
(
NULL
),
get_object_list_cb
(
0
),
set_inputfocus_cb
(
0
),
traverse_inputfocus_cb
(
0
)
filter_type
(
attr_eFilterType_No
),
message_cb
(
NULL
),
get_object_list_cb
(
0
),
set_inputfocus_cb
(
0
),
traverse_inputfocus_cb
(
0
)
{
{
strcpy
(
name
,
xn_name
);
strcpy
(
name
,
xn_name
);
*
status
=
1
;
*
status
=
1
;
...
@@ -2955,6 +2956,20 @@ void AttrNav::refresh_objects( unsigned int type)
...
@@ -2955,6 +2956,20 @@ void AttrNav::refresh_objects( unsigned int type)
default:
default:
strcpy
(
ncname
,
""
);
strcpy
(
ncname
,
""
);
}
}
switch
(
filter_type
)
{
case
attr_eFilterType_No
:
break
;
case
attr_eFilterType_Name
:
if
(
dcli_wildcard
(
filter_pattern
,
oname
)
!=
0
)
continue
;
break
;
case
attr_eFilterType_Class
:
if
(
dcli_wildcard
(
filter_pattern
,
ncname
)
!=
0
)
continue
;
break
;
}
item
=
new
AItemObject
(
this
,
oname
,
otype
,
list
[
i
],
ncname
,
NULL
,
flow_eDest_IntoLast
);
item
=
new
AItemObject
(
this
,
oname
,
otype
,
list
[
i
],
ncname
,
NULL
,
flow_eDest_IntoLast
);
// Open previously open objects
// Open previously open objects
...
@@ -3059,6 +3074,16 @@ void AttrNav::object_open_check( AItemObject *item, grow_tObject *open_list, int
...
@@ -3059,6 +3074,16 @@ void AttrNav::object_open_check( AItemObject *item, grow_tObject *open_list, int
}
}
}
}
void
AttrNav
::
filter
(
int
type
,
char
*
pattern
)
{
filter_type
=
(
attr_eFilterType
)
type
;
if
(
filter_type
==
attr_eFilterType_No
)
strcpy
(
filter_pattern
,
""
);
else
strncpy
(
filter_pattern
,
pattern
,
sizeof
(
filter_pattern
));
refresh_objects
(
attr_mRefresh_Objects
);
}
brow_tObject
AttrNav
::
gobject_to_bobject
(
grow_tObject
gobject
)
brow_tObject
AttrNav
::
gobject_to_bobject
(
grow_tObject
gobject
)
{
{
brow_tObject
*
blist
;
brow_tObject
*
blist
;
...
...
xtt/lib/ge/src/ge_attrnav.h
View file @
859097a5
...
@@ -95,6 +95,12 @@ typedef enum {
...
@@ -95,6 +95,12 @@ typedef enum {
attr_eType_ObjectTree
attr_eType_ObjectTree
}
attr_eType
;
}
attr_eType
;
typedef
enum
{
attr_eFilterType_No
,
attr_eFilterType_Name
,
attr_eFilterType_Class
}
attr_eFilterType
;
typedef
enum
{
typedef
enum
{
attrnav_eItemType_Local
,
attrnav_eItemType_Local
,
attrnav_eItemType_Enum
,
attrnav_eItemType_Enum
,
...
@@ -181,6 +187,8 @@ class AttrNav {
...
@@ -181,6 +187,8 @@ class AttrNav {
Graph
*
graph
;
Graph
*
graph
;
brow_tObject
last_selected
;
brow_tObject
last_selected
;
grow_tObject
last_selected_id
;
grow_tObject
last_selected_id
;
attr_eFilterType
filter_type
;
char
filter_pattern
[
80
];
void
(
*
message_cb
)(
void
*
,
int
,
char
,
const
char
*
);
void
(
*
message_cb
)(
void
*
,
int
,
char
,
const
char
*
);
void
(
*
change_value_cb
)(
void
*
);
void
(
*
change_value_cb
)(
void
*
);
int
(
*
get_subgraph_info_cb
)(
void
*
,
char
*
,
attr_sItem
**
,
int
*
);
int
(
*
get_subgraph_info_cb
)(
void
*
,
char
*
,
attr_sItem
**
,
int
*
);
...
@@ -204,6 +212,7 @@ class AttrNav {
...
@@ -204,6 +212,7 @@ class AttrNav {
void
refresh_objects
(
unsigned
int
type
);
void
refresh_objects
(
unsigned
int
type
);
void
object_open_check
(
AItemObject
*
item
,
grow_tObject
*
open_list
,
int
*
open_type
,
int
open_cnt
);
void
object_open_check
(
AItemObject
*
item
,
grow_tObject
*
open_list
,
int
*
open_type
,
int
open_cnt
);
brow_tObject
gobject_to_bobject
(
grow_tObject
gobject
);
brow_tObject
gobject_to_bobject
(
grow_tObject
gobject
);
void
filter
(
int
type
,
char
*
pattern
);
virtual
void
set_inputfocus
()
{}
virtual
void
set_inputfocus
()
{}
virtual
void
trace_start
()
{}
virtual
void
trace_start
()
{}
static
int
init_brow_cb
(
FlowCtx
*
fctx
,
void
*
client_data
);
static
int
init_brow_cb
(
FlowCtx
*
fctx
,
void
*
client_data
);
...
...
xtt/lib/ge/src/ge_graph.cpp
View file @
859097a5
...
@@ -1308,6 +1308,7 @@ void Graph::select_all_objects()
...
@@ -1308,6 +1308,7 @@ void Graph::select_all_objects()
}
}
object_p
++
;
object_p
++
;
}
}
refresh_objects
(
attr_mRefresh_Select
);
}
}
void
Graph
::
select_object
(
grow_tObject
o
)
void
Graph
::
select_object
(
grow_tObject
o
)
...
@@ -1367,6 +1368,7 @@ void Graph::select_nextobject( glow_eDirection dir)
...
@@ -1367,6 +1368,7 @@ void Graph::select_nextobject( glow_eDirection dir)
if
(
!
grow_IsVisible
(
grow
->
ctx
,
next
,
glow_eVisible_Partial
))
if
(
!
grow_IsVisible
(
grow
->
ctx
,
next
,
glow_eVisible_Partial
))
grow_CenterObject
(
grow
->
ctx
,
next
);
grow_CenterObject
(
grow
->
ctx
,
next
);
}
}
refresh_objects
(
attr_mRefresh_Select
);
}
}
int
Graph
::
get_selected_object
(
grow_tObject
*
object
)
int
Graph
::
get_selected_object
(
grow_tObject
*
object
)
...
@@ -2385,8 +2387,10 @@ void Graph::reset_mode( bool select_clear, bool keep)
...
@@ -2385,8 +2387,10 @@ void Graph::reset_mode( bool select_clear, bool keep)
grow_SetMoveRestrictions
(
grow
->
ctx
,
glow_eMoveRestriction_No
,
0
,
0
,
NULL
);
grow_SetMoveRestrictions
(
grow
->
ctx
,
glow_eMoveRestriction_No
,
0
,
0
,
NULL
);
grow_SetScaleEqual
(
grow
->
ctx
,
0
);
grow_SetScaleEqual
(
grow
->
ctx
,
0
);
keep_mode
=
keep
;
keep_mode
=
keep
;
if
(
select_clear
)
if
(
select_clear
)
{
grow_SelectClear
(
grow
->
ctx
);
grow_SelectClear
(
grow
->
ctx
);
refresh_objects
(
attr_mRefresh_Select
);
}
}
}
//
//
// Callbacks from grow
// Callbacks from grow
...
...
xtt/lib/ge/src/ge_graph_command.cpp
View file @
859097a5
...
@@ -121,6 +121,8 @@ static int graph_customcolor_func( void *client_data,
...
@@ -121,6 +121,8 @@ static int graph_customcolor_func( void *client_data,
void
*
client_flag
);
void
*
client_flag
);
static
int
graph_search_func
(
void
*
client_data
,
static
int
graph_search_func
(
void
*
client_data
,
void
*
client_flag
);
void
*
client_flag
);
static
int
graph_filter_func
(
void
*
client_data
,
void
*
client_flag
);
dcli_tCmdTable
graph_command_table
[]
=
{
dcli_tCmdTable
graph_command_table
[]
=
{
{
{
...
@@ -253,6 +255,11 @@ dcli_tCmdTable graph_command_table[] = {
...
@@ -253,6 +255,11 @@ dcli_tCmdTable graph_command_table[] = {
&
graph_search_func
,
&
graph_search_func
,
{
"dcli_arg"
,
"dcli_arg2"
,
"/NAME"
,
""
}
{
"dcli_arg"
,
"dcli_arg2"
,
"/NAME"
,
""
}
},
},
{
"FILTER"
,
&
graph_filter_func
,
{
"dcli_arg"
,
"/RESET"
,
"/TYPE"
,
"/PATTERN"
,
""
}
},
{
""
,}};
{
""
,}};
static
void
graph_store_graph
(
Graph
*
graph
)
static
void
graph_store_graph
(
Graph
*
graph
)
...
@@ -480,6 +487,57 @@ static int graph_search_func(void *client_data,
...
@@ -480,6 +487,57 @@ static int graph_search_func(void *client_data,
return
GE__SUCCESS
;
return
GE__SUCCESS
;
}
}
static
int
graph_filter_func
(
void
*
client_data
,
void
*
client_flag
)
{
Graph
*
graph
=
(
Graph
*
)
client_data
;
char
arg1_str
[
80
];
int
arg1_sts
;
int
sts
;
arg1_sts
=
dcli_get_qualifier
(
"dcli_arg1"
,
arg1_str
,
sizeof
(
arg1_str
));
if
(
cdh_NoCaseStrncmp
(
arg1_str
,
"NAVIGATOR"
,
strlen
(
arg1_str
))
==
0
)
{
// Command is "FILTER NAVIGATOR"
char
type_str
[
80
];
char
pattern_str
[
80
];
int
type
;
if
(
ODD
(
dcli_get_qualifier
(
"/RESET"
,
0
,
0
)))
{
((
Ge
*
)
graph
->
parent_ctx
)
->
objectnav
->
filter
(
0
,
0
);
return
GE__SUCCESS
;
}
sts
=
dcli_get_qualifier
(
"/TYPE"
,
type_str
,
sizeof
(
type_str
));
if
(
EVEN
(
sts
))
{
graph
->
message
(
'E'
,
"Syntax error"
);
return
GE__SYNTAX
;
}
if
(
cdh_NoCaseStrcmp
(
type_str
,
"name"
)
==
0
)
type
=
1
;
else
if
(
cdh_NoCaseStrcmp
(
type_str
,
"class"
)
==
0
)
type
=
2
;
else
{
graph
->
message
(
'E'
,
"Syntax error in filter type"
);
return
GE__SYNTAX
;
}
sts
=
dcli_get_qualifier
(
"/PATTERN"
,
pattern_str
,
sizeof
(
pattern_str
));
if
(
EVEN
(
sts
))
{
graph
->
message
(
'E'
,
"Syntax error"
);
return
GE__SYNTAX
;
}
((
Ge
*
)
graph
->
parent_ctx
)
->
objectnav
->
filter
(
type
,
pattern_str
);;
}
else
{
graph
->
message
(
'E'
,
"Syntax error"
);
return
GE__SYNTAX
;
}
return
GE__SUCCESS
;
}
static
int
graph_exit_func
(
void
*
client_data
,
static
int
graph_exit_func
(
void
*
client_data
,
void
*
client_flag
)
void
*
client_flag
)
{
{
...
...
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