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
5f9ff3c5
Commit
5f9ff3c5
authored
Feb 03, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java android app work
parent
e01bb94c
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
704 additions
and
571 deletions
+704
-571
java/aapp/app/src/AGraphInfo.java
java/aapp/app/src/AGraphInfo.java
+2
-0
java/aapp/app/src/AXttItemAttrObject.java
java/aapp/app/src/AXttItemAttrObject.java
+21
-0
java/aapp/app/src/FlowCmn.java
java/aapp/app/src/FlowCmn.java
+9
-6
java/aapp/app/src/FlowCon.java
java/aapp/app/src/FlowCon.java
+2
-2
java/aapp/app/src/FlowNode.java
java/aapp/app/src/FlowNode.java
+2
-2
java/aapp/app/src/GraphCmn.java
java/aapp/app/src/GraphCmn.java
+7
-0
java/aapp/app/src/OpwinCmn.java
java/aapp/app/src/OpwinCmn.java
+32
-12
java/aapp/app/src/PlowCmn.java
java/aapp/app/src/PlowCmn.java
+8
-1
java/aapp/app/src/PlowCmnIfc.java
java/aapp/app/src/PlowCmnIfc.java
+5
-0
java/aapp/app/src/PlowDraw.java
java/aapp/app/src/PlowDraw.java
+33
-8
java/aapp/app/src/PlowDrawIfc.java
java/aapp/app/src/PlowDrawIfc.java
+1
-1
java/aapp/app/src/PlowEvent.java
java/aapp/app/src/PlowEvent.java
+1
-0
java/aapp/app/src/PlowNode.java
java/aapp/app/src/PlowNode.java
+1
-1
java/aapp/jopg/src/GlowDraw.java
java/aapp/jopg/src/GlowDraw.java
+0
-1
java/aapp/jopg/src/GrowFrame.java
java/aapp/jopg/src/GrowFrame.java
+6
-249
java/aapp/pwrxtt/src/MainActivity.java
java/aapp/pwrxtt/src/MainActivity.java
+427
-277
java/jpwr/jopg/src/Dyn.java
java/jpwr/jopg/src/Dyn.java
+52
-3
java/jpwr/jopg/src/Glow.java
java/jpwr/jopg/src/Glow.java
+6
-0
java/jpwr/jopg/src/Graph.java
java/jpwr/jopg/src/Graph.java
+10
-1
java/jpwr/jopg/src/GraphApplIfc.java
java/jpwr/jopg/src/GraphApplIfc.java
+1
-0
java/jpwr/jopg/src/GraphIfc.java
java/jpwr/jopg/src/GraphIfc.java
+1
-0
java/jpwr/jopg/src/GrowCmn.java
java/jpwr/jopg/src/GrowCmn.java
+5
-1
java/jpwr/jopg/src/GrowCtx.java
java/jpwr/jopg/src/GrowCtx.java
+11
-0
java/jpwr/jopg/src/GrowCtxIfc.java
java/jpwr/jopg/src/GrowCtxIfc.java
+1
-0
java/jpwr/jopg/src/GrowScrollBar.java
java/jpwr/jopg/src/GrowScrollBar.java
+3
-0
java/jpwr/jopg/src/GrowWindow.java
java/jpwr/jopg/src/GrowWindow.java
+12
-4
src/tools/pkg/deb/src/os_templ/hw_templ/makefile
src/tools/pkg/deb/src/os_templ/hw_templ/makefile
+6
-0
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
+9
-0
xtt/lib/ge/src/ge_attrnav.cpp
xtt/lib/ge/src/ge_attrnav.cpp
+10
-0
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+10
-1
xtt/lib/glow/src/glow_ctx.cpp
xtt/lib/glow/src/glow_ctx.cpp
+4
-1
xtt/lib/glow/src/glow_ctx.h
xtt/lib/glow/src/glow_ctx.h
+1
-0
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+5
-0
No files found.
java/aapp/app/src/AGraphInfo.java
View file @
5f9ff3c5
...
@@ -4,6 +4,7 @@ import android.graphics.Bitmap;
...
@@ -4,6 +4,7 @@ import android.graphics.Bitmap;
public
class
AGraphInfo
{
public
class
AGraphInfo
{
public
Bitmap
bpm
;
public
Bitmap
bpm
;
public
Bitmap
bpmInverted
;
public
String
graph
;
public
String
graph
;
public
String
text
;
public
String
text
;
public
int
iconX
;
public
int
iconX
;
...
@@ -12,4 +13,5 @@ public class AGraphInfo {
...
@@ -12,4 +13,5 @@ public class AGraphInfo {
public
int
iconHeight
;
public
int
iconHeight
;
public
int
textX
;
public
int
textX
;
public
int
textY
;
public
int
textY
;
public
boolean
inverted
=
false
;
}
}
java/aapp/app/src/AXttItemAttrObject.java
View file @
5f9ff3c5
...
@@ -11,6 +11,8 @@ public class AXttItemAttrObject extends AXttItemBase {
...
@@ -11,6 +11,8 @@ public class AXttItemAttrObject extends AXttItemBase {
String
name
;
String
name
;
int
flags
;
int
flags
;
int
type
;
int
type
;
PwrtAttrRef
aref
;
AXttItemAttrObject
(
AXtt
axtt
,
PwrtObjid
objid
,
String
name
,
String
fullName
,
int
flags
,
int
type
,
AXttItemAttrObject
(
AXtt
axtt
,
PwrtObjid
objid
,
String
name
,
String
fullName
,
int
flags
,
int
type
,
PlowNode
destination
,
int
destCode
)
{
PlowNode
destination
,
int
destCode
)
{
...
@@ -20,9 +22,24 @@ public class AXttItemAttrObject extends AXttItemBase {
...
@@ -20,9 +22,24 @@ public class AXttItemAttrObject extends AXttItemBase {
this
.
flags
=
flags
;
this
.
flags
=
flags
;
this
.
type
=
type
;
this
.
type
=
type
;
CdhrAttrRef
ar
=
axtt
.
gdh
.
nameToAttrRef
(
fullName
);
if
(
ar
.
evenSts
())
return
;
aref
=
ar
.
aref
;
CdhrTypeId
cr
=
axtt
.
gdh
.
getAttrRefTid
(
ar
.
aref
);
if
(
cr
.
evenSts
())
return
;
CdhrObjid
coidret
=
axtt
.
gdh
.
classIdToObjid
(
cr
.
typeId
);
if
(
coidret
.
evenSts
())
return
;
CdhrString
cnameret
=
axtt
.
gdh
.
objidToName
(
coidret
.
objid
,
Cdh
.
mName_object
);
if
(
cnameret
.
evenSts
())
return
;
node
=
new
PlowNode
(
axtt
.
cmn
,
0
,
0
,
axtt
.
ncObject
);
node
=
new
PlowNode
(
axtt
.
cmn
,
0
,
0
,
axtt
.
ncObject
);
node
.
setAnnotPixmap
(
0
,
axtt
.
iconObject
);
node
.
setAnnotPixmap
(
0
,
axtt
.
iconObject
);
node
.
setAnnotation
(
0
,
name
,
22
);
node
.
setAnnotation
(
0
,
name
,
22
);
node
.
setAnnotation
(
1
,
cnameret
.
str
,
22
);
axtt
.
cmn
.
insertNode
(
node
,
destination
,
destCode
);
axtt
.
cmn
.
insertNode
(
node
,
destination
,
destCode
);
node
.
setUserData
(
this
);
node
.
setUserData
(
this
);
...
@@ -89,4 +106,8 @@ public class AXttItemAttrObject extends AXttItemBase {
...
@@ -89,4 +106,8 @@ public class AXttItemAttrObject extends AXttItemBase {
}
}
axtt
.
cmn
.
configure
();
axtt
.
cmn
.
configure
();
}
}
public
PwrtAttrRef
getAttrRef
()
{
return
aref
;
}
}
}
java/aapp/app/src/FlowCmn.java
View file @
5f9ff3c5
...
@@ -126,14 +126,14 @@ public class FlowCmn implements PlowCmnIfc {
...
@@ -126,14 +126,14 @@ public class FlowCmn implements PlowCmnIfc {
public
void
scroll
(
int
x
,
int
y
)
{
public
void
scroll
(
int
x
,
int
y
)
{
offset_y
+=
y
;
offset_y
+=
y
;
offset_x
+=
x
;
offset_x
+=
x
;
if
(
offset_x
<
x_left
*
zoom_factor
-
scrollOffset
)
offset_x
=
(
int
)(
x_left
*
zoom_factor
)
-
scrollOffset
;
if
(
offset_x
>
x_right
*
zoom_factor
-
canvasWidth
+
scrollOffset
)
if
(
offset_x
>
x_right
*
zoom_factor
-
canvasWidth
+
scrollOffset
)
offset_x
=
(
int
)(
x_right
*
zoom_factor
-
canvasWidth
)
+
scrollOffset
;
offset_x
=
(
int
)(
x_right
*
zoom_factor
-
canvasWidth
)
+
scrollOffset
;
if
(
offset_
y
<
y_low
*
zoom_factor
-
scrollOffset
)
if
(
offset_
x
<
x_left
*
zoom_factor
-
scrollOffset
)
offset_
y
=
(
int
)(
y_low
*
zoom_factor
)
-
scrollOffset
;
offset_
x
=
(
int
)(
x_left
*
zoom_factor
)
-
scrollOffset
;
if
(
offset_y
>
y_high
*
zoom_factor
-
canvasHeight
+
80
+
scrollOffset
)
if
(
offset_y
>
y_high
*
zoom_factor
-
canvasHeight
+
80
+
scrollOffset
)
offset_y
=
(
int
)(
y_high
*
zoom_factor
-
canvasHeight
+
80
)
+
scrollOffset
;
offset_y
=
(
int
)(
y_high
*
zoom_factor
-
canvasHeight
+
80
)
+
scrollOffset
;
if
(
offset_y
<
y_low
*
zoom_factor
-
scrollOffset
)
offset_y
=
(
int
)(
y_low
*
zoom_factor
)
-
scrollOffset
;
}
}
@Override
@Override
public
void
pageUp
()
{
public
void
pageUp
()
{
...
@@ -155,8 +155,11 @@ public class FlowCmn implements PlowCmnIfc {
...
@@ -155,8 +155,11 @@ public class FlowCmn implements PlowCmnIfc {
int
type
;
int
type
;
switch
(
action
)
{
switch
(
action
)
{
case
MotionEvent
.
ACTION_UP
:
case
PlowCmnIfc
.
ACTION_CLICK
:
type
=
PlowEvent
.
TYPE_CLICK
;
type
=
PlowEvent
.
TYPE_CLICK
;
break
;
case
PlowCmnIfc
.
ACTION_LONG_CLICK
:
type
=
PlowEvent
.
TYPE_LONG_CLICK
;
break
;
break
;
default
:
default
:
return
;
return
;
...
...
java/aapp/app/src/FlowCon.java
View file @
5f9ff3c5
...
@@ -227,8 +227,8 @@ public class FlowCon implements FlowArrayElem {
...
@@ -227,8 +227,8 @@ public class FlowCon implements FlowArrayElem {
public
void
draw
(
FlowPoint
p0
,
String
[]
annotv
,
boolean
highlight
)
{
public
void
draw
(
FlowPoint
p0
,
String
[]
annotv
,
boolean
highlight
)
{
// Adjust pos to javabean koordinates
// Adjust pos to javabean koordinates
FlowPoint
p
=
new
FlowPoint
(
cmn
);
FlowPoint
p
=
new
FlowPoint
(
cmn
);
p
.
x
=
x_left
/
cmn
.
zoom_factor
;
p
.
x
=
0
;
p
.
y
=
y_low
/
cmn
.
zoom_factor
;
p
.
y
=
0
;
if
(
temporary_ref
!=
0
||
cc
.
con_type
==
Flow
.
eConType_Reference
)
if
(
temporary_ref
!=
0
||
cc
.
con_type
==
Flow
.
eConType_Reference
)
ref_a
.
draw
(
p
,
null
,
highlight
);
ref_a
.
draw
(
p
,
null
,
highlight
);
else
{
else
{
...
...
java/aapp/app/src/FlowNode.java
View file @
5f9ff3c5
...
@@ -131,7 +131,7 @@ public class FlowNode implements FlowArrayElem {
...
@@ -131,7 +131,7 @@ public class FlowNode implements FlowArrayElem {
break
;
break
;
case
Flow
.
eSave_Node_n_name
:
case
Flow
.
eSave_Node_n_name
:
if
(
token
.
hasMoreTokens
())
if
(
token
.
hasMoreTokens
())
n_name
=
token
.
nextToken
();
n_name
=
token
.
nextToken
();
else
else
n_name
=
new
String
();
n_name
=
new
String
();
break
;
break
;
...
@@ -178,7 +178,7 @@ public class FlowNode implements FlowArrayElem {
...
@@ -178,7 +178,7 @@ public class FlowNode implements FlowArrayElem {
else
else
break
;
break
;
}
}
buf
.
append
(
c
);
// TODO convert to UTF-8
buf
.
append
(
c
);
c_old
=
c
;
c_old
=
c
;
}
}
annotv
[
i
]
=
new
String
(
buf
);
annotv
[
i
]
=
new
String
(
buf
);
...
...
java/aapp/app/src/GraphCmn.java
View file @
5f9ff3c5
...
@@ -139,4 +139,11 @@ public class GraphCmn implements PlowCmnIfc {
...
@@ -139,4 +139,11 @@ public class GraphCmn implements PlowCmnIfc {
public
void
resetNodraw
()
{
public
void
resetNodraw
()
{
graph
.
ctx
.
cmn
.
resetNodraw
();
graph
.
ctx
.
cmn
.
resetNodraw
();
}
}
public
int
getAppMotion
()
{
return
graph
.
cmn
.
getAppMotion
();
}
public
boolean
getSliderActive
()
{
return
graph
.
ctx
.
getSliderActive
();
}
}
}
java/aapp/app/src/OpwinCmn.java
View file @
5f9ff3c5
...
@@ -6,6 +6,7 @@ import jpwr.pwrxtt.MainActivity;
...
@@ -6,6 +6,7 @@ import jpwr.pwrxtt.MainActivity;
import
android.graphics.Canvas
;
import
android.graphics.Canvas
;
import
android.graphics.Paint
;
import
android.graphics.Paint
;
import
android.view.MotionEvent
;
public
class
OpwinCmn
implements
PlowCmnIfc
{
public
class
OpwinCmn
implements
PlowCmnIfc
{
Object
userData
;
Object
userData
;
...
@@ -17,10 +18,15 @@ public class OpwinCmn implements PlowCmnIfc {
...
@@ -17,10 +18,15 @@ public class OpwinCmn implements PlowCmnIfc {
int
canvasWidth
;
int
canvasWidth
;
int
offsetY
=
0
;
int
offsetY
=
0
;
int
borderY
=
0
;
int
borderY
=
0
;
AGraphInfo
currentGraph
=
null
;
double
downX
;
double
downY
;
float
density
;
public
OpwinCmn
(
MainActivity
appl
,
Vector
<
AGraphInfo
>
graphList
)
{
public
OpwinCmn
(
MainActivity
appl
,
Vector
<
AGraphInfo
>
graphList
,
float
density
)
{
this
.
graphList
=
graphList
;
this
.
graphList
=
graphList
;
this
.
appl
=
appl
;
this
.
appl
=
appl
;
this
.
density
=
density
;
}
}
public
int
type
()
{
public
int
type
()
{
return
TYPE_OPWIN
;
return
TYPE_OPWIN
;
...
@@ -41,10 +47,10 @@ public class OpwinCmn implements PlowCmnIfc {
...
@@ -41,10 +47,10 @@ public class OpwinCmn implements PlowCmnIfc {
if
(
graph
.
iconHeight
>
iconHeightMax
)
if
(
graph
.
iconHeight
>
iconHeightMax
)
iconHeightMax
=
graph
.
iconHeight
;
iconHeightMax
=
graph
.
iconHeight
;
}
}
int
offsetX
=
100
;
int
offsetX
=
(
int
)(
density
*
100
)
;
int
offsetY
=
100
;
int
offsetY
=
(
int
)(
density
*
100
)
;
int
distX
=
iconWidthMax
+
50
;
int
distX
=
iconWidthMax
+
(
int
)(
density
*
50
)
;
int
distY
=
iconHeightMax
+
70
;
int
distY
=
iconHeightMax
+
(
int
)(
density
*
70
)
;
int
x
=
offsetX
;
int
x
=
offsetX
;
int
y
=
offsetY
;
int
y
=
offsetY
;
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
...
@@ -52,7 +58,7 @@ public class OpwinCmn implements PlowCmnIfc {
...
@@ -52,7 +58,7 @@ public class OpwinCmn implements PlowCmnIfc {
graph
.
iconX
=
x
;
graph
.
iconX
=
x
;
graph
.
iconY
=
y
;
graph
.
iconY
=
y
;
graph
.
textX
=
graph
.
iconX
+
graph
.
iconWidth
/
2
;
graph
.
textX
=
graph
.
iconX
+
graph
.
iconWidth
/
2
;
graph
.
textY
=
graph
.
iconY
+
graph
.
iconHeight
+
15
;
graph
.
textY
=
graph
.
iconY
+
graph
.
iconHeight
+
(
int
)(
density
*
15
)
;
borderY
=
graph
.
textY
+
100
;
borderY
=
graph
.
textY
+
100
;
...
@@ -78,7 +84,12 @@ public class OpwinCmn implements PlowCmnIfc {
...
@@ -78,7 +84,12 @@ public class OpwinCmn implements PlowCmnIfc {
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
AGraphInfo
graph
=
graphList
.
get
(
i
);
AGraphInfo
graph
=
graphList
.
get
(
i
);
canvas
.
drawBitmap
(
graph
.
bpm
,
graph
.
iconX
,
graph
.
iconY
-
offsetY
,
p
);
if
(
graph
.
inverted
)
canvas
.
drawBitmap
(
graph
.
bpmInverted
,
graph
.
iconX
,
graph
.
iconY
-
offsetY
,
p
);
else
canvas
.
drawBitmap
(
graph
.
bpm
,
graph
.
iconX
,
graph
.
iconY
-
offsetY
,
p
);
p
.
setTextSize
(
density
*
15
);
int
textWidth
=
(
int
)
p
.
measureText
(
graph
.
text
);
int
textWidth
=
(
int
)
p
.
measureText
(
graph
.
text
);
canvas
.
drawText
(
graph
.
text
,
graph
.
textX
-
textWidth
/
2
,
graph
.
textY
-
offsetY
,
p
);
canvas
.
drawText
(
graph
.
text
,
graph
.
textX
-
textWidth
/
2
,
graph
.
textY
-
offsetY
,
p
);
}
}
...
@@ -100,14 +111,23 @@ public class OpwinCmn implements PlowCmnIfc {
...
@@ -100,14 +111,23 @@ public class OpwinCmn implements PlowCmnIfc {
public
void
pageDown
()
{}
public
void
pageDown
()
{}
public
void
eventHandler
(
int
action
,
double
fx
,
double
fy
)
{
public
void
eventHandler
(
int
action
,
double
fx
,
double
fy
)
{
switch
(
action
)
{
switch
(
action
)
{
case
PlowEvent
.
TYPE_CLICK
:
case
PlowCmnIfc
.
ACTION_UP
:
System
.
out
.
println
(
"Opwin click "
+
fx
+
" "
+
fy
);
if
(
currentGraph
!=
null
)
{
String
cmd
=
"open graph "
+
currentGraph
.
graph
;
if
(
Math
.
abs
(
fx
-
downX
)
<
10
&&
Math
.
abs
(
fy
-
downY
)
<
10
)
appl
.
command
(
cmd
);
currentGraph
.
inverted
=
false
;
currentGraph
=
null
;
}
break
;
case
PlowCmnIfc
.
ACTION_DOWN
:
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
graphList
.
size
();
i
++)
{
if
(
fx
>
graphList
.
get
(
i
).
iconX
&&
fx
<=
graphList
.
get
(
i
).
iconX
+
graphList
.
get
(
i
).
iconWidth
&&
if
(
fx
>
graphList
.
get
(
i
).
iconX
&&
fx
<=
graphList
.
get
(
i
).
iconX
+
graphList
.
get
(
i
).
iconWidth
&&
fy
>
graphList
.
get
(
i
).
iconY
-
offsetY
&&
fy
<=
graphList
.
get
(
i
).
iconY
+
graphList
.
get
(
i
).
iconHeight
-
offsetY
)
{
fy
>
graphList
.
get
(
i
).
iconY
-
offsetY
&&
fy
<=
graphList
.
get
(
i
).
iconY
+
graphList
.
get
(
i
).
iconHeight
-
offsetY
)
{
System
.
out
.
println
(
"Hit in icon"
);
currentGraph
=
graphList
.
get
(
i
);
String
cmd
=
"open graph "
+
graphList
.
get
(
i
).
graph
;
currentGraph
.
inverted
=
true
;
appl
.
command
(
cmd
);
downX
=
fx
;
downY
=
fy
;
}
}
}
}
break
;
break
;
...
...
java/aapp/app/src/PlowCmn.java
View file @
5f9ff3c5
...
@@ -77,11 +77,16 @@ public class PlowCmn implements PlowCmnIfc {
...
@@ -77,11 +77,16 @@ public class PlowCmn implements PlowCmnIfc {
double
x
=
(
fx
+
offset_x
)
/
zoom_factor
;
double
x
=
(
fx
+
offset_x
)
/
zoom_factor
;
double
y
=
(
fy
+
offset_y
)
/
zoom_factor
;
double
y
=
(
fy
+
offset_y
)
/
zoom_factor
;
int
type
;
int
type
;
boolean
long_click
=
false
;
switch
(
action
)
{
switch
(
action
)
{
case
MotionEvent
.
ACTION_UP
:
case
PlowCmnIfc
.
ACTION_CLICK
:
type
=
PlowEvent
.
TYPE_CLICK
;
type
=
PlowEvent
.
TYPE_CLICK
;
break
;
break
;
case
PlowCmnIfc
.
ACTION_LONG_CLICK
:
type
=
PlowEvent
.
TYPE_CLICK
;
long_click
=
true
;
break
;
default
:
default
:
return
;
return
;
}
}
...
@@ -92,6 +97,8 @@ public class PlowCmn implements PlowCmnIfc {
...
@@ -92,6 +97,8 @@ public class PlowCmn implements PlowCmnIfc {
currentNode
=
null
;
currentNode
=
null
;
a
.
eventHandler
(
e
);
a
.
eventHandler
(
e
);
if
(
long_click
)
e
.
type
=
PlowEvent
.
TYPE_LONG_CLICK
;
appl
.
eventHandler
(
e
);
appl
.
eventHandler
(
e
);
switch
(
e
.
type
)
{
switch
(
e
.
type
)
{
...
...
java/aapp/app/src/PlowCmnIfc.java
View file @
5f9ff3c5
...
@@ -8,6 +8,11 @@ public interface PlowCmnIfc {
...
@@ -8,6 +8,11 @@ public interface PlowCmnIfc {
public
static
final
int
TYPE_GRAPH
=
3
;
public
static
final
int
TYPE_GRAPH
=
3
;
public
static
final
int
TYPE_EV
=
4
;
public
static
final
int
TYPE_EV
=
4
;
public
static
final
int
TYPE_OPWIN
=
5
;
public
static
final
int
TYPE_OPWIN
=
5
;
public
static
final
int
ACTION_CLICK
=
0
;
public
static
final
int
ACTION_LONG_CLICK
=
1
;
public
static
final
int
ACTION_DOWN
=
2
;
public
static
final
int
ACTION_UP
=
3
;
public
int
type
();
public
int
type
();
public
Object
getUserData
();
public
Object
getUserData
();
...
...
java/aapp/app/src/PlowDraw.java
View file @
5f9ff3c5
...
@@ -10,6 +10,7 @@ import android.graphics.ColorMatrixColorFilter;
...
@@ -10,6 +10,7 @@ import android.graphics.ColorMatrixColorFilter;
import
android.graphics.Paint
;
import
android.graphics.Paint
;
import
android.graphics.Path
;
import
android.graphics.Path
;
import
android.graphics.RectF
;
import
android.graphics.RectF
;
import
android.graphics.Rect
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
public
class
PlowDraw
implements
PlowDrawIfc
{
public
class
PlowDraw
implements
PlowDrawIfc
{
...
@@ -26,12 +27,14 @@ public class PlowDraw implements PlowDrawIfc {
...
@@ -26,12 +27,14 @@ public class PlowDraw implements PlowDrawIfc {
Typeface
[]
fonts
=
new
Typeface
[
6
];
Typeface
[]
fonts
=
new
Typeface
[
6
];
int
canvasWidth
;
int
canvasWidth
;
int
canvasHeight
;
int
canvasHeight
;
float
textDensity
=
1
;
float
lineDensity
=
1
;
static
float
[]
inv
=
{
-
1
f
,
0
f
,
0
f
,
1
f
,
1
f
,
static
float
[]
inv
=
{
-
1
f
,
0
f
,
0
f
,
1
f
,
1
f
,
0
f
,-
1
f
,
0
f
,
1
f
,
1
f
,
0
f
,-
1
f
,
0
f
,
1
f
,
1
f
,
0
f
,
0
f
,-
1
f
,
1
f
,
1
f
,
0
f
,
0
f
,-
1
f
,
1
f
,
1
f
,
0
f
,
0
f
,
0
f
,
1
f
,
0
f
};
0
f
,
0
f
,
0
f
,
1
f
,
0
f
};
public
PlowDraw
(
Activity
activity
)
{
public
PlowDraw
(
Activity
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
paint
=
new
Paint
();
paint
=
new
Paint
();
...
@@ -61,7 +64,7 @@ public class PlowDraw implements PlowDrawIfc {
...
@@ -61,7 +64,7 @@ public class PlowDraw implements PlowDrawIfc {
if
(
border
)
{
if
(
border
)
{
paint
.
setColor
(
getColor
(
color
));
paint
.
setColor
(
getColor
(
color
));
paint
.
setStyle
(
Paint
.
Style
.
STROKE
);
paint
.
setStyle
(
Paint
.
Style
.
STROKE
);
paint
.
setStrokeWidth
(
1
);
paint
.
setStrokeWidth
(
lineDensity
<
1
?
1
:
lineDensity
);
canvas
.
drawRect
(
x1
,
y1
,
x2
,
y2
,
paint
);
canvas
.
drawRect
(
x1
,
y1
,
x2
,
y2
,
paint
);
}
}
else
{
else
{
...
@@ -78,7 +81,7 @@ public class PlowDraw implements PlowDrawIfc {
...
@@ -78,7 +81,7 @@ public class PlowDraw implements PlowDrawIfc {
if
(
border
)
{
if
(
border
)
{
paint
.
setColor
(
getColor
(
color
));
paint
.
setColor
(
getColor
(
color
));
paint
.
setStyle
(
Paint
.
Style
.
STROKE
);
paint
.
setStyle
(
Paint
.
Style
.
STROKE
);
paint
.
setStrokeWidth
(
1
);
paint
.
setStrokeWidth
(
lineDensity
<
1
?
1
:
lineDensity
);
canvas
.
drawArc
(
new
RectF
(
x1
,
y1
,
x2
,
y2
),
360
-
angel1
,
-
angel2
,
false
,
paint
);
canvas
.
drawArc
(
new
RectF
(
x1
,
y1
,
x2
,
y2
),
360
-
angel1
,
-
angel2
,
false
,
paint
);
}
}
else
{
else
{
...
@@ -93,7 +96,7 @@ public class PlowDraw implements PlowDrawIfc {
...
@@ -93,7 +96,7 @@ public class PlowDraw implements PlowDrawIfc {
paint
.
setColor
(
getColor
(
color
));
paint
.
setColor
(
getColor
(
color
));
paint
.
setStyle
(
Paint
.
Style
.
STROKE
);
paint
.
setStyle
(
Paint
.
Style
.
STROKE
);
paint
.
setStrokeWidth
(
1
);
paint
.
setStrokeWidth
(
lineDensity
<
1
?
1
:
lineDensity
);
canvas
.
drawLine
(
x1
,
y1
,
x2
,
y2
,
paint
);
canvas
.
drawLine
(
x1
,
y1
,
x2
,
y2
,
paint
);
}
}
...
@@ -114,16 +117,33 @@ public class PlowDraw implements PlowDrawIfc {
...
@@ -114,16 +117,33 @@ public class PlowDraw implements PlowDrawIfc {
@Override
@Override
public
void
drawText
(
String
text
,
int
textColor
,
int
textSize
,
int
font
,
float
x
,
float
y
)
{
public
void
drawText
(
String
text
,
int
textColor
,
int
textSize
,
int
font
,
float
x
,
float
y
)
{
paint
.
setTextSize
(
textSize
);
paint
.
setTextSize
(
text
Density
*
text
Size
);
paint
.
setTypeface
(
fonts
[
font
]);
paint
.
setTypeface
(
fonts
[
font
]);
paint
.
setColor
(
getColor
(
textColor
));
paint
.
setColor
(
getColor
(
textColor
));
paint
.
setStyle
(
Paint
.
Style
.
FILL
);
paint
.
setStyle
(
Paint
.
Style
.
FILL
);
canvas
.
drawText
(
text
,
x
,
y
,
paint
);
int
idx
;
if
(
(
idx
=
text
.
indexOf
(
'\n'
))
!=
-
1
)
{
Rect
tsize
=
new
Rect
();
paint
.
getTextBounds
(
"A"
,
0
,
1
,
tsize
);
String
row
=
text
.
substring
(
0
,
idx
);
String
rest
=
text
.
substring
(
idx
+
1
);
canvas
.
drawText
(
row
,
x
,
y
,
paint
);
while
(
(
idx
=
rest
.
indexOf
(
'\n'
))
!=
-
1
)
{
row
=
rest
.
substring
(
0
,
idx
);
rest
=
rest
.
substring
(
idx
+
1
);
y
+=
tsize
.
height
()
*
1.65
;
canvas
.
drawText
(
row
,
x
,
y
,
paint
);
}
}
else
canvas
.
drawText
(
text
,
x
,
y
,
paint
);
}
}
@Override
@Override
public
float
measureText
(
String
text
,
int
textSize
,
int
font
)
{
public
float
measureText
(
String
text
,
int
textSize
,
int
font
)
{
paint
.
setTextSize
(
textSize
);
paint
.
setTextSize
(
text
Density
*
text
Size
);
paint
.
setTypeface
(
null
);
paint
.
setTypeface
(
null
);
return
paint
.
measureText
(
text
);
return
paint
.
measureText
(
text
);
...
@@ -170,4 +190,9 @@ public class PlowDraw implements PlowDrawIfc {
...
@@ -170,4 +190,9 @@ public class PlowDraw implements PlowDrawIfc {
return
Color
.
BLACK
;
return
Color
.
BLACK
;
}
}
}
}
public
void
setDensity
(
float
textDensity
,
float
lineDensity
)
{
this
.
textDensity
=
textDensity
;
this
.
lineDensity
=
lineDensity
;
}
}
}
java/aapp/app/src/PlowDrawIfc.java
View file @
5f9ff3c5
...
@@ -13,5 +13,5 @@ public interface PlowDrawIfc {
...
@@ -13,5 +13,5 @@ public interface PlowDrawIfc {
public
int
getCanvasWidth
();
public
int
getCanvasWidth
();
public
int
getCanvasHeight
();
public
int
getCanvasHeight
();
public
void
setCanvas
(
Canvas
canvas
);
public
void
setCanvas
(
Canvas
canvas
);
public
void
setDensity
(
float
textDensity
,
float
lineDensity
);
}
}
java/aapp/app/src/PlowEvent.java
View file @
5f9ff3c5
...
@@ -3,6 +3,7 @@ package jpwr.app;
...
@@ -3,6 +3,7 @@ package jpwr.app;
public
class
PlowEvent
{
public
class
PlowEvent
{
public
static
final
int
TYPE_CLICK
=
1
;
public
static
final
int
TYPE_CLICK
=
1
;
public
static
final
int
TYPE_OBJECT_DELETED
=
2
;
public
static
final
int
TYPE_OBJECT_DELETED
=
2
;
public
static
final
int
TYPE_LONG_CLICK
=
3
;
public
int
type
;
public
int
type
;
public
double
x
;
public
double
x
;
...
...
java/aapp/app/src/PlowNode.java
View file @
5f9ff3c5
...
@@ -126,7 +126,7 @@ public class PlowNode implements PlowComponent, PlowArrayElem, PlowNodeIfc {
...
@@ -126,7 +126,7 @@ public class PlowNode implements PlowComponent, PlowArrayElem, PlowNodeIfc {
if
(
invert
==
this
.
invert
)
if
(
invert
==
this
.
invert
)
return
;
return
;
this
.
invert
=
invert
;
this
.
invert
=
invert
;
draw
();
//
draw();
}
}
public
void
configure
(
PlowNode
previous
)
{
public
void
configure
(
PlowNode
previous
)
{
...
...
java/aapp/jopg/src/GlowDraw.java
View file @
5f9ff3c5
...
@@ -69,7 +69,6 @@ public class GlowDraw implements GlowDrawIfc {
...
@@ -69,7 +69,6 @@ public class GlowDraw implements GlowDrawIfc {
public
GlowDraw
()
{
public
GlowDraw
()
{
paint
=
new
Paint
();
paint
=
new
Paint
();
}
}
public
void
setActivity
(
Activity
activity
)
{
public
void
setActivity
(
Activity
activity
)
{
...
...
java/aapp/jopg/src/GrowFrame.java
View file @
5f9ff3c5
...
@@ -38,174 +38,16 @@
...
@@ -38,174 +38,16 @@
package
jpwr.jopg
;
package
jpwr.jopg
;
import
jpwr.rt.*
;
import
jpwr.rt.*
;
import
java.io.*
;
import
java.io.*
;
//import java.awt.*;
//import java.awt.font.*;
import
java.net.*
;
import
java.net.*
;
public
class
GrowFrame
implements
GraphApplIfc
{
public
class
GrowFrame
implements
GraphApplIfc
{
/*
JScrollPane scrollPane;
JPanel contentPane;
BorderLayout borderLayout1 = new BorderLayout();
Dimension size;
Object root;
Graph graph;
Timer timer;
LocalPanel localPanel = new LocalPanel();
int scanTime = 1000;
int scanCount = 0;
JDialog confirmDia = null;
JLabel confirmLabel;
Object confirmDyn;
Object confirmObject;
*/
String
instance
;
String
instance
;
GrowFrameApplIfc
appl
;
GrowFrameApplIfc
appl
;
public
GrowFrame
(
String
file
,
Gdh
gdh
,
String
instance
,
GrowFrameApplIfc
appl
)
{
public
GrowFrame
(
String
file
,
Gdh
gdh
,
String
instance
,
GrowFrameApplIfc
appl
)
{
/*
root = (Object) this;
this.instance = instance;
this.appl = appl;
init( file, gdh);
*/
}
}
private
void
init
(
String
file
,
Gdh
gdh
)
{
private
void
init
(
String
file
,
Gdh
gdh
)
{
/*
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(borderLayout1);
contentPane.add(localPanel, BorderLayout.CENTER);
contentPane.setOpaque(true);
localPanel.setLayout(null);
localPanel.setOpaque(true);
localPanel.setBackground( Color.white);
this.setTitle("GrowFrame");
size = new Dimension( 1100, 900);
setSize( size);
String filename;
BufferedReader reader = null;
String fname = file;
if ( root != null && root instanceof JApplet) {
try {
URL current = ((JApplet) root).getCodeBase();
String current_str = current.toString();
int idx1 = current_str.lastIndexOf('/');
int idx2 = current_str.lastIndexOf(':');
int idx = idx1;
if ( idx2 > idx)
idx = idx2;
String path = current_str.substring(0,idx + 1);
filename = path + fname;
System.out.println( "Opening file " + filename);
URL fileURL = new URL( filename);
InputStream in = fileURL.openStream();
// in = new BufferedInputStream(in);
InputStreamReader r2 = new InputStreamReader(in);
reader = new BufferedReader( r2);
}
catch ( Exception e) {
System.out.println( "Unable to open file");
}
}
else {
if ( fname.lastIndexOf('/') == -1)
filename = "$pwrp_exe/" + fname;
else
filename = fname;
filename = Gdh.translateFilename( filename);
System.out.println( "Fname: " + filename);
try {
reader = new BufferedReader(new FileReader(filename));
}
catch ( Exception e) {
System.out.println( "Unable to open file " + filename);
return;
}
// Read size info
String line;
int defaultWidth = 0;
int defaultHeight = 0;
try {
for ( int i = 0; i < 2; i++) {
line = reader.readLine();
if ( line == null || !line.startsWith("0! "))
break;
if ( line.substring(3, 15).equals("DefaultWidth"))
defaultWidth = new Integer(line.substring(16)).intValue();
else if ( line.substring(3, 16).equals("DefaultHeight"))
defaultHeight = new Integer(line.substring(17)).intValue();
}
} catch ( Exception e) {
System.out.println( "IOException GlowFrame");
}
System.out.println("GraphFrame size " + defaultWidth + " " + defaultHeight);
if ( defaultWidth != 0 && defaultHeight != 0) {
size = new Dimension( defaultWidth + 5, defaultHeight + 40);
setSize( size);
}
}
if ( gdh == null)
gdh = new Gdh(this);
graph = new Graph(this, gdh);
graph.open(reader);
setSize();
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
setDefaultCloseOperation( DISPOSE_ON_CLOSE);
MouseAdapter adapter = new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
System.out.println("MouseListener");
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB1Click;
graph.ctx.eventHandler( event);
}
public void mousePressed(MouseEvent e) {
System.out.println("MouseListener");
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB1Down;
graph.ctx.eventHandler( event);
}
public void mouseReleased(MouseEvent e) {
System.out.println("MouseListener");
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_MB1Up;
graph.ctx.eventHandler( event);
}
public void mouseMoved(MouseEvent e) {
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_CursorMotion;
graph.ctx.eventHandler( event);
}
public void mouseDragged(MouseEvent e) {
GlowEvent event = new GlowEvent();
event.x = (e.getX() + graph.ctx.cmn.mw.offset_x) / graph.ctx.cmn.mw.zoom_factor_x;
event.y = (e.getY() + graph.ctx.cmn.mw.offset_y) / graph.ctx.cmn.mw.zoom_factor_y;
event.event = Glow.eEvent_ButtonMotion;
graph.ctx.eventHandler( event);
}
};
localPanel.addMouseListener(adapter);
localPanel.addMouseMotionListener(adapter);
timer = new Timer( scanTime, this);
timer.start();
*/
}
}
...
@@ -218,111 +60,23 @@ public class GrowFrame implements GraphApplIfc {
...
@@ -218,111 +60,23 @@ public class GrowFrame implements GraphApplIfc {
return
100
;
return
100
;
}
}
/*
public void actionPerformed( ActionEvent e) {
scanCount++;
if ( scanCount == 1)
graph.gdh.getObjectRefInfoAll();
graph.ctx.traceScan();
localPanel.repaint();
}
*/
void
setSize
()
{
void
setSize
()
{
/*
size = new Dimension( (int)((graph.ctx.cmn.x_right - graph.ctx.cmn.x_left) * graph.ctx.cmn.mw.zoom_factor_x) + Glow.DRAWOFFSET * 2,
(int)((graph.ctx.cmn.y_high - graph.ctx.cmn.y_low) * graph.ctx.cmn.mw.zoom_factor_y) + Glow.DRAWOFFSET * 2);
localPanel.setPreferredSize( size);
localPanel.revalidate();
*/
}
}
/*
class LocalPanel extends JPanel {
public LocalPanel() {}
public Dimension getPreferredSize() { return size;}
public Dimension getMinimumSize() { return size;}
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setPaint(graph.ctx.cmn.gdraw.getColor(graph.ctx.cmn.background_color));
g2.fill(new Rectangle2D.Double(0,0,getWidth(),getHeight()));
graph.gdraw.setGraphics(g2);
graph.ctx.draw();
}
}
*/
public
void
closeGrow
()
{
public
void
closeGrow
()
{
}
}
public
int
command
(
String
cmd
)
{
public
int
command
(
String
cmd
)
{
System
.
out
.
println
(
"Ge command : "
+
cmd
);
if
(
appl
!=
null
)
if
(
appl
!=
null
)
return
appl
.
command
(
cmd
);
return
appl
.
command
(
cmd
);
return
0
;
return
0
;
}
}
public
void
confirmNo
()
{}
public
void
confirmNo
()
{}
public
void
confirmYes
()
{
public
void
confirmYes
()
{}
// ((Dyn)confirmDyn).confirmedAction( Glow.eEvent_MB1Click, confirmObject);
public
void
openConfirmDialog
(
Object
dyn
,
String
text
,
Object
object
)
{}
}
public
void
openConfirmDialog
(
Object
dyn
,
String
text
,
Object
object
)
{
/*
JLabel label = null;
confirmDyn = dyn;
public
void
openValueInputDialog
(
Object
dyn
,
String
text
,
Object
object
)
{}
confirmObject = object;
if ( confirmDia == null) {
confirmDia = new JDialog();
confirmDia.setTitle("Confirm");
confirmDia.setResizable(false);
confirmDia.setDefaultCloseOperation( JDialog.DO_NOTHING_ON_CLOSE);
confirmDia.setSize( 400, 150);
confirmLabel = new JLabel( text, JLabel.CENTER);
confirmDia.getContentPane().setLayout( new BorderLayout());
confirmDia.getContentPane().add( confirmLabel, BorderLayout.CENTER);
JButton buttonYes = new JButton("Yes");
buttonYes.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent ev) {
confirmYes();
confirmDia.dispose();
}
});
JButton buttonNo = new JButton("No");
buttonNo.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent ev) {
confirmNo();
confirmDia.dispose();
}
});
JButton buttonCancel = new JButton("Cancel");
buttonCancel.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent ev) {
confirmNo();
confirmDia.dispose();
}
});
JPanel panel = new JPanel();
panel.add( buttonYes);
panel.add( buttonNo);
panel.add( buttonCancel);
confirmDia.getContentPane().add( panel, BorderLayout.SOUTH);
// confirmDia.setLocationRelativeTo( par);
confirmDia.setVisible( true);
}
else {
// confirmDia.setLocationRelativeTo( par);
confirmLabel.setText( text);
confirmDia.setVisible( true);
}
*/
}
public
void
openValueInputDialog
(
Object
dyn
,
String
text
,
Object
object
)
{
}
public
String
getObject
()
{
public
String
getObject
()
{
return
instance
;
return
instance
;
}
}
...
@@ -330,6 +84,9 @@ public class GrowFrame implements GraphApplIfc {
...
@@ -330,6 +84,9 @@ public class GrowFrame implements GraphApplIfc {
return
null
;
return
null
;
}
}
public
void
closeGraph
()
{}
public
void
closeGraph
()
{}
public
boolean
isAuthorized
(
int
access
)
{
return
false
;
}
}
}
...
...
java/aapp/pwrxtt/src/MainActivity.java
View file @
5f9ff3c5
This diff is collapsed.
Click to expand it.
java/jpwr/jopg/src/Dyn.java
View file @
5f9ff3c5
...
@@ -591,7 +591,7 @@ public class Dyn {
...
@@ -591,7 +591,7 @@ public class Dyn {
public
static
final
int
ePwrStatus_Error
=
3
;
public
static
final
int
ePwrStatus_Error
=
3
;
public
static
final
int
ePwrStatus_Fatal
=
4
;
public
static
final
int
ePwrStatus_Fatal
=
4
;
public
static
final
boolean
debug
=
fals
e
;
public
static
final
boolean
debug
=
tru
e
;
Vector
<
DynElem
>
elements
=
new
Vector
<
DynElem
>();
Vector
<
DynElem
>
elements
=
new
Vector
<
DynElem
>();
GraphIfc
graph
;
GraphIfc
graph
;
...
@@ -3174,6 +3174,9 @@ public class Dyn {
...
@@ -3174,6 +3174,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Click
:
case
Glow
.
eEvent_MB1Click
:
dyn
.
object
=
object
;
dyn
.
object
=
object
;
...
@@ -6361,6 +6364,9 @@ public class Dyn {
...
@@ -6361,6 +6364,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -6447,6 +6453,9 @@ public class Dyn {
...
@@ -6447,6 +6453,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -6533,14 +6542,19 @@ public class Dyn {
...
@@ -6533,14 +6542,19 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
dyn
.
repaintNow
=
true
;
dyn
.
repaintNow
=
true
;
dyn
.
graph
.
setClickActive
(
1
);
break
;
break
;
case
Glow
.
eEvent_MB1Up
:
case
Glow
.
eEvent_MB1Up
:
object
.
setColorInverse
(
0
);
object
.
setColorInverse
(
0
);
dyn
.
repaintNow
=
true
;
dyn
.
repaintNow
=
true
;
dyn
.
graph
.
setClickActive
(
0
);
break
;
break
;
case
Glow
.
eEvent_MB1Click
:
case
Glow
.
eEvent_MB1Click
:
if
(
(
dyn
.
action_type1
&
Dyn
.
mActionType1_Confirm
)
!=
0
)
if
(
(
dyn
.
action_type1
&
Dyn
.
mActionType1_Confirm
)
!=
0
)
...
@@ -6613,6 +6627,9 @@ public class Dyn {
...
@@ -6613,6 +6627,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
{
case
Glow
.
eEvent_MB1Down
:
{
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -6632,7 +6649,7 @@ public class Dyn {
...
@@ -6632,7 +6649,7 @@ public class Dyn {
break
;
break
;
}
}
if
(
sts
.
evenSts
())
if
(
sts
.
evenSts
())
System
.
out
.
println
(
"S
et
Dig: "
+
pname
.
name
);
System
.
out
.
println
(
"S
to
Dig: "
+
pname
.
name
);
break
;
break
;
}
}
case
Glow
.
eEvent_MB1Up
:
{
case
Glow
.
eEvent_MB1Up
:
{
...
@@ -6710,6 +6727,9 @@ public class Dyn {
...
@@ -6710,6 +6727,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -6783,6 +6803,9 @@ public class Dyn {
...
@@ -6783,6 +6803,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
object
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -6858,6 +6881,9 @@ public class Dyn {
...
@@ -6858,6 +6881,9 @@ public class Dyn {
if
(
(
dyn
.
action_type1
&
Dyn
.
mActionType1_Confirm
)
==
0
)
if
(
(
dyn
.
action_type1
&
Dyn
.
mActionType1_Confirm
)
==
0
)
return
1
;
return
1
;
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
break
;
break
;
...
@@ -6926,6 +6952,10 @@ public class Dyn {
...
@@ -6926,6 +6952,10 @@ public class Dyn {
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
GrowNode
object
=
(
GrowNode
)
o
;
GrowNode
object
=
(
GrowNode
)
o
;
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -7119,6 +7149,10 @@ public class Dyn {
...
@@ -7119,6 +7149,10 @@ public class Dyn {
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
GrowNode
object
=
(
GrowNode
)
o
;
GrowNode
object
=
(
GrowNode
)
o
;
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -7374,6 +7408,9 @@ public class Dyn {
...
@@ -7374,6 +7408,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
o
.
setColorInverse
(
1
);
o
.
setColorInverse
(
1
);
...
@@ -7466,6 +7503,9 @@ public class Dyn {
...
@@ -7466,6 +7503,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
GrowNode
object
=
(
GrowNode
)
o
;
GrowNode
object
=
(
GrowNode
)
o
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
...
@@ -7602,7 +7642,9 @@ public class Dyn {
...
@@ -7602,7 +7642,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
GrowNode
object
=
(
GrowNode
)
o
;
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Down
:
case
Glow
.
eEvent_MB1Down
:
object
.
setColorInverse
(
1
);
object
.
setColorInverse
(
1
);
...
@@ -8223,6 +8265,9 @@ public class Dyn {
...
@@ -8223,6 +8265,9 @@ public class Dyn {
}
}
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
GrowNode
object
=
(
GrowNode
)
o
;
GrowNode
object
=
(
GrowNode
)
o
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Click
:
case
Glow
.
eEvent_MB1Click
:
...
@@ -8859,6 +8904,10 @@ public class Dyn {
...
@@ -8859,6 +8904,10 @@ public class Dyn {
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
public
int
action
(
GlowArrayElem
o
,
GlowEvent
e
)
{
GrowNode
object
=
(
GrowNode
)
o
;
GrowNode
object
=
(
GrowNode
)
o
;
if
(
!
dyn
.
graph
.
isAuthorized
(
dyn
.
access
))
return
1
;
switch
(
e
.
event
)
{
switch
(
e
.
event
)
{
case
Glow
.
eEvent_MB1Click
:
case
Glow
.
eEvent_MB1Click
:
if
(
menu_object
!=
null
)
{
if
(
menu_object
!=
null
)
{
...
...
java/jpwr/jopg/src/Glow.java
View file @
5f9ff3c5
...
@@ -73,6 +73,7 @@ public class Glow {
...
@@ -73,6 +73,7 @@ public class Glow {
public
static
final
int
eType_AnnotType
=
21
;
public
static
final
int
eType_AnnotType
=
21
;
public
static
final
int
eType_DynType2
=
22
;
public
static
final
int
eType_DynType2
=
22
;
public
static
final
int
eType_ActionType2
=
23
;
public
static
final
int
eType_ActionType2
=
23
;
public
static
final
int
eType_AppMotion
=
24
;
public
static
final
int
eCtxType_Glow
=
0
;
public
static
final
int
eCtxType_Glow
=
0
;
public
static
final
int
eCtxType_Brow
=
1
;
public
static
final
int
eCtxType_Brow
=
1
;
...
@@ -243,6 +244,10 @@ public class Glow {
...
@@ -243,6 +244,10 @@ public class Glow {
public
static
final
int
eHotIndication_DarkColor
=
2
;
public
static
final
int
eHotIndication_DarkColor
=
2
;
public
static
final
int
eHotIndication_LightColor
=
3
;
public
static
final
int
eHotIndication_LightColor
=
3
;
public
static
final
int
eAppMotion_Scroll
=
0
;
public
static
final
int
eAppMotion_Slider
=
1
;
public
static
final
int
eAppMotion_Both
=
2
;
public
static
final
int
eDrawType_Line
=
0
;
public
static
final
int
eDrawType_Line
=
0
;
public
static
final
int
eDrawType_LineRed
=
1
;
public
static
final
int
eDrawType_LineRed
=
1
;
public
static
final
int
eDrawType_LineGray
=
2
;
public
static
final
int
eDrawType_LineGray
=
2
;
...
@@ -772,6 +777,7 @@ public class Glow {
...
@@ -772,6 +777,7 @@ public class Glow {
public
static
final
int
eSave_Ctx_version
=
137
;
public
static
final
int
eSave_Ctx_version
=
137
;
public
static
final
int
eSave_Ctx_hot_indication
=
138
;
public
static
final
int
eSave_Ctx_hot_indication
=
138
;
public
static
final
int
eSave_Ctx_tiptext_size
=
139
;
public
static
final
int
eSave_Ctx_tiptext_size
=
139
;
public
static
final
int
eSave_Ctx_app_motion
=
140
;
public
static
final
int
eSave_Ctx_comment
=
199
;
public
static
final
int
eSave_Ctx_comment
=
199
;
public
static
final
int
eSave_Array_a
=
200
;
public
static
final
int
eSave_Array_a
=
200
;
public
static
final
int
eSave_NodeClass_nc_name
=
300
;
public
static
final
int
eSave_NodeClass_nc_name
=
300
;
...
...
java/jpwr/jopg/src/Graph.java
View file @
5f9ff3c5
...
@@ -53,6 +53,7 @@ public class Graph implements GraphIfc, GrowApplIfc {
...
@@ -53,6 +53,7 @@ public class Graph implements GraphIfc, GrowApplIfc {
public
double
scan_time
=
1
;
public
double
scan_time
=
1
;
GrowCmn
[]
cmnStack
=
new
GrowCmn
[
10
];
GrowCmn
[]
cmnStack
=
new
GrowCmn
[
10
];
int
cmnStackCnt
=
0
;
int
cmnStackCnt
=
0
;
int
clickActive
=
0
;
public
Graph
(
GraphApplIfc
appl
,
Gdh
gdh
)
{
public
Graph
(
GraphApplIfc
appl
,
Gdh
gdh
)
{
this
.
appl
=
appl
;
this
.
appl
=
appl
;
...
@@ -504,7 +505,7 @@ public class Graph implements GraphIfc, GrowApplIfc {
...
@@ -504,7 +505,7 @@ public class Graph implements GraphIfc, GrowApplIfc {
}
}
public
boolean
isAuthorized
(
int
access
)
{
public
boolean
isAuthorized
(
int
access
)
{
return
true
;
return
appl
.
isAuthorized
(
access
)
;
}
}
public
double
getScanTime
()
{
public
double
getScanTime
()
{
...
@@ -538,4 +539,12 @@ public class Graph implements GraphIfc, GrowApplIfc {
...
@@ -538,4 +539,12 @@ public class Graph implements GraphIfc, GrowApplIfc {
ctx
=
(
GrowCtx
)
cmn
.
ctx
;
ctx
=
(
GrowCtx
)
cmn
.
ctx
;
}
}
}
}
public
void
setClickActive
(
int
active
)
{
clickActive
=
active
;
}
public
int
getClickActive
()
{
return
clickActive
;
}
}
}
java/jpwr/jopg/src/GraphApplIfc.java
View file @
5f9ff3c5
...
@@ -45,4 +45,5 @@ public interface GraphApplIfc {
...
@@ -45,4 +45,5 @@ public interface GraphApplIfc {
public
String
getObject
();
public
String
getObject
();
public
Object
loadGrowCtx
(
String
file
);
public
Object
loadGrowCtx
(
String
file
);
public
void
closeGraph
();
public
void
closeGraph
();
public
boolean
isAuthorized
(
int
access
);
}
}
java/jpwr/jopg/src/GraphIfc.java
View file @
5f9ff3c5
...
@@ -63,4 +63,5 @@ public interface GraphIfc {
...
@@ -63,4 +63,5 @@ public interface GraphIfc {
public
boolean
isAuthorized
(
int
access
);
public
boolean
isAuthorized
(
int
access
);
public
double
getScanTime
();
public
double
getScanTime
();
public
String
getCommand
(
String
cmd
);
public
String
getCommand
(
String
cmd
);
public
void
setClickActive
(
int
active
);
}
}
java/jpwr/jopg/src/GrowCmn.java
View file @
5f9ff3c5
...
@@ -99,6 +99,7 @@ public class GrowCmn {
...
@@ -99,6 +99,7 @@ public class GrowCmn {
int
translate_on
;
int
translate_on
;
int
input_focus_mark
;
int
input_focus_mark
;
int
hot_indication
;
int
hot_indication
;
int
app_motion
=
Glow
.
eAppMotion_Both
;
Object
userdata
;
Object
userdata
;
GlowArrayElem
callback_object
;
GlowArrayElem
callback_object
;
int
callback_object_type
;
int
callback_object_type
;
...
@@ -119,7 +120,7 @@ public class GrowCmn {
...
@@ -119,7 +120,7 @@ public class GrowCmn {
public
GrowCmn
(
GrowCtxIfc
ctx
,
GrowApplIfc
appl
)
{
public
GrowCmn
(
GrowCtxIfc
ctx
,
GrowApplIfc
appl
)
{
this
.
ctx
=
ctx
;
this
.
ctx
=
ctx
;
this
.
appl
=
appl
;
this
.
appl
=
appl
;
this
.
debug
=
fals
e
;
this
.
debug
=
tru
e
;
this
.
antiAliasing
=
true
;
this
.
antiAliasing
=
true
;
mw
.
window_width
=
getWidth
();
mw
.
window_width
=
getWidth
();
mw
.
window_height
=
getHeight
();
mw
.
window_height
=
getHeight
();
...
@@ -148,4 +149,7 @@ public class GrowCmn {
...
@@ -148,4 +149,7 @@ public class GrowCmn {
public
String
getOwner
()
{
public
String
getOwner
()
{
return
owner
;
return
owner
;
}
}
public
int
getAppMotion
()
{
return
app_motion
;
}
}
}
java/jpwr/jopg/src/GrowCtx.java
View file @
5f9ff3c5
...
@@ -140,6 +140,9 @@ public class GrowCtx implements GrowCtxIfc {
...
@@ -140,6 +140,9 @@ public class GrowCtx implements GrowCtxIfc {
break
;
break
;
case
Glow
.
eSave_Ctx_tiptext_size
:
case
Glow
.
eSave_Ctx_tiptext_size
:
break
;
break
;
case
Glow
.
eSave_Ctx_app_motion
:
cmn
.
app_motion
=
Integer
.
valueOf
(
token
.
nextToken
());
break
;
case
Glow
.
eSave_Ctx_grow
:
case
Glow
.
eSave_Ctx_grow
:
open_grow
(
reader
);
open_grow
(
reader
);
grow_loaded
=
true
;
grow_loaded
=
true
;
...
@@ -826,6 +829,14 @@ public class GrowCtx implements GrowCtxIfc {
...
@@ -826,6 +829,14 @@ public class GrowCtx implements GrowCtxIfc {
e
.
setSource
(
source
,
owner
);
e
.
setSource
(
source
,
owner
);
}
}
public
boolean
getSliderActive
()
{
return
sliderActive
;
}
public
void
setSliderActive
(
boolean
active
)
{
sliderActive
=
active
;
}
}
}
...
...
java/jpwr/jopg/src/GrowCtxIfc.java
View file @
5f9ff3c5
...
@@ -66,4 +66,5 @@ public interface GrowCtxIfc {
...
@@ -66,4 +66,5 @@ public interface GrowCtxIfc {
public
void
traceScan
();
public
void
traceScan
();
public
boolean
traceStarted
();
public
boolean
traceStarted
();
public
void
setSubwindowSource
(
String
name
,
String
source
,
String
owner
);
public
void
setSubwindowSource
(
String
name
,
String
source
,
String
owner
);
public
void
setSliderActive
(
boolean
active
);
}
}
java/jpwr/jopg/src/GrowScrollBar.java
View file @
5f9ff3c5
...
@@ -198,6 +198,7 @@ public class GrowScrollBar extends GrowRect {
...
@@ -198,6 +198,7 @@ public class GrowScrollBar extends GrowRect {
start_pos
=
fy
;
start_pos
=
fy
;
start_value
=
bar_value
;
start_value
=
bar_value
;
movement_active
=
1
;
movement_active
=
1
;
cmn
.
ctx
.
setSliderActive
(
true
);
}
}
break
;
break
;
case
Glow
.
eDir_Horizontal
:
case
Glow
.
eDir_Horizontal
:
...
@@ -206,12 +207,14 @@ public class GrowScrollBar extends GrowRect {
...
@@ -206,12 +207,14 @@ public class GrowScrollBar extends GrowRect {
start_pos
=
fx
;
start_pos
=
fx
;
start_value
=
bar_value
;
start_value
=
bar_value
;
movement_active
=
1
;
movement_active
=
1
;
cmn
.
ctx
.
setSliderActive
(
true
);
}
}
break
;
break
;
}
}
break
;
break
;
case
Glow
.
eEvent_MB1Up
:
case
Glow
.
eEvent_MB1Up
:
movement_active
=
0
;
movement_active
=
0
;
cmn
.
ctx
.
setSliderActive
(
false
);
break
;
break
;
case
Glow
.
eEvent_ButtonMotion
:
case
Glow
.
eEvent_ButtonMotion
:
if
(
movement_active
!=
0
)
{
if
(
movement_active
!=
0
)
{
...
...
java/jpwr/jopg/src/GrowWindow.java
View file @
5f9ff3c5
...
@@ -442,9 +442,13 @@ public class GrowWindow extends GrowRect implements GrowScrollBarIfc {
...
@@ -442,9 +442,13 @@ public class GrowWindow extends GrowRect implements GrowScrollBarIfc {
}
}
v_scrollbar
.
set_shadow
(
shadow
);
v_scrollbar
.
set_shadow
(
shadow
);
}
}
else
{
else
if
(
v_scrollbar
!=
null
)
{
if
(
windowCmn
!=
null
)
if
(
windowCmn
!=
null
)
{
v_scrollbar
.
set_range
(
wctx_y0
*
windowCmn
.
mw
.
subwindow_scale
,
wctx_y1
*
window_scale
);
v_scrollbar
.
set_value
(
wctx_y0
*
windowCmn
.
mw
.
subwindow_scale
,
y_high
-
(
y_low
+
y_low_offs
)
-
scrollbar_width
*
horizontal_scrollbar
);
v_value
=
wctx_y0
*
windowCmn
.
mw
.
subwindow_scale
;
v_value
=
wctx_y0
*
windowCmn
.
mw
.
subwindow_scale
;
}
}
}
if
(
horizontal_scrollbar
!=
0
&&
h_scrollbar
==
null
)
{
if
(
horizontal_scrollbar
!=
0
&&
h_scrollbar
==
null
)
{
...
@@ -467,9 +471,13 @@ public class GrowWindow extends GrowRect implements GrowScrollBarIfc {
...
@@ -467,9 +471,13 @@ public class GrowWindow extends GrowRect implements GrowScrollBarIfc {
}
}
h_scrollbar
.
set_shadow
(
shadow
);
h_scrollbar
.
set_shadow
(
shadow
);
}
}
else
{
else
if
(
h_scrollbar
!=
null
)
{
if
(
windowCmn
!=
null
)
if
(
windowCmn
!=
null
)
{
h_scrollbar
.
set_range
(
wctx_x0
*
windowCmn
.
mw
.
subwindow_scale
,
wctx_x1
*
windowCmn
.
mw
.
subwindow_scale
);
h_scrollbar
.
set_value
(
wctx_x0
*
windowCmn
.
mw
.
subwindow_scale
,
x_right
-
x_left
-
scrollbar_width
*
vertical_scrollbar
);
h_value
=
wctx_x0
*
windowCmn
.
mw
.
subwindow_scale
;
h_value
=
wctx_x0
*
windowCmn
.
mw
.
subwindow_scale
;
}
}
}
}
}
...
...
src/tools/pkg/deb/src/os_templ/hw_templ/makefile
View file @
5f9ff3c5
...
@@ -30,6 +30,7 @@ copy :
...
@@ -30,6 +30,7 @@ copy :
lib
:
lib
:
exe
:
$(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo $(bld_dir)/control_pwrsev
exe
:
$(bld_dir)/control_pwrrt $(bld_dir)/control_pwr $(bld_dir)/control_pwrdemo $(bld_dir)/control_pwrsev
rpi
:
$(bld_dir)/control_pwrrpi
clean
:
clean
:
...
@@ -60,5 +61,10 @@ $(bld_dir)/control_pwrsev : ../../../pwrsev/control
...
@@ -60,5 +61,10 @@ $(bld_dir)/control_pwrsev : ../../../pwrsev/control
@
../../../pwrsev/build.sh
@
../../../pwrsev/build.sh
@
cp
$(source)
$(target)
@
cp
$(source)
$(target)
$(bld_dir)/control_pwrrpi
:
../../../pwrrpi/control
@
echo
"build
$(target)
"
@
../../../pwrrpi/build.sh
@
cp
$(source)
$(target)
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
View file @
5f9ff3c5
...
@@ -329,6 +329,15 @@ SObject pwrb:Class
...
@@ -329,6 +329,15 @@ SObject pwrb:Class
Attr Flags = 0
Attr Flags = 0
EndBody
EndBody
EndObject
EndObject
!/**
! If AppUseWebDir is set all files used by the Android application is
! read from pwrp_web.
!*/
Object AppUseWebDir $Attribute 42
Body SysBody
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
EndObject
EndObject
!
!
! Template for WebHandler
! Template for WebHandler
...
...
xtt/lib/ge/src/ge_attrnav.cpp
View file @
5f9ff3c5
...
@@ -862,6 +862,12 @@ static attrnav_sEnumElement elem_hot_indication[] = {
...
@@ -862,6 +862,12 @@ static attrnav_sEnumElement elem_hot_indication[] = {
{
(
int
)
glow_eHotIndication_LightColor
,
"LightColor"
},
{
(
int
)
glow_eHotIndication_LightColor
,
"LightColor"
},
{
0
,
""
}};
{
0
,
""
}};
static
attrnav_sEnumElement
elem_app_motion
[]
=
{
{
(
int
)
glow_eAppMotion_Scroll
,
"Scroll"
},
{
(
int
)
glow_eAppMotion_Slider
,
"Slider"
},
{
(
int
)
glow_eAppMotion_Both
,
"Both"
},
{
0
,
""
}};
static
attrnav_sEnumElement
elem_annot_type
[]
=
{
static
attrnav_sEnumElement
elem_annot_type
[]
=
{
{
(
int
)
glow_eAnnotType_OneLine
,
"OneLine"
},
{
(
int
)
glow_eAnnotType_OneLine
,
"OneLine"
},
{
(
int
)
glow_eAnnotType_MultiLine
,
"MultiLine"
},
{
(
int
)
glow_eAnnotType_MultiLine
,
"MultiLine"
},
...
@@ -995,6 +1001,7 @@ static attrnav_sEnum enum_types[] = {
...
@@ -995,6 +1001,7 @@ static attrnav_sEnum enum_types[] = {
{
(
int
)
ge_eAttrType_CurveDataType
,
(
attrnav_sEnumElement
*
)
&
elem_curve_datatype
},
{
(
int
)
ge_eAttrType_CurveDataType
,
(
attrnav_sEnumElement
*
)
&
elem_curve_datatype
},
{
(
int
)
glow_eType_Gradient
,
(
attrnav_sEnumElement
*
)
&
elem_gradient
},
{
(
int
)
glow_eType_Gradient
,
(
attrnav_sEnumElement
*
)
&
elem_gradient
},
{
(
int
)
glow_eType_HotIndication
,
(
attrnav_sEnumElement
*
)
&
elem_hot_indication
},
{
(
int
)
glow_eType_HotIndication
,
(
attrnav_sEnumElement
*
)
&
elem_hot_indication
},
{
(
int
)
glow_eType_AppMotion
,
(
attrnav_sEnumElement
*
)
&
elem_app_motion
},
{
(
int
)
glow_eType_AnnotType
,
(
attrnav_sEnumElement
*
)
&
elem_annot_type
},
{
(
int
)
glow_eType_AnnotType
,
(
attrnav_sEnumElement
*
)
&
elem_annot_type
},
{
(
int
)
ge_eAttrType_OptionMenuType
,
(
attrnav_sEnumElement
*
)
&
elem_optionmenu_type
},
{
(
int
)
ge_eAttrType_OptionMenuType
,
(
attrnav_sEnumElement
*
)
&
elem_optionmenu_type
},
{
0
,
NULL
}};
{
0
,
NULL
}};
...
@@ -1063,6 +1070,7 @@ int attrnav_attr_string_to_value( int type_id, char *value_str,
...
@@ -1063,6 +1070,7 @@ int attrnav_attr_string_to_value( int type_id, char *value_str,
case
glow_eType_TextSize
:
case
glow_eType_TextSize
:
case
glow_eType_Gradient
:
case
glow_eType_Gradient
:
case
glow_eType_HotIndication
:
case
glow_eType_HotIndication
:
case
glow_eType_AppMotion
:
case
ge_eAttrType_DynType1
:
case
ge_eAttrType_DynType1
:
case
ge_eAttrType_DynType2
:
case
ge_eAttrType_DynType2
:
case
ge_eAttrType_DynTypeTone
:
case
ge_eAttrType_DynTypeTone
:
...
@@ -1150,6 +1158,7 @@ void attrnav_attrvalue_to_string( int type_id, void *value_ptr,
...
@@ -1150,6 +1158,7 @@ void attrnav_attrvalue_to_string( int type_id, void *value_ptr,
case
glow_eType_TextSize
:
case
glow_eType_TextSize
:
case
glow_eType_Gradient
:
case
glow_eType_Gradient
:
case
glow_eType_HotIndication
:
case
glow_eType_HotIndication
:
case
glow_eType_AppMotion
:
case
ge_eAttrType_AnimSequence
:
case
ge_eAttrType_AnimSequence
:
case
ge_eAttrType_LimitType
:
case
ge_eAttrType_LimitType
:
case
ge_eAttrType_ScaleType
:
case
ge_eAttrType_ScaleType
:
...
@@ -2235,6 +2244,7 @@ ItemLocal::ItemLocal( AttrNav *attrnav, const char *item_name, const char *attr,
...
@@ -2235,6 +2244,7 @@ ItemLocal::ItemLocal( AttrNav *attrnav, const char *item_name, const char *attr,
case
glow_eType_TextSize
:
case
glow_eType_TextSize
:
case
glow_eType_Gradient
:
case
glow_eType_Gradient
:
case
glow_eType_HotIndication
:
case
glow_eType_HotIndication
:
case
glow_eType_AppMotion
:
case
ge_eAttrType_DynType1
:
case
ge_eAttrType_DynType1
:
case
ge_eAttrType_DynType2
:
case
ge_eAttrType_DynType2
:
case
ge_eAttrType_DynTypeTone
:
case
ge_eAttrType_DynTypeTone
:
...
...
xtt/lib/glow/src/glow.h
View file @
5f9ff3c5
...
@@ -101,7 +101,8 @@ typedef enum {
...
@@ -101,7 +101,8 @@ typedef enum {
glow_eType_HotIndication
,
//!< Type is glow_eHotIndication
glow_eType_HotIndication
,
//!< Type is glow_eHotIndication
glow_eType_AnnotType
,
//!< Type is glow_eAnnotType
glow_eType_AnnotType
,
//!< Type is glow_eAnnotType
glow_eType_DynType2
,
//!< Type of dynamics mask 2
glow_eType_DynType2
,
//!< Type of dynamics mask 2
glow_eType_ActionType2
//!< Type of action mask 2
glow_eType_ActionType2
,
//!< Type of action mask 2
glow_eType_AppMotion
//!< Type is glow_eAppMotion
}
glow_eType
;
}
glow_eType
;
//! Type of Ctx class
//! Type of Ctx class
...
@@ -409,6 +410,13 @@ typedef enum {
...
@@ -409,6 +410,13 @@ typedef enum {
glow_eHotIndication_LightColor
//!< Lighter color for hot objects
glow_eHotIndication_LightColor
//!< Lighter color for hot objects
}
glow_eHotIndication
;
}
glow_eHotIndication
;
//! Action for app motion event
typedef
enum
{
glow_eAppMotion_Scroll
,
//!< Scrolling
glow_eAppMotion_Slider
,
//!< Slider
glow_eAppMotion_Both
//!< Both slider and scrolling
}
glow_eAppMotion
;
//! Color index for a color
//! Color index for a color
/*! The drawtype is index in an array that contains the gc for colors in the color palette.
/*! The drawtype is index in an array that contains the gc for colors in the color palette.
...
@@ -1128,6 +1136,7 @@ typedef enum {
...
@@ -1128,6 +1136,7 @@ typedef enum {
glow_eSave_Ctx_version
=
137
,
glow_eSave_Ctx_version
=
137
,
glow_eSave_Ctx_hot_indication
=
138
,
glow_eSave_Ctx_hot_indication
=
138
,
glow_eSave_Ctx_tiptext_size
=
139
,
glow_eSave_Ctx_tiptext_size
=
139
,
glow_eSave_Ctx_app_motion
=
140
,
glow_eSave_Ctx_comment
=
199
,
glow_eSave_Ctx_comment
=
199
,
glow_eSave_Array_a
=
200
,
glow_eSave_Array_a
=
200
,
glow_eSave_NodeClass_nc_name
=
300
,
glow_eSave_NodeClass_nc_name
=
300
,
...
...
xtt/lib/glow/src/glow_ctx.cpp
View file @
5f9ff3c5
...
@@ -98,7 +98,8 @@ GlowCtx::GlowCtx( const char *ctx_name, double zoom_fact, int offs_x, int offs_y
...
@@ -98,7 +98,8 @@ GlowCtx::GlowCtx( const char *ctx_name, double zoom_fact, int offs_x, int offs_y
default_hot_mode
(
glow_eHotMode_SingleObject
),
hot_found
(
0
),
default_hot_mode
(
glow_eHotMode_SingleObject
),
hot_found
(
0
),
userdata_save_callback
(
0
),
userdata_open_callback
(
0
),
userdata_copy_callback
(
0
),
userdata_save_callback
(
0
),
userdata_open_callback
(
0
),
userdata_copy_callback
(
0
),
version
(
GLOW_VERSION
),
inputfocus_object
(
0
),
is_component
(
0
),
comment
(
0
),
version
(
GLOW_VERSION
),
inputfocus_object
(
0
),
is_component
(
0
),
comment
(
0
),
hot_indication
(
glow_eHotIndication_LightColor
),
tiptext_size
(
2
),
eventlog_callback
(
0
)
hot_indication
(
glow_eHotIndication_LightColor
),
tiptext_size
(
2
),
app_motion
(
glow_eAppMotion_Both
),
eventlog_callback
(
0
)
{
{
strcpy
(
name
,
ctx_name
);
strcpy
(
name
,
ctx_name
);
memset
(
(
void
*
)
event_callback
,
0
,
sizeof
(
event_callback
));
memset
(
(
void
*
)
event_callback
,
0
,
sizeof
(
event_callback
));
...
@@ -214,6 +215,7 @@ int GlowCtx::save( char *filename, glow_eSaveMode mode)
...
@@ -214,6 +215,7 @@ int GlowCtx::save( char *filename, glow_eSaveMode mode)
fp
<<
int
(
glow_eSave_Ctx_version
)
<<
FSPACE
<<
version
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_version
)
<<
FSPACE
<<
version
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_hot_indication
)
<<
FSPACE
<<
hot_indication
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_hot_indication
)
<<
FSPACE
<<
hot_indication
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_tiptext_size
)
<<
FSPACE
<<
tiptext_size
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_tiptext_size
)
<<
FSPACE
<<
tiptext_size
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_app_motion
)
<<
FSPACE
<<
app_motion
<<
endl
;
if
(
ctx_type
==
glow_eCtxType_Grow
)
if
(
ctx_type
==
glow_eCtxType_Grow
)
{
{
fp
<<
int
(
glow_eSave_Ctx_grow
)
<<
endl
;
fp
<<
int
(
glow_eSave_Ctx_grow
)
<<
endl
;
...
@@ -361,6 +363,7 @@ int GlowCtx::open( char *filename, glow_eSaveMode mode)
...
@@ -361,6 +363,7 @@ int GlowCtx::open( char *filename, glow_eSaveMode mode)
case
glow_eSave_Ctx_version
:
fp
>>
version
;
break
;
case
glow_eSave_Ctx_version
:
fp
>>
version
;
break
;
case
glow_eSave_Ctx_hot_indication
:
fp
>>
tmp
;
hot_indication
=
(
glow_eHotIndication
)
tmp
;
break
;
case
glow_eSave_Ctx_hot_indication
:
fp
>>
tmp
;
hot_indication
=
(
glow_eHotIndication
)
tmp
;
break
;
case
glow_eSave_Ctx_tiptext_size
:
fp
>>
tiptext_size
;
break
;
case
glow_eSave_Ctx_tiptext_size
:
fp
>>
tiptext_size
;
break
;
case
glow_eSave_Ctx_app_motion
:
fp
>>
tmp
;
app_motion
=
(
glow_eAppMotion
)
tmp
;
break
;
case
glow_eSave_Ctx_grow
:
case
glow_eSave_Ctx_grow
:
((
GrowCtx
*
)
this
)
->
open_grow
(
fp
);
((
GrowCtx
*
)
this
)
->
open_grow
(
fp
);
grow_loaded
=
1
;
grow_loaded
=
1
;
...
...
xtt/lib/glow/src/glow_ctx.h
View file @
5f9ff3c5
...
@@ -847,6 +847,7 @@ class GlowCtx {
...
@@ -847,6 +847,7 @@ class GlowCtx {
CtxComment
*
comment
;
CtxComment
*
comment
;
glow_eHotIndication
hot_indication
;
//!< Specification of how hots object should be drawn.
glow_eHotIndication
hot_indication
;
//!< Specification of how hots object should be drawn.
int
tiptext_size
;
//!< Size of tooltip text
int
tiptext_size
;
//!< Size of tooltip text
glow_eAppMotion
app_motion
;
//!< Action for app motion event.
glow_tEventLogCb
eventlog_callback
;
//!< Callback function to log events.
glow_tEventLogCb
eventlog_callback
;
//!< Callback function to log events.
static
int
eventlog_enabled
;
//!< Event logging enabled.
static
int
eventlog_enabled
;
//!< Event logging enabled.
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
5f9ff3c5
...
@@ -3261,6 +3261,11 @@ int grow_GetGraphAttrInfo( grow_tCtx ctx, grow_sAttrInfo **info,
...
@@ -3261,6 +3261,11 @@ int grow_GetGraphAttrInfo( grow_tCtx ctx, grow_sAttrInfo **info,
attrinfo
[
i
].
type
=
glow_eType_TextSize
;
attrinfo
[
i
].
type
=
glow_eType_TextSize
;
attrinfo
[
i
++
].
size
=
sizeof
(
ctx
->
tiptext_size
);
attrinfo
[
i
++
].
size
=
sizeof
(
ctx
->
tiptext_size
);
strcpy
(
attrinfo
[
i
].
name
,
"AppMotion"
);
attrinfo
[
i
].
value_p
=
&
ctx
->
app_motion
;
attrinfo
[
i
].
type
=
glow_eType_AppMotion
;
attrinfo
[
i
++
].
size
=
sizeof
(
ctx
->
app_motion
);
attrinfo
[
i
].
info_type
=
grow_eInfoType_End
;
attrinfo
[
i
].
info_type
=
grow_eInfoType_End
;
*
attr_cnt
=
i
;
*
attr_cnt
=
i
;
*
info
=
attrinfo
;
*
info
=
attrinfo
;
...
...
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