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
5289da6c
Commit
5289da6c
authored
Apr 08, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Glow: Minor cleanup.
parent
abff9ea4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
47 deletions
+23
-47
xtt/lib/glow/src/glow_browctx.cpp
xtt/lib/glow/src/glow_browctx.cpp
+0
-5
xtt/lib/glow/src/glow_browctx.h
xtt/lib/glow/src/glow_browctx.h
+0
-1
xtt/lib/glow/src/glow_colpalctx.cpp
xtt/lib/glow/src/glow_colpalctx.cpp
+0
-8
xtt/lib/glow/src/glow_colpalctx.h
xtt/lib/glow/src/glow_colpalctx.h
+0
-3
xtt/lib/glow/src/glow_ctx.cpp
xtt/lib/glow/src/glow_ctx.cpp
+17
-2
xtt/lib/glow/src/glow_curvectx.cpp
xtt/lib/glow/src/glow_curvectx.cpp
+6
-19
xtt/lib/glow/src/glow_curvectx.h
xtt/lib/glow/src/glow_curvectx.h
+0
-1
xtt/lib/glow/src/glow_keyboardctx.cpp
xtt/lib/glow/src/glow_keyboardctx.cpp
+0
-5
xtt/lib/glow/src/glow_keyboardctx.h
xtt/lib/glow/src/glow_keyboardctx.h
+0
-3
No files found.
xtt/lib/glow/src/glow_browctx.cpp
View file @
5289da6c
...
...
@@ -135,11 +135,6 @@ void BrowCtx::zoom(double factor)
change_scrollbar
();
}
void
BrowCtx
::
unzoom
()
{
zoom
(
mw
->
base_zoom_factor
/
mw
->
zoom_factor_y
);
}
void
BrowCtx
::
print
(
char
*
filename
)
{
int
i
;
...
...
xtt/lib/glow/src/glow_browctx.h
View file @
5289da6c
...
...
@@ -56,7 +56,6 @@ public:
void
configure
();
void
change_scrollbar
();
void
zoom
(
double
factor
);
void
unzoom
();
void
print
(
char
*
filename
);
int
get_first
(
GlowArrayElem
**
first
)
{
...
...
xtt/lib/glow/src/glow_colpalctx.cpp
View file @
5289da6c
...
...
@@ -205,7 +205,6 @@ void ColPalCtx::configure()
}
get_borders
();
a
.
zoom
();
set_dirty
();
change_scrollbar
();
set_colors
();
hot_mode
=
glow_eHotMode_Disabled
;
...
...
@@ -257,11 +256,6 @@ void ColPalCtx::zoom(double factor)
change_scrollbar
();
}
void
ColPalCtx
::
unzoom
()
{
zoom
(
mw
->
base_zoom_factor
/
mw
->
zoom_factor_y
);
}
void
ColPalCtx
::
print
(
char
*
filename
)
{
int
i
;
...
...
@@ -493,7 +487,6 @@ int ColPalCtx::event_handler(glow_eEvent event, int x, int y, int w, int h)
}
callback
=
1
;
}
}
else
if
(
callback_object
->
type
()
==
glow_eObjectType_GrowText
)
{
}
}
break
;
...
...
@@ -695,7 +688,6 @@ int ColPalCtx::event_handler(glow_eEvent event, int x, int y, int w, int h)
if
(
callback_object_type
!=
glow_eObjectType_NoObject
)
e
.
object
.
object
=
callback_object
;
event_callback
[
event
](
this
,
&
e
);
redraw_if_dirty
();
}
redraw_if_dirty
();
...
...
xtt/lib/glow/src/glow_colpalctx.h
View file @
5289da6c
...
...
@@ -94,9 +94,6 @@ public:
//! Adjust the pixel coordinates to the current zoomfactor.
void
zoom
(
double
factor
);
//! Reset to base zoomfactor.
void
unzoom
();
//! Not used.
void
print
(
char
*
filename
);
...
...
xtt/lib/glow/src/glow_ctx.cpp
View file @
5289da6c
...
...
@@ -177,6 +177,10 @@ int GlowCtx::save(char* filename, glow_eSaveMode mode)
fp
<<
int
(
glow_eSave_Ctx_x_left
)
<<
FSPACE
<<
x_left
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_y_high
)
<<
FSPACE
<<
y_high
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_y_low
)
<<
FSPACE
<<
y_low
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_window_width
)
<<
FSPACE
<<
mw
->
window_width
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_window_height
)
<<
FSPACE
<<
mw
->
window_height
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_nav_window_width
)
<<
FSPACE
<<
navw
->
window_width
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_nav_window_height
)
<<
FSPACE
<<
navw
->
window_height
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_nav_rect_ll_x
)
<<
FSPACE
<<
nav_rect_ll_x
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_nav_rect_ll_y
)
<<
FSPACE
<<
nav_rect_ll_y
<<
'\n'
;
fp
<<
int
(
glow_eSave_Ctx_nav_rect_ur_x
)
<<
FSPACE
<<
nav_rect_ur_x
<<
'\n'
;
...
...
@@ -345,6 +349,18 @@ int GlowCtx::open(char* filename, glow_eSaveMode mode)
case
glow_eSave_Ctx_y_low
:
fp
>>
y_low
;
break
;
case
glow_eSave_Ctx_window_width
:
fp
>>
mw
->
window_width
;
break
;
case
glow_eSave_Ctx_window_height
:
fp
>>
mw
->
window_height
;
break
;
case
glow_eSave_Ctx_nav_window_width
:
fp
>>
navw
->
window_width
;
break
;
case
glow_eSave_Ctx_nav_window_height
:
fp
>>
navw
->
window_height
;
break
;
case
glow_eSave_Ctx_nav_rect_ll_x
:
fp
>>
nav_rect_ll_x
;
break
;
...
...
@@ -834,6 +850,7 @@ void GlowCtx::nav_zoom()
return
;
if
(
a
.
size
()
>
0
)
{
set_dirty
();
get_borders
();
double
x_nav_left
=
MIN
(
x_left
,
mw
->
offset_x
/
mw
->
zoom_factor_x
);
double
x_nav_right
...
...
@@ -849,7 +866,6 @@ void GlowCtx::nav_zoom()
navw
->
offset_x
=
int
(
x_nav_left
*
navw
->
zoom_factor_x
);
navw
->
offset_y
=
int
(
y_nav_low
*
navw
->
zoom_factor_y
);
a
.
nav_zoom
();
set_dirty
();
}
}
...
...
@@ -917,7 +933,6 @@ int GlowCtx::event_handler(glow_eEvent event, int x, int y, int w, int h)
if
(
sts
)
break
;
}
}
else
if
(
event
==
event_create_node
)
{
}
else
if
(
event
==
event_move_node
)
{
move_clear
();
...
...
xtt/lib/glow/src/glow_curvectx.cpp
View file @
5289da6c
...
...
@@ -88,11 +88,6 @@ void CurveCtx::zoom(double factor)
change_scrollbar
();
}
void
CurveCtx
::
unzoom
()
{
zoom
(
mw
->
base_zoom_factor
/
mw
->
zoom_factor_x
);
}
void
CurveCtx
::
adjust_layout
()
{
int
width
,
height
;
...
...
@@ -113,23 +108,15 @@ void CurveCtx::nav_zoom()
if
(
nodraw
)
return
;
if
(
a
.
size
()
>
0
)
{
double
x_nav_left
,
x_nav_right
,
y_nav_low
,
y_nav_high
;
set_dirty
();
get_borders
();
// std::cout << "Borders : <" << x_left << " > " << x_right << " ^ " <<
// y_high << " Y " << y_low << '\n';
x_nav_left
=
x_left
;
x_nav_right
=
x_right
;
y_nav_low
=
y_low
;
y_nav_high
=
y_high
;
if
(
feq
(
x_nav_right
,
x_nav_left
)
||
feq
(
y_nav_high
,
y_nav_low
))
if
(
feq
(
x_right
,
x_left
)
||
feq
(
y_high
,
y_low
))
return
;
navw
->
zoom_factor_x
=
navw
->
window_width
/
(
x_
nav_right
-
x_nav
_left
);
navw
->
zoom_factor_y
=
navw
->
window_height
/
(
y_
nav_high
-
y_nav
_low
);
navw
->
offset_x
=
int
(
x_
nav_
left
*
navw
->
zoom_factor_x
);
navw
->
offset_y
=
int
(
y_
nav_
low
*
navw
->
zoom_factor_y
);
navw
->
zoom_factor_x
=
navw
->
window_width
/
(
x_
right
-
x
_left
);
navw
->
zoom_factor_y
=
navw
->
window_height
/
(
y_
high
-
y
_low
);
navw
->
offset_x
=
int
(
x_left
*
navw
->
zoom_factor_x
);
navw
->
offset_y
=
int
(
y_low
*
navw
->
zoom_factor_y
);
a
.
nav_zoom
();
set_dirty
();
}
}
...
...
xtt/lib/glow/src/glow_curvectx.h
View file @
5289da6c
...
...
@@ -48,7 +48,6 @@ public:
int
layout_adjusted
;
void
configure
();
void
zoom
(
double
factor
);
void
unzoom
();
void
nav_zoom
();
void
get_zoom
(
double
*
factor_x
,
double
*
factor_y
);
void
get_prefered_zoom_y
(
int
height
,
double
*
factor_y
);
...
...
xtt/lib/glow/src/glow_keyboardctx.cpp
View file @
5289da6c
...
...
@@ -646,11 +646,6 @@ void KeyboardCtx::zoom(double factor)
nav_zoom
();
}
void
KeyboardCtx
::
unzoom
()
{
zoom
(
mw
->
base_zoom_factor
/
mw
->
zoom_factor_y
);
}
int
KeyboardCtx
::
event_handler
(
glow_eEvent
event
,
int
x
,
int
y
,
int
w
,
int
h
)
{
int
sts
;
...
...
xtt/lib/glow/src/glow_keyboardctx.h
View file @
5289da6c
...
...
@@ -94,9 +94,6 @@ public:
//! Adjust the pixel coordinates to the current zoomfactor.
void
zoom
(
double
factor
);
//! Reset to base zoomfactor.
void
unzoom
();
//! Event handler
/*!
\param event Current event.
...
...
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