Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Box42/Box/BoxButtonHandler.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// BoxButtonHandler.swift
// Box42
//
// Created by Chanhee Kim on 8/11/23.
//

import Cocoa

class BoxButtonHandler {
var clickAction: ((NSButton) -> Void)?

@objc func buttonClicked(_ sender: NSButton) {
clickAction?(sender)
}
}
275 changes: 0 additions & 275 deletions Box42/Box/BoxController.swift

This file was deleted.

33 changes: 14 additions & 19 deletions Box42/Box/BoxModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@
// BoxViewModel.swift
// Box42
//
// Created by Chan on 2023/03/16.
// Created by Chan on 2023/08/11.
//

import WebKit
import Cocoa

public extension NSScreen {
static let screenSize = NSScreen.main?.visibleFrame.size
static let screenWidth = screenSize!.width
static let screenHeight = screenSize!.height
static let halfOfScreen = (x: screenWidth / 2, y: screenHeight / 2)
static let customScreenSize = (x: CGFloat(900), y: screenHeight - 132)
}

public struct BoxViewSize {
var halfSize: (width: CGFloat, height: CGFloat) = (NSScreen.halfOfScreen.x, NSScreen.halfOfScreen.y)
var size: (width: CGFloat, height: CGFloat) = (NSScreen.customScreenSize.x, NSScreen.customScreenSize.y)
var buttonGroupSize: (width: CGFloat, height: CGFloat) = (CGFloat(132), NSScreen.customScreenSize.y)
var viewStack = [NSView()]
}

public class BoxStatus {
var isPin: Bool = false
struct BoxViewSize {
var halfSize: (width: CGFloat, height: CGFloat)!
var size: (width: CGFloat, height: CGFloat)!
var buttonGroupSize: (width: CGFloat, height: CGFloat)!
var viewStack: [NSView?]

init() {
halfSize = (NSScreen.halfOfScreen.x, NSScreen.halfOfScreen.y)
size = (NSScreen.customScreenSize.x, NSScreen.customScreenSize.y)
buttonGroupSize = (CGFloat(132), NSScreen.customScreenSize.y)
viewStack = [NSView()]
}
}
27 changes: 0 additions & 27 deletions Box42/Box/BoxView.swift

This file was deleted.

Loading