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
a3601a33
Commit
a3601a33
authored
Sep 28, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge, scalable toolbar, and invisible dynamic added to axis
parent
fb48718c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
3 deletions
+59
-3
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+5
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+1
-0
xtt/lib/glow/src/glow_growaxis.cpp
xtt/lib/glow/src/glow_growaxis.cpp
+29
-0
xtt/lib/glow/src/glow_growaxis.h
xtt/lib/glow/src/glow_growaxis.h
+3
-0
xtt/lib/glow/src/glow_growtoolbar.cpp
xtt/lib/glow/src/glow_growtoolbar.cpp
+17
-0
xtt/lib/glow/src/glow_growtoolbar.h
xtt/lib/glow/src/glow_growtoolbar.h
+1
-0
xtt/lib/xtt/src/xtt_ge.cpp
xtt/lib/xtt/src/xtt_ge.cpp
+3
-3
No files found.
xtt/lib/glow/src/glow_growapi.cpp
View file @
a3601a33
...
@@ -5310,6 +5310,11 @@ void grow_ToolbarConfigure( grow_tObject object, char *tools1, char *tools2, int
...
@@ -5310,6 +5310,11 @@ void grow_ToolbarConfigure( grow_tObject object, char *tools1, char *tools2, int
show_mask1
,
show_mask2
,
insensitive_mask1
,
insensitive_mask2
);
show_mask1
,
show_mask2
,
insensitive_mask1
,
insensitive_mask2
);
}
}
void
grow_ToolbarScale
(
grow_tObject
object
)
{
((
GrowToolbar
*
)
object
)
->
scale
();
}
void
grow_SetEditSetMode
(
grow_tCtx
ctx
,
glow_eEditSetMode
mode
)
void
grow_SetEditSetMode
(
grow_tCtx
ctx
,
glow_eEditSetMode
mode
)
{
{
ctx
->
set_edit_set_mode
(
mode
);
ctx
->
set_edit_set_mode
(
mode
);
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
a3601a33
...
@@ -3077,6 +3077,7 @@ void grow_GetObjectClassDynType( grow_tObject object, int *dyn_type1, int *dyn_t
...
@@ -3077,6 +3077,7 @@ void grow_GetObjectClassDynType( grow_tObject object, int *dyn_type1, int *dyn_t
void
grow_ToolbarConfigure
(
grow_tObject
object
,
char
*
tools1
,
char
*
tools2
,
int
tools1_cnt
,
int
tools2_cnt
,
void
grow_ToolbarConfigure
(
grow_tObject
object
,
char
*
tools1
,
char
*
tools2
,
int
tools1_cnt
,
int
tools2_cnt
,
unsigned
int
show_mask1
,
unsigned
int
show_mask2
,
unsigned
int
show_mask1
,
unsigned
int
show_mask2
,
unsigned
int
insensitive_mask1
,
unsigned
int
insensitive_mask2
);
unsigned
int
insensitive_mask1
,
unsigned
int
insensitive_mask2
);
void
grow_ToolbarScale
(
grow_tObject
object
);
void
grow_SetEditSetMode
(
grow_tCtx
ctx
,
glow_eEditSetMode
mode
);
void
grow_SetEditSetMode
(
grow_tCtx
ctx
,
glow_eEditSetMode
mode
);
/*@}*/
/*@}*/
...
...
xtt/lib/glow/src/glow_growaxis.cpp
View file @
a3601a33
...
@@ -280,6 +280,9 @@ void GrowAxis::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, void
...
@@ -280,6 +280,9 @@ void GrowAxis::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, void
idx
=
int
(
w
->
zoom_factor_y
/
w
->
base_zoom_factor
*
line_width
-
1
);
idx
=
int
(
w
->
zoom_factor_y
/
w
->
base_zoom_factor
*
line_width
-
1
);
idx
+=
hot
;
idx
+=
hot
;
}
}
if
(
(
node
&&
((
GrowNode
*
)
node
)
->
invisible
)
||
invisible
)
return
;
idx
=
max
(
0
,
idx
);
idx
=
max
(
0
,
idx
);
idx
=
min
(
idx
,
DRAW_TYPE_SIZE
-
1
);
idx
=
min
(
idx
,
DRAW_TYPE_SIZE
-
1
);
int
x1
,
y1
,
x2
,
y2
,
ll_x
,
ll_y
,
ur_x
,
ur_y
;
int
x1
,
y1
,
x2
,
y2
,
ll_x
,
ll_y
,
ur_x
,
ur_y
;
...
@@ -1017,6 +1020,32 @@ void GrowAxis::convert( glow_eConvert version)
...
@@ -1017,6 +1020,32 @@ void GrowAxis::convert( glow_eConvert version)
}
}
}
}
glow_eVis
GrowAxis
::
get_visibility
()
{
if
(
invisible
)
return
glow_eVis_Invisible
;
return
glow_eVis_Visible
;
}
void
GrowAxis
::
set_visibility
(
glow_eVis
visibility
)
{
switch
(
visibility
)
{
case
glow_eVis_Visible
:
if
(
invisible
==
0
)
return
;
invisible
=
0
;
break
;
case
glow_eVis_Invisible
:
if
(
invisible
)
return
;
invisible
=
1
;
erase
(
&
ctx
->
mw
);
break
;
case
glow_eVis_Dimmed
:
break
;
}
draw
();
}
...
...
xtt/lib/glow/src/glow_growaxis.h
View file @
a3601a33
...
@@ -260,6 +260,9 @@ class GrowAxis : public GrowRect {
...
@@ -260,6 +260,9 @@ class GrowAxis : public GrowRect {
\param value Value to format.
\param value Value to format.
*/
*/
void
format_text
(
char
*
text
,
char
*
fmt
,
double
value
);
void
format_text
(
char
*
text
,
char
*
fmt
,
double
value
);
glow_eVis
get_visibility
();
void
set_visibility
(
glow_eVis
visibility
);
};
};
...
...
xtt/lib/glow/src/glow_growtoolbar.cpp
View file @
a3601a33
...
@@ -524,6 +524,7 @@ void GrowToolbar::configure( char *tools1, char *tools2, int tools1_cnt, int too
...
@@ -524,6 +524,7 @@ void GrowToolbar::configure( char *tools1, char *tools2, int tools1_cnt, int too
}
}
get_node_borders
();
get_node_borders
();
scale
();
// Move the nc to after the methodbuttons nodeclasses, or they will be deleted in the wrong order
// Move the nc to after the methodbuttons nodeclasses, or they will be deleted in the wrong order
// when when deleted
// when when deleted
...
@@ -553,3 +554,19 @@ int GrowToolbar::get_mask_index( int idx, int *category, int *mask_idx)
...
@@ -553,3 +554,19 @@ int GrowToolbar::get_mask_index( int idx, int *category, int *mask_idx)
}
}
return
0
;
return
0
;
}
}
void
GrowToolbar
::
scale
()
{
double
scale
;
if
(
ctx
->
mw
.
window_width
==
0
)
return
;
if
(
x_right
*
ctx
->
mw
.
zoom_factor_x
-
ctx
->
mw
.
offset_x
>
ctx
->
mw
.
window_width
)
{
scale
=
(
ctx
->
mw
.
window_width
-
(
x_left
*
ctx
->
mw
.
zoom_factor_x
-
ctx
->
mw
.
offset_x
)
-
10
)
/
((
x_right
-
x_left
)
*
ctx
->
mw
.
zoom_factor_x
);
trf
.
scale
(
scale
,
1
,
x_left
,
y_low
);
get_node_borders
();
}
}
xtt/lib/glow/src/glow_growtoolbar.h
View file @
a3601a33
...
@@ -156,6 +156,7 @@ class GrowToolbar : public GrowNode {
...
@@ -156,6 +156,7 @@ class GrowToolbar : public GrowNode {
unsigned
int
show_mask1
,
unsigned
int
show_mask2
,
unsigned
int
show_mask1
,
unsigned
int
show_mask2
,
unsigned
int
insensitive_mask1
,
unsigned
int
insensitive_mask2
);
unsigned
int
insensitive_mask1
,
unsigned
int
insensitive_mask2
);
int
get_mask_index
(
int
idx
,
int
*
category
,
int
*
mask_idx
);
int
get_mask_index
(
int
idx
,
int
*
category
,
int
*
mask_idx
);
void
scale
();
};
};
/*@}*/
/*@}*/
...
...
xtt/lib/xtt/src/xtt_ge.cpp
View file @
a3601a33
...
@@ -71,17 +71,17 @@ void XttGe::graph_init_cb( void *client_data)
...
@@ -71,17 +71,17 @@ void XttGe::graph_init_cb( void *client_data)
strcat
(
fname
,
".pwg"
);
strcat
(
fname
,
".pwg"
);
ge
->
graph
->
open
(
fname
);
ge
->
graph
->
open
(
fname
);
ge
->
graph
->
init_trace
();
if
(
ge
->
width
==
0
||
ge
->
height
==
0
)
{
if
(
ge
->
width
==
0
||
ge
->
height
==
0
)
{
sts
=
ge
->
graph
->
get_default_size
(
&
default_width
,
&
default_height
);
sts
=
ge
->
graph
->
get_default_size
(
&
default_width
,
&
default_height
);
if
(
ODD
(
sts
))
{
if
(
ODD
(
sts
))
{
ge
->
set_size
(
default_width
,
default_height
);
ge
->
set_size
(
default_width
,
default_height
);
}
}
}
}
ge
->
graph
->
set_default_layout
();
ge
->
graph
->
set_default_layout
();
ge
->
graph
->
init_trace
();
}
}
int
XttGe
::
graph_close_cb
(
void
*
client_data
)
int
XttGe
::
graph_close_cb
(
void
*
client_data
)
...
...
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