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
1f55504f
Commit
1f55504f
authored
Feb 26, 2009
by
Claes pwr46/data0/x4-6-0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Frame inverse and sensitive area adjusted
parent
a3f601f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
8 deletions
+36
-8
xtt/lib/flow/src/flow_frame.cpp
xtt/lib/flow/src/flow_frame.cpp
+34
-8
xtt/lib/flow/src/flow_frame.h
xtt/lib/flow/src/flow_frame.h
+2
-0
No files found.
xtt/lib/flow/src/flow_frame.cpp
View file @
1f55504f
...
...
@@ -63,10 +63,10 @@ void FlowFrame::draw( void *pos, int highlight, int hot, void *node)
idx
=
MAX
(
0
,
idx
);
idx
=
MIN
(
idx
,
DRAW_TYPE_SIZE
-
1
);
ctx
->
fdraw
->
rect
(
ctx
,
ll
.
z_x
+
((
FlowPoint
*
)
pos
)
->
z_x
-
ctx
->
offset_x
,
ll
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
,
int
(
ur_x
*
ctx
->
zoom_factor
-
ll
.
z_x
-
((
FlowPoint
*
)
pos
)
->
z_x
-
1
),
int
(
ur_y
*
ctx
->
zoom_factor
-
ll
.
z_y
-
((
FlowPoint
*
)
pos
)
->
z_y
-
1
),
draw_type
,
idx
,
highlight
);
ll
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
,
int
(
ur_x
*
ctx
->
zoom_factor
-
ll
.
z_x
-
((
FlowPoint
*
)
pos
)
->
z_x
-
1
),
int
(
ur_y
*
ctx
->
zoom_factor
-
ll
.
z_y
-
((
FlowPoint
*
)
pos
)
->
z_y
-
1
),
draw_type
,
idx
,
highlight
);
}
void
FlowFrame
::
erase
(
void
*
pos
,
int
hot
,
void
*
node
)
...
...
@@ -94,10 +94,10 @@ void FlowFrame::erase( void *pos, int hot, void *node)
idx
=
MIN
(
idx
,
DRAW_TYPE_SIZE
-
1
);
ctx
->
fdraw
->
rect_erase
(
ctx
,
ll
.
z_x
+
((
FlowPoint
*
)
pos
)
->
z_x
-
ctx
->
offset_x
,
ll
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
,
int
(
ur_x
*
ctx
->
zoom_factor
-
ll
.
z_x
-
((
FlowPoint
*
)
pos
)
->
z_x
-
1
),
int
(
ur_y
*
ctx
->
zoom_factor
-
ll
.
z_y
-
((
FlowPoint
*
)
pos
)
->
z_y
-
1
),
idx
);
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
,
int
(
ur_x
*
ctx
->
zoom_factor
-
ll
.
z_x
-
((
FlowPoint
*
)
pos
)
->
z_x
-
1
),
int
(
ur_y
*
ctx
->
zoom_factor
-
ll
.
z_y
-
((
FlowPoint
*
)
pos
)
->
z_y
-
1
),
idx
);
}
void
FlowFrame
::
get_borders
(
double
pos_x
,
double
pos_y
,
double
*
x_right
,
...
...
@@ -113,3 +113,29 @@ void FlowFrame::get_borders( double pos_x, double pos_y, double *x_right,
*
y_high
=
pos_y
+
ur
.
y
;
}
int
FlowFrame
::
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
)
{
FlowPoint
*
p
;
p
=
(
FlowPoint
*
)
pos
;
if
(
ctx
->
type
()
==
flow_eCtxType_Brow
)
{
if
(
ll
.
z_x
+
((
FlowPoint
*
)
pos
)
->
z_x
-
ctx
->
offset_x
<=
x
&&
ll
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
<=
y
&&
y
<=
ur
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
)
return
1
;
else
return
0
;
}
else
{
if
(
ll
.
z_x
+
((
FlowPoint
*
)
pos
)
->
z_x
-
ctx
->
offset_x
<=
x
&&
x
<=
ur
.
z_x
+
((
FlowPoint
*
)
pos
)
->
z_x
-
ctx
->
offset_x
&&
ll
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
<=
y
&&
y
<=
ur
.
z_y
+
((
FlowPoint
*
)
pos
)
->
z_y
-
ctx
->
offset_y
)
// cout << "Event handler: Hit in rect" << endl;
return
1
;
else
return
0
;
}
}
xtt/lib/flow/src/flow_frame.h
View file @
1f55504f
...
...
@@ -41,6 +41,8 @@ class FlowFrame : public FlowRect {
void
get_borders
(
double
pos_x
,
double
pos_y
,
double
*
x_right
,
double
*
x_left
,
double
*
y_high
,
double
*
y_low
,
void
*
node
);
flow_eObjectType
type
()
{
return
flow_eObjectType_Frame
;};
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
};
#endif
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