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
bfa60f19
Commit
bfa60f19
authored
Mar 06, 2009
by
Claes pwr46/data0/x4-6-0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge color palette: select of fill, border and textcolor changed
parent
d52f5710
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
278 additions
and
37 deletions
+278
-37
xtt/lib/ge/src/ge.cpp
xtt/lib/ge/src/ge.cpp
+17
-4
xtt/lib/glow/src/glow_colpalapi.cpp
xtt/lib/glow/src/glow_colpalapi.cpp
+5
-0
xtt/lib/glow/src/glow_colpalapi.h
xtt/lib/glow/src/glow_colpalapi.h
+2
-0
xtt/lib/glow/src/glow_colpalctx.cpp
xtt/lib/glow/src/glow_colpalctx.cpp
+225
-26
xtt/lib/glow/src/glow_colpalctx.h
xtt/lib/glow/src/glow_colpalctx.h
+23
-4
xtt/lib/xtt/src/xtt_c_object.cpp
xtt/lib/xtt/src/xtt_c_object.cpp
+6
-3
No files found.
xtt/lib/ge/src/ge.cpp
View file @
bfa60f19
...
...
@@ -1817,16 +1817,29 @@ void Ge::activate_confirm_cancel()
int
Ge
::
colorpalette_cb
(
GlowCtx
*
ctx
,
glow_tEvent
event
)
{
Ge
*
gectx
;
colpal_eActive
active
;
colpal_GetCtxUserData
(
(
ColPalCtx
*
)
ctx
,
(
void
**
)
&
gectx
);
switch
(
event
->
event
)
{
case
glow_eEvent_MB1Click
:
if
(
event
->
any
.
type
==
glow_eEventType_ColorTone
)
{
gectx
->
graph
->
set_select_color_tone
(
event
->
colortone
.
tone
);
active
=
colpal_GetActive
(
gectx
->
colorpalette_ctx
);
switch
(
active
)
{
case
colpal_eActive_FillColor
:
if
(
event
->
any
.
type
==
glow_eEventType_ColorTone
)
gectx
->
graph
->
set_select_color_tone
(
event
->
colortone
.
tone
);
else
gectx
->
graph
->
set_select_fill_color
();
break
;
case
colpal_eActive_BorderColor
:
gectx
->
graph
->
set_select_border_color
();
break
;
case
colpal_eActive_TextColor
:
gectx
->
graph
->
set_select_text_color
();
break
;
}
else
gectx
->
graph
->
set_select_fill_color
();
break
;
case
glow_eEvent_MB1ClickShift
:
gectx
->
graph
->
set_select_text_color
();
...
...
xtt/lib/glow/src/glow_colpalapi.cpp
View file @
bfa60f19
...
...
@@ -72,3 +72,8 @@ void colpal_SetCurrentColors( colpal_tCtx ctx, glow_eDrawType fill_color,
ctx
->
current_text
=
text_color
;
}
colpal_eActive
colpal_GetActive
(
colpal_tCtx
ctx
)
{
return
ctx
->
get_active
();
}
xtt/lib/glow/src/glow_colpalapi.h
View file @
bfa60f19
...
...
@@ -98,6 +98,8 @@ typedef ColPalCtx *colpal_tCtx;
void
colpal_SetCurrentColors
(
colpal_tCtx
ctx
,
glow_eDrawType
fill_color
,
glow_eDrawType
border_color
,
glow_eDrawType
text_color
);
colpal_eActive
colpal_GetActive
(
colpal_tCtx
ctx
);
/*@}*/
#if defined __cplusplus
}
...
...
xtt/lib/glow/src/glow_colpalctx.cpp
View file @
bfa60f19
This diff is collapsed.
Click to expand it.
xtt/lib/glow/src/glow_colpalctx.h
View file @
bfa60f19
...
...
@@ -32,6 +32,13 @@
/*! \addtogroup Glow */
/*@{*/
typedef
enum
{
colpal_eActive_FillColor
,
colpal_eActive_BorderColor
,
colpal_eActive_TextColor
}
colpal_eActive
;
//! Context for the color palette.
/*! The color palette consists of 300 colors, where the bordercolor, fillcolor and the textcolor
...
...
@@ -50,10 +57,11 @@ class ColPalCtx : public GrowCtx {
\param zoom_fact Initial zoomfactor.
*/
ColPalCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
)
:
GrowCtx
(
ctx_name
,
zoom_fact
),
columns
(
30
),
current_fill
(
glow_eDrawType_LineGray
),
current_border
(
glow_eDrawType_Line
),
current_text
(
glow_eDrawType_Line
),
entry_width
(
0.3
),
entry_height
(
1
),
display_entry_width
(
3
)
{
ctx_type
=
glow_eCtxType_ColPal
;
grid_on
=
0
;
};
GrowCtx
(
ctx_name
,
zoom_fact
),
columns
(
30
),
current_fill
(
glow_eDrawType_LineGray
),
current_border
(
glow_eDrawType_Line
),
current_text
(
glow_eDrawType_Line
),
entry_width
(
0.3
),
entry_height
(
1
),
display_entry_width
(
3
),
active
(
colpal_eActive_FillColor
)
{
ctx_type
=
glow_eCtxType_ColPal
;
grid_on
=
0
;
};
//! Destructor
~
ColPalCtx
()
{};
...
...
@@ -95,6 +103,10 @@ class ColPalCtx : public GrowCtx {
*/
int
event_handler
(
glow_eEvent
event
,
int
x
,
int
y
,
int
w
,
int
h
);
void
set_active
(
colpal_eActive
a
);
colpal_eActive
get_active
()
{
return
active
;}
void
set_colors
();
int
columns
;
//!< Number of columns in the color palette.
glow_eDrawType
current_fill
;
//!< The currently selected fill color.
glow_eDrawType
current_border
;
//!< The currently selected border color.
...
...
@@ -102,9 +114,16 @@ class ColPalCtx : public GrowCtx {
GlowArrayElem
*
display_fill
;
//!< The rectangle object to display the current fillcolor.
GlowArrayElem
*
display_border
;
//!< The rectangle object to display the current border color.
GlowArrayElem
*
display_text
;
//!< The rectangle object to display the current text color.
GlowArrayElem
*
active_fill
;
//!< The rectangle object to mark fill color active.
GlowArrayElem
*
active_border
;
//!< The rectangle object to mark border color active.
GlowArrayElem
*
active_text
;
//!< The rectangle object to mark text color active.
GlowArrayElem
*
text_fill
;
//!< The fill color text object.
GlowArrayElem
*
text_border
;
//!< The border color text object.
GlowArrayElem
*
text_text
;
//!< The text color text object.
double
entry_width
;
//!< Width of a color palette entry.
double
entry_height
;
//!< Height of a color palette entry.
double
display_entry_width
;
//!< Width of a display entry.
colpal_eActive
active
;
//!< Active colortype (fill, border or text).
};
//! Scroll horizontal.
...
...
xtt/lib/xtt/src/xtt_c_object.cpp
View file @
bfa60f19
...
...
@@ -348,7 +348,7 @@ static pwr_tStatus OpenTrendFilter( xmenu_sMenuCall *ip)
{
int
sts
;
pwr_tObjid
child
;
pwr_tClassId
classid
;
pwr_tClassId
classid
,
cid
;
pwr_sAttrRef
deftrend
;
pwr_tAName
name
;
pwr_sAttrRef
*
objar
;
...
...
@@ -358,10 +358,10 @@ static pwr_tStatus OpenTrendFilter( xmenu_sMenuCall *ip)
else
objar
=
&
ip
->
ItemList
[
ip
->
ChosenItem
].
CurrentObject
;
sts
=
gdh_GetAttrRefTid
(
objar
,
&
c
lass
id
);
sts
=
gdh_GetAttrRefTid
(
objar
,
&
cid
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
c
lassid
==
pwr_cClass_DsTrend
||
class
id
==
pwr_cClass_PlotGroup
)
{
if
(
c
id
==
pwr_cClass_DsTrend
||
c
id
==
pwr_cClass_PlotGroup
)
{
return
XNAV__SUCCESS
;
}
...
...
@@ -381,6 +381,9 @@ static pwr_tStatus OpenTrendFilter( xmenu_sMenuCall *ip)
}
// Check if object has a DsTrend as child
if
(
cid
==
pwr_eClass_PlantHier
)
return
XNAV__INVISIBLE
;
if
(
!
objar
->
Flags
.
b
.
Object
)
return
XNAV__INVISIBLE
;
...
...
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