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
40516f33
Commit
40516f33
authored
Nov 23, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge text object size changed to dynamic for fix 80 char
parent
0959114d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
15 deletions
+27
-15
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+2
-2
xtt/lib/ge/src/ge_graph_command.cpp
xtt/lib/ge/src/ge_graph_command.cpp
+2
-2
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+2
-2
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+1
-1
xtt/lib/glow/src/glow_growtext.cpp
xtt/lib/glow/src/glow_growtext.cpp
+6
-3
xtt/lib/glow/src/glow_growtext.h
xtt/lib/glow/src/glow_growtext.h
+1
-1
xtt/lib/glow/src/glow_text.cpp
xtt/lib/glow/src/glow_text.cpp
+5
-1
xtt/lib/glow/src/glow_text.h
xtt/lib/glow/src/glow_text.h
+8
-3
No files found.
xtt/lib/ge/src/ge_graph.cpp
View file @
40516f33
...
...
@@ -887,7 +887,7 @@ void Graph::change_select_text()
{
grow_tObject
*
sel_list
;
int
sel_count
;
char
text
[
8
0
];
char
text
[
20
0
];
grow_GetSelectList
(
grow
->
ctx
,
&
sel_list
,
&
sel_count
);
if
(
sel_count
==
1
&&
...
...
@@ -897,7 +897,7 @@ void Graph::change_select_text()
{
journal_store
(
journal_eAction_AntePropertiesSelect
,
0
);
grow_GetObjectText
(
*
sel_list
,
text
);
grow_GetObjectText
(
*
sel_list
,
text
,
sizeof
(
text
)
);
(
change_text_cb
)(
parent_ctx
,
*
sel_list
,
text
);
journal_store
(
journal_eAction_PostPropertiesSelect
,
0
);
...
...
xtt/lib/ge/src/ge_graph_command.cpp
View file @
40516f33
...
...
@@ -4098,7 +4098,7 @@ static int graph_getobjecttext_func(
Graph
*
graph
;
int
type
;
grow_tObject
o
;
char
text
[
8
0
];
char
text
[
20
0
];
if
(
arg_count
!=
1
)
return
CCM__ARGMISM
;
...
...
@@ -4111,7 +4111,7 @@ static int graph_getobjecttext_func(
type
=
grow_GetObjectType
(
o
);
if
(
type
==
glow_eObjectType_GrowText
)
{
grow_GetObjectText
(
o
,
text
);
grow_GetObjectText
(
o
,
text
,
sizeof
(
text
)
);
strncpy
(
return_string
,
text
,
sizeof
(
text
));
}
else
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
40516f33
...
...
@@ -4728,9 +4728,9 @@ void grow_SetObjectText( grow_tObject object, char *text)
((
GrowText
*
)
object
)
->
set_text
(
text
);
}
void
grow_GetObjectText
(
grow_tObject
object
,
char
*
text
)
void
grow_GetObjectText
(
grow_tObject
object
,
char
*
text
,
int
size
)
{
((
GrowText
*
)
object
)
->
get_text
(
text
);
((
GrowText
*
)
object
)
->
get_text
(
text
,
size
);
}
void
grow_SetSelectTextSize
(
grow_tCtx
ctx
,
int
size
)
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
40516f33
...
...
@@ -2104,7 +2104,7 @@ extern "C" {
\param object A GrowText object.
\param text Text.
*/
void
grow_GetObjectText
(
grow_tObject
object
,
char
*
text
);
void
grow_GetObjectText
(
grow_tObject
object
,
char
*
text
,
int
size
);
//! Set text size on all selected objects.
/*!
...
...
xtt/lib/glow/src/glow_growtext.cpp
View file @
40516f33
...
...
@@ -360,8 +360,9 @@ void GrowText::open( ifstream& fp)
if
(
ctx
->
translate_on
&&
ctx
->
event_callback
[
glow_eEvent_Translate
])
{
if
(
ctx
->
translate_cb
(
this
,
text
,
&
new_text
))
{
strncpy
(
text
,
new_text
,
sizeof
(
text
));
text
[
sizeof
(
text
)
-
1
]
=
0
;
free
(
text
);
text
=
(
char
*
)
malloc
(
strlen
(
new_text
)
+
1
);
strcpy
(
text
,
new_text
);
}
get_node_borders
();
}
...
...
@@ -971,7 +972,9 @@ void GrowText::set_text( char *new_text)
erase
(
&
ctx
->
mw
);
erase
(
&
ctx
->
navw
);
strncpy
(
text
,
new_text
,
sizeof
(
text
)
-
1
);
free
(
text
);
text
=
(
char
*
)
malloc
(
strlen
(
new_text
)
+
1
);
strcpy
(
text
,
new_text
);
get_node_borders
();
// draw();
...
...
xtt/lib/glow/src/glow_growtext.h
View file @
40516f33
...
...
@@ -281,7 +281,7 @@ class GrowText : public GlowText {
/*!
\param str buffer where the text is copied.
*/
void
get_text
(
char
*
str
)
{
strcpy
(
str
,
text
)
;};
void
get_text
(
char
*
str
,
int
size
)
{
strncpy
(
str
,
text
,
size
);
str
[
size
-
1
]
=
0
;};
//! Set text size
/*!
...
...
xtt/lib/glow/src/glow_text.cpp
View file @
40516f33
...
...
@@ -80,6 +80,7 @@ void GlowText::open( ifstream& fp)
int
type
;
int
end_found
=
0
;
char
dummy
[
40
];
char
tmp_text
[
500
];
int
tmp
;
for
(;;)
...
...
@@ -98,7 +99,10 @@ void GlowText::open( ifstream& fp)
case
glow_eSave_Text_color_drawtype
:
fp
>>
tmp
;
color_drawtype
=
(
glow_eDrawType
)
tmp
;
break
;
case
glow_eSave_Text_text
:
fp
.
get
();
fp
.
getline
(
text
,
sizeof
(
text
));
fp
.
getline
(
tmp_text
,
sizeof
(
tmp_text
));
free
(
text
);
text
=
(
char
*
)
malloc
(
strlen
(
tmp_text
)
+
1
);
strcpy
(
text
,
tmp_text
);
break
;
case
glow_eSave_Text_p
:
p
.
open
(
fp
);
break
;
case
glow_eSave_End
:
end_found
=
1
;
break
;
...
...
xtt/lib/glow/src/glow_text.h
View file @
40516f33
...
...
@@ -73,8 +73,13 @@ class GlowText : public GlowArrayElem {
glow_eDrawType
color_d_type
=
glow_eDrawType_Line
,
int
t_size
=
2
,
glow_mDisplayLevel
display_lev
=
glow_mDisplayLevel_1
)
:
ctx
(
glow_ctx
),
p
(
glow_ctx
,
x
,
y
),
draw_type
(
d_type
),
text_size
(
t_size
),
display_level
(
display_lev
),
color_drawtype
(
color_d_type
)
{
strncpy
(
text
,
text1
,
sizeof
(
text
));};
display_level
(
display_lev
),
color_drawtype
(
color_d_type
)
{
text
=
(
char
*
)
malloc
(
strlen
(
text1
)
+
1
);
strcpy
(
text
,
text1
);
}
~
GlowText
()
{
free
(
text
);
}
friend
ostream
&
operator
<<
(
ostream
&
o
,
const
GlowText
t
);
...
...
@@ -184,7 +189,7 @@ class GlowText : public GlowArrayElem {
GrowCtx
*
ctx
;
//!< Glow context.
GlowPoint
p
;
//!< Position point.
char
text
[
80
];
//!< The text.
char
*
text
;
//!< The text.
glow_eDrawType
draw_type
;
//!< Drawtype for the text.
int
text_size
;
//!< Text size.
glow_mDisplayLevel
display_level
;
//!< Display level when the object is visible.
...
...
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