-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
633 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## User settings | ||
xcuserdata/ | ||
|
||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | ||
*.xcscmblueprint | ||
*.xccheckout | ||
|
||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) | ||
build/ | ||
DerivedData/ | ||
*.moved-aside | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
|
||
## App packaging | ||
*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
## Playgrounds | ||
timeline.xctimeline | ||
playground.xcworkspace | ||
|
||
# Swift Package Manager | ||
# | ||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. | ||
# Packages/ | ||
# Package.pins | ||
# Package.resolved | ||
# *.xcodeproj | ||
# | ||
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata | ||
# hence it is not needed unless you have added a package configuration file to your project | ||
# .swiftpm | ||
|
||
.build/ | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. | ||
# Instead, use fastlane to re-generate the screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/#source-control | ||
|
||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots/**/*.png | ||
fastlane/test_output | ||
|
||
# Custom | ||
.DS_Store |
235 changes: 191 additions & 44 deletions
235
Like-Hangul.xcodeproj/project.pbxproj → Like Hangul.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions
43
Like Hangul.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "BitByteData", | ||
"repositoryURL": "https://github.com/tsolomko/BitByteData", | ||
"state": { | ||
"branch": null, | ||
"revision": "3ee55b113ae52d5c1f4cbec0ed4eae613dcd7eff", | ||
"version": "1.4.3" | ||
} | ||
}, | ||
{ | ||
"package": "Hwp-Swift", | ||
"repositoryURL": "https://github.com/sboh1214/Hwp-Swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "ae21bf695c0f35686e62b795023bd9d0a0a6fbd9", | ||
"version": "0.11.0" | ||
} | ||
}, | ||
{ | ||
"package": "OLEKit", | ||
"repositoryURL": "https://github.com/CoreOffice/OLEKit.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "c78476f851d7333c1e479c663731654a3b377a18", | ||
"version": "0.3.0" | ||
} | ||
}, | ||
{ | ||
"package": "SWCompression", | ||
"repositoryURL": "https://github.com/tsolomko/SWCompression.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "4fa4adcf5bbf263388edcbf2631987039a84b389", | ||
"version": "4.5.7" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
19 changes: 0 additions & 19 deletions
19
Like-Hangul.xcodeproj/xcuserdata/sboh1214.xcuserdatad/xcschemes/xcschememanagement.plist
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import SwiftUI | ||
|
||
struct ContentView: View { | ||
var body: some View { | ||
ScrollView { | ||
#if os(iOS) | ||
UIHwpView() | ||
#elseif os(macOS) | ||
NSHwpView() | ||
#endif | ||
} | ||
} | ||
} | ||
|
||
struct ContentView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ContentView() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SwiftUI | ||
|
||
struct NSHwpView: NSViewRepresentable { | ||
typealias NSViewType = NSTextView | ||
|
||
func makeNSView(context: Context) -> NSViewType { | ||
let view = NSTextView() | ||
return view | ||
} | ||
|
||
func updateNSView(_ nsView: NSViewType, context: Context) { | ||
|
||
} | ||
} | ||
|
||
struct NSHwpView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
NSHwpView() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SwiftUI | ||
|
||
struct UIHwpView: UIViewRepresentable { | ||
typealias UIViewType = UIView | ||
|
||
func makeUIView(context: Context) -> UIViewType { | ||
let view = UIView() | ||
return view | ||
} | ||
|
||
func updateUIView(_ uiView: UIViewType, context: Context) { | ||
|
||
} | ||
} | ||
|
||
struct UIHwpView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
UIHwpView() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import SwiftUI | ||
|
||
@main | ||
struct LikeHangulApp: App { | ||
var body: some Scene { | ||
DocumentGroup(newDocument: LikeHangulDocument()) { file in | ||
MainView(document: file.$document) | ||
} | ||
.commands { | ||
ToolbarCommands() | ||
SidebarCommands() | ||
CommandGroup(replacing: CommandGroupPlacement.appInfo) { | ||
Button("한글다운에 관하여...") { | ||
|
||
} | ||
} | ||
} | ||
// WindowGroup("About") { | ||
// AboutView() | ||
// } | ||
|
||
#if os(macOS) | ||
Settings { | ||
PreferencesView() | ||
.padding(20) | ||
.frame(width: 375, height: 150) | ||
} | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import SwiftUI | ||
import UniformTypeIdentifiers | ||
import CoreHwp | ||
|
||
extension UTType { | ||
static var hwp: UTType { | ||
UTType(importedAs: "com.haansoft.HancomOfficeViewer.mac.hwp") | ||
} | ||
} | ||
|
||
struct LikeHangulDocument: FileDocument { | ||
var hwp: HwpFile | ||
|
||
init() { | ||
hwp = HwpFile() | ||
} | ||
|
||
static var readableContentTypes: [UTType] { [.hwp] } | ||
|
||
init(configuration: ReadConfiguration) throws { | ||
hwp = try HwpFile(fromWrapper: configuration.file) | ||
} | ||
|
||
func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper { | ||
throw CocoaError(.persistentStoreSave) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import SwiftUI | ||
|
||
struct MainView: View { | ||
@Binding var document: LikeHangulDocument | ||
|
||
@State var isFileInfoPresented: Bool = false | ||
|
||
var body: some View { | ||
NavigationView { | ||
Group { | ||
SidebarView() | ||
ContentView() | ||
} | ||
}.toolbar { | ||
#if os(macOS) | ||
ToolbarItem(placement: .navigation){ | ||
Button(action: toggleSidebar) { | ||
Image(systemName: "sidebar.left") | ||
} | ||
} | ||
#endif | ||
ToolbarItem(placement: .automatic) { | ||
Button(action: {isFileInfoPresented = true}) { | ||
Image(systemName: "info.circle") | ||
} | ||
} | ||
}.sheet(isPresented: $isFileInfoPresented) { | ||
FileInfoView(header: document.hwp.fileHeader, toggleSheet: {isFileInfoPresented = false}) | ||
} | ||
} | ||
} | ||
|
||
#if os(macOS) | ||
func toggleSidebar() { | ||
NSApp.keyWindow?.firstResponder?.tryToPerform(#selector(NSSplitViewController.toggleSidebar(_:)), with: nil) | ||
} | ||
#endif | ||
|
||
struct MainView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
MainView(document: .constant(LikeHangulDocument())) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import SwiftUI | ||
|
||
struct AdvancedView: View { | ||
var body: some View { | ||
Text("Advanced") | ||
} | ||
} | ||
|
||
struct AdvancedView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
AdvancedView() | ||
} | ||
} |
Oops, something went wrong.