Warning corrections, so that Gorm compiles completely clean without any noise from the compiler. Also a new header to properly declare the knob functions.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19076 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-04-12 01:41:32 +00:00
parent af3a0687b6
commit 2d45fa3a29
15 changed files with 106 additions and 35 deletions

View file

@ -1,4 +1,20 @@
2004-04-06 20:16 Gregory John Casamento <greg_casamento@yahoo.com>
2004-04-11 21:26 Gregory John Casamento <greg_casamento@yahoo.com>
* GormBoxEditor.m: Cleaned up warnings.
* GormImageEditor.m: same..
* GormInternalViewEditor.m: same..
* GormTabViewEditor.m: same..
* GormViewEditor.m: same..
* GormViewWithContentViewEditor.m: same..
* Palettes/0Menus/main.m: same..
* Palettes/3Containers/GormTableViewEditor.m: same..
* Palettes/3Containers/inspectors.m: same..
* Palettes/4Data/inspectors.m: same..
* Palettes/4Data/main.m: same..
* GormViewKnobs.m: Added reference to new header...
* GormViewKnobs.h: New header which declares the knob related functions.
2004-04-06 20:16 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassManager.m: Correction to how actions are added to
FirstResponder. Previously it was adding *all* actions to this

View file

@ -148,6 +148,7 @@ Gorm_HEADERS = \
GormViewWithSubviewsEditor.h \
GormViewWithContentViewEditor.h \
GormViewWindow.h \
GormViewKnobs.h \
GormBoxEditor.h \
GormClassManager.h \
GormControlEditor.h \

View file

@ -76,9 +76,9 @@
{
NSView *contentView = [_EO contentView];
contentViewEditor = [document editorForObject: contentView
inEditor: self
create: YES];
contentViewEditor = (GormInternalViewEditor *)[document editorForObject: contentView
inEditor: self
create: YES];
return YES;
}

View file

@ -81,7 +81,7 @@ static int handled_mask= NSDragOperationCopy|NSDragOperationGeneric|NSDragOperat
NSArray *types=[[sender draggingPasteboard] types];
unsigned int mask=[sender draggingSourceOperationMask];
NSDebugLLog(@"GormImageEditor draggingEntered mask=%i types=%@",mask,types);
// NSDebugLLog(@"GormImageEditor draggingEntered mask=%d types=%@",mask,types);
if ( mask&handled_mask &&
([types containsObject: NSFilenamesPboardType] ||

View file

@ -133,7 +133,7 @@ static NSImage *horizontalImage;
name: NSViewFrameDidChangeNotification
object: self];
parent = [document parentEditorForEditor: self];
parent = (GormViewWithSubviewsEditor *)[document parentEditorForEditor: self];
if ([parent isKindOfClass: [GormViewEditor class]])
[parent setNeedsDisplay: YES];

View file

@ -141,9 +141,9 @@
{
if ([[tabViewItem view] isKindOfClass: [GormViewEditor class]] == NO)
{
currentView = [document editorForObject: [tabViewItem view]
inEditor: self
create: YES];
currentView = (GormInternalViewEditor *)[document editorForObject: [tabViewItem view]
inEditor: self
create: YES];
NSDebugLog(@"dSTVI %@ %@ %@", self, currentView, [tabViewItem view]);
NSDebugLog(@"dsTVI %@ %@", self, [document parentEditorForEditor: currentView]);
}

View file

@ -185,7 +185,7 @@ static BOOL currently_displaying = NO;
name: NSViewFrameDidChangeNotification
object: self];
parent = [document parentEditorForEditor: self];
parent = (GormViewWithSubviewsEditor *)[document parentEditorForEditor: self];
if ([parent isKindOfClass: [GormViewEditor class]])
[parent setNeedsDisplay: YES];

52
GormViewKnobs.h Normal file
View file

@ -0,0 +1,52 @@
/*
GormViewKnobs.h
Copyright (C) 1999 Free Software Foundation, Inc.
Author: Gregory John Casamento
Date: 2004
This file is part of the GNUstep Interface Modeller Application.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef INCLUDED_GormViewKnobs_h
#define INCLUDED_GormViewKnobs_h
#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
#include <InterfaceBuilder/InterfaceBuilder.h>
void
GormShowFastKnobFills(void);
void
GormShowFrameWithKnob(NSRect aRect, IBKnobPosition aKnob);
void
GormDrawKnobsForRect(NSRect aRect);
void
GormDrawOpenKnobsForRect(NSRect aRect);
IBKnobPosition
GormKnobHitInRect(NSRect aFrame, NSPoint p);
NSRect
GormExtBoundsForRect(NSRect aRect);
#endif

View file

@ -25,7 +25,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "GormPrivate.h"
#include "GormViewKnobs.h"
#include <math.h>
static int KNOB_WIDTH = 0.0;

View file

@ -904,9 +904,7 @@ int _sortViews(id view1, id view2, void *context)
y1 = prevRect.origin.y,
y2 = currRect.origin.y,
h1 = prevRect.size.height,
h2 = currRect.size.height,
w1 = prevRect.size.width,
w2 = currRect.size.width;
w1 = prevRect.size.width;
if((x1 < x2 || x1 > x2) && ((y2 >= y1 && y2 <= (y1 + h1)) ||
(y2 <= y1 && y2 >= (y1 - h1))))
@ -975,9 +973,9 @@ int _sortViews(id view1, id view2, void *context)
enumerator = [sortedviews objectEnumerator];
editor = [document editorForObject: splitView
inEditor: self
create: YES];
editor = (GormViewEditor *)[document editorForObject: splitView
inEditor: self
create: YES];
while ((subview = [enumerator nextObject]) != nil)
{
@ -1039,9 +1037,9 @@ int _sortViews(id view1, id view2, void *context)
[subview close];
}
editor = [document editorForObject: box
inEditor: self
create: YES];
editor = (GormViewEditor *)[document editorForObject: box
inEditor: self
create: YES];
[self selectObjects: [NSArray arrayWithObject: editor]];
}
@ -1135,9 +1133,9 @@ int _sortViews(id view1, id view2, void *context)
[subview close];
}
editor = [document editorForObject: scrollView
inEditor: self
create: YES];
editor = (GormViewEditor *)[document editorForObject: scrollView
inEditor: self
create: YES];
[self selectObjects: [NSArray arrayWithObject: editor]];
}

View file

@ -337,9 +337,9 @@
/*
* Font submenu
*/
i = [m addItemWithTitle: @"Font"
action: NULL
keyEquivalent: @""];
i = (NSMenuItem *)[m addItemWithTitle: @"Font"
action: NULL
keyEquivalent: @""];
s = [GormNSMenu new];
[s addItemWithTitle: @"Font Panel..."
action: @selector(orderFrontFontPanel:)
@ -374,9 +374,9 @@
/*
* Text submenu
*/
i = [m addItemWithTitle: @"Text"
action: NULL
keyEquivalent: @""];
i = (NSMenuItem *)[m addItemWithTitle: @"Text"
action: NULL
keyEquivalent: @""];
s = [GormNSMenu new];
[s addItemWithTitle: @"Align Left"
action: @selector(alignLeft:)

View file

@ -26,6 +26,7 @@
#include <InterfaceBuilder/InterfaceBuilder.h>
#include "GormTableViewEditor.h"
#include "GormNSTableView.h"
#include "GormViewKnobs.h"
NSString *IBTableColumnPboardType = @"IBTableColumnPboardType";

View file

@ -229,7 +229,9 @@
case NSRightTextAlignment:
[titleAlignmentMatrix selectCellAtRow: 0 column: 2];
break;
default:
NSLog(@"Unhandled alignment value...");
break;
}
switch ([[anObject dataCell] alignment])
@ -243,7 +245,9 @@
case NSRightTextAlignment:
[contentsAlignmentMatrix selectCellAtRow: 0 column: 2];
break;
default:
NSLog(@"Unhandled alignment value...");
break;
}
[identifierTextField setStringValue: [anObject identifier]];
@ -686,8 +690,7 @@ static NSString *ITEM=@"item";
- (void) _getValuesFromObject: anObject
{
//TODO ScrollView
unsigned int i,numberOfTabViewItems;
unsigned int numberOfTabViewItems;
numberOfTabViewItems=[anObject numberOfTabViewItems];
[numberOfItemsField setStringValue:[NSString stringWithFormat:@"%i",numberOfTabViewItems]];

View file

@ -119,7 +119,6 @@ extern NSArray *predefinedDateFormats, *predefinedNumberFormats;
- (void) _getValuesFromObject: anObject
{
int i;
if (anObject != object)
return;
@ -187,6 +186,7 @@ extern NSArray *predefinedDateFormats, *predefinedNumberFormats;
{
if (aTableView == itemTableView )
return [object itemObjectValueAtIndex:rowIndex];
return nil;
}
//TableView delegate
@ -197,6 +197,7 @@ extern NSArray *predefinedDateFormats, *predefinedNumberFormats;
[itemTxt setStringValue:[object itemObjectValueAtIndex:rowIndex]];
return YES;
}
return NO;
}
//itemTxt delegate

View file

@ -192,7 +192,6 @@ int defaultDateFormatIndex = 3;
NSView *contents;
NSTextView *tv;
NSSize contentSize;
id v;
NSNumberFormatter *nf;
NSDateFormatter *df;