mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Merge branch 'master' of github.com:gnustep/libs-gui
This commit is contained in:
commit
9f1ea165a6
14 changed files with 725 additions and 11 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2020-01-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSDatePicker.h,
|
||||
* Headers/AppKit/NSDatePickerCell.h,
|
||||
* Source/NSDatePicker.m,
|
||||
* Source/NSDatePickerCell.m: Small cleanup.
|
||||
* Headers/AppKit/AppKit.h
|
||||
* Headers/AppKit/NSPredicateEditor.h
|
||||
* Headers/AppKit/NSPredicateEditorRowTemplate.h
|
||||
* Headers/AppKit/NSRuleEditor.h
|
||||
* Source/GNUmakefile
|
||||
* Source/NSPredicateEditor.m
|
||||
* Source/NSPredicateEditorRowTemplate.m
|
||||
* Source/NSRuleEditor.m
|
||||
* Source/externs.m: Add minimal version of predicate editor copied
|
||||
over from mySTEP.
|
||||
|
||||
2020-01-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSDatePickerCell.h,
|
||||
|
|
|
@ -180,9 +180,12 @@
|
|||
#import <AppKit/NSOutlineView.h>
|
||||
#import <AppKit/NSParagraphStyle.h>
|
||||
#import <AppKit/NSPickerTouchBarItem.h>
|
||||
#import <AppKit/NSPredicateEditor.h>
|
||||
#import <AppKit/NSPredicateEditorRowTemplate.h>
|
||||
#import <AppKit/NSProgressIndicator.h>
|
||||
#import <AppKit/NSPopoverTouchBarItem.h>
|
||||
#import <AppKit/NSPressGestureRecognizer.h>
|
||||
#import <AppKit/NSRuleEditor.h>
|
||||
#import <AppKit/NSRulerMarker.h>
|
||||
#import <AppKit/NSRulerView.h>
|
||||
#import <AppKit/NSRotationGestureRecognizer.h>
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
#ifndef _GNUstep_H_NSDatePicker
|
||||
#define _GNUstep_H_NSDatePicker
|
||||
|
||||
#import "AppKit/NSControl.h"
|
||||
#import "AppKit/NSDatePickerCell.h"
|
||||
#import <AppKit/NSControl.h>
|
||||
#import <AppKit/NSDatePickerCell.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#ifndef _GNUstep_H_NSDatePickerCell
|
||||
#define _GNUstep_H_NSDatePickerCell
|
||||
|
||||
#import "AppKit/NSActionCell.h"
|
||||
#import <AppKit/NSActionCell.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
|
||||
|
|
48
Headers/AppKit/NSPredicateEditor.h
Normal file
48
Headers/AppKit/NSPredicateEditor.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/* -*-objc-*-
|
||||
NSPredicateEditor.h
|
||||
|
||||
The predicate editor class
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
Created by Fabian Spillner on 03.12.07.
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GNUstep_H_NSPredicateEditor
|
||||
#define _GNUstep_H_NSPredicateEditor
|
||||
|
||||
#import <AppKit/NSRuleEditor.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
@class NSArray;
|
||||
|
||||
@interface NSPredicateEditor : NSRuleEditor {
|
||||
NSArray *_rowTemplates;
|
||||
}
|
||||
|
||||
- (NSArray *) rowTemplates;
|
||||
- (void) setRowTemplates: (NSArray *)templates;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
#endif /* _GNUstep_H_NSPredicateEditor */
|
88
Headers/AppKit/NSPredicateEditorRowTemplate.h
Normal file
88
Headers/AppKit/NSPredicateEditorRowTemplate.h
Normal file
|
@ -0,0 +1,88 @@
|
|||
/* -*-objc-*-
|
||||
NSPredicateEditorRowTemplate.h
|
||||
|
||||
The template rows for the predicate editor
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
Created by Fabian Spillner on 03.12.07.
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GNUstep_H_NSPredicateEditorRowTemplate
|
||||
#define _GNUstep_H_NSPredicateEditorRowTemplate
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class NSPredicate, NSEntityDescription;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
/* CoreData Framework */
|
||||
enum {
|
||||
NSUndefinedAttributeType = 0,
|
||||
NSInteger16AttributeType = 100,
|
||||
NSInteger32AttributeType = 200,
|
||||
NSInteger64AttributeType = 300,
|
||||
NSDecimalAttributeType = 400,
|
||||
NSDoubleAttributeType = 500,
|
||||
NSFloatAttributeType = 600,
|
||||
NSStringAttributeType = 700,
|
||||
NSBooleanAttributeType = 800,
|
||||
NSDateAttributeType = 900,
|
||||
NSBinaryDataAttributeType = 1000
|
||||
};
|
||||
typedef NSUInteger NSAttributeType;
|
||||
|
||||
@interface NSPredicateEditorRowTemplate : NSObject {
|
||||
|
||||
}
|
||||
|
||||
+ (NSArray *) templatesWithAttributeKeyPaths: (NSArray *)paths
|
||||
inEntityDescription: (NSEntityDescription *)entityDesc;
|
||||
|
||||
- (NSArray *) compoundTypes;
|
||||
- (NSArray *) displayableSubpredicatesOfPredicate: (NSPredicate *)pred;
|
||||
- (id) initWithCompoundTypes: (NSArray *)types;
|
||||
- (id) initWithLeftExpressions: (NSArray *)leftExprs
|
||||
rightExpressionAttributeType: (NSAttributeType)attrType
|
||||
modifier: (NSComparisonPredicateModifier)modif
|
||||
operators: (NSArray *)ops
|
||||
options: (NSUInteger)opts;
|
||||
- (id) initWithLeftExpressions: (NSArray *)leftExprs
|
||||
rightExpressions: (NSArray *)rightExprs
|
||||
modifier: (NSComparisonPredicateModifier)modif
|
||||
operators: (NSArray *)ops
|
||||
options: (NSUInteger)opts;
|
||||
- (NSArray *) leftExpressions;
|
||||
- (double) matchForPredicate: (NSPredicate *)pred;
|
||||
- (NSComparisonPredicateModifier) modifier;
|
||||
- (NSArray *) operators;
|
||||
- (NSUInteger) options;
|
||||
- (NSPredicate *) predicateWithSubpredicates: (NSArray *)subpred;
|
||||
- (NSAttributeType) rightExpressionAttributeType;
|
||||
- (NSArray *) rightExpressions;
|
||||
- (void) setPredicate: (NSPredicate *)pred;
|
||||
- (NSArray *) templateViews;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
#endif /* _GNUstep_H_NSPredicateEditorRowTemplate */
|
140
Headers/AppKit/NSRuleEditor.h
Normal file
140
Headers/AppKit/NSRuleEditor.h
Normal file
|
@ -0,0 +1,140 @@
|
|||
/* -*-objc-*-
|
||||
NSRuleEditor.h
|
||||
|
||||
The rule editor class
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
Created by Fabian Spillner on 03.12.07.
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GNUstep_H_NSRuleEditor
|
||||
#define _GNUstep_H_NSRuleEditor
|
||||
|
||||
#import <AppKit/NSControl.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
enum {
|
||||
NSRuleEditorNestingModeSingle,
|
||||
NSRuleEditorNestingModeList,
|
||||
NSRuleEditorNestingModeCompound,
|
||||
NSRuleEditorNestingModeSimple
|
||||
};
|
||||
typedef NSUInteger NSRuleEditorNestingMode;
|
||||
|
||||
enum {
|
||||
NSRuleEditorRowTypeSimple,
|
||||
NSRuleEditorRowTypeCompound
|
||||
};
|
||||
typedef NSUInteger NSRuleEditorRowType;
|
||||
|
||||
extern NSString * const NSRuleEditorPredicateLeftExpression;
|
||||
extern NSString * const NSRuleEditorPredicateRightExpression;
|
||||
extern NSString * const NSRuleEditorPredicateComparisonModifier;
|
||||
extern NSString * const NSRuleEditorPredicateOptions;
|
||||
extern NSString * const NSRuleEditorPredicateOperatorType;
|
||||
extern NSString * const NSRuleEditorPredicateCustomSelector;
|
||||
extern NSString * const NSRuleEditorPredicateCompoundType;
|
||||
|
||||
extern NSString *NSRuleEditorRowsDidChangeNotification;
|
||||
|
||||
@interface NSRuleEditor : NSControl {
|
||||
|
||||
}
|
||||
|
||||
- (void) addRow: (id)sender;
|
||||
- (BOOL) canRemoveAllRows;
|
||||
- (NSArray *) criteriaForRow: (NSInteger)index;
|
||||
- (NSString *) criteriaKeyPath;
|
||||
- (id) delegate;
|
||||
- (NSArray *) displayValuesForRow: (NSInteger)index;
|
||||
- (NSString *) displayValuesKeyPath;
|
||||
- (NSDictionary *) formattingDictionary;
|
||||
- (NSString *) formattingStringsFilename;
|
||||
- (void) insertRowAtIndex: (NSInteger)index
|
||||
withType: (NSRuleEditorRowType)type
|
||||
asSubrowOfRow: (NSInteger)row
|
||||
animate: (BOOL)flag;
|
||||
- (BOOL) isEditable;
|
||||
- (NSRuleEditorNestingMode) nestingMode;
|
||||
- (NSInteger) numberOfRows;
|
||||
- (NSInteger) parentRowForRow: (NSInteger)row;
|
||||
- (NSPredicate *) predicate;
|
||||
- (NSPredicate *) predicateForRow: (NSInteger)row;
|
||||
- (void) reloadCriteria;
|
||||
- (void) reloadPredicate;
|
||||
- (void) removeRowAtIndex: (NSInteger)index;
|
||||
- (void) removeRowsAtIndexes: (NSIndexSet *)rowIds includeSubrows: (BOOL)flag;
|
||||
- (Class) rowClass;
|
||||
- (NSInteger) rowForDisplayValue: (id)value;
|
||||
- (CGFloat) rowHeight;
|
||||
- (NSRuleEditorRowType) rowTypeForRow: (NSInteger)row;
|
||||
- (NSString *) rowTypeKeyPath;
|
||||
- (NSIndexSet *) selectedRowIndexes;
|
||||
- (void) selectRowIndexes: (NSIndexSet *)ids
|
||||
byExtendingSelection: (BOOL)flag;
|
||||
- (void) setCanRemoveAllRows: (BOOL)flag;
|
||||
- (void) setCriteria: (NSArray *)crits
|
||||
andDisplayValues: (NSArray *)vals
|
||||
forRowAtIndex: (NSInteger)index;
|
||||
- (void) setCriteriaKeyPath: (NSString *)path;
|
||||
- (void) setDelegate: (id)delegate;
|
||||
- (void) setDisplayValuesKeyPath: (NSString *)path;
|
||||
- (void) setEditable: (BOOL)flag;
|
||||
- (void) setFormattingDictionary: (NSDictionary *)dict;
|
||||
- (void) setFormattingStringsFilename: (NSString *)filename;
|
||||
- (void) setNestingMode: (NSRuleEditorNestingMode)flag;
|
||||
- (void) setRowClass: (Class)rowClass;
|
||||
- (void) setRowHeight: (CGFloat)height;
|
||||
- (void) setRowTypeKeyPath: (NSString *)path;
|
||||
- (void) setSubrowsKeyPath: (NSString *)path;
|
||||
- (NSIndexSet *) subrowIndexesForRow: (NSInteger)row;
|
||||
- (NSString *) subrowsKeyPath;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
|
||||
@protocol NSRuleEditorDelegate
|
||||
|
||||
- (id) ruleEditor: (NSRuleEditor *)editor
|
||||
child: (NSInteger)idx
|
||||
forCriterion: (id)crit
|
||||
withRowType: (NSRuleEditorRowType) type;
|
||||
- (id) ruleEditor: (NSRuleEditor *)editor
|
||||
displayValueForCriterion: (id)crit
|
||||
inRow: (NSInteger)row;
|
||||
- (NSInteger) ruleEditor: (NSRuleEditor *)editor
|
||||
numberOfChildrenForCriterion: (id)crit
|
||||
withRowType: (NSRuleEditorRowType)type;
|
||||
- (NSDictionary *) ruleEditor: (NSRuleEditor *)editor
|
||||
predicatePartsForCriterion: (id)crit
|
||||
withDisplayValue: (id)val
|
||||
inRow: (NSInteger)row;
|
||||
- (void) ruleEditorRowsDidChange: (NSNotification *)notif;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
#endif /* _GNUstep_H_NSRuleEditor */
|
|
@ -172,7 +172,6 @@ NSPanel.m \
|
|||
NSPanGestureRecognizer.m \
|
||||
NSPickerTouchBarItem.m \
|
||||
NSPopoverTouchBarItem.m \
|
||||
NSPressGestureRecognizer.m \
|
||||
NSParagraphStyle.m \
|
||||
NSPasteboardItem.m \
|
||||
NSPDFInfo.m \
|
||||
|
@ -182,6 +181,9 @@ NSPICTImageRep.m \
|
|||
NSPopover.m \
|
||||
NSPopUpButton.m \
|
||||
NSPopUpButtonCell.m \
|
||||
NSPredicateEditor.m \
|
||||
NSPredicateEditorRowTemplate.m \
|
||||
NSPressGestureRecognizer.m \
|
||||
NSPrinter.m \
|
||||
NSPrintInfo.m \
|
||||
NSPrintOperation.m \
|
||||
|
@ -189,6 +191,7 @@ NSPrintPanel.m \
|
|||
NSProgressIndicator.m \
|
||||
NSResponder.m \
|
||||
NSRotationGestureRecognizer.m \
|
||||
NSRuleEditor.m \
|
||||
NSRulerMarker.m \
|
||||
NSRulerView.m \
|
||||
NSRunningApplication.m \
|
||||
|
@ -437,6 +440,8 @@ NSPopoverTouchBarItem.h \
|
|||
NSPopover.h \
|
||||
NSPopUpButton.h \
|
||||
NSPopUpButtonCell.h \
|
||||
NSPredicateEditor.h \
|
||||
NSPredicateEditorRowTemplate.h \
|
||||
NSPressGestureRecognizer.h \
|
||||
NSPrintInfo.h \
|
||||
NSPrintOperation.h \
|
||||
|
@ -445,6 +450,7 @@ NSPrinter.h \
|
|||
NSProgressIndicator.h \
|
||||
NSResponder.h \
|
||||
NSRotationGestureRecognizer.h \
|
||||
NSRuleEditor.h \
|
||||
NSRulerMarker.h \
|
||||
NSRulerView.h \
|
||||
NSRunningApplication.h \
|
||||
|
|
|
@ -31,9 +31,8 @@
|
|||
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <AppKit/NSDatePickerCell.h>
|
||||
#import <AppKit/NSDatePicker.h>
|
||||
#import <AppKit/NSColor.h>
|
||||
#import "AppKit/NSDatePickerCell.h"
|
||||
#import "AppKit/NSDatePicker.h"
|
||||
|
||||
static id usedCellClass = nil;
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSDateFormatter.h>
|
||||
#import <AppKit/NSDatePickerCell.h>
|
||||
#import <AppKit/NSColor.h>
|
||||
#import "AppKit/NSDatePickerCell.h"
|
||||
#import "AppKit/NSColor.h"
|
||||
|
||||
@implementation NSDatePickerCell
|
||||
|
||||
|
|
50
Source/NSPredicateEditor.m
Normal file
50
Source/NSPredicateEditor.m
Normal file
|
@ -0,0 +1,50 @@
|
|||
/** <title>NSPredicateEditor</title>
|
||||
|
||||
<abstract>The predicate editor class</abstract>
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
Author: Fred Kiefer <fredkiefer@gmx.de>
|
||||
Date: January 2020
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#import "AppKit/NSPredicateEditor.h"
|
||||
|
||||
|
||||
@implementation NSPredicateEditor
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(_rowTemplates);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSArray *) rowTemplates
|
||||
{
|
||||
return _rowTemplates;
|
||||
}
|
||||
|
||||
- (void) setRowTemplates: (NSArray *)templates
|
||||
{
|
||||
ASSIGN(_rowTemplates, templates);
|
||||
}
|
||||
|
||||
@end
|
121
Source/NSPredicateEditorRowTemplate.m
Normal file
121
Source/NSPredicateEditorRowTemplate.m
Normal file
|
@ -0,0 +1,121 @@
|
|||
/** <title>NSPredicateEditorRowTemplate</title>
|
||||
|
||||
<abstract>The template rows for the predicate editor</abstract>
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
Author: Fred Kiefer <fredkiefer@gmx.de>
|
||||
Date: January 2020
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#import "AppKit/NSPredicateEditorRowTemplate.h"
|
||||
|
||||
@implementation NSPredicateEditorRowTemplate
|
||||
|
||||
+ (NSArray *) templatesWithAttributeKeyPaths: (NSArray *)paths
|
||||
inEntityDescription: (NSEntityDescription *)entityDesc
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) compoundTypes
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) displayableSubpredicatesOfPredicate: (NSPredicate *)pred
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) initWithCompoundTypes: (NSArray *)types
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithLeftExpressions: (NSArray *)leftExprs
|
||||
rightExpressionAttributeType: (NSAttributeType)attrType
|
||||
modifier: (NSComparisonPredicateModifier)modif
|
||||
operators: (NSArray *)ops
|
||||
options: (NSUInteger)opts;
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithLeftExpressions: (NSArray *)leftExprs
|
||||
rightExpressions: (NSArray *)rightExprs
|
||||
modifier: (NSComparisonPredicateModifier)modif
|
||||
operators: (NSArray *)ops
|
||||
options: (NSUInteger)opts;
|
||||
{
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSArray *) leftExpressions
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (double) matchForPredicate: (NSPredicate *)pred
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
- (NSComparisonPredicateModifier) modifier
|
||||
{
|
||||
return NSDirectPredicateModifier;
|
||||
}
|
||||
|
||||
- (NSArray *) operators
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSUInteger) options
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSPredicate *) predicateWithSubpredicates: (NSArray *)subpred
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSAttributeType) rightExpressionAttributeType
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSArray *) rightExpressions
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) setPredicate: (NSPredicate *)pred
|
||||
{
|
||||
}
|
||||
|
||||
- (NSArray *) templateViews
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
233
Source/NSRuleEditor.m
Normal file
233
Source/NSRuleEditor.m
Normal file
|
@ -0,0 +1,233 @@
|
|||
/** <title>NSRuleEditor</title>
|
||||
|
||||
<abstract>The rule editor class</abstract>
|
||||
|
||||
Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
|
||||
Author: Fred Kiefer <fredkiefer@gmx.de>
|
||||
Date: January 2020
|
||||
|
||||
This file is part of the GNUstep GUI Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; see the file COPYING.LIB.
|
||||
If not, see <http://www.gnu.org/licenses/> or write to the
|
||||
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#import "AppKit/NSRuleEditor.h"
|
||||
|
||||
|
||||
@implementation NSRuleEditor
|
||||
- (void) addRow: (id)sender
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL) canRemoveAllRows
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSArray *) criteriaForRow: (NSInteger)index
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) criteriaKeyPath
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) delegate
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) displayValuesForRow: (NSInteger)index
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) displayValuesKeyPath
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSDictionary *) formattingDictionary
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) formattingStringsFilename
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) insertRowAtIndex: (NSInteger)index
|
||||
withType: (NSRuleEditorRowType)type
|
||||
asSubrowOfRow: (NSInteger)row
|
||||
animate: (BOOL)flag
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL) isEditable
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSRuleEditorNestingMode) nestingMode
|
||||
{
|
||||
return NSRuleEditorNestingModeSingle;
|
||||
}
|
||||
|
||||
- (NSInteger) numberOfRows
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSInteger) parentRowForRow: (NSInteger)row
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSPredicate *) predicate
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSPredicate *) predicateForRow: (NSInteger)row
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) reloadCriteria
|
||||
{
|
||||
}
|
||||
|
||||
- (void) reloadPredicate
|
||||
{
|
||||
}
|
||||
|
||||
- (void) removeRowAtIndex: (NSInteger)index
|
||||
{
|
||||
}
|
||||
|
||||
- (void) removeRowsAtIndexes: (NSIndexSet *)rowIds includeSubrows: (BOOL)flag
|
||||
{
|
||||
}
|
||||
|
||||
- (Class) rowClass
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSInteger) rowForDisplayValue: (id)value
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (CGFloat) rowHeight
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
- (NSRuleEditorRowType) rowTypeForRow: (NSInteger)row
|
||||
{
|
||||
return NSRuleEditorRowTypeSimple;
|
||||
}
|
||||
|
||||
- (NSString *) rowTypeKeyPath
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSIndexSet *) selectedRowIndexes
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) selectRowIndexes: (NSIndexSet *)ids
|
||||
byExtendingSelection: (BOOL)flag
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setCanRemoveAllRows: (BOOL)flag
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setCriteria: (NSArray *)crits
|
||||
andDisplayValues: (NSArray *)vals
|
||||
forRowAtIndex: (NSInteger)index
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setCriteriaKeyPath: (NSString *)path
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setDelegate: (id)delegate
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setDisplayValuesKeyPath: (NSString *)path
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setEditable: (BOOL)flag
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setFormattingDictionary: (NSDictionary *)dict
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setFormattingStringsFilename: (NSString *)filename
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setNestingMode: (NSRuleEditorNestingMode)flag
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setRowClass: (Class)rowClass
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setRowHeight: (CGFloat)height
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setRowTypeKeyPath: (NSString *)path
|
||||
{
|
||||
}
|
||||
|
||||
- (void) setSubrowsKeyPath: (NSString *)path
|
||||
{
|
||||
}
|
||||
|
||||
- (NSIndexSet *) subrowIndexesForRow: (NSInteger)row
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSString *) subrowsKeyPath
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) viewDidMoveToWindow
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
|
@ -785,6 +785,17 @@ NSString *NSImageNameFontPanel = @"NSFontPanel";
|
|||
NSString *NSImageNameColorPanel = @"NSColorPanel";
|
||||
NSString *NSImageNameCaution = @"NSCaution";
|
||||
|
||||
// NSRuleEditor
|
||||
NSString *const NSRuleEditorPredicateLeftExpression = @"NSRuleEditorPredicateLeftExpression";
|
||||
NSString *const NSRuleEditorPredicateRightExpression = @"NSRuleEditorPredicateRightExpression";
|
||||
NSString *const NSRuleEditorPredicateComparisonModifier = @"NSRuleEditorPredicateComparisonModifier";
|
||||
NSString *const NSRuleEditorPredicateOptions = @"NSRuleEditorPredicateOptions";
|
||||
NSString *const NSRuleEditorPredicateOperatorType = @"NSRuleEditorPredicateOperatorType";
|
||||
NSString *const NSRuleEditorPredicateCustomSelector = @"NSRuleEditorPredicateCustomSelector";
|
||||
NSString *const NSRuleEditorPredicateCompoundType = @"NSRuleEditorPredicateCompoundType";
|
||||
|
||||
NSString *NSRuleEditorRowsDidChangeNotification = @"NSRuleEditorRowsDidChangeNotification";
|
||||
|
||||
extern void __objc_gui_force_linking (void);
|
||||
|
||||
void
|
||||
|
@ -793,5 +804,3 @@ __objc_gui_force_linking (void)
|
|||
extern void __objc_gui_linking (void);
|
||||
__objc_gui_linking ();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue