Skip to content

Commit cf1782b

Browse files
bulantsevajoaesilevichflangel
authored
Scade2 (#5)
* Removed all examples. * Added AppInApp example. * Added Gesture example. * Added CryptoSwift example. * Added UgTiles example. * Added Map example. * Added modal window example. * Added swift foundation example. * Added Clock example. * Added ProgrammaticUI example. * Added Master Pages demo. * Added Kyle1 example. * Added text example. * Added logging example. * Added Calculator example. * Added SQLite example. * Added Bitmap example. * Updated SQLite package.swift. * Updated UgCalculator package.swift. * Added proxies. * Added ListControl example. * UgCalculator: removed Expression library from list of libraries for IOS (NM-876) We don't need it in the list of libraries after switching build to SPM * UgSqlLiteSwift: removed SQLite library from list of libraries for IOS in build file (NM-875) We don't need it after switching IOS build to SPM * Updated Package.swift file. * Updated Package.swift files and fixed CryptoSwift example. * Fixed URL to download dependent library without problem * Fixed UgMasterPageDemo. Removed explicit references and used onClick short code * Removed binding for result value. * Updated UgBitmap example. * Updated UgListControl example. * Updated UgMap example. * Updated Text example. * Updated ModalDialogDemo example. * Updated SwiftFoundation example. * Updated AppInApp application. * Updated Kyle1 example. * Updated Calculator example. * Updated CryptoSwift example. * Updated gesture example. * Updated page container example. * Updated programmatic creation example. * Updated SQLite example. * Added new UgSlider demo * Polished List Control demo * Updated UgTilesMenu example. * Small fix for UgTilesMenu example. * Updated spacings in UgTilesMenu example. * Small changes UgTiles example. * Updates UgSwissClock example. * Updated UgMasterPages example. * Uodated gesture example. * Updated gesture example. * Updated CryptoSwift example. * Updated matchParent function name Co-authored-by: Alexander Esilevich <[email protected]> Co-authored-by: flangel <[email protected]>
1 parent d22b487 commit cf1782b

File tree

353 files changed

+6105
-12456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+6105
-12456
lines changed

Kyle1/.project

-17
This file was deleted.

Kyle1/.settings/com.scade.sdk.core.prefs

-14
This file was deleted.

Kyle1/CMakeLists.txt

-10
This file was deleted.

Kyle1/Package.swift

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// swift-tools-version:5.3
2+
3+
import PackageDescription
4+
import Foundation
5+
6+
let SCADE_SDK = ProcessInfo.processInfo.environment["SCADE_SDK"] ?? ""
7+
8+
let package = Package(
9+
name: "Kyle1",
10+
platforms: [
11+
.macOS(.v10_14)
12+
],
13+
products: [
14+
.library(
15+
name: "Kyle1",
16+
type: .static,
17+
targets: [
18+
"Kyle1"
19+
]
20+
)
21+
],
22+
dependencies: [
23+
24+
],
25+
targets: [
26+
.target(
27+
name: "Kyle1",
28+
dependencies: [],
29+
exclude: ["main.page"],
30+
swiftSettings: [
31+
.unsafeFlags(["-F", SCADE_SDK], .when(platforms: [.macOS, .iOS])),
32+
.unsafeFlags(["-I", "\(SCADE_SDK)/include"], .when(platforms: [.android])),
33+
]
34+
)
35+
]
36+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import ScadeKit
2+
3+
extension MainPageAdapter {
4+
var grid1: SCDWidgetsGridView {
5+
return self.page?.getWidgetByName("grid1") as! SCDWidgetsGridView
6+
}
7+
}

Kyle1/Sources/Kyle1/main.page

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<xmi:XMI xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0" xmlns:binding="http://scade.com/sdk/data/binding" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:graphics="http://scade.com/sdk/view/graphics" xmlns:layout="http://scade.com/sdk/layout" xmlns:navigation="http://scade.com/lattice/navigation" xmlns:widgets="http://scade.com/sdk/view/widgets">
3+
<widgets:Page name="main">
4+
<children xsi:type="widgets:GridView" name="grid1">
5+
<layout xsi:type="layout:GridLayout" marginTop="5" marginBottom="5" marginLeft="5" marginRight="5"/>
6+
<maxArea xsi:type="graphics:Dimension" width="-1" height="-1"/>
7+
<size xsi:type="graphics:Dimension" width="320" height="480"/>
8+
<location xsi:type="graphics:Point"/>
9+
<minArea xsi:type="graphics:Dimension"/>
10+
<layoutData xsi:type="layout:GridData" grabHorizontalSpace="true" widthConstraint="MATCH_PARENT" grabVerticalSpace="true" heightConstraint="MATCH_PARENT"/>
11+
</children>
12+
<layout xsi:type="layout:GridLayout"/>
13+
<maxArea xsi:type="graphics:Dimension" width="320" height="480"/>
14+
<location xsi:type="graphics:Point"/>
15+
<minArea xsi:type="graphics:Dimension" width="320" height="480"/>
16+
<size xsi:type="graphics:Dimension" width="320" height="480"/>
17+
</widgets:Page>
18+
<binding:BindingModel/>
19+
<navigation:Navigation page="/0"/>
20+
</xmi:XMI>

Kyle1/Sources/Kyle1/main.page.svg

+10
Loading

Kyle1/src/main.page.swift renamed to Kyle1/Sources/Kyle1/main.page.swift

+6-11
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,16 @@ let whiteColor = SCDGraphicsRGB(red:241,green:241,blue:241)
77
let orangeColor = SCDGraphicsRGB(red:255,green:127,blue:80)
88

99
class MainPageAdapter: SCDLatticePageAdapter {
10-
11-
var grid : SCDWidgetsGridView?
1210

1311
// page adapter initialization
1412
override func load(_ path: String) {
1513
super.load(path)
1614

17-
// get grid
18-
self.grid = self.page!.getWidgetByName("grid1") as? SCDWidgetsGridView
19-
2015
// set matrix size
2116
let (columns,rows) = (UInt(20),UInt(4))
2217

2318
// set grid size
24-
self.grid!.setGridSize(to:(columns,rows))
19+
grid1.setGridSize(to:(columns,rows))
2520

2621
// populate grid
2722
self.populateGrid(columns:columns,rows:rows)
@@ -31,7 +26,7 @@ class MainPageAdapter: SCDLatticePageAdapter {
3126
for c in (0..<columns) {
3227
for r in (0..<rows) {
3328
let button = createButton(label:"X", action:{ e in print(e) })
34-
self.grid!.insert(button,at:(c,r))
29+
grid1.insert(button,at:(c,r))
3530
}
3631
}
3732
}
@@ -44,10 +39,10 @@ class MainPageAdapter: SCDLatticePageAdapter {
4439
button.text = "x"
4540

4641
// on click, call callback with name of button
47-
button.onClick.append( SCDWidgetsEventHandler{ (e:SCDWidgetsEvent?) in
48-
let button = e!.target as! SCDWidgetsButton
49-
action(button.name)
50-
})
42+
button.onClick{ (e:SCDWidgetsEvent?) in
43+
let button = e!.target as! SCDWidgetsButton
44+
action(button.name)
45+
}
5146

5247
// set colors
5348
button.font!.color = whiteColor

Kyle1/src/start.swift renamed to Kyle1/Sources/Kyle1/start.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class Kyle1: SCDApplication {
77

88
override func onFinishLaunching() {
99
mainAdapter.load("main.page")
10-
mainAdapter.show(window)
10+
mainAdapter.show(view: window)
1111
}
1212
}

Kyle1/build.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,27 @@ ios:
2222
simulator:
2323
os: 12.1
2424
output: Kyle1/.build/ios-simulator
25+
product-path: Kyle1/Product/ios-simulator
2526
extra-args:
2627
search-paths: []
2728
linked-libs: []
2829
device:
2930
os: 12.1
3031
output: Kyle1/.build/ios-device
32+
product-path: Kyle1/Product/ios-device
3133
extra-args:
3234
search-paths: []
3335
linked-libs: []
3436
mac:
3537
os: 10.11
3638
output: Kyle1/.build/scade-simulator
39+
product-path: Kyle1/Product/scade-simulator
3740
extra-args:
3841
search-paths: []
3942
linked-libs: []
4043
sign:
41-
provision-profile: /Users/juliawork/ScadeTools/certificates/Scade_Adhoc.mobileprovision
42-
certificate: /Users/juliawork/ScadeTools/certificates/Certificates.p12
44+
provision-profile:
45+
certificate:
4346
beta-reports-active: false
4447
icons:
4548
iphone: # or ipad, sizes: 20X20, 29X29, 40X40, 60X60, 76X76, 83.5X83.5
@@ -78,21 +81,25 @@ android:
7881
permissions: []
7982
armeabi-v7a:
8083
output: Kyle1/.build/android-armeabi-v7a
84+
product-path: Kyle1/Product/android-armeabi-v7a
8185
extra-args:
8286
search-paths: []
8387
linked-libs: []
8488
arm64-v8a:
8589
output: Kyle1/.build/android-arm64-v8a
90+
product-path: Kyle1/Product/android-arm64-v8a
8691
extra-args:
8792
search-paths: []
8893
linked-libs: []
8994
x86:
9095
output: Kyle1/.build/android-x86
96+
product-path: Kyle1/Product/android-x86
9197
extra-args:
9298
search-paths: []
9399
linked-libs: []
94100
x86_64:
95101
output: Kyle1/.build/android-x86_64
102+
product-path: Kyle1/Product/android-x86_64
96103
extra-args:
97104
search-paths: []
98105
linked-libs: []

Kyle1/src/main.page

-83
This file was deleted.

UgAnimationDemo/.project

-17
This file was deleted.

UgAnimationDemo/.settings/com.scade.sdk.core.prefs

-14
This file was deleted.

UgAnimationDemo/res/fonts/ArialMT.ttf

-755 KB
Binary file not shown.

UgAnimationDemo/src/AnimationUtiliites.swift

-23
This file was deleted.

0 commit comments

Comments
 (0)