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
ad44fde4
Commit
ad44fde4
authored
Nov 01, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge, mouse scrolling added to tables, tabbed windows and windows with vertical scrollbar
parent
af0416b9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
2 deletions
+84
-2
xtt/lib/glow/gtk/glow_draw_gtk.cpp
xtt/lib/glow/gtk/glow_draw_gtk.cpp
+2
-2
xtt/lib/glow/src/glow_growctx.cpp
xtt/lib/glow/src/glow_growctx.cpp
+2
-0
xtt/lib/glow/src/glow_growtable.cpp
xtt/lib/glow/src/glow_growtable.cpp
+40
-0
xtt/lib/glow/src/glow_growwindow.cpp
xtt/lib/glow/src/glow_growwindow.cpp
+40
-0
No files found.
xtt/lib/glow/gtk/glow_draw_gtk.cpp
View file @
ad44fde4
...
@@ -1144,9 +1144,9 @@ int GlowDrawGtk::event_handler( GdkEvent event)
...
@@ -1144,9 +1144,9 @@ int GlowDrawGtk::event_handler( GdkEvent event)
break
;
break
;
case
GDK_SCROLL
:
case
GDK_SCROLL
:
if
(
event
.
scroll
.
direction
==
GDK_SCROLL_UP
)
if
(
event
.
scroll
.
direction
==
GDK_SCROLL_UP
)
sts
=
ctx
->
event_handler
(
glow_eEvent_ScrollUp
,
0
,
0
,
0
,
0
);
sts
=
ctx
->
event_handler
(
glow_eEvent_ScrollUp
,
(
int
)
event
.
scroll
.
x
,
(
int
)
event
.
scroll
.
y
,
0
,
0
);
else
if
(
event
.
scroll
.
direction
==
GDK_SCROLL_DOWN
)
else
if
(
event
.
scroll
.
direction
==
GDK_SCROLL_DOWN
)
sts
=
ctx
->
event_handler
(
glow_eEvent_ScrollDown
,
0
,
0
,
0
,
0
);
sts
=
ctx
->
event_handler
(
glow_eEvent_ScrollDown
,
(
int
)
event
.
scroll
.
x
,
(
int
)
event
.
scroll
.
y
,
0
,
0
);
break
;
break
;
default:
default:
break
;
break
;
...
...
xtt/lib/glow/src/glow_growctx.cpp
View file @
ad44fde4
...
@@ -665,6 +665,8 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
...
@@ -665,6 +665,8 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
case
glow_eEvent_MB3Press
:
case
glow_eEvent_MB3Press
:
case
glow_eEvent_MB1Down
:
case
glow_eEvent_MB1Down
:
case
glow_eEvent_MB1Up
:
case
glow_eEvent_MB1Up
:
case
glow_eEvent_ScrollUp
:
case
glow_eEvent_ScrollDown
:
tiptext
->
remove
();
tiptext
->
remove
();
sts
=
0
;
sts
=
0
;
for
(
i
=
0
;
i
<
a
.
a_size
;
i
++
)
for
(
i
=
0
;
i
<
a
.
a_size
;
i
++
)
...
...
xtt/lib/glow/src/glow_growtable.cpp
View file @
ad44fde4
...
@@ -967,6 +967,46 @@ int GrowTable::event_handler( GlowWind *w, glow_eEvent event, int x, int y, doub
...
@@ -967,6 +967,46 @@ int GrowTable::event_handler( GlowWind *w, glow_eEvent event, int x, int y, doub
((
GrowCtx
*
)
ctx
)
->
send_table_callback
(
this
,
event
,
fx
,
fy
,
column
,
row
);
((
GrowCtx
*
)
ctx
)
->
send_table_callback
(
this
,
event
,
fx
,
fy
,
column
,
row
);
break
;
break
;
}
}
case
glow_eEvent_ScrollUp
:
if
(
!
ctx
->
trace_started
)
return
0
;
if
(
v_scrollbar
)
{
double
rx
,
ry
;
// Convert koordinates to local koordinates
trf
.
reverse
(
fx
,
fy
,
&
rx
,
&
ry
);
sts
=
local_event_handler
(
event
,
rx
,
ry
);
if
(
sts
)
{
v_value
-=
(
table_y1
-
table_y0
)
*
window_scale
/
50
;
if
(
v_value
<
table_y0
*
window_scale
)
v_value
=
table_y0
*
window_scale
;
draw
();
v_scrollbar
->
set_value
(
v_value
,
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
);
return
1
;
}
}
return
0
;
case
glow_eEvent_ScrollDown
:
if
(
!
ctx
->
trace_started
)
return
0
;
if
(
v_scrollbar
)
{
double
rx
,
ry
;
// Convert koordinates to local koordinates
trf
.
reverse
(
fx
,
fy
,
&
rx
,
&
ry
);
sts
=
local_event_handler
(
event
,
rx
,
ry
);
if
(
sts
)
{
v_value
+=
(
table_y1
-
table_y0
)
*
window_scale
/
50
;
if
(
v_value
>
(
table_y1
-
(
y_high
-
y_low
-
scrollbar_width
*
horizontal_scrollbar
))
*
window_scale
)
v_value
=
(
table_y1
-
(
y_high
-
y_low
-
scrollbar_width
*
horizontal_scrollbar
))
*
window_scale
;
draw
();
v_scrollbar
->
set_value
(
v_value
,
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
);
return
1
;
}
}
return
0
;
default:
;
default:
;
}
}
...
...
xtt/lib/glow/src/glow_growwindow.cpp
View file @
ad44fde4
...
@@ -579,6 +579,46 @@ int GrowWindow::event_handler( GlowWind *w, glow_eEvent event, int x, int y, dou
...
@@ -579,6 +579,46 @@ int GrowWindow::event_handler( GlowWind *w, glow_eEvent event, int x, int y, dou
}
}
else
else
return
0
;
return
0
;
case
glow_eEvent_ScrollUp
:
if
(
!
ctx
->
trace_started
)
return
0
;
if
(
v_scrollbar
)
{
double
rx
,
ry
;
// Convert koordinates to local koordinates
trf
.
reverse
(
fx
,
fy
,
&
rx
,
&
ry
);
sts
=
local_event_handler
(
event
,
rx
,
ry
);
if
(
sts
)
{
v_value
-=
(
wctx_y1
-
wctx_y0
)
*
window_scale
/
50
;
if
(
v_value
<
wctx_y0
*
window_scale
)
v_value
=
wctx_y0
*
window_scale
;
draw
();
v_scrollbar
->
set_value
(
v_value
,
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
);
return
1
;
}
}
return
0
;
case
glow_eEvent_ScrollDown
:
if
(
!
ctx
->
trace_started
)
return
0
;
if
(
v_scrollbar
)
{
double
rx
,
ry
;
// Convert koordinates to local koordinates
trf
.
reverse
(
fx
,
fy
,
&
rx
,
&
ry
);
sts
=
local_event_handler
(
event
,
rx
,
ry
);
if
(
sts
)
{
v_value
+=
(
wctx_y1
-
wctx_y0
)
*
window_scale
/
50
;
if
(
v_value
>
wctx_y1
*
window_scale
-
((
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
)))
v_value
=
wctx_y1
*
window_scale
-
((
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
));
draw
();
v_scrollbar
->
set_value
(
v_value
,
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
);
return
1
;
}
}
return
0
;
default:
default:
;
;
}
}
...
...
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