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
6197f6b6
Commit
6197f6b6
authored
Sep 04, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixposition added to GrowRect and GrowPolyLine
parent
dd46515c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
55 deletions
+86
-55
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+3
-1
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+11
-1
xtt/lib/glow/src/glow_growpolyline.cpp
xtt/lib/glow/src/glow_growpolyline.cpp
+57
-49
xtt/lib/glow/src/glow_growpolyline.h
xtt/lib/glow/src/glow_growpolyline.h
+2
-1
xtt/lib/glow/src/glow_growrect.cpp
xtt/lib/glow/src/glow_growrect.cpp
+11
-2
xtt/lib/glow/src/glow_growrect.h
xtt/lib/glow/src/glow_growrect.h
+2
-1
No files found.
xtt/lib/glow/src/glow.h
View file @
6197f6b6
/*
* Proview $Id: glow.h,v 1.2
2 2007-07-18 09:26:43
claes Exp $
* Proview $Id: glow.h,v 1.2
3 2007-09-04 07:23:06
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1206,6 +1206,7 @@ typedef enum {
glow_eSave_GrowRect_disable_shadow
=
1917
,
glow_eSave_GrowRect_invisible
=
1918
,
glow_eSave_GrowRect_fixcolor
=
1919
,
glow_eSave_GrowRect_fixposition
=
1920
,
glow_eSave_GrowLine_x_right
=
2000
,
glow_eSave_GrowLine_x_left
=
2001
,
glow_eSave_GrowLine_y_high
=
2002
,
...
...
@@ -1324,6 +1325,7 @@ typedef enum {
glow_eSave_GrowPolyLine_fill_eq_light
=
2619
,
glow_eSave_GrowPolyLine_fill_eq_shadow
=
2620
,
glow_eSave_GrowPolyLine_fixcolor
=
2621
,
glow_eSave_GrowPolyLine_fixposition
=
2622
,
glow_eSave_GrowNode_node_part
=
2700
,
glow_eSave_GrowNode_dynamic
=
2701
,
glow_eSave_GrowNode_dynamicsize
=
2702
,
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
6197f6b6
/*
* Proview $Id: glow_growapi.cpp,v 1.3
2 2007-07-18 09:26:43
claes Exp $
* Proview $Id: glow_growapi.cpp,v 1.3
3 2007-09-04 07:23:06
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1178,6 +1178,11 @@ int grow_GetObjectAttrInfo( grow_tObject object, char *transtab,
attrinfo
[
i
].
type
=
glow_eType_Boolean
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
disable_shadow
);
strcpy
(
attrinfo
[
i
].
name
,
"fixposition"
);
attrinfo
[
i
].
value_p
=
&
op
->
fixposition
;
attrinfo
[
i
].
type
=
glow_eType_Boolean
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
fixposition
);
strcpy
(
attrinfo
[
i
].
name
,
"Dynamic"
);
op
->
get_dynamic
(
&
dynamic
,
&
dynsize
);
attrinfo
[
i
].
value_p
=
malloc
(
1024
);
...
...
@@ -1289,6 +1294,11 @@ int grow_GetObjectAttrInfo( grow_tObject object, char *transtab,
attrinfo
[
i
].
type
=
glow_eType_Boolean
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
fixcolor
);
strcpy
(
attrinfo
[
i
].
name
,
"fixposition"
);
attrinfo
[
i
].
value_p
=
&
op
->
fixposition
;
attrinfo
[
i
].
type
=
glow_eType_Boolean
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
fixposition
);
strcpy
(
attrinfo
[
i
].
name
,
"Dynamic"
);
op
->
get_dynamic
(
&
dynamic
,
&
dynsize
);
attrinfo
[
i
].
value_p
=
malloc
(
1024
);
...
...
xtt/lib/glow/src/glow_growpolyline.cpp
View file @
6197f6b6
/*
* Proview $Id: glow_growpolyline.cpp,v 1.
6 2007-06-15 11:33:55
claes Exp $
* Proview $Id: glow_growpolyline.cpp,v 1.
7 2007-09-04 07:23:06
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -43,7 +43,8 @@ GrowPolyLine::GrowPolyLine( GrowCtx *glow_ctx, char *name,
original_fill_drawtype
(
fill_d_type
),
fill_drawtype
(
fill_d_type
),
border
(
display_border
),
fill_eq_border
(
0
),
current_point
(
0
),
shadow
(
display_shadow
),
shadow_width
(
5
),
relief
(
glow_eRelief_Up
),
shadow_contrast
(
2
),
disable_shadow
(
0
),
fill_eq_light
(
0
),
fill_eq_shadow
(
0
),
fixcolor
(
0
)
shadow_contrast
(
2
),
disable_shadow
(
0
),
fill_eq_light
(
0
),
fill_eq_shadow
(
0
),
fixcolor
(
0
),
fixposition
(
0
)
{
strcpy
(
n_name
,
name
);
pzero
.
nav_zoom
();
...
...
@@ -463,6 +464,8 @@ void GrowPolyLine::erase( GlowWind *w, GlowTransform *t, int hot, void *node)
void
GrowPolyLine
::
move
(
double
delta_x
,
double
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
ctx
->
set_defered_redraw
();
ctx
->
draw
(
&
ctx
->
mw
,
x_left
*
ctx
->
mw
.
zoom_factor_x
-
ctx
->
mw
.
offset_x
-
2
*
DRAW_MP
,
y_low
*
ctx
->
mw
.
zoom_factor_y
-
ctx
->
mw
.
offset_y
-
2
*
DRAW_MP
,
...
...
@@ -585,8 +588,10 @@ GrowPolyLine::~GrowPolyLine()
void
GrowPolyLine
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
...
...
@@ -595,8 +600,7 @@ void GrowPolyLine::move_noerase( int delta_x, int delta_y, int grid)
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
else
{
double
dx
,
dy
;
dx
=
double
(
delta_x
)
/
ctx
->
mw
.
zoom_factor_x
;
...
...
@@ -811,6 +815,7 @@ void GrowPolyLine::save( ofstream& fp, glow_eSaveMode mode)
fp
<<
int
(
glow_eSave_GrowPolyLine_fill_eq_light
)
<<
FSPACE
<<
fill_eq_light
<<
endl
;
fp
<<
int
(
glow_eSave_GrowPolyLine_fill_eq_shadow
)
<<
FSPACE
<<
fill_eq_shadow
<<
endl
;
fp
<<
int
(
glow_eSave_GrowPolyLine_fixcolor
)
<<
FSPACE
<<
fixcolor
<<
endl
;
fp
<<
int
(
glow_eSave_GrowPolyLine_fixposition
)
<<
FSPACE
<<
fixposition
<<
endl
;
fp
<<
int
(
glow_eSave_End
)
<<
endl
;
}
...
...
@@ -881,6 +886,7 @@ void GrowPolyLine::open( ifstream& fp)
case
glow_eSave_GrowPolyLine_fill_eq_light
:
fp
>>
fill_eq_light
;
break
;
case
glow_eSave_GrowPolyLine_fill_eq_shadow
:
fp
>>
fill_eq_shadow
;
break
;
case
glow_eSave_GrowPolyLine_fixcolor
:
fp
>>
fixcolor
;
break
;
case
glow_eSave_GrowPolyLine_fixposition
:
fp
>>
fixposition
;
break
;
case
glow_eSave_End
:
end_found
=
1
;
break
;
default:
cout
<<
"GrowPolyLine:open syntax error"
<<
endl
;
...
...
@@ -1329,51 +1335,53 @@ void GrowPolyLine::add_and_shift_y_value_filled( double value)
void
GrowPolyLine
::
align
(
double
x
,
double
y
,
glow_eAlignDirection
direction
)
{
double
dx
,
dy
;
double
dx
,
dy
;
erase
(
&
ctx
->
mw
);
erase
(
&
ctx
->
navw
);
ctx
->
set_defered_redraw
();
draw
();
switch
(
direction
)
{
case
glow_eAlignDirection_CenterVert
:
dx
=
x
-
(
x_right
+
x_left
)
/
2
;
dy
=
0
;
break
;
case
glow_eAlignDirection_CenterHoriz
:
dx
=
0
;
dy
=
y
-
(
y_high
+
y_low
)
/
2
;
break
;
case
glow_eAlignDirection_CenterCenter
:
dx
=
x
-
(
x_right
+
x_left
)
/
2
;
dy
=
y
-
(
y_high
+
y_low
)
/
2
;
break
;
case
glow_eAlignDirection_Right
:
dx
=
x
-
x_right
;
dy
=
0
;
break
;
case
glow_eAlignDirection_Left
:
dx
=
x
-
x_left
;
dy
=
0
;
break
;
case
glow_eAlignDirection_Up
:
dx
=
0
;
dy
=
y
-
y_high
;
break
;
case
glow_eAlignDirection_Down
:
dx
=
0
;
dy
=
y
-
y_low
;
break
;
}
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
if
(
fixposition
)
return
;
draw
();
ctx
->
redraw_defered
();
erase
(
&
ctx
->
mw
);
erase
(
&
ctx
->
navw
);
ctx
->
set_defered_redraw
();
draw
();
switch
(
direction
)
{
case
glow_eAlignDirection_CenterVert
:
dx
=
x
-
(
x_right
+
x_left
)
/
2
;
dy
=
0
;
break
;
case
glow_eAlignDirection_CenterHoriz
:
dx
=
0
;
dy
=
y
-
(
y_high
+
y_low
)
/
2
;
break
;
case
glow_eAlignDirection_CenterCenter
:
dx
=
x
-
(
x_right
+
x_left
)
/
2
;
dy
=
y
-
(
y_high
+
y_low
)
/
2
;
break
;
case
glow_eAlignDirection_Right
:
dx
=
x
-
x_right
;
dy
=
0
;
break
;
case
glow_eAlignDirection_Left
:
dx
=
x
-
x_left
;
dy
=
0
;
break
;
case
glow_eAlignDirection_Up
:
dx
=
0
;
dy
=
y
-
y_high
;
break
;
case
glow_eAlignDirection_Down
:
dx
=
0
;
dy
=
y
-
y_low
;
break
;
}
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
draw
();
ctx
->
redraw_defered
();
}
...
...
xtt/lib/glow/src/glow_growpolyline.h
View file @
6197f6b6
/*
* Proview $Id: glow_growpolyline.h,v 1.
6 2007-06-15 11:33:55
claes Exp $
* Proview $Id: glow_growpolyline.h,v 1.
7 2007-09-04 07:23:06
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -357,6 +357,7 @@ class GrowPolyLine : public GlowPolyLine {
int
fill_eq_light
;
//!< Fill is drawn with light shadow color.
int
fill_eq_shadow
;
//!< Fill is drawn with dark shadow color.
int
fixcolor
;
//!< Color independent of node color.
int
fixposition
;
//!< Can't be moved.
//! Set user data.
/*!
...
...
xtt/lib/glow/src/glow_growrect.cpp
View file @
6197f6b6
/*
* Proview $Id: glow_growrect.cpp,v 1.
9 2007-07-04 13:29:54
claes Exp $
* Proview $Id: glow_growrect.cpp,v 1.
10 2007-09-04 07:23:06
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -40,7 +40,7 @@ GrowRect::GrowRect( GrowCtx *glow_ctx, char *name, double x, double y,
original_fill_drawtype
(
fill_d_type
),
fill_drawtype
(
fill_d_type
),
border
(
display_border
),
dynamic
(
0
),
dynamicsize
(
0
),
shadow
(
display_shadow
),
shadow_width
(
5
),
relief
(
glow_eRelief_Up
),
shadow_contrast
(
2
),
disable_shadow
(
0
),
invisible
(
0
),
fixcolor
(
0
)
shadow_contrast
(
2
),
disable_shadow
(
0
),
invisible
(
0
),
fixcolor
(
0
)
,
fixposition
(
0
)
{
strcpy
(
n_name
,
name
);
pzero
.
nav_zoom
();
...
...
@@ -82,6 +82,8 @@ GrowRect::~GrowRect()
void
GrowRect
::
move
(
double
delta_x
,
double
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
ctx
->
set_defered_redraw
();
ctx
->
draw
(
&
ctx
->
mw
,
x_left
*
ctx
->
mw
.
zoom_factor_x
-
ctx
->
mw
.
offset_x
-
DRAW_MP
,
y_low
*
ctx
->
mw
.
zoom_factor_y
-
ctx
->
mw
.
offset_y
-
DRAW_MP
,
...
...
@@ -127,6 +129,8 @@ void GrowRect::move( double delta_x, double delta_y, int grid)
void
GrowRect
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
...
...
@@ -278,6 +282,7 @@ void GrowRect::save( ofstream& fp, glow_eSaveMode mode)
fp
<<
int
(
glow_eSave_GrowRect_relief
)
<<
FSPACE
<<
int
(
relief
)
<<
endl
;
fp
<<
int
(
glow_eSave_GrowRect_invisible
)
<<
FSPACE
<<
invisible
<<
endl
;
fp
<<
int
(
glow_eSave_GrowRect_fixcolor
)
<<
FSPACE
<<
fixcolor
<<
endl
;
fp
<<
int
(
glow_eSave_GrowRect_fixposition
)
<<
FSPACE
<<
fixposition
<<
endl
;
fp
<<
int
(
glow_eSave_GrowRect_disable_shadow
)
<<
FSPACE
<<
disable_shadow
<<
endl
;
fp
<<
int
(
glow_eSave_GrowRect_dynamicsize
)
<<
FSPACE
<<
dynamicsize
<<
endl
;
fp
<<
int
(
glow_eSave_GrowRect_dynamic
)
<<
endl
;
...
...
@@ -335,6 +340,7 @@ void GrowRect::open( ifstream& fp)
case
glow_eSave_GrowRect_disable_shadow
:
fp
>>
disable_shadow
;
break
;
case
glow_eSave_GrowRect_invisible
:
fp
>>
invisible
;
break
;
case
glow_eSave_GrowRect_fixcolor
:
fp
>>
fixcolor
;
break
;
case
glow_eSave_GrowRect_fixposition
:
fp
>>
fixposition
;
break
;
case
glow_eSave_GrowRect_dynamicsize
:
fp
>>
dynamicsize
;
break
;
case
glow_eSave_GrowRect_dynamic
:
fp
.
getline
(
dummy
,
sizeof
(
dummy
));
...
...
@@ -938,6 +944,9 @@ void GrowRect::align( double x, double y, glow_eAlignDirection direction)
{
double
dx
,
dy
;
if
(
fixposition
)
return
;
erase
(
&
ctx
->
mw
);
erase
(
&
ctx
->
navw
);
ctx
->
set_defered_redraw
();
...
...
xtt/lib/glow/src/glow_growrect.h
View file @
6197f6b6
/*
* Proview $Id: glow_growrect.h,v 1.
7 2007-01-04 07:57:39
claes Exp $
* Proview $Id: glow_growrect.h,v 1.
8 2007-09-04 07:23:06
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -285,6 +285,7 @@ class GrowRect : public GlowRect {
int
disable_shadow
;
//!< Disable shadow, even if parent node has shadow.
int
invisible
;
//!< Invisible if not highlighted.
int
fixcolor
;
//!< Color independent of node color.
int
fixposition
;
//!< Can't be moved.
//! Set user 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