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
69ef52fc
Commit
69ef52fc
authored
May 24, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GrowTable select color changeable
parent
4ba58a5e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
11 deletions
+30
-11
xtt/changelog.txt
xtt/changelog.txt
+2
-1
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+3
-2
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+3
-2
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+7
-1
xtt/lib/glow/src/glow_growtable.cpp
xtt/lib/glow/src/glow_growtable.cpp
+13
-4
xtt/lib/glow/src/glow_growtable.h
xtt/lib/glow/src/glow_growtable.h
+2
-1
No files found.
xtt/changelog.txt
View file @
69ef52fc
...
...
@@ -12,4 +12,5 @@
060516 cs ge Possibility to use local database in DigLowColor, ToggleDig, Slider
insensitiv, and Invisible.
060516 cs ge Bit type added in Invisible to check visibility on bits in a bitmap.
060522 cs ge Bugfix for $user attributes. Scan function for dynamics wasn't called.
\ No newline at end of file
060522 cs ge Bugfix for $user attributes. Scan function for dynamics wasn't called.
060524 cs ge Property for selected cell color in GrowTable.
\ No newline at end of file
xtt/lib/ge/src/ge_graph.cpp
View file @
69ef52fc
/*
* Proview $Id: ge_graph.cpp,v 1.3
1 2006-05-16 11:51:0
1 claes Exp $
* Proview $Id: ge_graph.cpp,v 1.3
2 2006-05-24 08:01:5
1 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1259,7 +1259,8 @@ int Graph::get_attr_items( grow_tObject object, attr_sItem **itemlist,
"HeaderRowHeight"
,
"Table.HeaderRowHeight"
,
"HeaderTextSize"
,
"Table.HeaderTextSize"
,
"HeaderTextBold"
,
"Table.HeaderTextBold"
,
"HeaderTextColor"
,
"Table.HeaderTextColor"
,
"HeaderTextBold"
,
"Table.HeaderTextBold"
,
"SelectColor"
,
"Table.SelectColor"
,
"Options"
,
"Table.Options"
,
"VerticalScrollbar"
,
"Table.VerticalScrollbar"
,
"HorizontalScrollbar"
,
"Table.HorizontalScrollbar"
,
...
...
xtt/lib/glow/src/glow.h
View file @
69ef52fc
/*
* Proview $Id: glow.h,v 1.1
3 2006-05-16 11:50:27
claes Exp $
* Proview $Id: glow.h,v 1.1
4 2006-05-24 08:01:51
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1580,7 +1580,8 @@ typedef enum {
glow_eSave_GrowTable_column_width11
=
4260
,
glow_eSave_GrowTable_header_text11
=
4261
,
glow_eSave_GrowTable_column_width12
=
4262
,
glow_eSave_GrowTable_header_text12
=
4263
glow_eSave_GrowTable_header_text12
=
4263
,
glow_eSave_GrowTable_select_drawtype
=
4264
}
glow_eSave
;
//! Relative or absolute position for an annotation
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
69ef52fc
/*
* Proview $Id: glow_growapi.cpp,v 1.2
1 2006-05-16 11:50:27
claes Exp $
* Proview $Id: glow_growapi.cpp,v 1.2
2 2006-05-24 08:01:51
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1890,6 +1890,12 @@ int grow_GetObjectAttrInfo( grow_tObject object, char *transtab,
attrinfo
[
i
].
type
=
glow_eType_Color
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
header_text_color
);
}
if
(
(
name
=
growapi_translate
(
transtab
,
"SelectColor"
)))
{
strcpy
(
attrinfo
[
i
].
name
,
name
);
attrinfo
[
i
].
value_p
=
&
op
->
select_drawtype
;
attrinfo
[
i
].
type
=
glow_eType_Color
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
select_drawtype
);
}
if
(
(
name
=
growapi_translate
(
transtab
,
"Options"
)))
{
strcpy
(
attrinfo
[
i
].
name
,
name
);
attrinfo
[
i
].
value_p
=
&
op
->
options
;
...
...
xtt/lib/glow/src/glow_growtable.cpp
View file @
69ef52fc
/*
* Proview $Id: glow_growtable.cpp,v 1.
9 2005-12-06 09:13:08
claes Exp $
* Proview $Id: glow_growtable.cpp,v 1.
10 2006-05-24 08:01:51
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -47,7 +47,8 @@ GrowTable::GrowTable( GlowCtx *glow_ctx, char *name, double x, double y,
header_text_size
(
1
),
header_text_drawtype
(
glow_eDrawType_TextHelvetica
),
header_text_color
(
glow_eDrawType_Line
),
header_row_height
(
0.8
),
row_height
(
0.6
),
value_size
(
0
),
cell_value
(
0
),
selected_cell_row
(
-
1
),
selected_cell_column
(
-
1
),
input_focus
(
0
),
options
(
glow_mTableOptions_No
)
selected_cell_column
(
-
1
),
select_drawtype
(
glow_eDrawType_Inherit
),
input_focus
(
0
),
options
(
glow_mTableOptions_No
)
{
for
(
int
i
=
0
;
i
<
TABLE_MAX_COL
;
i
++
)
{
strcpy
(
header_text
[
i
],
""
);
...
...
@@ -100,6 +101,7 @@ void GrowTable::save( ofstream& fp, glow_eSaveMode mode)
fp
<<
int
(
glow_eSave_GrowTable_header_row_height
)
<<
FSPACE
<<
header_row_height
<<
endl
;
fp
<<
int
(
glow_eSave_GrowTable_row_height
)
<<
FSPACE
<<
row_height
<<
endl
;
fp
<<
int
(
glow_eSave_GrowTable_options
)
<<
FSPACE
<<
options
<<
endl
;
fp
<<
int
(
glow_eSave_GrowTable_select_drawtype
)
<<
FSPACE
<<
select_drawtype
<<
endl
;
for
(
int
i
=
0
;
i
<
TABLE_MAX_COL
;
i
++
)
{
fp
<<
int
(
glow_eSave_GrowTable_column_width1
)
+
2
*
i
<<
FSPACE
<<
column_width
[
i
]
<<
endl
;
fp
<<
int
(
glow_eSave_GrowTable_header_text1
)
+
2
*
i
<<
FSPACE
<<
header_text
[
i
]
<<
endl
;
...
...
@@ -146,6 +148,7 @@ void GrowTable::open( ifstream& fp)
case
glow_eSave_GrowTable_header_row_height
:
fp
>>
header_row_height
;
break
;
case
glow_eSave_GrowTable_row_height
:
fp
>>
row_height
;
break
;
case
glow_eSave_GrowTable_options
:
fp
>>
tmp
;
options
=
(
glow_mTableOptions
)
tmp
;
break
;
case
glow_eSave_GrowTable_select_drawtype
:
fp
>>
tmp
;
select_drawtype
=
(
glow_eDrawType
)
tmp
;
break
;
case
glow_eSave_GrowTable_column_width1
:
fp
>>
column_width
[
0
];
break
;
case
glow_eSave_GrowTable_header_text1
:
fp
.
get
();
fp
.
getline
(
header_text
[
0
],
sizeof
(
header_text
[
0
]));
break
;
case
glow_eSave_GrowTable_column_width2
:
fp
>>
column_width
[
1
];
break
;
...
...
@@ -342,8 +345,14 @@ void GrowTable::draw( GlowTransform *t, int highlight, int hot, void *node, void
glow_eDrawType
light_drawtype
;
glow_eDrawType
dark_drawtype
;
glow_eDrawType
sel_drawtype
;
dark_drawtype
=
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
fill_drawtype
,
2
,
0
);
light_drawtype
=
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
fill_drawtype
,
-
2
,
0
);
if
(
select_drawtype
==
glow_eDrawType_Inherit
)
sel_drawtype
=
dark_drawtype
;
else
sel_drawtype
=
select_drawtype
;
ll_x
=
int
(
dx1
*
ctx
->
zoom_factor_x
)
-
ctx
->
offset_x
;
ll_y
=
int
(
dy1
*
ctx
->
zoom_factor_y
)
-
ctx
->
offset_y
;
...
...
@@ -451,7 +460,7 @@ void GrowTable::draw( GlowTransform *t, int highlight, int hot, void *node, void
if
(
selected_cell_row
>=
0
&&
selected_cell_column
==
0
)
{
x
=
ll_x
;
y
=
t_ll_y
+
row_height
*
ctx
->
zoom_factor_y
*
selected_cell_row
;
glow_draw_fill_rect
(
ctx
,
int
(
x
),
int
(
y
),
header_w
,
int
(
row_height
*
ctx
->
zoom_factor_y
),
dark
_drawtype
);
glow_draw_fill_rect
(
ctx
,
int
(
x
),
int
(
y
),
header_w
,
int
(
row_height
*
ctx
->
zoom_factor_y
),
sel
_drawtype
);
}
if
(
shadow
)
{
...
...
@@ -505,7 +514,7 @@ void GrowTable::draw( GlowTransform *t, int highlight, int hot, void *node, void
x
+=
column_width
[
i
]
*
ctx
->
zoom_factor_x
;
y
=
t_ll_y
+
row_height
*
ctx
->
zoom_factor_y
*
selected_cell_row
;
glow_draw_fill_rect
(
ctx
,
int
(
x
),
int
(
y
),
int
(
column_width
[
selected_cell_column
]
*
ctx
->
zoom_factor_x
),
int
(
row_height
*
ctx
->
zoom_factor_y
),
dark
_drawtype
);
int
(
row_height
*
ctx
->
zoom_factor_y
),
sel
_drawtype
);
}
if
(
shadow
)
{
...
...
xtt/lib/glow/src/glow_growtable.h
View file @
69ef52fc
/*
* Proview $Id: glow_growtable.h,v 1.
5 2005-09-01 14:57:54
claes Exp $
* Proview $Id: glow_growtable.h,v 1.
6 2006-05-24 08:01:51
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -169,6 +169,7 @@ class GrowTable : public GrowRect {
char
*
cell_value
;
//!< Contains the cell values.
int
selected_cell_row
;
//!< Row of the currently selected cell. -1 of no row is selected.
int
selected_cell_column
;
//!< Column of the currently selected cell. -1 of no row is selected.
glow_eDrawType
select_drawtype
;
//!< Drawtype for selected cell.
int
input_focus
;
//!< This object has input focus.
int
header_text_bold
;
//!< Header text is bold.
glow_mTableOptions
options
;
//!< Options bitmask.
...
...
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