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
cbe08aa1
Commit
cbe08aa1
authored
Jul 12, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Background color added to palette
parent
677a962d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
14 deletions
+56
-14
xtt/lib/glow/src/glow_colpalctx.cpp
xtt/lib/glow/src/glow_colpalctx.cpp
+56
-14
No files found.
xtt/lib/glow/src/glow_colpalctx.cpp
View file @
cbe08aa1
...
...
@@ -84,7 +84,17 @@ void ColPalCtx::configure()
glow_mDisplayLevel_1
,
1
,
1
,
0
,
glow_eDrawType_Color34
);
insert
(
rect
);
text
=
new
GrowText
(
this
,
name
,
"Reset"
,
x
+
0.15
,
y
+
entry_height
/
2
+
0.3
,
y
+
entry_height
/
2
+
0.25
,
glow_eDrawType_TextHelvetica
,
glow_eDrawType_Line
,
2
);
insert
(
(
GlowArrayElem
*
)
text
);
x
+=
2
*
tone_entry_width
;
sprintf
(
name
,
"ColorEntryBg"
);
rect
=
new
GrowRect
(
this
,
name
,
x
,
y
,
tone_entry_width
*
2
,
entry_height
,
glow_eDrawType_Line
,
1
,
0
,
glow_mDisplayLevel_1
,
1
,
1
,
0
,
glow_eDrawType_Color34
);
insert
(
rect
);
text
=
new
GrowText
(
this
,
name
,
" Bg"
,
x
+
0.15
,
y
+
entry_height
/
2
+
0.25
,
glow_eDrawType_TextHelvetica
,
glow_eDrawType_Line
,
2
);
insert
(
(
GlowArrayElem
*
)
text
);
...
...
@@ -315,21 +325,38 @@ int ColPalCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
}
break
;
}
if
(
str
cmp
(
name
,
"ColorEntry"
)
!=
0
)
if
(
str
ncmp
(
name
,
"ColorEntry"
,
10
)
!=
0
)
break
;
if
(
event
==
glow_eEvent_MB1Click
)
{
current_fill
=
rect
->
fill_drawtype
;
((
GrowRect
*
)
display_fill
)
->
set_fill_color
(
current_fill
);
if
(
strcmp
(
name
,
"ColorEntryBg"
)
==
0
)
{
if
(
event
==
glow_eEvent_MB1Click
)
{
current_fill
=
glow_eDrawType_LineErase
;
((
GrowRect
*
)
display_fill
)
->
set_fill_color
(
glow_eDrawType_Color4
);
}
else
if
(
event
==
glow_eEvent_MB1ClickShift
)
{
current_text
=
glow_eDrawType_LineErase
;
((
GrowRect
*
)
display_text
)
->
set_fill_color
(
glow_eDrawType_Color4
);
}
else
{
current_border
=
glow_eDrawType_LineErase
;
((
GrowRect
*
)
display_border
)
->
set_fill_color
(
glow_eDrawType_Color4
);
}
callback
=
1
;
}
else
if
(
event
==
glow_eEvent_MB1ClickShift
)
{
current_text
=
rect
->
fill_drawtype
;
((
GrowRect
*
)
display_text
)
->
set_fill_color
(
current_text
);
}
else
{
current_border
=
rect
->
fill_drawtype
;
((
GrowRect
*
)
display_border
)
->
set_fill_color
(
current_border
);
}
callback
=
1
;
else
{
if
(
event
==
glow_eEvent_MB1Click
)
{
current_fill
=
rect
->
fill_drawtype
;
((
GrowRect
*
)
display_fill
)
->
set_fill_color
(
current_fill
);
}
else
if
(
event
==
glow_eEvent_MB1ClickShift
)
{
current_text
=
rect
->
fill_drawtype
;
((
GrowRect
*
)
display_text
)
->
set_fill_color
(
current_text
);
}
else
{
current_border
=
rect
->
fill_drawtype
;
((
GrowRect
*
)
display_border
)
->
set_fill_color
(
current_border
);
}
callback
=
1
;
}
}
else
if
(
callback_object
->
type
()
==
glow_eObjectType_GrowText
)
{
GrowText
*
text
;
...
...
@@ -359,6 +386,21 @@ int ColPalCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
}
break
;
}
if
(
strcmp
(
name
,
"ColorEntryBg"
)
==
0
)
{
if
(
event
==
glow_eEvent_MB1Click
)
{
current_fill
=
glow_eDrawType_LineErase
;
((
GrowRect
*
)
display_fill
)
->
set_fill_color
(
glow_eDrawType_Color4
);
}
else
if
(
event
==
glow_eEvent_MB1ClickShift
)
{
current_text
=
glow_eDrawType_LineErase
;
((
GrowRect
*
)
display_text
)
->
set_fill_color
(
glow_eDrawType_Color4
);
}
else
{
current_border
=
glow_eDrawType_LineErase
;
((
GrowRect
*
)
display_border
)
->
set_fill_color
(
glow_eDrawType_Color4
);
}
callback
=
1
;
}
}
}
break
;
...
...
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