Skip to content

Commit 5d0bf6b

Browse files
authored
Merge pull request #83 from 42Box/cluster_develop
Merge: Second Week Release
2 parents 24cc8dc + e860578 commit 5d0bf6b

109 files changed

Lines changed: 2681 additions & 739 deletions

File tree

Some content is hidden

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

Box42.xcodeproj/project.pbxproj

Lines changed: 200 additions & 29 deletions
Large diffs are not rendered by default.

Box42/Box/BoxBaseContainerViewController.swift

Lines changed: 0 additions & 129 deletions
This file was deleted.

Box42/Box/View/BoxButtonViewGroup.swift

Lines changed: 0 additions & 92 deletions
This file was deleted.

Box42/BoxWindowController.swift

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//
2+
// BoxWindowController.swift
3+
// Box42
4+
//
5+
// Created by Chanhee Kim on 8/11/23.
6+
//
7+
8+
import Cocoa
9+
10+
class BoxWindowController: NSWindowController, NSWindowDelegate {
11+
override init(window: NSWindow?) {
12+
let contentRect = BoxSizeManager.shared.boxViewSizeNSRect
13+
let styleMask: NSWindow.StyleMask = [.resizable, .titled, .fullSizeContentView]
14+
let windowInstance = NSWindow(contentRect: contentRect, styleMask: styleMask, backing: .buffered, defer: false)
15+
super.init(window: windowInstance)
16+
windowInstance.delegate = self
17+
18+
windowInstance.title = "Box"
19+
windowInstance.titlebarAppearsTransparent = true
20+
windowInstance.titleVisibility = .hidden
21+
windowInstance.isMovableByWindowBackground = true
22+
windowInstance.isReleasedWhenClosed = false
23+
windowInstance.standardWindowButton(.closeButton)?.isHidden = true
24+
windowInstance.standardWindowButton(.miniaturizeButton)?.isHidden = true
25+
windowInstance.standardWindowButton(.zoomButton)?.isHidden = true
26+
27+
let boxViewController = BoxBaseContainerViewController(nibName: nil, bundle: nil)
28+
windowInstance.contentViewController = boxViewController
29+
}
30+
31+
required init?(coder: NSCoder) {
32+
fatalError("init(coder:) has not been implemented")
33+
}
34+
}
35+
36+
extension BoxWindowController {
37+
func windowWillClose(_ notification: Notification) {
38+
StateManager.shared.showWindow = false
39+
}
40+
41+
func windowWillMiniaturize(_ notification: Notification) {
42+
StateManager.shared.showWindow = false
43+
}
44+
}

0 commit comments

Comments
 (0)