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
6a1ca26a
Commit
6a1ca26a
authored
Jan 17, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scroll events added
parent
2100c210
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
5 deletions
+61
-5
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+15
-1
xtt/lib/glow/src/glow_ctx.cpp
xtt/lib/glow/src/glow_ctx.cpp
+23
-1
xtt/lib/glow/src/glow_ctx.h
xtt/lib/glow/src/glow_ctx.h
+8
-1
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+6
-1
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+9
-1
No files found.
xtt/lib/ge/src/ge_graph.cpp
View file @
6a1ca26a
/*
* Proview $Id: ge_graph.cpp,v 1.3
5 2007-01-11 11:40:3
0 claes Exp $
* Proview $Id: ge_graph.cpp,v 1.3
6 2007-01-17 10:31:2
0 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2396,6 +2396,16 @@ static int graph_grow_cb( GlowCtx *ctx, glow_tEvent event)
event
->
translate
.
new_text
=
new_text
;
return
sts
;
}
case
glow_eEvent_ScrollUp
:
{
grow_Scroll
(
graph
->
grow
->
ctx
,
0
,
0.05
);
break
;
}
case
glow_eEvent_ScrollDown
:
{
grow_Scroll
(
graph
->
grow
->
ctx
,
0
,
-
0.05
);
break
;
}
default:
;
}
...
...
@@ -2574,6 +2584,10 @@ void GraphGrow::grow_setup()
graph_grow_cb
);
grow_EnableEvent
(
ctx
,
glow_eEvent_Key_Tab
,
glow_eEventType_CallBack
,
graph_grow_cb
);
grow_EnableEvent
(
ctx
,
glow_eEvent_ScrollUp
,
glow_eEventType_CallBack
,
graph_grow_cb
);
grow_EnableEvent
(
ctx
,
glow_eEvent_ScrollDown
,
glow_eEventType_CallBack
,
graph_grow_cb
);
grow_RegisterUserDataCallbacks
(
ctx
,
graph_userdata_save_cb
,
graph_userdata_open_cb
,
graph_userdata_copy_cb
);
...
...
xtt/lib/glow/src/glow_ctx.cpp
View file @
6a1ca26a
/*
* Proview $Id: glow_ctx.cpp,v 1.1
2 2007-01-15 13:19:09
claes Exp $
* Proview $Id: glow_ctx.cpp,v 1.1
3 2007-01-17 10:31:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1914,6 +1914,28 @@ void GlowCtx::change_scrollbar()
(
scroll_callback
)(
&
data
);
}
void
GlowCtx
::
scroll
(
double
x
,
double
y
)
{
int
delta_x
=
int
(
x
*
mw
.
window_width
);
int
delta_y
=
int
(
y
*
mw
.
window_height
);
if
(
delta_y
<
0
&&
mw
.
offset_y
+
mw
.
window_height
>
y_high
*
mw
.
zoom_factor_y
)
delta_y
=
0
;
else
if
(
delta_y
>
0
&&
mw
.
offset_y
<
y_low
*
mw
.
zoom_factor_y
)
delta_y
=
0
;
if
(
delta_x
<
0
&&
mw
.
offset_x
+
mw
.
window_width
>
x_right
*
mw
.
zoom_factor_x
)
delta_x
=
0
;
else
if
(
delta_x
>
0
&&
mw
.
offset_x
<
x_left
*
mw
.
zoom_factor_x
)
delta_x
=
0
;
if
(
delta_x
==
0
&&
delta_y
==
0
)
return
;
scroll
(
delta_x
,
delta_y
);
change_scrollbar
();
}
void
GlowCtx
::
scroll
(
int
delta_x
,
int
delta_y
)
{
mw
.
offset_x
-=
delta_x
;
...
...
xtt/lib/glow/src/glow_ctx.h
View file @
6a1ca26a
/*
* Proview $Id: glow_ctx.h,v 1.1
0 2007-01-04 07:57:38
claes Exp $
* Proview $Id: glow_ctx.h,v 1.1
1 2007-01-17 10:31:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -773,6 +773,13 @@ class GlowCtx {
int
display_level
;
//!< Current display level.
//! Scroll the window the specified distance.
/*!
\param delta_x Scroll this factor in relation to window size in x direction.
\param delta_y Scroll this factor in relation to window size in y direction.
*/
void
scroll
(
double
x
,
double
y
);
//! Scroll the window the specified distance.
/*!
\param delta_x Scroll distance in x direction in pixel.
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
6a1ca26a
/*
* Proview $Id: glow_growapi.cpp,v 1.2
5 2007-01-04 07:57:38
claes Exp $
* Proview $Id: glow_growapi.cpp,v 1.2
6 2007-01-17 10:31:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -619,6 +619,11 @@ void grow_GetZoom( grow_tCtx ctx, double *zoom_factor)
*
zoom_factor
=
ctx
->
mw
.
zoom_factor_x
;
}
void
grow_Scroll
(
grow_tCtx
ctx
,
double
x
,
double
y
)
{
ctx
->
scroll
(
x
,
y
);;
}
void
grow_SetAttributes
(
grow_tCtx
ctx
,
grow_sAttributes
*
attr
,
unsigned
long
mask
)
{
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
6a1ca26a
/*
* Proview $Id: glow_growapi.h,v 1.2
2 2007-01-04 07:57:38
claes Exp $
* Proview $Id: glow_growapi.h,v 1.2
3 2007-01-17 10:31:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -670,6 +670,14 @@ extern "C" {
*/
void
grow_GetZoom
(
grow_tCtx
ctx
,
double
*
zoom_factor
);
//! Scroll window.
/*!
\param ctx Grow context.
\param x Scrollfactor of window size in x direction.
\param y Scrollfactor of window size in y direction.
*/
void
grow_Scroll
(
grow_tCtx
ctx
,
double
x
,
double
y
);
//! Set attributes of the grow context.
/*!
\param ctx Grow context.
...
...
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