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
7583e817
Commit
7583e817
authored
Nov 22, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in scroll
parent
ee67737f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
8 deletions
+52
-8
xtt/lib/flow/gtk/flow_widget_gtk.cpp
xtt/lib/flow/gtk/flow_widget_gtk.cpp
+2
-2
xtt/lib/glow/gtk/glow_curvewidget_gtk.cpp
xtt/lib/glow/gtk/glow_curvewidget_gtk.cpp
+47
-3
xtt/lib/glow/gtk/glow_growwidget_gtk.cpp
xtt/lib/glow/gtk/glow_growwidget_gtk.cpp
+3
-3
No files found.
xtt/lib/flow/gtk/flow_widget_gtk.cpp
View file @
7583e817
/*
* Proview $Id: flow_widget_gtk.cpp,v 1.
5 2007-10-17 07:19:57
claes Exp $
* Proview $Id: flow_widget_gtk.cpp,v 1.
6 2007-11-22 09:02:10
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -145,7 +145,7 @@ static gboolean scroll_callback_cb( void *d)
gtk_adjustment_changed
(
((
GtkScrollbar
*
)
scroll_data
->
scroll_h
)
->
range
.
adjustment
);
}
else
{
gtk_range_set_value
(
GTK_RANGE
(
scroll_data
->
scroll_
v
),
(
gdouble
)
data
->
offset_y
);
gtk_range_set_value
(
GTK_RANGE
(
scroll_data
->
scroll_
h
),
(
gdouble
)
data
->
offset_x
);
}
((
FlowWidgetGtk
*
)
scroll_data
->
flow
)
->
scroll_h_value
=
(
gdouble
)
data
->
offset_x
;
((
FlowWidgetGtk
*
)
scroll_data
->
flow
)
->
scroll_h_pagesize
=
data
->
window_width
;
...
...
xtt/lib/glow/gtk/glow_curvewidget_gtk.cpp
View file @
7583e817
/*
* Proview $Id: glow_curvewidget_gtk.cpp,v 1.
3 2007-02-06 15:13:34
claes Exp $
* Proview $Id: glow_curvewidget_gtk.cpp,v 1.
4 2007-11-22 09:02:10
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -59,6 +59,14 @@ struct _CurveWidgetGtk {
GtkWidget
*
form
;
int
scroll_h_ignore
;
int
scroll_v_ignore
;
gdouble
scroll_h_value
;
gdouble
scroll_v_value
;
int
scroll_h_pagesize
;
int
scroll_v_pagesize
;
int
scroll_h_upper
;
int
scroll_v_upper
;
gint
scroll_timerid
;
glow_sScroll
scroll_data
;
};
struct
_CurveWidgetGtkClass
{
...
...
@@ -66,12 +74,24 @@ struct _CurveWidgetGtkClass {
};
G_DEFINE_TYPE
(
CurveWidgetGtk
,
curvewidgetgtk
,
GTK_TYPE_DRAWING_AREA
);
static
gboolean
scroll_callback_cb
(
void
*
d
);
static
void
scroll_callback
(
glow_sScroll
*
data
)
{
curvewidget_sScroll
*
scroll_data
;
curvewidget_sScroll
*
scroll_data
=
(
curvewidget_sScroll
*
)
data
->
scroll_data
;
if
(
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_timerid
)
g_source_remove
(
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_timerid
);
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_timerid
=
g_timeout_add
(
200
,
scroll_callback_cb
,
scroll_data
->
curve
);
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_data
=
*
data
;
}
scroll_data
=
(
curvewidget_sScroll
*
)
data
->
scroll_data
;
static
gboolean
scroll_callback_cb
(
void
*
d
)
{
glow_sScroll
*
data
=
&
((
CurveWidgetGtk
*
)
d
)
->
scroll_data
;
curvewidget_sScroll
*
scroll_data
=
(
curvewidget_sScroll
*
)
data
->
scroll_data
;
if
(
data
->
total_width
<=
data
->
window_width
)
{
if
(
data
->
offset_x
==
0
)
...
...
@@ -115,6 +135,29 @@ static void scroll_callback( glow_sScroll *data)
if
(
data
->
window_height
<
1
)
data
->
window_height
=
1
;
if
(
scroll_data
->
scroll_v_managed
)
{
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_v_ignore
=
1
;
if
(
data
->
window_height
!=
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_v_pagesize
||
data
->
total_height
!=
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_v_upper
)
{
g_object_set
(
((
GtkScrollbar
*
)
scroll_data
->
scroll_v
)
->
range
.
adjustment
,
"upper"
,
(
gdouble
)
data
->
total_height
,
"page-size"
,
(
gdouble
)
data
->
window_height
,
"value"
,
(
gdouble
)
data
->
offset_y
,
NULL
);
gtk_adjustment_changed
(
((
GtkScrollbar
*
)
scroll_data
->
scroll_v
)
->
range
.
adjustment
);
}
else
{
g_object_set
(
((
GtkScrollbar
*
)
scroll_data
->
scroll_v
)
->
range
.
adjustment
,
"value"
,
(
gdouble
)
data
->
offset_y
,
NULL
);
gtk_adjustment_value_changed
(
((
GtkScrollbar
*
)
scroll_data
->
scroll_v
)
->
range
.
adjustment
);
}
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_v_value
=
(
gdouble
)
data
->
offset_y
;
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_h_pagesize
=
data
->
window_width
;
((
CurveWidgetGtk
*
)
scroll_data
->
curve
)
->
scroll_h_upper
=
data
->
total_width
;
}
return
FALSE
;
#if 0
if ( scroll_data->scroll_h_managed) {
((CurveWidgetGtk *)scroll_data->curve)->scroll_h_ignore = 1;
g_object_set( ((GtkScrollbar *)scroll_data->scroll_h)->range.adjustment,
...
...
@@ -136,6 +179,7 @@ static void scroll_callback( glow_sScroll *data)
gtk_adjustment_changed(
((GtkScrollbar *)scroll_data->scroll_v)->range.adjustment);
}
#endif
}
static
void
scroll_h_action
(
GtkWidget
*
w
,
...
...
xtt/lib/glow/gtk/glow_growwidget_gtk.cpp
View file @
7583e817
/*
* Proview $Id: glow_growwidget_gtk.cpp,v 1.
5 2007-10-17 07:19:57
claes Exp $
* Proview $Id: glow_growwidget_gtk.cpp,v 1.
6 2007-11-22 09:02:10
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -148,7 +148,7 @@ static gboolean scroll_callback_cb( void *d)
gtk_adjustment_changed
(
((
GtkScrollbar
*
)
scroll_data
->
scroll_h
)
->
range
.
adjustment
);
}
else
{
gtk_range_set_value
(
GTK_RANGE
(
scroll_data
->
scroll_
v
),
(
gdouble
)
data
->
offset_y
);
gtk_range_set_value
(
GTK_RANGE
(
scroll_data
->
scroll_
h
),
(
gdouble
)
data
->
offset_x
);
}
((
GrowWidgetGtk
*
)
scroll_data
->
grow
)
->
scroll_h_value
=
(
gdouble
)
data
->
offset_x
;
((
GrowWidgetGtk
*
)
scroll_data
->
grow
)
->
scroll_h_pagesize
=
data
->
window_width
;
...
...
@@ -292,7 +292,7 @@ static void growwidgetgtk_destroy( GtkObject *object)
if
(
grow
->
scroll_timerid
)
g_source_remove
(
grow
->
scroll_timerid
);
if
(
grow
->
is_navigator
)
{
if
(
grow
->
is_navigator
&&
grow
->
grow_ctx
)
{
((
GrowCtx
*
)
grow
->
grow_ctx
)
->
no_nav
=
1
;
}
GTK_OBJECT_CLASS
(
growwidgetgtk_parent_class
)
->
destroy
(
object
);
...
...
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