mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 04:50:37 +00:00
Improved documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22022 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7971a89c72
commit
f67f526cb3
3 changed files with 64 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-11-16 fabien <fabien@sonappart.net>
|
||||
|
||||
* Source/NSColorPanel.m : Improved documentation
|
||||
* Source/NSColorWell.m : Improved documentation
|
||||
|
||||
2005-11-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSEPSPrintOperation.m:
|
||||
|
|
|
@ -363,6 +363,8 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
|
||||
@end
|
||||
|
||||
/**<p>TODO Description</p>
|
||||
*/
|
||||
@implementation NSColorPanel
|
||||
|
||||
/*
|
||||
|
@ -378,6 +380,8 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
}
|
||||
}
|
||||
|
||||
/**<p>Creates ( if needed ) and returns the shared NSColorPanel</p>
|
||||
*/
|
||||
+ (NSColorPanel *)sharedColorPanel
|
||||
{
|
||||
if (_gs_gui_color_panel == nil)
|
||||
|
@ -395,6 +399,8 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
return _gs_gui_color_panel;
|
||||
}
|
||||
|
||||
/** <p>Returns whether the NSColorPanel has been already created</p>
|
||||
*/
|
||||
+ (BOOL) sharedColorPanelExists
|
||||
{
|
||||
return (_gs_gui_color_panel == nil) ? NO : YES;
|
||||
|
@ -478,16 +484,26 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
/** <p>Returns the NSColorPanel's accessory view if it exists,
|
||||
nil otherwise</p><p>See Also: -setAccessoryView:</p>
|
||||
*/
|
||||
- (NSView *) accessoryView
|
||||
{
|
||||
return _accessoryView;
|
||||
}
|
||||
|
||||
/** <p> Returns whether the NSColorPanel continuously sends the action message.
|
||||
The default is ... </p><p>See Also: -setContinuous:-setAction: -setTarget:
|
||||
</p>
|
||||
*/
|
||||
- (BOOL) isContinuous
|
||||
{
|
||||
return _isContinuous;
|
||||
}
|
||||
|
||||
/** <p> Returns the current mode of the NSColorPanel.</p>
|
||||
<p>See Also: -setMode:</p>
|
||||
*/
|
||||
- (int) mode
|
||||
{
|
||||
if (_currentPicker != nil)
|
||||
|
@ -496,6 +512,11 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**<p> Sets the accessoryView to a view. The old view ( if exists ) will be
|
||||
remove ( and release ). You need to retain it if you want to use
|
||||
it later</p>
|
||||
<p>See Also: -accessoryView</p>
|
||||
*/
|
||||
- (void) setAccessoryView: (NSView *)aView
|
||||
{
|
||||
if (_accessoryView == aView)
|
||||
|
@ -512,11 +533,17 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
_action = aSelector;
|
||||
}
|
||||
|
||||
/** <p>Sets whether the NSColorPanel sends continuously action messages</p>
|
||||
<p>See Also: -isContinuous</p>
|
||||
*/
|
||||
- (void) setContinuous: (BOOL)flag
|
||||
{
|
||||
_isContinuous = flag;
|
||||
}
|
||||
|
||||
/** <p>Set the NSColorPanel mode to mode. TODO more about _pickers</p>
|
||||
<p>See Also: -mode</p>
|
||||
*/
|
||||
- (void) setMode: (int)mode
|
||||
{
|
||||
int i, count;
|
||||
|
@ -605,11 +632,18 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
|||
return 1.0;
|
||||
}
|
||||
|
||||
/** <p>Returns the current NSColor displayed by the NSColorPanel</p>
|
||||
<p>See Also : -setColor:</p>
|
||||
*/
|
||||
- (NSColor *) color
|
||||
{
|
||||
return [_colorWell color];
|
||||
}
|
||||
|
||||
/** <p>Sets the NSColor displayed to aColor. This method post a
|
||||
NSColorPanelColorChangedNotification notification</p>
|
||||
<p>See Also: -color</p>
|
||||
*/
|
||||
- (void) setColor: (NSColor *)aColor
|
||||
{
|
||||
[_colorWell setColor: aColor];
|
||||
|
|
|
@ -71,6 +71,11 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
return _action;
|
||||
}
|
||||
|
||||
/**<p>Activates the NSColorWell and displays the NSColorPanel with the current
|
||||
NSColorWell's color.
|
||||
If exclusive is YES other NSColorWells are desacivate (through notification)
|
||||
</p><p>See Also: -deactivate</p>
|
||||
*/
|
||||
- (void) activate: (BOOL)exclusive
|
||||
{
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
|
@ -100,11 +105,18 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
[self setNeedsDisplay: YES];
|
||||
}
|
||||
|
||||
/**<p> Returns the current NSColor of the NSColorWell</p>
|
||||
<p> See Also: -setColor:</p>
|
||||
*/
|
||||
- (NSColor *) color
|
||||
{
|
||||
return _the_color;
|
||||
}
|
||||
|
||||
/** <p>Desactivates the NSColorWell and marks self for display.
|
||||
It is usally call from an observer, when another NSColorWell is
|
||||
activate</p><p>See Also: -activate:</p>
|
||||
*/
|
||||
- (void) deactivate
|
||||
{
|
||||
_is_active = NO;
|
||||
|
@ -260,11 +272,17 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
return self;
|
||||
}
|
||||
|
||||
/** <p>Returns whether the NSColorWell is active</p>
|
||||
<p>See Also: -activate: -deactivate</p>
|
||||
*/
|
||||
- (BOOL) isActive
|
||||
{
|
||||
return _is_active;
|
||||
}
|
||||
|
||||
/** <p>Returns whether the NSColorWell has border</p>
|
||||
<p>See Also: -setBordered:</p>
|
||||
*/
|
||||
- (BOOL) isBordered
|
||||
{
|
||||
return _is_bordered;
|
||||
|
@ -322,12 +340,19 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
|
|||
_action = action;
|
||||
}
|
||||
|
||||
/**<p>Sets whether the NSColorWell has border and marks self for display</p>
|
||||
<p>See Also: -isBordered</p>
|
||||
*/
|
||||
- (void) setBordered: (BOOL)bordered
|
||||
{
|
||||
_is_bordered = bordered;
|
||||
[self setNeedsDisplay: YES];
|
||||
}
|
||||
|
||||
/** <p>Sets the NSColorWell to color. Sets the NSColorPanel if active,
|
||||
notify the target of color change and marks self to display</p>
|
||||
<p>See Also: -color</p>
|
||||
*/
|
||||
- (void) setColor: (NSColor *)color
|
||||
{
|
||||
ASSIGN(_the_color, color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue