Release 1.0 Copyleft ©1995 by Thomas Engel. All Rights Reserved.
MiscColorView |
Inherits From: | View : Responder : Object | |
Declared In: | misckit/MiscColorView.h |
Class Description |
This view fills its contents with a specified color
(setBackgroundColor:). You can also use the
setUseSameColorAsDesktop: method to force it to use the
color of the users desktop background.
In this release you can not use transparency in the background. |
Instance Variables |
NXColor backgroundColor;
BOOL sameColorAsDesktop; |
backgroundColor | The views background color. | |
sameColorAsDesktop | True if we draw in the desktop color. |
Method Types |
Initializing the class object | + initialize | |
Initializing a new object | - initFrame: | |
Adjusting appearance | - setBackgroundColor: - backgroundColor - setUseSameColorAsDesktop: - hasSameColorAsDesktop | |
Drawing | - drawSelf:: | |
Archiving | - read: - write: |
Class Methods |
initialize |
+ initialize |
Initializes the class.
See also: - initFrame: |
Instance Methods |
backgroundColor |
- (NXColor)backgroundColor |
Returns the background color.
See also: - setBackgroundColor:
drawSelf:: |
- drawSelf:(const NXRect *)rects :(int)rectCount |
Redraws the views whole area using the backgroundColor. If
we should appear in the same color as the desktop then we will
read the NeXT1/BackgroundColor default. If there is no such
defaut it will use the blue color with RGB values: 0.333, 0.333,
0.466.
See also: - setUseSameColorAsDesktop:
hasSameColorAsDesktop |
- (BOOL)hasSameColorAsDesktop |
Returns YES is we will always draw our background in the same
color as the desktop.
See also: - setUseSameColorAsDesktop:, - setBackgroundColor:
initFrame: |
- initFrame:(const NXRect *)frameRect |
The views designated init method sets the default background
color to white.
See also: - initialize
read: |
- read:(NXTypedStream *)stream |
Reads the object from a stream. We take care of versioning.
See also: - write:, - initialize,
setBackgroundColor: |
- setBackgroundColor:(NXColor)color |
Sets the background color to use if we do not restict the view to
the desktop color.
See also: - setUseSameColorAsDesktop:, - drawSelf::
setUseSameColorAsDesktop: |
- setUseSameColorAsDesktop:(BOOL)flag |
If flag is YES then we will use the desktop's color for our
background.
See also: - hasSameColorAsDesktop, - drawSelf::
write: |
- write:(NXTypedStream *)stream |
Writes the object to a stream using the latest archiving version.
See also: - read:, - initialize |