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
130fc06d
Commit
130fc06d
authored
Jan 24, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CreateObject in WFoe popupmenu
parent
7094d765
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
11 deletions
+41
-11
wb/lib/wb/src/wb_foe.cpp
wb/lib/wb/src/wb_foe.cpp
+8
-2
wb/lib/wb/src/wb_foe.h
wb/lib/wb/src/wb_foe.h
+4
-2
wb/lib/wb/src/wb_gre.cpp
wb/lib/wb/src/wb_gre.cpp
+10
-2
wb/lib/wb/src/wb_gre.h
wb/lib/wb/src/wb_gre.h
+5
-2
xtt/lib/flow/src/flow_api.cpp
xtt/lib/flow/src/flow_api.cpp
+7
-1
xtt/lib/flow/src/flow_api.h
xtt/lib/flow/src/flow_api.h
+3
-1
xtt/lib/flow/src/flow_ctx.h
xtt/lib/flow/src/flow_ctx.h
+4
-1
No files found.
wb/lib/wb/src/wb_foe.cpp
View file @
130fc06d
/*
* Proview $Id: wb_foe.cpp,v 1.
2 2007-01-15 13:22:11
claes Exp $
* Proview $Id: wb_foe.cpp,v 1.
3 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -608,6 +608,11 @@ void WFoe::activate_delete()
}
}
void
WFoe
::
activate_createobject
(
float
x
,
float
y
)
{
gre_node_created
(
gre
,
0
,
x
,
y
);
}
//
// Callback from the menu.
// Deletes the selected nodes and connections.
...
...
@@ -1640,7 +1645,8 @@ void WFoe::gre_popupmenu( WGre *gre, int x_pix, int y_pix, int popupmenu_type,
foe
->
modify_popup
(
foe_e_popupmenu_delete
|
foe_e_popupmenu_copy
|
foe_e_popupmenu_cut
|
foe_e_popupmenu_printselect
,
foe_e_popupmenu_printselect
|
foe_e_popupmenu_createobject
,
x_pix
+
5
,
y_pix
);
}
}
...
...
wb/lib/wb/src/wb_foe.h
View file @
130fc06d
/*
* Proview $Id: wb_foe.h,v 1.1
1 2007-01-04 07:29:03
claes Exp $
* Proview $Id: wb_foe.h,v 1.1
2 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -65,7 +65,8 @@ enum foe_e_popupmenu {
foe_e_popupmenu_copy
=
1
<<
5
,
foe_e_popupmenu_cut
=
1
<<
6
,
foe_e_popupmenu_printselect
=
1
<<
7
,
foe_e_popupmenu_helpclass
=
1
<<
8
foe_e_popupmenu_helpclass
=
1
<<
8
,
foe_e_popupmenu_createobject
=
1
<<
9
};
class
WFoe
;
...
...
@@ -197,6 +198,7 @@ class WFoe : public WUtility {
void
activate_syntax
();
void
activate_compile
();
void
activate_delete
();
void
activate_createobject
(
float
x
,
float
y
);
void
activate_changetext
();
void
activate_cut
();
void
activate_copy
();
...
...
wb/lib/wb/src/wb_gre.cpp
View file @
130fc06d
/*
* Proview $Id: wb_gre.cpp,v 1.
2 2007-01-17 06:21:33
claes Exp $
* Proview $Id: wb_gre.cpp,v 1.
3 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1437,7 +1437,7 @@ int WGre::flow_cb( FlowCtx *ctx, flow_tEvent event)
flow_SetSelectHighlight
(
ctx
);
break
;
case
flow_eEvent_MB2Click
:
/* Cr
d
ate node */
/* Cr
e
ate node */
switch
(
event
->
object
.
object_type
)
{
case
flow_eObjectType_NoObject
:
(
gre
->
gre_node_created
)
(
gre
,
dummy
,
event
->
object
.
x
,
...
...
@@ -1511,6 +1511,8 @@ int WGre::flow_cb( FlowCtx *ctx, flow_tEvent event)
flow_PositionToPixel
(
gre
->
flow_ctx
,
event
->
object
.
x
,
event
->
object
.
y
,
&
x_pix
,
&
y_pix
);
gre
->
popup_menu_x
=
x_pix
;
gre
->
popup_menu_y
=
y_pix
;
gre
->
get_popup_position
(
&
x_pix
,
&
y_pix
);
current_node
=
0
;
...
...
@@ -2882,6 +2884,7 @@ int WGre::set_trace_attributes( char *host)
node_ptr
=
nodelist
;
for
(
i
=
0
;
i
<
(
int
)
node_count
;
i
++
)
{
inverted
=
0
;
sts
=
trace_get_attributes
(
this
,
*
node_ptr
,
object_str
,
attr_str
,
&
trace_type
,
&
inverted
);
if
(
ODD
(
sts
)
&&
sts
!=
TRA__DISCARD
)
{
...
...
@@ -3014,3 +3017,8 @@ void WGre::set_grid_size( double size)
mask
|=
flow_eAttr_grid_size_y
;
flow_SetAttributes
(
flow_ctx
,
&
flow_attr
,
mask
);
}
void
WGre
::
pixel_to_position
(
int
pix_x
,
int
pix_y
,
double
*
x
,
double
*
y
)
{
flow_PixelToPosition
(
flow_ctx
,
pix_x
,
pix_y
,
x
,
y
);
}
wb/lib/wb/src/wb_gre.h
View file @
130fc06d
/*
* Proview $Id: wb_gre.h,v 1.
6 2007-01-04 07:29:03
claes Exp $
* Proview $Id: wb_gre.h,v 1.
7 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -109,7 +109,9 @@ class WGre {
int
trace_started
;
flow_tNodeClass
trace_analyse_nc
;
flow_tConClass
trace_con_cc
;
flow_tNode
trace_changenode
;
flow_tNode
trace_changenode
;
int
popup_menu_x
;
int
popup_menu_y
;
/* Callbacks */
void
(
*
gre_setup_window
)(
WGre
*
);
...
...
@@ -223,6 +225,7 @@ class WGre {
void
disable_button_events
();
int
get_conclass
(
pwr_tClassId
cid
,
ldh_tSesContext
ldhses
,
unsigned
long
con_type
,
flow_tConClass
*
con_class
);
void
pixel_to_position
(
int
pix_x
,
int
pix_y
,
double
*
x
,
double
*
y
);
static
int
get_annot_width
(
flow_tNodeClass
nodeclass
,
float
*
annot_width
,
char
*
annot_str
,
int
annot_count
,
...
...
xtt/lib/flow/src/flow_api.cpp
View file @
130fc06d
/*
* Proview $Id: flow_api.cpp,v 1.
7 2007-01-17 06:19:26
claes Exp $
* Proview $Id: flow_api.cpp,v 1.
8 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -579,6 +579,12 @@ void flow_PositionToPixel( flow_tCtx ctx, double x, double y,
ctx
->
position_to_pixel
(
x
,
y
,
pix_x
,
pix_y
);
}
void
flow_PixelToPosition
(
flow_tCtx
ctx
,
int
pix_x
,
int
pix_y
,
double
*
x
,
double
*
y
)
{
ctx
->
pixel_to_position
(
pix_x
,
pix_y
,
x
,
y
);
}
void
flow_UnZoom
(
flow_tCtx
ctx
)
{
ctx
->
unzoom
();
...
...
xtt/lib/flow/src/flow_api.h
View file @
130fc06d
/*
* Proview $Id: flow_api.h,v 1.
7 2007-01-17 06:19:26
claes Exp $
* Proview $Id: flow_api.h,v 1.
8 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -207,6 +207,8 @@ void flow_SetAttributes( flow_tCtx ctx, flow_sAttributes *attr,
void
flow_GetAttributes
(
flow_tCtx
ctx
,
flow_sAttributes
*
attr
);
void
flow_PositionToPixel
(
flow_tCtx
ctx
,
double
x
,
double
y
,
int
*
pix_x
,
int
*
pix_y
);
void
flow_PixelToPosition
(
flow_tCtx
ctx
,
int
pix_x
,
int
pix_y
,
double
*
x
,
double
*
y
);
void
flow_UnZoom
(
flow_tCtx
ctx
);
void
flow_CenterObject
(
flow_tCtx
ctx
,
flow_tObject
object
);
void
flow_GetNodePosition
(
flow_tNode
node
,
double
*
x
,
double
*
y
);
...
...
xtt/lib/flow/src/flow_ctx.h
View file @
130fc06d
/*
* Proview $Id: flow_ctx.h,v 1.
4 2007-01-17 06:19:26
claes Exp $
* Proview $Id: flow_ctx.h,v 1.
5 2007-01-24 12:37:07
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -286,6 +286,9 @@ class FlowCtx {
void
position_to_pixel
(
double
x
,
double
y
,
int
*
pix_x
,
int
*
pix_y
)
{
*
pix_x
=
int
(
x
*
zoom_factor
-
offset_x
);
*
pix_y
=
int
(
y
*
zoom_factor
-
offset_y
);};
void
pixel_to_position
(
int
pix_x
,
int
pix_y
,
double
*
x
,
double
*
y
)
{
*
x
=
double
(
pix_x
+
offset_x
)
/
zoom_factor
;
*
y
=
double
(
pix_y
+
offset_y
)
/
zoom_factor
;};
void
unzoom
()
{
zoom
(
base_zoom_factor
/
zoom_factor
);};
void
center_object
(
FlowArrayElem
*
object
);
FlowArrayElem
*
get_document
(
double
x
,
double
y
);
...
...
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