就地最小化 - 我需要自定义框架吗
我想创建一个系统范围的最小化就地功能,该功能在双击第 0 层中任何可见窗口的标题栏时发生。
看起来这将是一个非常简单的重新实现功能... -bar 双击,只绘制标题栏。就是这样。问题在于在所有应用程序中实施它。我认为需要编写一个自定义框架来覆盖 AppKit 中的行为?也许是 NSApplication、NSWindow 或 NSView?
如何重新创建就地最小化? 框架是我唯一的选择吗?如果我创建一个框架,我可以替换第 3 方应用程序中的最小化行为吗?
我需要重写哪个框架才能拦截并重新创建最小化按钮的默认行为?
有关就地最小化的更多信息: 我熟悉 Unsanity 的 WindowShade,这正是我想要创建的。据推测,unsanity 正在开发 Lion 版本,但他们的记录却很糟糕。就地最小化是 OS 7 或 8 时代的一项系统功能。我尝试过其他实用程序来尝试替换此功能,但没有任何实用程序可以在核心系统级别进行就地最小化就像需要完成一样。请不要提供实用建议,我将构建自己的。
我已经构建了一个重新创建就地最小化的应用程序,但它还不够好。 当第三方窗口最小化到停靠位置时,我的应用程序通过将“占位符”窗口(属于我的应用程序)代替第三方窗口,半成功地重新创建了最小化。当我的窗口(仅标题栏)被双击时,我关闭窗口并从扩展坞恢复真实的窗口。
我的自定义应用程序运行良好,但需要进行大量应用程序切换。我已经优化了应用程序之间的切换,使其几乎无缝,但事实仍然是,每次双击窗口标题栏时都会发生应用程序切换。应用程序切换的结果是菜单栏来回切换,当我的应用程序获得焦点时,第三方应用程序的托盘会隐藏起来,等等。
因此,尽管我已经构建了一个概念应用程序,但此方法不会像我希望的那样工作。就地最小化需要使用构建应用程序之外的其他方法来实现,我需要帮助了解如何做到这一点。
我知道我需要做什么。欢迎提出建议和帮助。 我想我需要编写一个自定义框架来替换 AppKit?尽管我只需要覆盖代码的一小部分,但这似乎令人难以承受?即核心 _minimize 函数无论是什么。
当双击第 3 方窗口的标题栏时,只需剪辑到标题栏即可让系统的其余部分正常运行。取消最小化(第二次双击)时,将剪辑设置回全窗口。
简单吧?
感谢您的任何帮助/建议,
克里斯
I want to create a system wide minimize-in-place feature that occurs when double-clicking the title bar of any visible window in layer 0.
It seems that this would be a really simple feature to re-implement... When a title-bar is double-clicked, just draw the title bar only. That's it. The problem is implimenting it in all applications. I think it requires writting a custom framework to override the behavior in AppKit? Maybe NSApplication, NSWindow or NSView?
How can I recreate minimize-in-place?
Is a framework my only choice? If I create a framework, can I replace the behavior of minimize in 3rd party apps?
Which framework do I need to override in order to intercept and recreate the default behavior of the minimize button?
More about minimize-in-place:
I am familiar with WindowShade by Unsanity, this is exactly what I want to create. Supposedly unsanity is working on a Lion version, but their track record is bismal. Minimize-in-place was a system feature way back in the days of OS 7 or 8. I have tried other utilities that try to replace this feature, and there aren't any that do minimize-in-place at a core system level like it needs to be done. Please don't offer utitlity suggestions, I am going to build my own.
I have built an Application that recreates minimize-in-place, but it's not good enough.
My Application semi-successfully recreates minimize-in-place by putting "placeholder" windows (belonging to my app) in place of the 3rd party windows when they get minimized to dock. When my window (title bar only) gets double-clicked, I close my window and restore the real window from the dock.
My custom app works perfectly, but there is a lot of application switching going on. I have optimized the switching between apps to be nearly seamless, but the fact remains that there is application switching going on every time a window title bar is double-clicked. The result of application switching is that menu bars switch back and forth, pallets of 3rd party apps hide themselves when my app takes focus, and the list goes on.
So, although I've built a concept app, this method isn't going to work as I'd like it to. Minimize-in-place needs to be implemented using some other method than building an Application, and I need help understanding how to do it.
What I know think I need to do. Suggestions and assistance welcome.
I think I need to write a custom framework that replaces AppKit? This seems overwhelming even though I only need a super-tiny portion of the code to be overridden? i.e. the core _minimize function whatever that may be.
When a title-bar of 3rd party window is double-clicked, just clip to the title bar and let the rest of the system function as normal. On un-minimize (double click 2nd time), set clip back to full window.
Simple right?
Thanks for any assistance/suggestions,
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论