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
de62ef6b
Commit
de62ef6b
authored
Jan 23, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function brow_GetPreviousSibling implemented
parent
c4c79675
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
0 deletions
+51
-0
xtt/lib/flow/src/flow_array.cpp
xtt/lib/flow/src/flow_array.cpp
+39
-0
xtt/lib/flow/src/flow_array.h
xtt/lib/flow/src/flow_array.h
+2
-0
xtt/lib/flow/src/flow_browapi.cpp
xtt/lib/flow/src/flow_browapi.cpp
+6
-0
xtt/lib/flow/src/flow_browapi.h
xtt/lib/flow/src/flow_browapi.h
+2
-0
xtt/lib/flow/src/flow_browctx.h
xtt/lib/flow/src/flow_browctx.h
+2
-0
No files found.
xtt/lib/flow/src/flow_array.cpp
View file @
de62ef6b
...
...
@@ -481,6 +481,45 @@ int FlowArray::brow_get_next_sibling( FlowArrayElem *element,
return
FLOW__NONEXTSIBLING
;
}
int
FlowArray
::
brow_get_previous_sibling
(
FlowArrayElem
*
element
,
FlowArrayElem
**
sibling
)
{
int
i
;
int
idx
;
int
found
;
int
level
;
found
=
0
;
for
(
i
=
0
;
i
<
a_size
;
i
++
)
{
if
(
*
(
a
+
i
)
==
element
)
{
idx
=
i
;
found
=
1
;
break
;
}
}
if
(
!
found
)
return
FLOW__NOELEM
;
if
(
idx
==
0
)
return
FLOW__NONEXTSIBLING
;
// Return previous element of the same level
level
=
((
FlowNode
*
)
a
[
idx
])
->
get_level
();
for
(
i
=
idx
-
1
;
i
<=
0
;
i
--
)
{
if
(((
FlowNode
*
)
a
[
i
])
->
get_level
()
==
level
)
{
*
sibling
=
a
[
i
];
return
1
;
}
if
(((
FlowNode
*
)
a
[
i
])
->
get_level
()
<
level
)
return
FLOW__NONEXTSIBLING
;
}
return
FLOW__NONEXTSIBLING
;
}
void
FlowArray
::
zoom
()
{
int
i
;
...
...
xtt/lib/flow/src/flow_array.h
View file @
de62ef6b
...
...
@@ -65,6 +65,8 @@ class FlowArray {
int
brow_get_child
(
FlowArrayElem
*
element
,
FlowArrayElem
**
child
);
int
brow_get_next_sibling
(
FlowArrayElem
*
element
,
FlowArrayElem
**
sibling
);
int
brow_get_previous_sibling
(
FlowArrayElem
*
element
,
FlowArrayElem
**
sibling
);
void
move_widgets
(
int
x
,
int
y
);
int
get_first
(
FlowArrayElem
**
first
);
int
get_last
(
FlowArrayElem
**
last
);
...
...
xtt/lib/flow/src/flow_browapi.cpp
View file @
de62ef6b
...
...
@@ -668,6 +668,12 @@ int brow_GetNextSibling( brow_tCtx ctx, brow_tObject object,
return
ctx
->
get_next_sibling
(
(
FlowArrayElem
*
)
object
,
(
FlowArrayElem
**
)
sibling
);
}
int
brow_GetPreviousSibling
(
brow_tCtx
ctx
,
brow_tObject
object
,
brow_tObject
*
sibling
)
{
return
ctx
->
get_previous_sibling
(
(
FlowArrayElem
*
)
object
,
(
FlowArrayElem
**
)
sibling
);
}
int
brow_IsVisible
(
brow_tCtx
ctx
,
brow_tObject
object
)
{
return
ctx
->
is_visible
(
(
FlowArrayElem
*
)
object
);
...
...
xtt/lib/flow/src/flow_browapi.h
View file @
de62ef6b
...
...
@@ -196,6 +196,8 @@ int brow_GetParent( brow_tCtx ctx, brow_tObject object, brow_tObject *parent);
int
brow_GetChild
(
brow_tCtx
ctx
,
brow_tObject
object
,
brow_tObject
*
child
);
int
brow_GetNextSibling
(
brow_tCtx
ctx
,
brow_tObject
object
,
brow_tObject
*
sibling
);
int
brow_GetPreviousSibling
(
brow_tCtx
ctx
,
brow_tObject
object
,
brow_tObject
*
sibling
);
int
brow_IsVisible
(
brow_tCtx
ctx
,
brow_tObject
object
);
int
brow_CreateSecondaryCtx
(
brow_tCtx
ctx
,
brow_tCtx
*
secondary_ctx
,
int
(
*
init_proc
)(
brow_tCtx
ctx
,
void
*
client_data
),
...
...
xtt/lib/flow/src/flow_browctx.h
View file @
de62ef6b
...
...
@@ -35,6 +35,8 @@ class BrowCtx : public FlowCtx {
{
return
a
.
brow_get_child
(
element
,
child
);};
int
get_next_sibling
(
FlowArrayElem
*
element
,
FlowArrayElem
**
sibling
)
{
return
a
.
brow_get_next_sibling
(
element
,
sibling
);};
int
get_previous_sibling
(
FlowArrayElem
*
element
,
FlowArrayElem
**
sibling
)
{
return
a
.
brow_get_previous_sibling
(
element
,
sibling
);};
int
is_visible
(
FlowArrayElem
*
element
);
void
center_object
(
FlowArrayElem
*
object
,
double
factor
);
~
BrowCtx
()
{};
...
...
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