About NSCell
来源:互联网 发布:中国gdp数据分析 编辑:程序博客网 时间:2024/05/21 09:26
The NSCell class provides a mechanism for displaying text or images in an NSView without the overhead of a full NSView subclass. In particular, it provides much of the functionality of the NSText class by providing access to a shared NSText object used by all instances of NSCell in an application. NSCells are also extremely useful for placing text or images at various locations in a custom subclass of NSView.
NSCell is used heavily by most of the NSControl classes to implement their internal workings. For example, NSSlider uses an NSSliderCell, NSTextField uses an NSTextFieldCell, and NSBrowser uses an NSBrowserCell. Sending a message to the NSControl is often simpler than dealing directly with the corresponding NSCell. For instance, NSControls typically invoke updateCell:
(causing the cell to be displayed) after changing a cell attribute; whereas if you directly call the corresponding method of the NSCell, the NSCell might not automatically display itself again.
Some subclasses of NSControl (notably NSMatrix) group NSCells in an arrangement where they act together in some cooperative manner. Thus, with an NSMatrix, you can implement a uniformly sized group of radio buttons without needing an NSView for each button (and without needing an NSText object as the field editor for the text on each button).
The NSCell class provides primitives for displaying text or an image, editing text, setting and getting object values, maintaining state, highlighting, and tracking the mouse. NSCell’s method trackMouse:inRect:ofView:untilMouseUp:
implements the mechanism that sends action messages to target objects. However, NSCell implements target/action features abstractly, deferring the details of implementation to NSActionCell and its subclasses.
- About NSCell
- NSTableView中自定义NSCell
- NSButtonCell inside custom NSCell
- Cocoa NSTableView, NSTextFieldCell, NSCell, ImageAndTextCell tutorial
- about:
- about
- About
- About
- About
- MacOS 上的 NSCell(比较 NSButton 和 NSButtonCell )
- All about "about face"
- about:blank about:internets
- About DL, About Mxnet
- about serial
- About me!
- About me
- about aop
- About macro
- C++总是能让我想起什么(7) ——类成员进行初始化,通常的方法有两种
- 微软面试题 5
- Tarjan算法的C++实现
- 微软面试题day 6(打印所有对称子串)
- MKMapView蓝屏现象
- About NSCell
- 微软面试题day 7(找数组中唯一出现两次的数)
- The Zen of Python
- 使用FireBreath写浏览器插件(三)
- C/C++面试题常考点(一)
- zoj 3344 //组合数学那种的DP
- Activity中ConfigChanges属性的用法
- 窗口传值(转载)
- 如何选择:数据端计算,应用端计算,客户端计算