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
abff9ea4
Commit
abff9ea4
authored
Apr 08, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Glow: Fixed initial zoom factor.
parent
8dc32763
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
51 additions
and
59 deletions
+51
-59
xtt/lib/glow/gtk/glow_draw_gtk.cpp
xtt/lib/glow/gtk/glow_draw_gtk.cpp
+6
-6
xtt/lib/glow/gtk/glow_draw_gtk.h
xtt/lib/glow/gtk/glow_draw_gtk.h
+1
-1
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+6
-6
xtt/lib/glow/qt/glow_draw_qt.h
xtt/lib/glow/qt/glow_draw_qt.h
+1
-1
xtt/lib/glow/src/glow_browctx.h
xtt/lib/glow/src/glow_browctx.h
+2
-3
xtt/lib/glow/src/glow_colpalctx.h
xtt/lib/glow/src/glow_colpalctx.h
+5
-7
xtt/lib/glow/src/glow_ctx.cpp
xtt/lib/glow/src/glow_ctx.cpp
+1
-1
xtt/lib/glow/src/glow_ctx.h
xtt/lib/glow/src/glow_ctx.h
+1
-3
xtt/lib/glow/src/glow_curvectx.h
xtt/lib/glow/src/glow_curvectx.h
+1
-2
xtt/lib/glow/src/glow_growctx.cpp
xtt/lib/glow/src/glow_growctx.cpp
+19
-21
xtt/lib/glow/src/glow_growctx.h
xtt/lib/glow/src/glow_growctx.h
+1
-2
xtt/lib/glow/src/glow_growwindow.cpp
xtt/lib/glow/src/glow_growwindow.cpp
+5
-2
xtt/lib/glow/src/glow_keyboardctx.h
xtt/lib/glow/src/glow_keyboardctx.h
+2
-4
No files found.
xtt/lib/glow/gtk/glow_draw_gtk.cpp
View file @
abff9ea4
...
...
@@ -581,17 +581,17 @@ GlowDrawGtk::GlowDrawGtk(GtkWidget* toplevel, void** glow_ctx,
memset
(
customcolors
,
0
,
sizeof
(
customcolors
));
if
(
type
==
glow_eCtxType_Brow
)
ctx
=
(
GlowCtx
*
)
new
BrowCtx
(
"Claes context"
,
20
);
ctx
=
(
GlowCtx
*
)
new
BrowCtx
(
"Claes context"
);
else
if
(
type
==
glow_eCtxType_Grow
)
ctx
=
(
GlowCtx
*
)
new
GrowCtx
(
"Claes context"
,
20
);
ctx
=
(
GlowCtx
*
)
new
GrowCtx
(
"Claes context"
);
else
if
(
type
==
glow_eCtxType_ColPal
)
ctx
=
(
GlowCtx
*
)
new
ColPalCtx
(
"Claes context"
,
20
);
ctx
=
(
GlowCtx
*
)
new
ColPalCtx
(
"Claes context"
);
else
if
(
type
==
glow_eCtxType_Keyboard
)
ctx
=
(
GlowCtx
*
)
new
KeyboardCtx
(
"Claes context"
,
20
);
ctx
=
(
GlowCtx
*
)
new
KeyboardCtx
(
"Claes context"
);
else
if
(
type
==
glow_eCtxType_Curve
)
ctx
=
(
GlowCtx
*
)
new
CurveCtx
(
"Claes context"
,
20
);
ctx
=
(
GlowCtx
*
)
new
CurveCtx
(
"Claes context"
);
else
ctx
=
new
GlowCtx
(
"Claes context"
,
20
);
ctx
=
new
GlowCtx
(
"Claes context"
);
*
glow_ctx
=
(
void
*
)
ctx
;
ctx
->
gdraw
=
this
;
...
...
xtt/lib/glow/gtk/glow_draw_gtk.h
View file @
abff9ea4
...
...
@@ -54,7 +54,7 @@ class DrawWindGtk : public DrawWind {
public:
DrawWindGtk
()
{
zoom_factor_x
=
zoom_factor_y
=
base_zoom_factor
=
10
0
;
zoom_factor_x
=
zoom_factor_y
=
base_zoom_factor
=
2
0
;
offset_x
=
offset_y
=
0
;
window_width
=
window_height
=
0
;
subwindow_x
=
subwindow_y
=
0
;
...
...
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
abff9ea4
...
...
@@ -259,17 +259,17 @@ GlowDrawQt::GlowDrawQt(QWidget* toplevel, void** glow_ctx,
memset(customcolors, 0, sizeof(customcolors));
if (type == glow_eCtxType_Brow) {
ctx = (GlowCtx*)new BrowCtx("Claes context"
, 20
);
ctx = (GlowCtx*)new BrowCtx("Claes context");
} else if (type == glow_eCtxType_Grow) {
ctx = (GlowCtx*)new GrowCtx("Claes context"
, 20
);
ctx = (GlowCtx*)new GrowCtx("Claes context");
} else if (type == glow_eCtxType_ColPal) {
ctx = (GlowCtx*)new ColPalCtx("Claes context"
, 20
);
ctx = (GlowCtx*)new ColPalCtx("Claes context");
} else if (type == glow_eCtxType_Keyboard) {
ctx = (GlowCtx*)new KeyboardCtx("Claes context"
, 20
);
ctx = (GlowCtx*)new KeyboardCtx("Claes context");
} else if (type == glow_eCtxType_Curve) {
ctx = (GlowCtx*)new CurveCtx("Claes context"
, 20
);
ctx = (GlowCtx*)new CurveCtx("Claes context");
} else {
ctx = new GlowCtx("Claes context"
, 20
);
ctx = new GlowCtx("Claes context");
}
*glow_ctx = (void*)ctx;
...
...
xtt/lib/glow/qt/glow_draw_qt.h
View file @
abff9ea4
...
...
@@ -60,7 +60,7 @@ class DrawWindQt : public DrawWind {
public:
DrawWindQt
()
{
zoom_factor_x
=
zoom_factor_y
=
base_zoom_factor
=
10
0
;
zoom_factor_x
=
zoom_factor_y
=
base_zoom_factor
=
2
0
;
offset_x
=
offset_y
=
0
;
window_width
=
window_height
=
0
;
subwindow_x
=
subwindow_y
=
0
;
...
...
xtt/lib/glow/src/glow_browctx.h
View file @
abff9ea4
...
...
@@ -43,9 +43,8 @@
class
BrowCtx
:
public
GlowCtx
{
public:
BrowCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
)
:
GlowCtx
(
ctx_name
,
zoom_fact
),
indentation
(
0.8
),
frame_x_right
(
0
),
annotation_space
(
0.3
)
BrowCtx
(
const
char
*
ctx_name
)
:
GlowCtx
(
ctx_name
),
indentation
(
0.8
),
frame_x_right
(
0
),
annotation_space
(
0.3
)
{
ctx_type
=
glow_eCtxType_Brow
;
}
...
...
xtt/lib/glow/src/glow_colpalctx.h
View file @
abff9ea4
...
...
@@ -67,14 +67,12 @@ public:
//! Constructor.
/*!
\param ctx_name Name of the context.
\param zoom_fact Initial zoomfactor.
*/
ColPalCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
)
:
GrowCtx
(
ctx_name
,
zoom_fact
),
columns
(
30
),
current_fill
(
glow_eDrawType_LineGray
),
current_border
(
glow_eDrawType_Line
),
current_text
(
glow_eDrawType_Line
),
entry_width
(
0.3
),
entry_height
(
1
),
display_entry_width
(
3
),
active
(
colpal_eActive_FillColor
)
ColPalCtx
(
const
char
*
ctx_name
)
:
GrowCtx
(
ctx_name
),
columns
(
30
),
current_fill
(
glow_eDrawType_LineGray
),
current_border
(
glow_eDrawType_Line
),
current_text
(
glow_eDrawType_Line
),
entry_width
(
0.3
),
entry_height
(
1
),
display_entry_width
(
3
),
active
(
colpal_eActive_FillColor
)
{
ctx_type
=
glow_eCtxType_ColPal
;
grid_on
=
0
;
...
...
xtt/lib/glow/src/glow_ctx.cpp
View file @
abff9ea4
...
...
@@ -61,7 +61,7 @@ CtxComment::CtxComment()
memset
(
text
,
0
,
sizeof
(
text
));
}
GlowCtx
::
GlowCtx
(
const
char
*
ctx_name
,
double
zoom_fact
,
int
offs_x
,
int
offs_y
)
GlowCtx
::
GlowCtx
(
const
char
*
ctx_name
,
int
offs_x
,
int
offs_y
)
:
ctx_type
(
glow_eCtxType_Glow
),
print_zoom_factor
(
100
),
x_right
(
0
),
x_left
(
0
),
y_high
(
0
),
y_low
(
0
),
nav_rect_ll_x
(
0
),
nav_rect_ll_y
(
0
),
nav_rect_ur_x
(
0
),
nav_rect_ur_y
(
0
),
gdraw
(
0
),
node_movement_active
(
0
),
...
...
xtt/lib/glow/src/glow_ctx.h
View file @
abff9ea4
...
...
@@ -90,12 +90,10 @@ public:
//! Constructor
/*!
\param ctx_name Name of context.
\param zoom_fact Initial zoom factor.
\param offs_x Initial offset for x-coordinate.
\param offs_y Initial offset for y-coordinate.
*/
GlowCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
,
int
offs_x
=
0
,
int
offs_y
=
0
);
GlowCtx
(
const
char
*
ctx_name
,
int
offs_x
=
0
,
int
offs_y
=
0
);
glow_eCtxType
ctx_type
;
//!< Type of context
DrawWind
*
mw
;
//!< Main window data.
...
...
xtt/lib/glow/src/glow_curvectx.h
View file @
abff9ea4
...
...
@@ -41,8 +41,7 @@
class
CurveCtx
:
public
GrowCtx
{
public:
CurveCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
)
:
GrowCtx
(
ctx_name
,
zoom_fact
),
layout_adjusted
(
0
)
CurveCtx
(
const
char
*
ctx_name
)
:
GrowCtx
(
ctx_name
),
layout_adjusted
(
0
)
{
ctx_type
=
glow_eCtxType_Curve
;
}
...
...
xtt/lib/glow/src/glow_growctx.cpp
View file @
abff9ea4
...
...
@@ -79,27 +79,25 @@ public:
double
rank
;
};
GrowCtx
::
GrowCtx
(
const
char
*
ctx_name
,
double
zoom_fact
)
:
GlowCtx
(
ctx_name
,
zoom_fact
),
edit_mode
(
grow_eMode_Edit
),
conpoint_num_cnt
(
0
),
objectname_cnt
(
0
),
polyline_not_first
(
0
),
background_color
(
glow_eDrawType_LineErase
),
highlight_disabled
(
0
),
dynamic
(
0
),
dynamicsize
(
0
),
arg_cnt
(
0
),
x0
(
0
),
y0
(
0
),
x1
(
0
),
y1
(
0
),
path_cnt
(
0
),
dyn_type1
(
0
),
dyn_type2
(
0
),
dyn_action_type1
(
0
),
dyn_action_type2
(
0
),
no_con_obstacle
(
0
),
slider
(
0
),
slider_cursor_offset
(
0
),
move_restriction
(
glow_eMoveRestriction_No
),
restriction_max_limit
(
0
),
restriction_min_limit
(
0
),
restriction_object
(
0
),
subgraph
(
0
),
modified
(
0
),
export_jbean
(
0
),
animation_count
(
1
),
scantime
(
0.5
),
fast_scantime
(
0.5
),
animation_scantime
(
0.5
),
stored_zoom_factor_x
(
0
),
stored_zoom_factor_y
(
0
),
java_width
(
0
),
enable_bg_pixmap
(
0
),
background_tiled
(
0
),
scale_active
(
0
),
initial_position
(
glow_eDirection_Up
),
is_javaapplet
(
0
),
is_javaapplication
(
0
),
cycle
(
glow_eCycle_Slow
),
mb3_action
(
glow_eMB3Action_PopupMenu
),
scale_equal
(
0
),
translate_on
(
0
),
input_focus_mark
(
glow_eInputFocusMark_Relief
),
background_disabled
(
0
),
redraw_callback
(
0
),
redraw_data
(
0
),
has_subwindows
(
-
1
),
is_subwindow
(
0
),
bitmap_fonts
(
0
),
environment
(
glow_eEnv_Runtime
),
text_coding
(
glow_eTextCoding_ISO8859_1
),
recursive_trace
(
0
),
edit_set_mode
(
glow_eEditSetMode_None
)
GrowCtx
::
GrowCtx
(
const
char
*
ctx_name
)
:
GlowCtx
(
ctx_name
),
edit_mode
(
grow_eMode_Edit
),
conpoint_num_cnt
(
0
),
objectname_cnt
(
0
),
polyline_not_first
(
0
),
background_color
(
glow_eDrawType_LineErase
),
highlight_disabled
(
0
),
dynamic
(
0
),
dynamicsize
(
0
),
arg_cnt
(
0
),
x0
(
0
),
y0
(
0
),
x1
(
0
),
y1
(
0
),
path_cnt
(
0
),
dyn_type1
(
0
),
dyn_type2
(
0
),
dyn_action_type1
(
0
),
dyn_action_type2
(
0
),
no_con_obstacle
(
0
),
slider
(
0
),
slider_cursor_offset
(
0
),
move_restriction
(
glow_eMoveRestriction_No
),
restriction_max_limit
(
0
),
restriction_min_limit
(
0
),
restriction_object
(
0
),
subgraph
(
0
),
modified
(
0
),
export_jbean
(
0
),
animation_count
(
1
),
scantime
(
0.5
),
fast_scantime
(
0.5
),
animation_scantime
(
0.5
),
stored_zoom_factor_x
(
0
),
stored_zoom_factor_y
(
0
),
java_width
(
0
),
enable_bg_pixmap
(
0
),
background_tiled
(
0
),
scale_active
(
0
),
initial_position
(
glow_eDirection_Up
),
is_javaapplet
(
0
),
is_javaapplication
(
0
),
cycle
(
glow_eCycle_Slow
),
mb3_action
(
glow_eMB3Action_PopupMenu
),
scale_equal
(
0
),
translate_on
(
0
),
input_focus_mark
(
glow_eInputFocusMark_Relief
),
background_disabled
(
0
),
redraw_callback
(
0
),
redraw_data
(
0
),
has_subwindows
(
-
1
),
is_subwindow
(
0
),
bitmap_fonts
(
0
),
environment
(
glow_eEnv_Runtime
),
text_coding
(
glow_eTextCoding_ISO8859_1
),
recursive_trace
(
0
),
edit_set_mode
(
glow_eEditSetMode_None
)
{
ctx_type
=
glow_eCtxType_Grow
;
strcpy
(
name
,
""
);
...
...
xtt/lib/glow/src/glow_growctx.h
View file @
abff9ea4
...
...
@@ -72,9 +72,8 @@ public:
//! Constructor
/*!
\param ctx_name Name of context.
\param zoom_fact Initial zoom factor.
*/
GrowCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
);
GrowCtx
(
const
char
*
ctx_name
);
//! Destructor
/*! Delete all objects. */
...
...
xtt/lib/glow/src/glow_growwindow.cpp
View file @
abff9ea4
...
...
@@ -919,12 +919,15 @@ void GrowWindow::new_ctx()
strcat
(
fname
,
".pwg"
);
dcli_translate_filename
(
fname
,
fname
);
window_ctx
=
new
GrowCtx
(
"WindowComponent"
,
ctx
->
mw
->
zoom_factor_x
*
window_scale
);
window_ctx
=
new
GrowCtx
(
"WindowComponent"
);
window_ctx
->
gdraw
=
ctx
->
gdraw
;
window_ctx
->
is_subwindow
=
1
;
window_ctx
->
mw
=
ctx
->
mw
->
copy
();
window_ctx
->
mw
->
zoom_factor_x
=
window_ctx
->
mw
->
zoom_factor_y
=
window_ctx
->
mw
->
base_zoom_factor
=
ctx
->
mw
->
zoom_factor_x
*
window_scale
;
window_ctx
->
navw
=
ctx
->
navw
->
copy
();
window_ctx
->
navw
->
zoom_factor_x
=
window_ctx
->
navw
->
zoom_factor_y
=
window_ctx
->
navw
->
base_zoom_factor
=
ctx
->
mw
->
zoom_factor_x
*
window_scale
;
window_ctx
->
userdata_save_callback
=
ctx
->
userdata_save_callback
;
window_ctx
->
userdata_open_callback
=
ctx
->
userdata_open_callback
;
window_ctx
->
userdata_copy_callback
=
ctx
->
userdata_copy_callback
;
...
...
xtt/lib/glow/src/glow_keyboardctx.h
View file @
abff9ea4
...
...
@@ -71,11 +71,9 @@ public:
//! Constructor.
/*!
\param ctx_name Name of the context.
\param zoom_fact Initial zoomfactor.
*/
KeyboardCtx
(
const
char
*
ctx_name
,
double
zoom_fact
=
100
)
:
GrowCtx
(
ctx_name
,
zoom_fact
),
type
(
default_type
),
current_keymap
(
default_keymap
)
KeyboardCtx
(
const
char
*
ctx_name
)
:
GrowCtx
(
ctx_name
),
type
(
default_type
),
current_keymap
(
default_keymap
)
{
ctx_type
=
glow_eCtxType_Keyboard
;
grid_on
=
0
;
...
...
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