KMNBotaBaseViewController.swift 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // KMNBotaBaseViewController.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by User-Tangchao on 2024/11/30.
  6. //
  7. import Cocoa
  8. import KMComponentLibrary
  9. class KMNBotaBaseViewController: KMNBaseViewController {
  10. private lazy var searchButton_: ComponentButton = {
  11. let view = ComponentButton()
  12. view.properties = ComponentButtonProperty(type: .text_gray, size: .xxs, state: .normal, isDisable: false, onlyIcon: true)
  13. return view
  14. }()
  15. private lazy var headerSearchView_: KMNBotaHeaderSearchView? = {
  16. let view = KMNBotaHeaderSearchView.createFromNib()
  17. return view
  18. }()
  19. var searchButton: ComponentButton {
  20. get {
  21. return searchButton_
  22. }
  23. }
  24. var headerSearchView: KMNBotaHeaderSearchView? {
  25. get {
  26. return headerSearchView_
  27. }
  28. }
  29. var searchGroupView: ComponentGroup?
  30. var searchGroupTarget: ComponentButton?
  31. override func viewDidLoad() {
  32. super.viewDidLoad()
  33. // Do view setup here.
  34. }
  35. func showHeaderSearch() {
  36. headerSearchView?.isHidden = false
  37. }
  38. func hideHeaderSearch() {
  39. headerSearchView?.clearInputData()
  40. headerSearchView?.isHidden = true
  41. }
  42. }