├── .gitignore ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Assets.xcassets ├── AccentColor.colorset │ └── Contents.json ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json ├── Tahoma.dataset │ ├── Contents.json │ └── TAHOMA_0.TTF ├── bottom-stepper-active.imageset │ ├── Contents.json │ └── bottom-stepper-active.png ├── bottom-stepper-prelight.imageset │ ├── Contents.json │ └── bottom-stepper-prelight.png ├── bottom-stepper.imageset │ ├── Contents.json │ └── bottom-stepper.png ├── button-focused-pressed.imageset │ ├── Contents.json │ └── button-focused-pressed.png ├── button-focused.imageset │ ├── Contents.json │ └── button-focused.png ├── button-hover.imageset │ ├── Contents.json │ └── button-hover.png ├── button.imageset │ ├── Contents.json │ └── button.png ├── checkbox-active-selectionmode.imageset │ ├── Contents.json │ └── checkbox-active-selectionmode.png ├── checkbox-checked-active-selectionmode.imageset │ ├── Contents.json │ └── checkbox-checked-active-selectionmode.png ├── checkbox-checked-active.imageset │ ├── Contents.json │ └── checkbox-checked-active.png ├── checkbox-checked-hover-selectionmode.imageset │ ├── Contents.json │ └── checkbox-checked-hover-selectionmode.png ├── checkbox-checked-hover.imageset │ ├── Contents.json │ └── checkbox-checked-hover.png ├── checkbox-checked-insensitive.imageset │ ├── Contents.json │ └── checkbox-checked-insensitive.png ├── checkbox-checked-selectionmode.imageset │ ├── Contents.json │ └── checkbox-checked-selectionmode.png ├── checkbox-checked.imageset │ ├── Contents.json │ └── checkbox-checked.png ├── checkbox-hover-selectionmode.imageset │ ├── Contents.json │ └── checkbox-hover-selectionmode.png ├── checkbox-mixed-active.imageset │ ├── Contents.json │ └── checkbox-mixed-active.png ├── checkbox-mixed-hover.imageset │ ├── Contents.json │ └── checkbox-mixed-hover.png ├── checkbox-mixed-insensitive.imageset │ ├── Contents.json │ └── checkbox-mixed-insensitive.png ├── checkbox-mixed.imageset │ ├── Contents.json │ └── checkbox-mixed.png ├── checkbox-selectionmode.imageset │ ├── Contents.json │ └── checkbox-selectionmode.png ├── checkbox-unchecked-active.imageset │ ├── Contents.json │ └── checkbox-unchecked-active.png ├── checkbox-unchecked-hover.imageset │ ├── Contents.json │ └── checkbox-unchecked-hover.png ├── checkbox-unchecked-insensitive.imageset │ ├── Contents.json │ └── checkbox-unchecked-insensitive.png ├── checkbox-unchecked.imageset │ ├── Contents.json │ └── checkbox-unchecked.png ├── close-active.imageset │ ├── Contents.json │ └── close-active.png ├── close-backdrop-hover.imageset │ ├── Contents.json │ └── close-backdrop-hover.png ├── close-backdrop.imageset │ ├── Contents.json │ └── close-backdrop.png ├── close-hover.imageset │ ├── Contents.json │ └── close-hover.png ├── close-normal.imageset │ ├── Contents.json │ └── close-normal.png ├── handle-vert-active.imageset │ ├── Contents.json │ └── handle-vert-active.png ├── handle-vert-prelight.imageset │ ├── Contents.json │ └── handle-vert-prelight.png ├── handle-vert.imageset │ ├── Contents.json │ └── handle-vert.png ├── icons.imageset │ ├── Contents.json │ └── windows-xp-icons.png ├── maximize-active.imageset │ ├── Contents.json │ └── maximize-active.png ├── maximize-hover.imageset │ ├── Contents.json │ └── maximize-hover.png ├── maximize-normal.imageset │ ├── Contents.json │ └── maximize-normal.png ├── minimize-active.imageset │ ├── Contents.json │ └── minimize-active.png ├── minimize-hover.imageset │ ├── Contents.json │ └── minimize-hover.png ├── minimize-normal.imageset │ ├── Contents.json │ └── minimize-normal.png ├── minus.imageset │ ├── Contents.json │ └── minus.png ├── plus.imageset │ ├── Contents.json │ └── plus.png ├── radio-checked-active.imageset │ ├── Contents.json │ └── radio-checked-active.png ├── radio-checked-hover.imageset │ ├── Contents.json │ └── radio-checked-hover.png ├── radio-checked.imageset │ ├── Contents.json │ └── radio-checked.png ├── radio-unchecked-active.imageset │ ├── Contents.json │ └── radio-unchecked-active.png ├── radio-unchecked-hover.imageset │ ├── Contents.json │ └── radio-unchecked-hover.png ├── radio-unchecked-insensitive.imageset │ ├── Contents.json │ └── radio-unchecked-insensitive.png ├── radio-unchecked.imageset │ ├── Contents.json │ └── radio-unchecked.png ├── slider-vert-active.imageset │ ├── Contents.json │ └── slider-vert-active.png ├── slider-vert-prelight.imageset │ ├── Contents.json │ └── slider-vert-prelight.png ├── slider-vert.imageset │ ├── Contents.json │ └── slider-vert.png ├── top-stepper-active.imageset │ ├── Contents.json │ └── top-stepper-active.png ├── top-stepper-prelight.imageset │ ├── Contents.json │ └── top-stepper-prelight.png ├── top-stepper.imageset │ ├── Contents.json │ └── top-stepper.png ├── trough-scrollbar-horiz.imageset │ ├── Contents.json │ └── trough-scrollbar-horiz.png ├── window-bottom-left.imageset │ ├── Contents.json │ └── window-bottom-left.png ├── window-bottom-right.imageset │ ├── Contents.json │ └── window-bottom-right.png ├── window-bottom.imageset │ ├── Contents.json │ └── window-bottom.png ├── window-left.imageset │ ├── Contents.json │ └── window-left.png ├── window-right.imageset │ ├── Contents.json │ └── window-right.png ├── window-top-left.imageset │ ├── Contents.json │ └── window-top-left.png ├── window-top-right.imageset │ ├── Contents.json │ └── window-top-right.png └── window-top.imageset │ ├── Contents.json │ └── window-top.png ├── Docs ├── logo.png └── screenshot.png ├── Package.swift ├── README.md ├── Sources └── SwiftXP │ ├── File.swift │ ├── Helpers │ ├── SmallControl.swift │ └── XPIcon.swift │ ├── XPButtonStyle.swift │ ├── XPFont.swift │ ├── XPIconView.swift │ ├── XPListTest.swift │ ├── XPSmallExplorer.swift │ ├── XPTitlebar.swift │ ├── XPToggleStyle.swift │ └── XPWindow.swift └── Tests └── SwiftXPTests └── SwiftXPTests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | DerivedData/ 7 | .swiftpm/config/registries.json 8 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 9 | .netrc 10 | -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "scale" : "2x", 11 | "size" : "16x16" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "scale" : "1x", 16 | "size" : "32x32" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "scale" : "2x", 21 | "size" : "32x32" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "scale" : "1x", 26 | "size" : "128x128" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "scale" : "2x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "scale" : "1x", 36 | "size" : "256x256" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "scale" : "2x", 41 | "size" : "256x256" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "scale" : "1x", 46 | "size" : "512x512" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "scale" : "2x", 51 | "size" : "512x512" 52 | } 53 | ], 54 | "info" : { 55 | "author" : "xcode", 56 | "version" : 1 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Assets.xcassets/Tahoma.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "data" : [ 3 | { 4 | "filename" : "TAHOMA_0.TTF", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/Tahoma.dataset/TAHOMA_0.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/Tahoma.dataset/TAHOMA_0.TTF -------------------------------------------------------------------------------- /Assets.xcassets/bottom-stepper-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bottom-stepper-active.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/bottom-stepper-active.imageset/bottom-stepper-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/bottom-stepper-active.imageset/bottom-stepper-active.png -------------------------------------------------------------------------------- /Assets.xcassets/bottom-stepper-prelight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bottom-stepper-prelight.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/bottom-stepper-prelight.imageset/bottom-stepper-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/bottom-stepper-prelight.imageset/bottom-stepper-prelight.png -------------------------------------------------------------------------------- /Assets.xcassets/bottom-stepper.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bottom-stepper.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/bottom-stepper.imageset/bottom-stepper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/bottom-stepper.imageset/bottom-stepper.png -------------------------------------------------------------------------------- /Assets.xcassets/button-focused-pressed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "button-focused-pressed.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/button-focused-pressed.imageset/button-focused-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/button-focused-pressed.imageset/button-focused-pressed.png -------------------------------------------------------------------------------- /Assets.xcassets/button-focused.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "button-focused.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/button-focused.imageset/button-focused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/button-focused.imageset/button-focused.png -------------------------------------------------------------------------------- /Assets.xcassets/button-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "button-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/button-hover.imageset/button-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/button-hover.imageset/button-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/button.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "button.png", 5 | "idiom" : "mac" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "template-rendering-intent" : "original" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assets.xcassets/button.imageset/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/button.imageset/button.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-active-selectionmode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-active-selectionmode.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-active-selectionmode.imageset/checkbox-active-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-active-selectionmode.imageset/checkbox-active-selectionmode.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-active-selectionmode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked-active-selectionmode.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-active-selectionmode.imageset/checkbox-checked-active-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked-active-selectionmode.imageset/checkbox-checked-active-selectionmode.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-active.imageset/checkbox-checked-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked-active.imageset/checkbox-checked-active.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-hover-selectionmode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked-hover-selectionmode.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-hover-selectionmode.imageset/checkbox-checked-hover-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked-hover-selectionmode.imageset/checkbox-checked-hover-selectionmode.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-hover.imageset/checkbox-checked-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked-hover.imageset/checkbox-checked-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-insensitive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked-insensitive.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-insensitive.imageset/checkbox-checked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked-insensitive.imageset/checkbox-checked-insensitive.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-selectionmode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked-selectionmode.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked-selectionmode.imageset/checkbox-checked-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked-selectionmode.imageset/checkbox-checked-selectionmode.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-checked.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-checked.imageset/checkbox-checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-checked.imageset/checkbox-checked.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-hover-selectionmode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-hover-selectionmode.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-hover-selectionmode.imageset/checkbox-hover-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-hover-selectionmode.imageset/checkbox-hover-selectionmode.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-mixed-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed-active.imageset/checkbox-mixed-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-mixed-active.imageset/checkbox-mixed-active.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-mixed-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed-hover.imageset/checkbox-mixed-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-mixed-hover.imageset/checkbox-mixed-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed-insensitive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-mixed-insensitive.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed-insensitive.imageset/checkbox-mixed-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-mixed-insensitive.imageset/checkbox-mixed-insensitive.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-mixed.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-mixed.imageset/checkbox-mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-mixed.imageset/checkbox-mixed.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-selectionmode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-selectionmode.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-selectionmode.imageset/checkbox-selectionmode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-selectionmode.imageset/checkbox-selectionmode.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-unchecked-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked-active.imageset/checkbox-unchecked-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-unchecked-active.imageset/checkbox-unchecked-active.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-unchecked-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked-hover.imageset/checkbox-unchecked-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-unchecked-hover.imageset/checkbox-unchecked-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked-insensitive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-unchecked-insensitive.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked-insensitive.imageset/checkbox-unchecked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-unchecked-insensitive.imageset/checkbox-unchecked-insensitive.png -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "checkbox-unchecked.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/checkbox-unchecked.imageset/checkbox-unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/checkbox-unchecked.imageset/checkbox-unchecked.png -------------------------------------------------------------------------------- /Assets.xcassets/close-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "close-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/close-active.imageset/close-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/close-active.imageset/close-active.png -------------------------------------------------------------------------------- /Assets.xcassets/close-backdrop-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "close-backdrop-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/close-backdrop-hover.imageset/close-backdrop-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/close-backdrop-hover.imageset/close-backdrop-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/close-backdrop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "close-backdrop.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/close-backdrop.imageset/close-backdrop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/close-backdrop.imageset/close-backdrop.png -------------------------------------------------------------------------------- /Assets.xcassets/close-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "close-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/close-hover.imageset/close-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/close-hover.imageset/close-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/close-normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "close-normal.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/close-normal.imageset/close-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/close-normal.imageset/close-normal.png -------------------------------------------------------------------------------- /Assets.xcassets/handle-vert-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "handle-vert-active.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/handle-vert-active.imageset/handle-vert-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/handle-vert-active.imageset/handle-vert-active.png -------------------------------------------------------------------------------- /Assets.xcassets/handle-vert-prelight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "handle-vert-prelight.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/handle-vert-prelight.imageset/handle-vert-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/handle-vert-prelight.imageset/handle-vert-prelight.png -------------------------------------------------------------------------------- /Assets.xcassets/handle-vert.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "handle-vert.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/handle-vert.imageset/handle-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/handle-vert.imageset/handle-vert.png -------------------------------------------------------------------------------- /Assets.xcassets/icons.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "windows-xp-icons.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/icons.imageset/windows-xp-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/icons.imageset/windows-xp-icons.png -------------------------------------------------------------------------------- /Assets.xcassets/maximize-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "maximize-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/maximize-active.imageset/maximize-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/maximize-active.imageset/maximize-active.png -------------------------------------------------------------------------------- /Assets.xcassets/maximize-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "maximize-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/maximize-hover.imageset/maximize-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/maximize-hover.imageset/maximize-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/maximize-normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "maximize-normal.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/maximize-normal.imageset/maximize-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/maximize-normal.imageset/maximize-normal.png -------------------------------------------------------------------------------- /Assets.xcassets/minimize-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "minimize-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/minimize-active.imageset/minimize-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/minimize-active.imageset/minimize-active.png -------------------------------------------------------------------------------- /Assets.xcassets/minimize-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "minimize-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/minimize-hover.imageset/minimize-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/minimize-hover.imageset/minimize-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/minimize-normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "minimize-normal.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/minimize-normal.imageset/minimize-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/minimize-normal.imageset/minimize-normal.png -------------------------------------------------------------------------------- /Assets.xcassets/minus.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "minus.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/minus.imageset/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/minus.imageset/minus.png -------------------------------------------------------------------------------- /Assets.xcassets/plus.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "plus.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/plus.imageset/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/plus.imageset/plus.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-checked-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-checked-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-checked-active.imageset/radio-checked-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-checked-active.imageset/radio-checked-active.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-checked-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-checked-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-checked-hover.imageset/radio-checked-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-checked-hover.imageset/radio-checked-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-checked.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-checked.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-checked.imageset/radio-checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-checked.imageset/radio-checked.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-unchecked-active.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked-active.imageset/radio-unchecked-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-unchecked-active.imageset/radio-unchecked-active.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked-hover.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-unchecked-hover.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked-hover.imageset/radio-unchecked-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-unchecked-hover.imageset/radio-unchecked-hover.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked-insensitive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-unchecked-insensitive.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked-insensitive.imageset/radio-unchecked-insensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-unchecked-insensitive.imageset/radio-unchecked-insensitive.png -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "radio-unchecked.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/radio-unchecked.imageset/radio-unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/radio-unchecked.imageset/radio-unchecked.png -------------------------------------------------------------------------------- /Assets.xcassets/slider-vert-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "slider-vert-active.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/slider-vert-active.imageset/slider-vert-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/slider-vert-active.imageset/slider-vert-active.png -------------------------------------------------------------------------------- /Assets.xcassets/slider-vert-prelight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "slider-vert-prelight.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/slider-vert-prelight.imageset/slider-vert-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/slider-vert-prelight.imageset/slider-vert-prelight.png -------------------------------------------------------------------------------- /Assets.xcassets/slider-vert.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "slider-vert.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/slider-vert.imageset/slider-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/slider-vert.imageset/slider-vert.png -------------------------------------------------------------------------------- /Assets.xcassets/top-stepper-active.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "top-stepper-active.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/top-stepper-active.imageset/top-stepper-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/top-stepper-active.imageset/top-stepper-active.png -------------------------------------------------------------------------------- /Assets.xcassets/top-stepper-prelight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "top-stepper-prelight.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/top-stepper-prelight.imageset/top-stepper-prelight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/top-stepper-prelight.imageset/top-stepper-prelight.png -------------------------------------------------------------------------------- /Assets.xcassets/top-stepper.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "top-stepper.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/top-stepper.imageset/top-stepper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/top-stepper.imageset/top-stepper.png -------------------------------------------------------------------------------- /Assets.xcassets/trough-scrollbar-horiz.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "trough-scrollbar-horiz.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets.xcassets/trough-scrollbar-horiz.imageset/trough-scrollbar-horiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/trough-scrollbar-horiz.imageset/trough-scrollbar-horiz.png -------------------------------------------------------------------------------- /Assets.xcassets/window-bottom-left.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-bottom-left.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-bottom-left.imageset/window-bottom-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-bottom-left.imageset/window-bottom-left.png -------------------------------------------------------------------------------- /Assets.xcassets/window-bottom-right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-bottom-right.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-bottom-right.imageset/window-bottom-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-bottom-right.imageset/window-bottom-right.png -------------------------------------------------------------------------------- /Assets.xcassets/window-bottom.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-bottom.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-bottom.imageset/window-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-bottom.imageset/window-bottom.png -------------------------------------------------------------------------------- /Assets.xcassets/window-left.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-left.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-left.imageset/window-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-left.imageset/window-left.png -------------------------------------------------------------------------------- /Assets.xcassets/window-right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-right.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-right.imageset/window-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-right.imageset/window-right.png -------------------------------------------------------------------------------- /Assets.xcassets/window-top-left.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-top-left.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-top-left.imageset/window-top-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-top-left.imageset/window-top-left.png -------------------------------------------------------------------------------- /Assets.xcassets/window-top-right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-top-right.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-top-right.imageset/window-top-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-top-right.imageset/window-top-right.png -------------------------------------------------------------------------------- /Assets.xcassets/window-top.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "window-top.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets.xcassets/window-top.imageset/window-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Assets.xcassets/window-top.imageset/window-top.png -------------------------------------------------------------------------------- /Docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Docs/logo.png -------------------------------------------------------------------------------- /Docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartjakobs/SwiftXP/021d3d4b1f510ca4217cce597d80e35b82c918f0/Docs/screenshot.png -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.7 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "SwiftXP", 8 | platforms: [ .macOS(.v12), .iOS(.v15) ], 9 | products: [ 10 | // Products define the executables and libraries a package produces, and make them visible to other packages. 11 | .library( 12 | name: "SwiftXP", 13 | targets: ["SwiftXP"]), 14 | ], 15 | dependencies: [ 16 | // Dependencies declare other packages that this package depends on. 17 | // .package(url: /* package url */, from: "1.0.0"), 18 | ], 19 | targets: [ 20 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 21 | // Targets can depend on other targets in this package, and on products in packages this package depends on. 22 | .target( 23 | name: "SwiftXP", 24 | dependencies: []), 25 | .testTarget( 26 | name: "SwiftXPTests", 27 | dependencies: ["SwiftXP"]), 28 | ] 29 | ) 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftXP 2 | 3 | ![Logo](Docs/logo.png) 4 | 5 | SwiftUI in style. Install as package in all your projects. 6 | Your clients will be so happy, they'll become your friends. 7 | 8 | ## What's included? 9 | What's _not_ included?! 10 | * `xpFont()`, for giving every Text() that sweet sentimental feeling of Tahoma. 11 | * `XPWindow(title: String, xpIcon: XPIcon) { }` A whole window! 12 | * `XPIcon`. An enum with a many, many icons! 13 | * `XPIconView`. Extremely easy to use view for icons 14 | * `XPButtonStye()`! For using with `.buttonStyle()` 15 | * `XPSmallExplorer()`. A file explorer view, as in the example. 16 | 17 | ## Compatibility 18 | Works on MacOS, iOS probably. 19 | Use at your own risk. 20 | Live dangerously. 21 | 22 | ## Example 23 | Want to make a window like this? 24 | ![Example](Docs/screenshot.png "Example") 25 | 26 | Type this Xcode: 27 | ```Swift 28 | import SwiftUI 29 | import SwiftXP 30 | 31 | public struct ContentView: View { 32 | 33 | @State var isOn: Bool = false 34 | @State var selectedFilename: String = "" 35 | 36 | public var body: some View { 37 | 38 | XPWindow(title: "Explorer", xpIcon: .folderHand) { 39 | HStack(alignment: .top) { 40 | XPSmallExplorer() 41 | 42 | XPVerticalSeparator() 43 | 44 | VStack { 45 | Text("Look at this window!") 46 | .xpFont() 47 | 48 | 49 | Spacer() 50 | Toggle("Checkbox!", isOn: $isOn) 51 | .toggleStyle(XPToggleStyle()) 52 | 53 | HStack { 54 | Button("Cancel") {} 55 | .buttonStyle(XPButtonStye()) 56 | 57 | Spacer() 58 | 59 | Button("Ok!") {} 60 | .buttonStyle(XPButtonStye()) 61 | } 62 | } 63 | .padding() 64 | } 65 | } 66 | } 67 | } 68 | ``` 69 | 70 | (I do not own Windows XP. Obviously. I made this for fun. Please don't sue me.) 71 | 72 | ## Now do Vista! 73 | Nah. 74 | -------------------------------------------------------------------------------- /Sources/SwiftXP/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // 4 | // 5 | // Created by Bart Jakobs on 27/01/2023. 6 | // 7 | 8 | import Foundation 9 | import SwiftUI 10 | 11 | public struct XPVerticalSeparator: View { 12 | public init(){} 13 | 14 | public var body: some View { 15 | Rectangle() 16 | .frame(width: 1) 17 | .foregroundColor(.gray) 18 | } 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Sources/SwiftXP/Helpers/SmallControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SmallControl.swift 3 | // Helper for SwiftXP 4 | // 5 | // Created by Bart Jakobs on 27/01/2023. 6 | // 7 | 8 | import Foundation 9 | import SwiftUI 10 | 11 | public struct SmallControl: View{ 12 | public init(type: String, text: String = "", checked: Bool, action: @escaping (() -> ()) ){ 13 | self.type = type 14 | self.text = text 15 | self.checked = checked 16 | self.action = action 17 | } 18 | 19 | var type: String 20 | var text: String = "" 21 | 22 | var checked: Bool 23 | 24 | var action: (() -> ()) 25 | @State var isHover: Bool = false 26 | @State var isDown: Bool = false 27 | @State var isChecked: Bool = false 28 | @State private var isFocused = false 29 | 30 | static let Size = CGSize(width: 16, height: 16) 31 | 32 | private var img: String { 33 | var str = type 34 | 35 | if isChecked { 36 | str += "-checked" 37 | } else { 38 | str += "-unchecked" 39 | } 40 | 41 | if isDown { 42 | return str + "-active" 43 | } 44 | 45 | if isHover { 46 | return str + "-hover" 47 | } 48 | 49 | return str 50 | } 51 | 52 | public var body: some View { 53 | HStack(alignment: .center) { 54 | 55 | 56 | Image(img) 57 | .resizable() 58 | .frame(width: SmallControl.Size.width, height: SmallControl.Size.height) 59 | .onHover(perform: { hover in 60 | isHover = hover 61 | }) 62 | .gesture( 63 | DragGesture(minimumDistance: 0) 64 | .onChanged({ _ in 65 | isDown = true 66 | }) 67 | .onEnded({ gesture in 68 | isDown = false 69 | if(CGRect(origin: .zero, size: TopBarButton.Size).contains(gesture.location)) { 70 | action() 71 | isChecked.toggle() 72 | } 73 | }) 74 | ) 75 | } 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Sources/SwiftXP/Helpers/XPIcon.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPIcon.swift 3 | // segmenttest 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public enum XPIcon: Int, Identifiable { 11 | public var id: Int { 12 | return self.rawValue 13 | } 14 | 15 | static let count = 171 16 | public static var all: [XPIcon] { 17 | var icons = [XPIcon]() 18 | (0.. some View { 32 | ZStack { 33 | HStack(spacing: 0) { 34 | Rectangle().fill(ImagePaint(image: Image(img), sourceRect: CGRect(x: 0, y:0, width: 0.4, height: 1))) 35 | .frame(width: 4, height: 23) 36 | 37 | Rectangle().fill(ImagePaint(image: Image(img), sourceRect: CGRect(x: 0.4, y:0, width: 0.2, height: 1))) 38 | .frame(minWidth: 4, maxHeight: 23) 39 | 40 | 41 | Rectangle().fill(ImagePaint(image: Image(img), sourceRect: CGRect(x: 0.6, y:0, width: 0.4, height: 1))) 42 | .frame(width: 4, height: 23) 43 | .frame(width: 4, height: 23) 44 | } 45 | configuration.label 46 | .font(.custom("Tahoma", size: 12)) 47 | .foregroundColor(.black) 48 | } 49 | .onHover { hover in 50 | isHover = hover 51 | } 52 | .gesture( 53 | DragGesture(minimumDistance: 0) 54 | .onChanged({ _ in 55 | 56 | isDown = true 57 | }) 58 | .onEnded({ gesture in 59 | isDown = false 60 | }) 61 | ) 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPFont.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPFont.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | 11 | public struct XPFont: ViewModifier { 12 | var size: CGFloat = 12 13 | 14 | public func body(content: Content) -> some View { 15 | return content 16 | .font(.custom("Tahoma", size: size)) 17 | .foregroundColor(.black) 18 | } 19 | 20 | } 21 | 22 | public extension View { 23 | func xpFont(size: CGFloat = 12) -> some View { 24 | return self.modifier(XPFont(size: size)) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPIconView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPIcon.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public struct XPIconView: View { 11 | var icon: XPIcon 12 | var size: XPIconSize = .large 13 | 14 | public var body: some View { 15 | Rectangle() 16 | .foregroundStyle(.image(Image("icons"), sourceRect: icon.rectInSpritesheet, scale: size.scale)) 17 | 18 | .frame(width: size.size, height: size.size) 19 | 20 | } 21 | 22 | public enum XPIconSize { 23 | case small 24 | case large 25 | 26 | var size: CGFloat? { 27 | 28 | return self == .large ? 32 : 16 29 | } 30 | var scale: CGFloat { 31 | return self == .large ? 1 : 0.5 32 | } 33 | } 34 | 35 | 36 | 37 | } 38 | 39 | struct XPIcon_Previews: PreviewProvider { 40 | static var previews: some View { 41 | if #available(macOS 13.0, *) { 42 | Grid { 43 | ForEach(XPIcon.all) { icon in 44 | XPIconView(icon: icon, size: .large) 45 | .previewLayout(.fixed(width: 100, height: 102.0)) 46 | } 47 | } 48 | } else { 49 | HStack{ 50 | ForEach(XPIcon.all) { icon in 51 | XPIconView(icon: icon, size: .large) 52 | .previewLayout(.fixed(width: 100, height: 102.0)) 53 | } 54 | } 55 | } 56 | 57 | 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPListTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPListTest.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | 11 | 12 | struct XPListRow: View where Content : View { 13 | 14 | var canExpand: Bool = false 15 | var text: String = "Item" 16 | var path: String = "Item" 17 | var icon: XPIcon = .pc 18 | @Binding var selected: String 19 | var content: () -> Content 20 | 21 | init(canExpand: Bool, text: String = "", path: String = "" ,icon: XPIcon = .pc, selected: Binding, @ViewBuilder _ content: @escaping () -> Content) { 22 | self.text = text 23 | self.icon = icon 24 | self.content = content 25 | self.canExpand = canExpand 26 | self.path = path 27 | self._selected = selected 28 | 29 | } 30 | 31 | @State var isExpaned: Bool = false 32 | var isSelected: Bool { 33 | selected == text 34 | } 35 | private func select() { 36 | selected = text 37 | } 38 | // @State var isSelected: Bool = false 39 | var body: some View { 40 | HStack(spacing: 6) { 41 | 42 | if canExpand { 43 | 44 | Button { 45 | withAnimation { 46 | isExpaned.toggle() 47 | } 48 | 49 | } label: { 50 | if isExpaned { 51 | Image("minus") 52 | } else { 53 | Image("plus") 54 | } 55 | } 56 | .buttonStyle(.plain) 57 | 58 | } else { 59 | Rectangle() 60 | .frame(width: 9, height: 9) 61 | .opacity(0.000001) 62 | .padding([.trailing], 0) 63 | 64 | } 65 | XPIconView(icon: icon, size: .small) 66 | // .padding([.leading], -3) 67 | 68 | Text(text) 69 | .foregroundColor(isSelected ? .white : .black) 70 | .xpFont(size: 12) 71 | 72 | .background { 73 | Rectangle() 74 | .foregroundStyle(Color(red: 0.2, green: 0.4, blue: 0.8)) 75 | .padding(-1) 76 | .overlay { 77 | Rectangle() 78 | .foregroundStyle(Color.white) 79 | .frame(height: 1) 80 | .padding([.top], 13) 81 | } 82 | .opacity(isSelected ? 1 : 0) 83 | } 84 | } 85 | .contentShape(Rectangle()) 86 | .onTapGesture { 87 | select() 88 | } 89 | .onTapGesture(count: 2) { 90 | select() 91 | isExpaned = true 92 | } 93 | if (isExpaned) { 94 | content() 95 | .padding([.leading], 20) 96 | } 97 | 98 | 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPSmallExplorer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPSmallExplorer.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public struct XPSmallExplorer: View { 11 | @ObservedObject var vm: ExplorerViewModel = ExplorerViewModel() 12 | // @Binding var selectedFile: String 13 | // 14 | // public init(selectedFile: Binding){ 15 | // self._selectedFile = selectedFile 16 | // } 17 | // 18 | public init(){} 19 | public var body: some View { 20 | 21 | ScrollView(axes: .vertical, showsIndicators: false, offsetChanged: { point in 22 | 23 | }) 24 | { 25 | 26 | VStack(alignment: .leading, spacing: 2) { 27 | XPListRow(canExpand: true, text: "My Computer", path: "Computer", icon: .pc, selected: $vm.selected) 28 | { 29 | ForEach(vm.entries) { entry in 30 | XPSmallExplorerEntry(entry: entry) 31 | } 32 | .environmentObject(vm) 33 | } 34 | } 35 | // .onChange(of: vm.selected) { newValue in 36 | // selectedFile = newValue 37 | // } 38 | } 39 | // } 40 | } 41 | } 42 | 43 | public struct XPSmallExplorerEntry: View{ 44 | @ObservedObject var entry: ExplorerEntry 45 | @EnvironmentObject var vm: ExplorerViewModel 46 | 47 | public init(entry: ExplorerEntry) { 48 | self.entry = entry 49 | } 50 | 51 | public var body: some View { 52 | XPListRow(canExpand: entry.isDirectory, text: entry.name, path: entry.path, icon: entry.icon, selected: $vm.selected) 53 | { 54 | 55 | ForEach(entry.entries) { subEntry in 56 | XPSmallExplorerEntry(entry: subEntry) 57 | } 58 | } 59 | .onAppear { 60 | 61 | entry.read() 62 | } 63 | } 64 | } 65 | 66 | public class ExplorerViewModel: ObservableObject { 67 | @Published var entries: [ExplorerEntry] = [] 68 | @Published var selected: String = "" 69 | init(){ 70 | // Get the document directory url 71 | 72 | var url = URL(string: "/")! 73 | entries.append(ExplorerEntry(name: "C:\\", path: url, icon: .hardDisk)) 74 | 75 | url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! 76 | entries.append(ExplorerEntry(name: "My Documents", path: url, icon: .folderDocument)) 77 | 78 | url = FileManager.default.urls(for: .musicDirectory, in: .userDomainMask).first! 79 | entries.append(ExplorerEntry(name: "My Music", path: url, icon: .folderMusic)) 80 | 81 | url = FileManager.default.urls(for: .moviesDirectory, in: .userDomainMask).first! 82 | entries.append(ExplorerEntry(name: "My Movies", path: url, icon: .folderMovie)) 83 | 84 | } 85 | 86 | } 87 | 88 | public class ExplorerEntry: ObservableObject, Identifiable { 89 | public var id: String { 90 | return path 91 | } 92 | var name: String 93 | var path: String 94 | var icon: XPIcon 95 | var url: URL 96 | 97 | @Published var entries: [ExplorerEntry] = [] 98 | var hasRead = false 99 | var isDirectory = false 100 | 101 | init(path: URL){ 102 | if path.hasDirectoryPath { 103 | self.icon = .folder 104 | self.isDirectory = true 105 | } else { 106 | self.icon = .document 107 | } 108 | self.path = path.absoluteString 109 | self.name = path.lastPathComponent 110 | self.url = path 111 | } 112 | 113 | func read(){ 114 | print("Read \(self.url)") 115 | guard !hasRead else {return} 116 | guard isDirectory else {return} 117 | 118 | guard self.url.startAccessingSecurityScopedResource() else { print("tja");return } 119 | 120 | guard let directoryContents = try? FileManager.default.contentsOfDirectory(at: self.url, includingPropertiesForKeys: [.isDirectoryKey]) else { print("pech"); return } 121 | print(directoryContents) 122 | 123 | for file in directoryContents { 124 | self.entries.append( 125 | ExplorerEntry(path: file)) 126 | print(" - \(file) ") 127 | 128 | 129 | } 130 | 131 | hasRead = true 132 | } 133 | 134 | public convenience init(name: String, path: URL, icon: XPIcon? = nil) { 135 | self.init(path: path) 136 | self.name = name 137 | if let icon = icon { 138 | self.icon = icon 139 | } 140 | } 141 | } 142 | 143 | 144 | 145 | 146 | public struct ScrollView: View { 147 | let axes: Axis.Set 148 | let showsIndicators: Bool 149 | let offsetChanged: (CGPoint) -> Void 150 | let content: Content 151 | 152 | public init( 153 | axes: Axis.Set = .vertical, 154 | showsIndicators: Bool = true, 155 | offsetChanged: @escaping (CGPoint) -> Void = { _ in }, 156 | @ViewBuilder content: () -> Content 157 | ) { 158 | self.axes = axes 159 | self.showsIndicators = showsIndicators 160 | self.offsetChanged = offsetChanged 161 | self.content = content() 162 | } 163 | 164 | public var body: some View { 165 | HStack { 166 | SwiftUI.ScrollView(axes, showsIndicators: showsIndicators) { 167 | GeometryReader { geometry in 168 | Color.clear.preference( 169 | key: ScrollOffsetPreferenceKey.self, 170 | value: geometry.frame(in: .named("scrollView")).origin 171 | ) 172 | }.frame(width: 0, height: 0) 173 | content 174 | } 175 | .coordinateSpace(name: "scrollView") 176 | .onPreferenceChange(ScrollOffsetPreferenceKey.self, perform: offsetChanged) 177 | 178 | 179 | } 180 | } 181 | } 182 | 183 | 184 | public struct ScrollOffsetPreferenceKey: PreferenceKey { 185 | public static var defaultValue: CGPoint = .zero 186 | 187 | public static func reduce(value: inout CGPoint, nextValue: () -> CGPoint) {} 188 | } 189 | 190 | 191 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPTitlebar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPTitlebar.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | 11 | struct XPTitleBar: View { 12 | 13 | var title: String 14 | 15 | var icon: Image? 16 | var xpIcon: XPIconView? 17 | 18 | init(title: String) { 19 | self.title = title 20 | } 21 | 22 | init(title: String, icon: Image) { 23 | self.title = title 24 | self.icon = icon 25 | } 26 | 27 | init(title: String, xpIcon: XPIcon) { 28 | self.title = title 29 | self.xpIcon = XPIconView(icon: xpIcon, size: .small) 30 | } 31 | 32 | var body: some View { 33 | HStack(spacing: 0) { 34 | Image("window-top-left") 35 | 36 | ZStack { 37 | Image("window-top") 38 | .resizable() 39 | // .dragWndWithClick() 40 | HStack(spacing: 0) { 41 | if icon != nil { 42 | icon! 43 | .padding([.leading, ], 3) 44 | .padding([.top], 1) 45 | } 46 | if xpIcon != nil { 47 | xpIcon! 48 | .padding([.leading, ], 3) 49 | .padding([.top], 1) 50 | } 51 | Text(title) 52 | .font(.custom("Tahoma", size: 12)) 53 | .foregroundColor(.white) 54 | .shadow(color: .black, radius: 0, x: 1, y: 1) 55 | .padding([.leading], 4) 56 | Spacer() 57 | 58 | TopBarButton(name: "minimize"){ 59 | print("Minimize") 60 | } 61 | .padding([.trailing], 4) 62 | TopBarButton(name: "maximize"){ 63 | print("Maxxx") 64 | } 65 | .padding([.trailing], 4) 66 | TopBarButton(name: "close"){ 67 | print("Close") 68 | } 69 | 70 | }.padding([.trailing], 4) 71 | 72 | } 73 | Image("window-top-right") 74 | 75 | } 76 | .frame(height: 30) 77 | } 78 | } 79 | 80 | 81 | 82 | struct TopBarButton: View { 83 | var name: String = "close" 84 | var action: (() -> ()) 85 | @State var isHover: Bool = false 86 | @State var isDown: Bool = false 87 | static let Size = CGSize(width: 21, height: 21) 88 | 89 | var body: some View { 90 | 91 | 92 | Image(isDown ? "\(name)-active" : (isHover ? "\(name)-hover" : "\(name)-normal") ) 93 | .resizable() 94 | .frame(width: TopBarButton.Size.width, height: TopBarButton.Size.height) 95 | 96 | .onHover { hover in 97 | isHover = hover 98 | } 99 | .highPriorityGesture( 100 | DragGesture(minimumDistance: 0) 101 | .onChanged({ _ in 102 | print("hu") 103 | isDown = true 104 | }) 105 | .onEnded({ gesture in 106 | isDown = false 107 | if(CGRect(origin: .zero, size: TopBarButton.Size).contains(gesture.location)) { 108 | action() 109 | } 110 | }) 111 | ) 112 | 113 | 114 | } 115 | } 116 | 117 | struct XPTitlebar_Previews: PreviewProvider { 118 | static var previews: some View { 119 | 120 | XPTitleBar(title: "Test titel!", xpIcon: .document) 121 | .previewLayout(.fixed(width: 500, height: 40)) 122 | 123 | 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPToggleStyle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPPickerStyle.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 07/01/2022. 6 | // 7 | 8 | import Foundation 9 | 10 | import Combine 11 | import SwiftUI 12 | 13 | public struct XPToggleStyle: ToggleStyle { 14 | public init(){} 15 | public func makeBody(configuration: Configuration) -> some View { 16 | HStack { 17 | SmallControl(type: "checkbox", checked: configuration.isOn) { 18 | configuration.isOn.toggle() 19 | } 20 | configuration.label 21 | .foregroundColor(.black) 22 | .onTapGesture { 23 | configuration.isOn.toggle() 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/SwiftXP/XPWindow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XPWIndow.swift 3 | // SwiftXP 4 | // 5 | // Created by Bart Jakobs on 08/01/2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public struct XPWindow: View where Content : View { 11 | var title: String 12 | var xpIcon: XPIcon 13 | 14 | var content: () -> Content 15 | 16 | 17 | public init(title: String = "", xpIcon: XPIcon = .document, @ViewBuilder _ content: @escaping () -> Content) { 18 | self.title = title 19 | self.xpIcon = xpIcon 20 | self.content = content 21 | } 22 | 23 | public var body: some View { 24 | 25 | VStack(spacing: 0) { 26 | XPTitleBar(title: title, xpIcon: xpIcon) 27 | 28 | 29 | HStack(spacing: 0) { 30 | Image("window-left") 31 | .resizable() 32 | .frame(width: 4) 33 | Spacer() 34 | content() 35 | .padding(4) 36 | Spacer() 37 | Image("window-right") 38 | .resizable() 39 | .frame(width: 4) 40 | } 41 | 42 | .background(Color(nsColor: #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) )) 43 | HStack(spacing: 0) { 44 | Image("window-bottom-left") 45 | 46 | .frame(width: 4, height: 4) 47 | 48 | Image("window-bottom") 49 | .resizable() 50 | .frame(height: 4) 51 | 52 | Image("window-bottom-right") 53 | 54 | .frame(width: 4, height: 4) 55 | } 56 | 57 | 58 | } 59 | 60 | } 61 | } 62 | 63 | 64 | struct XPWIndow_Previews: PreviewProvider { 65 | static var previews: some View { 66 | XPWindow { 67 | Text("Oh?") 68 | .padding() 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Tests/SwiftXPTests/SwiftXPTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import SwiftXP 3 | 4 | final class SwiftXPTests: XCTestCase { 5 | func testExample() throws { 6 | // no tests, because SwiftUI is testable by looking at the UI, 7 | // according to Apple. 8 | // IDK. 9 | 10 | } 11 | } 12 | --------------------------------------------------------------------------------