apps-gorm/GormPosingView.m

90 lines
2 KiB
Mathematica
Raw Normal View History

GormBoxEditor.h GormBoxEditor.m GormButtonEditor.h GormButtonEditor.m GormControlEditor.h GormControlEditor.m GormInternalViewEditor.h GormInternalViewEditor.m GormMatrixEditor.h GormPlacementInfo.h GormPosingView.h GormPosingView.m GormSplitViewEditor.h GormSplitViewEditor.m GormTabViewEditor.h GormTabViewEditor.m GormViewEditor.h GormViewEditor.m GormViewWithContentViewEditor.h GormViewWithContentViewEditor.m GormViewWithSubviewsEditor.h GormViewWithSubviewsEditor.m Palettes/3Containers/GormTableViewEditor.h Palettes/3Containers/GormTableViewEditor.m ChangeLog GNUmakefile Gorm.h Gorm.m GormClassEditor.m GormClassManager.m GormCustomClassInspector.m GormCustomView.m GormDocument.m GormMatrixEditor.m GormObjectEditor.m GormOutlineView.m GormPrivate.h GormWindowEditor.m Palettes/0Menus/GormMenuEditor.m Palettes/1Windows/main.m Palettes/2Controls/GormBoxInspector.gorm Palettes/2Controls/GormButtonInspector.gorm Palettes/2Controls/GormTextFieldInspector.gorm Palettes/2Controls/main.m Palettes/3Containers/GNUmakefile Palettes/3Containers/GormNSBrowser.m Palettes/3Containers/GormNSOutlineView.m Palettes/3Containers/GormNSTableView.h Palettes/3Containers/GormTableColumnInspector.classes Palettes/3Containers/GormTableColumnInspector.gorm Palettes/3Containers/GormTableViewInspector.gorm Palettes/3Containers/inspectors.m Palettes/3Containers/main.m Palettes/4Data/inspectors.m Palettes/4Data/main.m git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@14267 72102866-910b-0410-8b05-ffd578937521
2002-08-14 00:01:42 +00:00
#import "GormPosingView.h"
@implementation GormPosingView
struct _rFlagsType2 {
/*
* 'flipped_view' is set in NSViews designated initialiser (and other
* methods that create views) to be the value returned by [-isFlipped]
* This caching assumes that the value returned by [-isFlipped] will
* not change during the views lifetime - if it does, the view must
* be sure to change the flag accordingly.
*/
unsigned flipped_view:1;
unsigned has_subviews:1; /* The view has subviews. */
unsigned has_currects:1; /* The view has cursor rects. */
unsigned has_trkrects:1; /* The view has tracking rects. */
unsigned has_draginfo:1; /* View/window has drag types. */
unsigned opaque_view:1; /* For views whose opacity may */
/* change to keep track of it. */
unsigned valid_rects:1; /* Some cursor rects may be ok. */
unsigned needs_display:1; /* Window/view needs display. */
unsigned isCustom:1;
} ;
- (id) initWithFrame: (NSRect)frameRect
{
struct _rFlagsType2 *rft2;
rft2 = (struct _rFlagsType2 *) &_rFlags;
rft2->isCustom = 0;
[super initWithFrame: frameRect];
}
- (void) viewWillMoveToWindow: (NSWindow*)newWindow
{
if ([newWindow isKindOfClass: NSClassFromString(@"GormNSWindow")])
{
[self setCustom: YES];
}
[super viewWillMoveToWindow: newWindow];
}
- (BOOL) isCustom
{
struct _rFlagsType2 *rft2;
rft2 = (struct _rFlagsType2 *) &_rFlags;
if (rft2->isCustom == 0)
return NO;
else
return YES;
}
- (void) display
{
if ([self isCustom])
{
NSLog(@"%@ display", self);
}
[super display];
}
- (void) displayIfNeeded
{
if ([self isCustom])
{
NSLog(@"%@ displayIfNeeded", self);
}
[super displayIfNeeded];
}
- (void) setCustom: (BOOL) value
{
struct _rFlagsType2 *rft2;
rft2 = (struct _rFlagsType2 *) &_rFlags;
if (value)
rft2->isCustom = 1;
else
rft2->isCustom = 0;
}
@end