Added autosize switch for forms.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21689 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-08-30 02:40:32 +00:00
parent 00d55609da
commit eb7c76758e
8 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,13 @@
2005-08-29 22:41 Gregory John Casamento <greg_casamento@yahoo.com>
* Palettes/2Controls/GormFormAttributesInspector.h: Added ivar
autosizeSwitch.
* Palettes/2Controls/GormFormAttributesInspector.m: Added code
to handle autosize flag.
* Palettes/2Controls/GormNSFormInspector.gorm: Added autosize flag
* Palettes/2Controls/GormNSMatrixInspector.gorm: Box on bottom
now reads "Options".
2005-08-29 19:40 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormMatrixEditor.m: Corrected bug in

View file

@ -49,6 +49,7 @@
NSButton *editableSwitch;
NSButton *selectableSwitch;
NSButton *scrollableSwitch;
NSButton *autosizeSwitch;
id backgroundColorWell;
id drawsBackgroundSwitch;
id tagForm;

View file

@ -34,11 +34,10 @@
*/
#include "GormFormAttributesInspector.h"
#warning GNUstep bug ?
#include <GormCore/NSColorWell+GormExtensions.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSDebug.h>
#include <AppKit/NSButton.h>
#include <AppKit/NSForm.h>
@ -147,6 +146,12 @@
{
[object setTag: [[sender cellAtIndex: 0] intValue]];
}
/* autosize */
else if (sender == autosizeSwitch)
{
BOOL flag = ([autosizeSwitch state] == NSOnState) ? YES : NO;
[object setAutosizesCells: flag];
}
[super ok:sender];
}
@ -170,6 +175,7 @@
[editableSwitch setState:[[object cellAtIndex: 0] isEditable]];
[selectableSwitch setState:[[object cellAtIndex: 0] isSelectable]];
[scrollableSwitch setState:[[object cellAtIndex: 0] isScrollable]];
[autosizeSwitch setState: [object autosizesCells]];
// Cells tags = position is not directly stored in the Form so guess it.
{

View file

@ -12,7 +12,8 @@
cellPositionSwitch,
editableSwitch,
scrollableSwitch,
selectableSwitch
selectableSwitch,
autosizeSwitch
);
Super = IBInspector;
};