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
13109a4f
Commit
13109a4f
authored
Aug 20, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge action input focus, invisible objects skipped for next tab and arrow right (refs #79)
parent
9300f10a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
33 deletions
+81
-33
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+60
-33
xtt/lib/glow/src/glow_array_elem.h
xtt/lib/glow/src/glow_array_elem.h
+1
-0
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+5
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+3
-0
xtt/lib/glow/src/glow_grownode.cpp
xtt/lib/glow/src/glow_grownode.cpp
+9
-0
xtt/lib/glow/src/glow_grownode.h
xtt/lib/glow/src/glow_grownode.h
+3
-0
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
13109a4f
...
...
@@ -12052,6 +12052,8 @@ int GeInputFocus::action( grow_tObject object, glow_tEvent event)
int
sts
;
grow_tObject
next
;
int
found
;
GeDyn
*
next_dyn
;
GeInputFocus
*
next_inputfocus
;
switch
(
event
->
event
)
{
case
glow_eEvent_MB1Click
:
...
...
@@ -12065,25 +12067,49 @@ int GeInputFocus::action( grow_tObject object, glow_tEvent event)
case
glow_eEvent_Key_Right
:
if
(
event
->
object
.
object_type
!=
glow_eObjectType_NoObject
)
{
found
=
0
;
if
(
strcmp
(
next_horizontal
,
""
)
!=
0
)
{
sts
=
grow_FindObjectByName
(
dyn
->
graph
->
grow
->
ctx
,
next_horizontal
,
&
next
);
if
(
ODD
(
sts
))
{
next_inputfocus
=
this
;
while
(
!
found
)
{
if
(
strcmp
(
next_inputfocus
->
next_horizontal
,
""
)
!=
0
)
{
sts
=
grow_FindObjectByName
(
dyn
->
graph
->
grow
->
ctx
,
next_inputfocus
->
next_horizontal
,
&
next
);
if
(
EVEN
(
sts
))
break
;
// Check that this object can handle input focus
GeDyn
*
next_dyn
;
grow_GetUserData
(
next
,
(
void
**
)
&
next_dyn
);
if
(
next_dyn
->
total_action_type
&
ge_mActionType_InputFocus
)
found
=
1
;
if
(
next_dyn
->
total_action_type
&
ge_mActionType_InputFocus
)
{
for
(
GeDynElem
*
elem
=
next_dyn
->
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
action_type
==
ge_mActionType_InputFocus
)
{
next_inputfocus
=
(
GeInputFocus
*
)
elem
;
found
=
1
;
break
;
}
}
if
(
found
&&
grow_GetObjectVisibility
(
next
)
!=
glow_eVis_Visible
)
found
=
0
;
}
}
}
else
if
(
strcmp
(
next_tab
,
""
)
!=
0
)
{
sts
=
grow_FindObjectByName
(
dyn
->
graph
->
grow
->
ctx
,
next_tab
,
&
next
);
if
(
ODD
(
sts
))
{
else
if
(
strcmp
(
next_inputfocus
->
next_tab
,
""
)
!=
0
)
{
sts
=
grow_FindObjectByName
(
dyn
->
graph
->
grow
->
ctx
,
next_inputfocus
->
next_tab
,
&
next
);
if
(
EVEN
(
sts
))
break
;
// Check that this object can handle input focus
GeDyn
*
next_dyn
;
grow_GetUserData
(
next
,
(
void
**
)
&
next_dyn
);
if
(
next_dyn
->
total_action_type
&
ge_mActionType_InputFocus
)
found
=
1
;
if
(
next_dyn
->
total_action_type
&
ge_mActionType_InputFocus
)
{
for
(
GeDynElem
*
elem
=
next_dyn
->
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
action_type
==
ge_mActionType_InputFocus
)
{
next_inputfocus
=
(
GeInputFocus
*
)
elem
;
found
=
1
;
break
;
}
}
if
(
found
&&
grow_GetObjectVisibility
(
next
)
!=
glow_eVis_Visible
)
found
=
0
;
}
}
if
(
next_inputfocus
==
this
)
break
;
}
if
(
found
)
...
...
@@ -12244,32 +12270,33 @@ int GeInputFocus::action( grow_tObject object, glow_tEvent event)
case
glow_eEvent_Key_Tab
:
if
(
event
->
object
.
object_type
!=
glow_eObjectType_NoObject
)
{
found
=
0
;
if
(
strcmp
(
next_tab
,
""
)
!=
0
)
{
sts
=
grow_FindObjectByName
(
dyn
->
graph
->
grow
->
ctx
,
next_tab
,
&
next
);
if
(
ODD
(
sts
))
{
next_inputfocus
=
this
;
while
(
!
found
)
{
if
(
strcmp
(
next_inputfocus
->
next_tab
,
""
)
!=
0
)
{
sts
=
grow_FindObjectByName
(
dyn
->
graph
->
grow
->
ctx
,
next_inputfocus
->
next_tab
,
&
next
);
if
(
EVEN
(
sts
))
break
;
// Check that this object can handle input focus
GeDyn
*
next_dyn
;
grow_GetUserData
(
next
,
(
void
**
)
&
next_dyn
);
if
(
next_dyn
->
total_action_type
&
ge_mActionType_InputFocus
)
found
=
1
;
if
(
next_dyn
->
total_action_type
&
ge_mActionType_InputFocus
)
{
for
(
GeDynElem
*
elem
=
next_dyn
->
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
action_type
==
ge_mActionType_InputFocus
)
{
next_inputfocus
=
(
GeInputFocus
*
)
elem
;
found
=
1
;
break
;
}
}
if
(
found
&&
grow_GetObjectVisibility
(
next
)
!=
glow_eVis_Visible
)
found
=
0
;
}
}
if
(
next_inputfocus
==
this
)
break
;
}
if
(
found
)
{
grow_SetObjectInputFocus
(
next
,
1
,
event
->
event
);
// Mark this object as previous tab
if
(
grow_GetObjectType
(
next
)
==
glow_eObjectType_GrowNode
||
grow_GetObjectType
(
next
)
==
glow_eObjectType_GrowSlider
||
grow_GetObjectType
(
next
)
==
glow_eObjectType_GrowGroup
)
{
GeDyn
*
next_dyn
;
grow_GetUserData
(
next
,
(
void
**
)
&
next_dyn
);
for
(
GeDynElem
*
elem
=
next_dyn
->
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
action_type
==
ge_mActionType_InputFocus
)
{
((
GeInputFocus
*
)
elem
)
->
prev_tab
=
object
;
break
;
}
}
}
next_inputfocus
->
prev_tab
=
object
;
}
else
grow_SetObjectInputFocus
(
object
,
0
,
event
->
event
);
...
...
xtt/lib/glow/src/glow_array_elem.h
View file @
13109a4f
...
...
@@ -182,6 +182,7 @@ class GlowArrayElem {
virtual
void
set_original_color_shift
(
int
shift
)
{};
virtual
void
reset_color_shift
()
{};
virtual
void
set_visibility
(
glow_eVis
visibiliby
)
{};
virtual
glow_eVis
get_visibility
()
{
return
glow_eVis_Visible
;}
virtual
void
set_transform
(
GlowTransform
*
t
)
{};
virtual
void
set_transform_from_stored
(
GlowTransform
*
t
)
{};
virtual
void
store_transform
()
{};
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
13109a4f
...
...
@@ -4101,6 +4101,11 @@ void grow_SetObjectVisibility( grow_tObject object, glow_eVis visibility)
((
GlowArrayElem
*
)
object
)
->
set_visibility
(
visibility
);
}
glow_eVis
grow_GetObjectVisibility
(
grow_tObject
object
)
{
return
((
GlowArrayElem
*
)
object
)
->
get_visibility
();
}
void
grow_RotateSelectedObjects
(
grow_tCtx
ctx
,
double
angle
,
glow_eRotationPoint
type
)
{
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
13109a4f
...
...
@@ -1743,6 +1743,9 @@ extern "C" {
*/
void
grow_SetObjectVisibility
(
grow_tObject
object
,
glow_eVis
visibility
);
//! Get object visibility.
glow_eVis
grow_GetObjectVisibility
(
grow_tObject
object
);
//! Rotate selected objects.
/*!
\param ctx Grow context.
...
...
xtt/lib/glow/src/glow_grownode.cpp
View file @
13109a4f
...
...
@@ -2087,6 +2087,15 @@ int GrowNode::get_annotation_text_size( int num, double *tsize)
return
nc
->
get_annotation_text_size
(
&
trf
,
num
,
tsize
);
}
glow_eVis
GrowNode
::
get_visibility
()
{
if
(
invisible
)
return
glow_eVis_Invisible
;
if
(
dimmed
)
return
glow_eVis_Dimmed
;
return
glow_eVis_Visible
;
}
void
GrowNode
::
set_visibility
(
glow_eVis
visibility
)
{
switch
(
visibility
)
{
...
...
xtt/lib/glow/src/glow_grownode.h
View file @
13109a4f
...
...
@@ -532,6 +532,9 @@ class GrowNode : public GlowNode {
*/
void
set_visibility
(
glow_eVis
visibility
);
//! Get object visibility.
glow_eVis
get_visibility
();
//! Set position relative last stored transform.
/*!
\param x x coordinate.
...
...
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