<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/VerseEnumerator.h<|end_filename|>
//
//  VerseEnumerator.h
//  MacSword2
//
//  Created by <NAME> on 25.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>

@class SwordListKey;

@interface VerseEnumerator : NSEnumerator

- (id)initWithListKey:(SwordListKey *)aListKey;

- (NSArray *)allObjects;
- (NSString *)nextObject;

@end


<|start_filename|>src/UserInterface/NSDictionary+Additions.h<|end_filename|>
//
//  NSMutableDictionary+Additions.h
//  Eloquent
//
//  Created by <NAME> on 18.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSMutableDictionary (Additions)

- (void)setColor:(NSColor *)aColor forKey:(NSString *)aKey;

@end

@interface NSDictionary (Additions)

- (NSColor *)colorForKey:(NSString *)aKey;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swlog.h<|end_filename|>
/******************************************************************************
 *
 *  swlog.h -	definition of class SWLog used for logging messages
 *
 * $Id: swlog.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

//---------------------------------------------------------------------------
#ifndef swlogH
#define swlogH
//---------------------------------------------------------------------------

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT SWLog {
protected:
	char logLevel;
	static SWLog *systemLog;

public:

	static const int LOG_ERROR;
	static const int LOG_WARN;
	static const int LOG_INFO;
	static const int LOG_TIMEDINFO;
	static const int LOG_DEBUG;

	static SWLog *getSystemLog();
	static void setSystemLog(SWLog *newLogger);

	SWLog() { logLevel = 1;	/*default to show only errors*/}
	virtual ~SWLog() {};

	void setLogLevel(char level) { logLevel = level; }
	char getLogLevel() const { return logLevel; }
	void logWarning(const char *fmt, ...) const;
	void logError(const char *fmt, ...) const;
	void logInformation(const char *fmt, ...) const;
	virtual void logTimedInformation(const char *fmt, ...) const;
	void logDebug(const char *fmt, ...) const;

	// Override this method if you want to have a custom logger
	virtual void logMessage(const char *message, int level) const;
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/hebrewmcim.h<|end_filename|>
/******************************************************************************
 *
 *  hebrewmcim.h -	Implementation of HebrewMCIM
 *
 * $Id: hebrewmcim.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef HEBREWMCIM_H
#define HEBREWMCIM_H

/**
 * Title: Keyboard mapping for Michigan-Claremont Hebrew input
 * Description:
 * Copyright:    Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL
 * Company:
 * @author <NAME>
 * @version 1.0
 */

#include <swinputmeth.h>
#include <map>
#include <defs.h>
SWORD_NAMESPACE_START


class SWDLLEXPORT HebrewMCIM : public SWInputMethod {

    void init();
    int subst[255];
    map<int, int> subst2[12];
    map<int, int*> multiChars;

public:
    HebrewMCIM();
    int *translate(char in);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/WindowHostController.h<|end_filename|>
//
//  WindowHostController.h
//  Eloquent
//
//  Created by <NAME> on 05.11.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "Indexer.h"
#import "ContentDisplayingViewController.h"

@class Bookmark;
@class ScopeBarView;
@class SearchTextObject;
@class FullScreenView;
@class LeftSideBarViewController;
@class RightSideBarViewController;
@class SingleViewHostController;
@class HostableViewController;
@class ModulesUIController;
@class BookmarksUIController;
@class NotesUIController;
@class ToolbarController;
@class PrintAccessoryViewController;

@interface WindowHostController : NSWindowController <NSWindowDelegate, NSSplitViewDelegate, NSCoding, SubviewHosting, ContentSaving> {
    IBOutlet NSSplitView *mainSplitView;
    IBOutlet NSBox *contentPlaceHolderView;
    IBOutlet FullScreenView *view;

    IBOutlet NSSplitView *contentSplitView;
    IBOutlet NSBox *placeHolderView;

    IBOutlet ScopeBarView *scopebarView;
    IBOutlet NSBox *scopebarViewPlaceholder;
    
    IBOutlet NSProgressIndicator *progressIndicator;

    id __strong delegate;
    
    NSView *searchOptionsView;
    SearchTextObject *currentSearchText;

    ContentDisplayingViewController *contentViewController;
    
    ToolbarController *toolbarController;
    
    LeftSideBarViewController *lsbViewController;
    float lsbWidth;
    float defaultLSBWidth;
    float loadedLSBWidth;
    BOOL lsbShowing;
    
    RightSideBarViewController *rsbViewController;
    float rsbWidth;
    float defaultRSBWidth;
    float loadedRSBWidth;
    BOOL rsbShowing;

    ModulesUIController *modulesUIController;
    BookmarksUIController *bookmarksUIController;
    NotesUIController *notesUIController;
    
    PrintAccessoryViewController *printAccessoryController;
    
    BOOL inFullScreenTransition;
    BOOL inFullScreenMode;
    
    BOOL hostLoaded;
}

@property (strong, readwrite) id delegate;
@property (readwrite) SearchType searchType;
@property (strong, readwrite) SearchTextObject *currentSearchText;
@property (strong, readwrite) ContentDisplayingViewController *contentViewController;

// methods
- (NSView *)view;
- (void)setView:(FullScreenView *)aView;

/** sets the text string into the search text field */
- (void)setSearchText:(NSString *)aString;
- (NSString *)searchText;

/** sets the type of search to UI */
- (void)setSearchTypeUI:(SearchType)aType;

/** tells the lsb to open the module about window */
- (void)displayModuleAboutSheetForModule:(SwordModule *)aMod;

- (ContentViewType)contentViewType;
- (void)readaptHostUI;
- (void)setupContentRelatedViews;
- (void)setupForContentViewController;

// SubviewHosting
- (void)addContentViewController:(ContentDisplayingViewController *)aViewController;
- (void)contentViewInitFinished:(HostableViewController *)aView;
- (void)removeSubview:(HostableViewController *)aViewController;

// ContentSaving
- (BOOL)hasUnsavedContent;
- (void)saveContent;

// actions
- (IBAction)myPrint:(id)sender;
- (IBAction)clearRecents:(id)sender;
- (IBAction)addBookmark:(id)sender;
- (IBAction)searchInput:(id)sender;
- (IBAction)searchType:(id)sender;
- (IBAction)forceReload:(id)sender;

// menu first responder actions
- (IBAction)leftSideBarHideShow:(id)sender;
- (IBAction)rightSideBarHideShow:(id)sender;
- (IBAction)switchLookupView:(id)sender;
- (IBAction)focusSearchEntry:(id)sender;
- (IBAction)nextBook:(id)sender;
- (IBAction)previousBook:(id)sender;
- (IBAction)nextChapter:(id)sender;
- (IBAction)previousChapter:(id)sender;
- (IBAction)performClose:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/roman.h<|end_filename|>
/******************************************************************************
 *
 *  roman.h -	roman numeral functions
 *
 * $Id: roman.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */
#ifndef ROMAN_H
#define ROMAN_H

#include <defs.h>
SWORD_NAMESPACE_START

/** Checks if a string is a roman numeral.
*/
char isroman(const char *, int maxchars = 0);
/* char* to_rom(int num, char *p); */

/** Converts a roman numeral to a string.
* @param s Roman numeral to convert.
*/
int from_rom(const char *s);

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/ModuleManager/ModuleManageViewController.h<|end_filename|>
#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@class ModuleListObject;
@class InstallSourceListObject;
@class ModuleListViewController;

#define EDITING_MODE_ADD    1
#define EDITING_MODE_EDIT   2

#define TYPE_TAG_REMOTE 0
#define TYPE_TAG_LOCAL  1

@interface ModuleManageViewController : NSObject <NSOutlineViewDelegate, NSOutlineViewDataSource> {
    
    // the views
    IBOutlet NSOutlineView *categoryOutlineView;
    IBOutlet NSSplitView *splitView;
    IBOutlet NSPopUpButton *actionButton;
    
    // add/edit Install Source window
    IBOutlet NSWindow *editISWindow;
    IBOutlet NSButton *editISOKButton;
    IBOutlet NSButton *editISCancelButton;    
    IBOutlet NSButton *editISTestButton;
    IBOutlet NSTextField *editISCaptionCell;
    IBOutlet NSTextField *editISSourceCell;
    IBOutlet NSTextField *editISDirCell;
    // the type popup
    IBOutlet NSPopUpButton *editISType;
    IBOutlet NSButton *editISDirSelect;
    // disclaimer window
    IBOutlet NSWindow *disclaimerWindow;
    // tasks preview window
    IBOutlet NSWindow *tasksPreviewWindow;
    
    // The preview text field
    IBOutlet NSTextField *tasksPreviewTextField;
    IBOutlet NSButton *processTasksButton;

    // the hosting window
    IBOutlet NSWindow *__strong parentWindow;
    
    // menus
    IBOutlet NSMenu *installSourceMenu;
    
    // the module list view controller
    IBOutlet ModuleListViewController *modListViewController;
}

@property (strong, readwrite) IBOutlet id delegate;
@property (strong, readwrite) IBOutlet NSWindow *parentWindow;

@property (strong, nonatomic) NSArray *installSourceListObjects;
@property (strong, nonatomic) NSArray *selectedInstallSources;

+ (NSURL *)fileOpenDialog;

- (BOOL)initialized;

// --------------- methods ----------------
- (id)initWithDelegate:(id)aDelegate;
- (id)initWithDelegate:(id)aDelegate parent:(NSWindow *)aParent;

- (NSView *)contentView;

/** delegate methods */
- (void)unregister:(ModuleListObject *)modObj;
- (void)registerForInstall:(ModuleListObject *)modObj;
- (void)registerForRemove:(ModuleListObject *)modObj;
- (void)registerForUpdate:(ModuleListObject *)modObj;

/** process all the tasks */
- (void)processTasks;
- (NSInteger)numberOfTasks;
- (BOOL)hasTasks;

/** show tasks preview */
- (void)showTasksPreview;
- (void)tasksPreviewSheetEnd;

// tasks preview window actions
- (IBAction)closePreview:(id)sender;
- (IBAction)processTasks:(id)sender;
/** serialize tasks for previews */
- (NSString *)tasksPreviewDescription;

// disclaimer
- (IBAction)showDisclaimer;
- (void)disclaimerSheetEnd;
// disclaimer window actions
- (IBAction)confirmNo:(id)sender;
- (IBAction)confirmYes:(id)sender;

- (IBAction)syncInstallSourcesFromMasterList:(id)sender;
- (IBAction)addInstallSource:(id)sender;
- (IBAction)deleteInstallSource:(id)sender;
- (IBAction)editInstallSource:(id)sender;
- (IBAction)refreshInstallSource:(id)sender;

// add/edit IS actions
- (IBAction)editISOKButton:(id)sender;
- (IBAction)editISCancelButton:(id)sender;
- (IBAction)editISTestButton:(id)sender;
- (IBAction)editISDirSelectButton:(id)sender;
- (IBAction)editISTypeSelect:(id)sender;

@end


<|start_filename|>src/ModuleManager/InstallSourceListObject.h<|end_filename|>
//
//  InstallSourceListObject.h
//  Eloquent
//
//  Created by <NAME> on 10.03.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@class SwordInstallSource;

typedef enum _InstallSourceListObjectType {
    TypeInstallSource = 0,
    TypeModuleType
}InstallSourceListObjectType;

@interface InstallSourceListObject : NSObject

@property (strong, readwrite) SwordInstallSource *installSource;
@property (readwrite) InstallSourceListObjectType objectType;
@property (strong, readwrite) NSString *moduleType;
@property (strong, readwrite) NSArray *subInstallSources;

/** convenient allocator */
+ (InstallSourceListObject *)installSourceListObjectForType:(InstallSourceListObjectType)type;

- (id)initWithListObjectType:(InstallSourceListObjectType)type;

@end


<|start_filename|>src/UserInterface/BibleSearchOptionsViewController.h<|end_filename|>
//
//  BibleSearchOptionsViewController.h
//  MacSword2
//
//  Created by <NAME> on 10.07.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#define BIBLESEARCHOPTIONSVIEW_NIBNAME @"BibleSearchOptions"

@interface BibleSearchOptionsViewController : SearchOptionsViewController {
}

- (id)initWithDelegate:(id)aDelegate andTarget:(id)aTarget;

// viewSearchOptions actions
- (IBAction)viewSearchDirection:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/sysdata.h<|end_filename|>
/******************************************************************************
 *
 *  sysdata.h -	
 *
 * $Id: sysdata.h 3455 2017-04-24 08:50:31Z scribe $
 * 
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SIZEDTYPES_H
#define SIZEDTYPES_H
/*
 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
 * header files exported to user space
 */
#ifdef USE_AUTOTOOLS
#include "config.h"
#endif


typedef signed char __s8;
typedef unsigned char __u8;

typedef signed short __s16;
typedef unsigned short __u16;

typedef signed int __s32;
typedef unsigned int __u32;

#ifdef OS_ANDROID
#elif defined(__GNUC__)
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#elif defined(__BORLANDC__)
typedef signed __int64 __s64;
typedef unsigned __int64 __u64;
#else
typedef signed long long __s64;
typedef unsigned long long __u64;
#endif

#undef __swswap16
#undef __swswap32
#undef __swswap64

#define __swswap16(x) \
	((__u16)( \
		(((__u16)(x) & (__u16)0x00ffU) << 8) | \
		(((__u16)(x) & (__u16)0xff00U) >> 8) ))

		
#define __swswap32(x) \
	((__u32)( \
		(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
		(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) | \
		(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) | \
		(((__u32)(x) & (__u32)0xff000000UL) >> 24) ))

		
#define __swswap64(x) \
	((__u64)( \
		(__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
		(__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
		(__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
		(__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) <<  8) | \
		   (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >>  8) | \
		(__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
		(__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
		(__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
		



#ifndef WORDS_BIGENDIAN

#define swordtoarch16(x) (x)
#define swordtoarch32(x) (x)
#define swordtoarch64(x) (x)
#define archtosword16(x) (x)
#define archtosword32(x) (x)
#define archtosword64(x) (x)

#else 

#define swordtoarch16(x) __swswap16(x)
#define swordtoarch32(x) __swswap32(x)
#define swordtoarch64(x) __swswap64(x)
#define archtosword16(x) __swswap16(x)
#define archtosword32(x) __swswap32(x)
#define archtosword64(x) __swswap64(x)


#endif


#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/entriesblk.h<|end_filename|>
/******************************************************************************
 *
 *  entriesblk.h -	Implementation of EntriesBlock
 *
 * $Id: entriesblk.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ENTRIESBLK_H
#define ENTRIESBLK_H

#include <sysdata.h>
#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT EntriesBlock {
	static const int METAHEADERSIZE;
	static const int METAENTRYSIZE;

private:
	char *block;
	void setCount(int count);
	void getMetaEntry(int index, unsigned long *offset, unsigned long *size);
	void setMetaEntry(int index, unsigned long offset, unsigned long size);

public:
	EntriesBlock(const char *iBlock, unsigned long size);
	EntriesBlock();
	~EntriesBlock();

	int getCount();
	int addEntry(const char *entry);
	const char *getEntry(int entryIndex);
	unsigned long getEntrySize(int entryIndex);
	void removeEntry(int entryIndex);
	const char *getRawData(unsigned long *size);
};


SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/ObjCSword.h<|end_filename|>
/*
 *  ObjCSword.h
 *  ObjCSword
 *
 *  Created by <NAME> on 15.06.10.
 *  Copyright 2010 Software by MABE. All rights reserved.
 *
 */

#import <ObjCSword/SwordManager.h>
#import <ObjCSword/SwordLocaleManager.h>
#import <ObjCSword/SwordVerseManager.h>
#import <ObjCSword/SwordModule.h>
#import <ObjCSword/SwordBible.h>
#import <ObjCSword/SwordCommentary.h>
#import <ObjCSword/SwordDictionary.h>
#import <ObjCSword/SwordBook.h>
#import <ObjCSword/SwordKey.h>
#import <ObjCSword/SwordVerseKey.h>
#import <ObjCSword/SwordListKey.h>
#import <ObjCSword/SwordBibleBook.h>
#import <ObjCSword/SwordBibleChapter.h>
#import <ObjCSword/SwordBibleTextEntry.h>
#import <ObjCSword/SwordVerseManager.h>
#import <ObjCSword/SwordInstallSource.h>
#import <ObjCSword/SwordInstallSourceManager.h>
#import <ObjCSword/SwordModuleTextEntry.h>
#import <ObjCSword/SwordModuleTreeEntry.h>
#import <ObjCSword/SwordFilter.h>
#import <ObjCSword/VerseEnumerator.h>
#import <ObjCSword/Configuration.h>
#import <ObjCSword/OSXConfiguration.h>
#import <ObjCSword/FilterProviderFactory.h>
#import <ObjCSword/DefaultFilterProvider.h>


<|start_filename|>src/ModuleManager/ModuleListViewController.h<|end_filename|>

#import <Cocoa/Cocoa.h>
#import <CocoPCRE/CocoPCRE.h>
#import <FooLogger/CocoLogger.h>
#import <ObjCSword/SwordInstallSource.h>
#import <ObjCSword/SwordModule.h>

@interface ModuleListViewController : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate> {
    
    IBOutlet NSOutlineView *moduleOutlineView;
    IBOutlet NSSearchField *searchTextField;
    
    IBOutlet NSMenu *moduleMenu;
    IBOutlet NSPopUpButton *languagesButton;
}

@property (readwrite) NSString *langFilter;
@property (strong, readwrite) NSArray *installSources;
@property (strong, readwrite) IBOutlet id delegate;

- (void)refreshModulesList;
- (void)refreshSwordManager;

- (IBAction)search:(id)sender;
- (IBAction)languageFilter:(id)sender;

- (IBAction)noneTask:(id)sender;
- (IBAction)installModule:(id)sender;
- (IBAction)removeModule:(id)sender;
- (IBAction)updateModule:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordFilter.h<|end_filename|>
//
// Created by mbergmann on 18.12.12.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>

#ifdef __cplusplus
#include <swfilter.h>
#endif

@interface SwordFilter : NSObject

#ifdef __cplusplus
- (sword::SWFilter *)swFilter;
#endif

@end

@interface SwordOsisHtmlRefFilter : SwordFilter
+ (SwordOsisHtmlRefFilter *)newFilter;
@end

@interface SwordOsisPlainFilter : SwordFilter
+ (SwordOsisPlainFilter *)newFilter;
@end

@interface SwordOsisXHtmlFilter : SwordFilter
+ (SwordOsisXHtmlFilter *)newFilter;
@end

@interface SwordThmlHtmlFilter : SwordFilter
+ (SwordThmlHtmlFilter *)newFilter;
@end

@interface SwordThmlPlainFilter : SwordFilter
+ (SwordThmlPlainFilter *)newFilter;
@end

@interface SwordGbfHtmlFilter : SwordFilter
+ (SwordGbfHtmlFilter *)newFilter;
@end

@interface SwordGbfPlainFilter : SwordFilter
+ (SwordGbfPlainFilter *)newFilter;
@end

@interface SwordTeiHtmlFilter : SwordFilter
+ (SwordTeiHtmlFilter *)newFilter;
@end

@interface SwordTeiXHtmlFilter : SwordFilter
+ (SwordTeiXHtmlFilter *)newFilter;
@end

@interface SwordTeiPlainFilter : SwordFilter
+ (SwordTeiPlainFilter *)newFilter;
@end


<|start_filename|>src/Indexing/SearchBookSet.h<|end_filename|>
//
//  SearchBookSet.h
//  Eloquent
//
//  Created by <NAME> on 18.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface SearchBookSet : NSObject <NSCoding> {
    NSString *name;
    NSMutableDictionary *osisBookNames;
    BOOL isPredefined;
}

@property (strong, readwrite) NSString *name;
@property (readwrite) BOOL isPredefined;

+ (id)searchBookSetWithName:(NSString *)aName;
- (id)initWithName:(NSString *)aName;

- (NSInteger)count;
- (BOOL)containsBook:(NSString *)bookName;
- (void)addBook:(NSString *)bookName;
- (void)addFromArray:(NSArray *)bookNames;
- (void)removeBook:(NSString *)bookName;
- (void)removeAll;

@end


<|start_filename|>src/UserInterface/DailyDevotionPanelController.h<|end_filename|>
//
//  DailyDevotionPanelController.h
//  Eloquent
//
//  Created by <NAME> on 01.08.10.
//  Copyright 2010 CrossWire. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import <WebKit/WebKit.h>

@class SwordDictionary, DictionaryViewController;

@interface DailyDevotionPanelController : NSWindowController <NSTextViewDelegate, NSWindowDelegate> {
    SwordDictionary *dailyDevotionModule;
    DictionaryViewController *dictionaryViewController;

    NSInteger day;
    NSInteger month;    
        
    IBOutlet NSTextView *textView;
    IBOutlet NSStepper *dayStepper;
    IBOutlet NSStepper *monthStepper;    
    IBOutlet NSTextField *dayTextField;
    IBOutlet NSTextField *monthTextField;    
    
    IBOutlet id __strong delegate;
}

@property(strong, readwrite) id delegate;
@property(strong, readwrite) SwordDictionary *dailyDevotionModule;
@property(readwrite) NSInteger day;
@property(readwrite) NSInteger month;

- (id)initWithDelegate:(id)aDelegate andModule:(SwordDictionary *)ddModule;

// bindings for stepper and text fields
- (NSInteger)minDays;
- (NSInteger)maxDays;
- (NSInteger)minMonths;
- (NSInteger)maxMonths;

- (NSInteger)day;
- (void)setDay:(NSInteger)aDay;
- (NSInteger)month;
- (void)setMonth:(NSInteger)aMonth;

- (NSString *)moduleName;
- (NSAttributedString *)moduleText;

- (BOOL)isTextViewEditable;

- (IBAction)todayButton:(id)sender;

@end



<|start_filename|>src/UserInterface/NSAttributedString+Additions.h<|end_filename|>
//
//  NSAttributedString+Additions.h
//  Eloquent
//
//  Created by <NAME> on 18.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSAttributedString (Additions)

- (NSArray *)findBibleVerses;

@end


<|start_filename|>src/UserInterface/HostWindow.h<|end_filename|>
//
//  HostWindow.h
//  Eloquent
//
//  Created by <NAME> on 05.04.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

/**
 This class is used as first responder for all the main menu actions.
 */
@interface HostWindow : NSWindow {
}

- (IBAction)leftSideBarHideShow:(id)sender;
- (IBAction)rightSideBarHideShow:(id)sender;
- (IBAction)switchLookupView:(id)sender;
- (IBAction)navigationBack:(id)sender;
- (IBAction)navigationForward:(id)sender;
- (IBAction)focusSearchEntry:(id)sender;
- (IBAction)nextBook:(id)sender;
- (IBAction)previousBook:(id)sender;
- (IBAction)nextChapter:(id)sender;
- (IBAction)previousChapter:(id)sender;
- (IBAction)performClose:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordVerseKey.h<|end_filename|>
//
//  SwordVerseKey.h
//  MacSword2
//
//  Created by <NAME> on 17.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SwordKey.h"

#ifdef __cplusplus
#include <versekey.h>
#endif

@interface SwordVerseKey : SwordKey

+ (SwordVerseKey *)verseKey;
+ (SwordVerseKey *)verseKeyWithVersification:(NSString *)scheme;
+ (SwordVerseKey *)verseKeyWithRef:(NSString *)aRef;
+ (SwordVerseKey *)verseKeyWithRef:(NSString *)aRef v11n:(NSString *)scheme;

#ifdef __cplusplus
+ (SwordVerseKey *)verseKeyWithSWVerseKey:(sword::VerseKey *)aVk;
+ (SwordVerseKey *)verseKeyWithNewSWVerseKey:(sword::VerseKey *)aVk;
- (SwordVerseKey *)initWithSWVerseKey:(sword::VerseKey *)aVk;
- (SwordVerseKey *)initWithNewSWVerseKey:(sword::VerseKey *)aVk;
- (sword::VerseKey *)swVerseKey;
#endif

- (SwordVerseKey *)initWithVersification:(NSString *)scheme;
- (SwordVerseKey *)initWithRef:(NSString *)aRef;
- (SwordVerseKey *)initWithRef:(NSString *)aRef v11n:(NSString *)scheme;

- (long)index;
- (int)testament;
- (void)setTestament:(char)val;
- (int)book;
- (void)setBook:(char)val;
- (int)chapter;
- (void)setChapter:(int)val;
- (int)verse;
- (void)setVerse:(long)val;
- (BOOL)intros;
- (void)setIntros:(BOOL)flag;
- (BOOL)autoNormalize;
- (void)setAutoNormalize:(BOOL)flag;
- (NSString *)bookName;
- (NSString *)osisBookName;
- (NSString *)osisRef;
- (void)setVersification:(NSString *)versification;
- (NSString *)versification;

@end


<|start_filename|>src/UserInterface/ContentDisplayingViewControllerFactory.h<|end_filename|>
//
//  ContentDisplayingViewControllerFactory.h
//  Eloquent
//
//  Created by <NAME> on 22.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <ObjCSword/SwordModule.h>

@class FileRepresentation;
@class ContentDisplayingViewController;

@interface ContentDisplayingViewControllerFactory : NSObject {
}

+ (ContentDisplayingViewController *)createSwordModuleViewControllerForModule:(SwordModule *)aModule;
+ (ContentDisplayingViewController *)createSwordModuleViewControllerForModuleType:(ModuleType)aModuleType;
+ (ContentDisplayingViewController *)createNotesViewControllerForFileRep:(FileRepresentation *)aFileRep;

@end


<|start_filename|>src/UserInterface/WindowHostController+Fullscreen.h<|end_filename|>
//
//  WindowHostController+Fullscreen.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "WindowHostController.h"

@interface WindowHostController (Fullscreen)

- (BOOL)isFullScreenMode;

@end


<|start_filename|>src/NotesTaking/FileRepresentation.h<|end_filename|>
//
//  FileRepresentation.h
//  Eloquent
//
//  Created by <NAME> on 15.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>


@interface FileRepresentation : NSObject {
    NSString *filePath;
    NSFileWrapper *fileWrapper;
    NSMutableDictionary *directoryContentWrapper;
    FileRepresentation *__strong parent;
}

@property (readwrite, strong) NSString *filePath;

+ (FileRepresentation *)createWithName:(NSString *)aName isFolder:(BOOL)isFolder destinationDirectoryRep:(FileRepresentation *)aFolderRep;
+ (BOOL)copyComplete:(FileRepresentation *)source to:(FileRepresentation *)destDirectoryRep;
+ (BOOL)moveComplete:(FileRepresentation *)source to:(FileRepresentation *)destDirectoryRep;
+ (BOOL)deleteComplete:(FileRepresentation *)fileRep;

- (id)initWithPath:(NSString *)aPath;

- (BOOL)isFile;
- (NSString *)name;
- (void)setName:(NSString *)aName;

// regular file methods
- (NSData *)fileContent;
- (void)setFileContent:(NSData *)aData;

// directory methods
- (void)buildTree;
- (BOOL)isDirectory;
- (NSArray *)directoryContent;
- (void)addFileRepresentation:(FileRepresentation *)anItem;
- (void)removeFileRepresentation:(FileRepresentation *)anItem;


@end


<|start_filename|>src/ModuleManager/ModuleListObject.h<|end_filename|>
//
//  ModuleListObject.h
//  Eloquent
//
//  Created by <NAME> on 01.01.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class SwordModule;
@class SwordInstallSource;

// tasks
typedef enum _ModuleTaskId {
    TaskNone = 0,
    TaskInstall,
    TaskRemove,
    TaskUpdate
}ModuleTaskId;

@interface ModuleListObject : NSObject

@property (strong, readwrite) SwordModule *module;
@property (strong, readwrite) SwordInstallSource *installSource;
@property (readwrite) ModuleTaskId taskId;

- (NSString *)moduleName;
- (NSString *)moduleTypeString;
- (NSInteger)moduleStatus;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/thmlwordjs.h<|end_filename|>
/***************************************************************************
 *
 *  thmlwordjs.h -	Implementation of ThMLWordJS
 *
 * $Id: thmlwordjs.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2005-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef THMLWORDSJS_H
#define THMLWORDSJS_H

#include <swoptfilter.h>

SWORD_NAMESPACE_START

class SWMgr;
  /** This Filter shows/hides strong's numbers in a ThML text
  */
class SWDLLEXPORT ThMLWordJS : public SWOptionFilter {
     SWModule *defaultGreekLex;
     SWModule *defaultHebLex;
     SWModule *defaultGreekParse;
     SWModule *defaultHebParse;
     SWMgr *mgr;

public:
	ThMLWordJS();
	virtual ~ThMLWordJS();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
	void setDefaultModules(SWModule *defaultGreekLex = 0, SWModule *defaultHebLex = 0, SWModule *defaultGreekParse = 0, SWModule *defaultHebParse = 0) {
		this->defaultGreekLex   = defaultGreekLex;
		this->defaultHebLex     = defaultHebLex;
		this->defaultGreekParse = defaultGreekParse;
		this->defaultHebParse   = defaultHebParse;
	}
	void setMgr(SWMgr *mgr) { this->mgr = mgr; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/ContentDisplayingViewController.h<|end_filename|>
//
//  ContentDisplayingViewController.h
//  Eloquent
//
//  Created by <NAME> on 18.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "HostableViewController.h"

typedef enum _ContentViewType {
    SwordBibleContentType = 1,
    SwordCommentaryContentType,
    SwordDictionaryContentType,
    SwordGenBookContentType,
    SwordModuleContentType = 99,
    NoteContentType = 100,
}ContentViewType;

enum TextContextMenuItems {
    AddBookmark = 90,
    AddVersesToBookmark = 91,
    LookUpInIndexDefault = 100,
    LookUpInIndexList,
    LookUpInDictionaryDefault = 300,
    LookUpInDictionaryList
};

enum LinkContextMenuItems {
    OpenLink = 10,
    RemoveLink
};

typedef enum _ProgressActionType {
    ReferenceLookupAction,
    IndexSearchAction,
    IndexCreateAction
}ProgressActionType;

@class CacheObject;
@class ModulesUIController;
@class ProgressOverlayViewController;

@interface ContentDisplayingViewController : HostableViewController <ProgressIndicating, TextDisplayable, ContextMenuProviding> {
    IBOutlet NSView *topAccessoryView;
    IBOutlet id contentDisplayController;    
    CacheObject *contentCache;
    
    ProgressOverlayViewController *progressController;
    ProgressActionType progressActionType;
    
    // content context menues
    IBOutlet NSMenu *textContextMenu;
    IBOutlet NSMenu *linkContextMenu;
    IBOutlet NSMenu *imageContextMenu;
    
    // context menu clicked
    NSEvent *lastEvent;
    NSURL *contextMenuClickedLink;
    NSRange clickedLinkTextRange;

    BOOL forceRedisplay;
}

@property (readwrite) BOOL forceRedisplay;
@property (strong, readwrite) NSEvent *lastEvent;
@property (strong, readwrite) CacheObject *contentCache;
@property (readonly) ProgressOverlayViewController *progressController;
@property (readwrite) ProgressActionType progressActionType;

- (void)commonInit;

- (ModulesUIController *)modulesUIController;

// delegate method of ContentDisplayController, called for context menu selection
- (NSMenu *)menuForEvent:(NSEvent *)event;

// printing
- (NSView *)printViewForInfo:(NSPrintInfo *)printInfo;

// Clicked links
- (BOOL)linkClicked:(id)link;
- (NSString *)processPreviewDisplay:(NSURL *)aUrl;

- (id)progressIndicator;
- (void)setProgressActionType:(ProgressActionType)aType;
- (ProgressActionType)progressActionType;
- (void)putProgressOverlayView;
- (void)removeProgressOverlayView;

- (IBAction)saveDocument:(id)sender;

// context menu actions
- (IBAction)lookUpInIndex:(id)sender;
- (IBAction)lookUpInIndexOfBible:(id)sender;
- (IBAction)lookUpInDictionary:(id)sender;
- (IBAction)lookUpInDictionaryOfModule:(id)sender;
- (IBAction)openLink:(id)sender;
- (IBAction)removeLink:(id)sender;

// convenience methods
- (void)hostingDelegateShowRightSideBar:(BOOL)aFlag;
- (ContentViewType)contentViewType;
- (BOOL)isSwordModuleContentType;
- (BOOL)isNoteContentType;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/untgz.h<|end_filename|>
#ifndef UNTGZ_H
#define UNTGZ_H

#include "zlib.h"

int untargz(int fd, const char *dest);
int untar(gzFile in, const char *dest);

#endif



<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordManager.h<|end_filename|>
/*	SwordManager.h - Sword API wrapper for Modules.

    Copyright 2008 <NAME>
    Based on code by <NAME>

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation version 2.

	This program 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
	General Public License for more details. (http://www.gnu.org/licenses/gpl.html)
*/

#import <Foundation/Foundation.h>
#import "SwordModule.h"

#ifdef __cplusplus
#include <swmgr.h>		// C++ Sword API
#include <localemgr.h>
#include <versekey.h>
#endif

/** the major types as returned in -[SwordModule -typeString] */
#define SWMOD_TYPES_BIBLES              @"Biblical Texts"
#define SWMOD_TYPES_COMMENTARIES        @"Commentaries"
#define SWMOD_TYPES_DICTIONARIES        @"Lexicons / Dictionaries"
#define SWMOD_TYPES_GENBOOKS            @"Generic Books"

#define SWMOD_CATEGORY_DAILYDEVS        @"Daily Devotional"
#define SWMOD_CATEGORY_GLOSSARIES       @"Glossaries"
#define SWMOD_CATEGORY_CULTS            @"Cults / Unorthodox / Questionable Material"
#define SWMOD_CATEGORY_ESSEYS           @"Essays"
#define SWMOD_CATEGORY_MAPS             @"Maps"
#define SWMOD_CATEGORY_IMAGES           @"Images"

/** number of sword module stypes */
#define SWMODTYPE_COUNT                 5

/** config entries */
#define SWMOD_CONFENTRY_VERSION             @"Version"
#define SWMOD_CONFENTRY_MINVERSION          @"MinimumVersion"
#define SWMOD_CONFENTRY_CIPHERKEY           @"CipherKey"
#define SWMOD_CONFENTRY_ABOUT               @"About"
#define SWMOD_CONFENTRY_CATEGORY            @"Category"
#define SWMOD_CONFENTRY_INSTALLSIZE         @"InstallSize"
#define SWMOD_CONFENTRY_COPYRIGHT           @"Copyright"
#define SWMOD_CONFENTRY_COPYRIGHTHOLDER     @"CopyrightHolder"
#define SWMOD_CONFENTRY_DISTRLICENSE        @"DistributionLicense"
#define SWMOD_CONFENTRY_DISTRNOTES          @"DistributionNotes"
#define SWMOD_CONFENTRY_TEXTSOURCE          @"TextSource"
#define SWMOD_CONFENTRY_SHORTPROMO          @"ShortPromo"
#define SWMOD_CONFENTRY_VERSIFICATION       @"Versification"
#define SWMOD_CONFENTRY_DIRECTION           @"Direction"
#define SWMOD_CONFENTRY_EDITABLE            @"Editable"

/** module features */
#define SWMOD_FEATURE_STRONGS           @"Strongs"
#define SWMOD_FEATURE_HEADINGS          @"Headings"
#define SWMOD_FEATURE_FOOTNOTES         @"Footnotes"
#define SWMOD_FEATURE_MORPH             @"Morph"
#define SWMOD_FEATURE_CANTILLATION      @"Cantillation"
#define SWMOD_FEATURE_HEBREWPOINTS      @"HebrewPoints"
#define SWMOD_FEATURE_GREEKACCENTS      @"GreekAccents"
#define SWMOD_FEATURE_LEMMA             @"Lemma"
#define SWMOD_FEATURE_SCRIPTREF         @"Scripref"     // not Scriptref
#define SWMOD_FEATURE_VARIANTS          @"Variants"
#define SWMOD_FEATURE_REDLETTERWORDS    @"RedLetterWords"

/** global options */
#define SW_OPTION_STRONGS               @"Strong's Numbers"
#define SW_OPTION_HEADINGS              @"Headings"
#define SW_OPTION_FOOTNOTES             @"Footnotes"
#define SW_OPTION_MORPHS                @"Morphological Tags"
#define SW_OPTION_HEBREWCANTILLATION    @"Hebrew Cantillation"
#define SW_OPTION_HEBREWPOINTS          @"Hebrew Vowel Points"
#define SW_OPTION_GREEKACCENTS          @"Greek Accents"
#define SW_OPTION_LEMMAS                @"Lemmas"
#define SW_OPTION_SCRIPTREFS            @"Cross-references"
#define SW_OPTION_VARIANTS              @"Textual Variants"
#define SW_OPTION_REDLETTERWORDS        @"Words of Christ in Red"
// this is not part of Sword
#define SW_OPTION_REF                   @"Reference"
#define SW_OPTION_MODULENAME            @"ModuleName"

/** config features definitions */
#define SWMOD_CONF_FEATURE_STRONGS       @"StrongsNumbers"
#define SWMOD_CONF_FEATURE_GREEKDEF      @"GreekDef"
#define SWMOD_CONF_FEATURE_HEBREWDEF     @"HebrewDef"
#define SWMOD_CONF_FEATURE_GREEKPARSE    @"GreekParse"
#define SWMOD_CONF_FEATURE_HEBREWPARSE   @"HebrewParse"
#define SWMOD_CONF_FEATURE_DAILYDEVOTION @"DailyDevotion"
#define SWMOD_CONF_FEATURE_GLOSSARY      @"Glossary"
#define SWMOD_CONF_FEATURE_IMAGES        @"Images"

/** On / Off */
#define SW_ON    @"On"
#define SW_OFF   @"Off"

// direction
#define SW_DIRECTION_RTL    @"RtoL"

// CipherKeys NSUserdefaultsKey
#define DefaultsModuleCipherKeysKey     @"DefaultsModuleCipherKeysKey"

@interface SwordManager : NSObject

@property (retain, readonly) NSString *modulesPath;

// --------------------- methods -----------------------

/**
 Convenience initializer. Creates an instance of SwordManager for a given module path.
 Internally -initWithPath: is called.
 */
+ (SwordManager *)managerWithPath:(NSString*)path;

/**
 Create an instance of SwordManager that will get the default manager
 in this application.
 Internally a static reference is set so that this instance will get a singleton object.
 */
+ (SwordManager *)defaultManager;

/**
 Retrieve a list of known module types.
 See SWMOD_CATEGORY_*
 */
+ (NSArray *)moduleTypes;

/** uses the current instance as default manager */
- (void)useAsDefaultManager;

/**
 Initializes this manager for the given module path.
 */
- (id)initWithPath:(NSString *)path;

/**
 Add an additional path to the manager to augment more modules.
 */
- (void)addModulesPath:(NSString*)path;

/** 
 Loads all modules, filters and such
 */
- (void)initManager;

/** should be called to reload all modules and such */
- (void)reloadManager;

/**
 Set a cipher key for the given module to make it unlocked and in order to render it's text.
 */
- (void)setCipherKey:(NSString*)key forModuleNamed:(NSString *)name;

/**
 Set a global option, for example render option.
 */
- (void)setGlobalOption:(NSString*)option value:(NSString *)value;

/**
 Returns the value of an option.
 */
- (BOOL)globalOption:(NSString *)option;

/** the number of modules */
- (NSInteger)numberOfModules;

/**
 List of module names known by this manager
 */
- (NSArray *)moduleNames;

/**
 List of modules known by this manager
 */
- (NSDictionary *)allModules;

/**
 Module list sorted by name
 */
- (NSArray *)sortedModuleNames;

/**
 Get module with name. Module is created from scratch.
 */
- (SwordModule *)moduleWithName:(NSString *)name;

/**
 Get modules with certain feature from internal list
 */
- (NSArray *)modulesForFeature:(NSString *)feature;

/**
 Get modules with certain type from internal list
 */
- (NSArray *)modulesForType:(ModuleType)type;

/**
 Get modules with certain category from the internal list
 */
- (NSArray *)modulesForCategory:(ModuleCategory)cat;

#ifdef __cplusplus
- (id)initWithSWMgr:(sword::SWMgr *)swMgr;
- (sword::SWModule *)getSWModuleWithName:(NSString *)moduleName;

/**
 Returns the underlying sword::SWMgr instance
 */
- (sword::SWMgr *)swManager;

#endif

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swbasicfilter.h<|end_filename|>
/******************************************************************************
 *
 *  swbasicfilter.h -	definition of class SWBasicFilter.  An SWFilter
 *  		       	impl that provides some basic methods that
 *  	       		many filter will need and can use as a starting
 *     			point
 *
 * $Id: swbasicfilter.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWBASICFILTER_H
#define SWBASICFILTER_H

#include <swfilter.h>
#include <swbuf.h>

SWORD_NAMESPACE_START

class VerseKey;

// not a protected inner class because MSVC++ sucks and can't handle it
class SWDLLEXPORT BasicFilterUserData {
public:
	BasicFilterUserData(const SWModule *module, const SWKey *key);
	virtual ~BasicFilterUserData() {}
	const SWModule *module;
	const SWKey *key;
	const VerseKey *vkey;
	SWBuf lastTextNode;
	SWBuf lastSuspendSegment;
	bool suspendTextPassThru;
	bool supressAdjacentWhitespace;
};

/** A filter providing commonly used functionality.
 * This filter has facilities for handling SGML/HTML/XML like tokens and
 * escape strings (like SGML entities). It has the facility for just
 * substituting the given tokens and escape strings to other strings and for
 * "manual" custom token handling.
 *
 * In this class the functions with arguments looking as <code>char
 * **buf</code> write a character sequnce at address specified by
 * <code>*buf</code> address and change <code>*buf</code> to point past
 * the last char of the written sequence.
 */
class SWDLLEXPORT SWBasicFilter : public virtual SWFilter {

class Private;

	char *tokenStart;
	char *tokenEnd;
	char *escStart;
	char *escEnd;
	char escStartLen;
	char escEndLen;
	char tokenStartLen;
	char tokenEndLen;
	bool escStringCaseSensitive;
	bool tokenCaseSensitive;
	bool passThruUnknownToken;
	bool passThruUnknownEsc;
	bool passThruNumericEsc;
	char processStages;


	Private *p;
public:

	SWBasicFilter();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
	virtual ~SWBasicFilter();

protected:

	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new BasicFilterUserData(module, key);
	}

	// STAGEs
	static const char INITIALIZE;	// flag for indicating processing before char loop
	static const char PRECHAR;	// flag for indicating processing at top in char loop
	static const char POSTCHAR;	// flag for indicating processing at bottom in char loop
	static const char FINALIZE;	// flag for indicating processing after char loop


	/** Sets the beginning of escape sequence (by default "&").*/
	void setEscapeStart(const char *escStart);

	/** Sets the end of escape sequence (by default ";").*/
	void setEscapeEnd(const char *escEnd);

	/** Sets the beginning of token start sequence (by default "<").*/
	void setTokenStart(const char *tokenStart);

	/** Sets the end of token start sequence (by default ">").*/
	void setTokenEnd(const char *tokenEnd);

	/** Sets whether to pass thru an unknown token unchanged
	 *	or just remove it.
	 * Default is false.*/
	void setPassThruUnknownToken(bool val);

	/** Sets whether to pass thru an unknown escape sequence unchanged
	 *	or just remove it.
	 *	Default is false.
	 */
	void setPassThruUnknownEscapeString(bool val);

	/** Sets whether to pass thru a numeric escape sequence unchanged
	 *	or allow it to be handled otherwise.
	 * Default is false.*/
	void setPassThruNumericEscapeString(bool val);

	/** Are escapeStrings case sensitive or not? Call this
	 *	function before addEscapeStingSubstitute()
	 */
	void setEscapeStringCaseSensitive(bool val);

	/** Registers an esc control sequence that can pass unchanged
	 */
	void addAllowedEscapeString(const char *findString);

	/** Unregisters an esc control sequence that can pass unchanged
	 */
	void removeAllowedEscapeString(const char *findString);

	/** Registers an esc control sequence
	 */
	void addEscapeStringSubstitute(const char *findString, const char *replaceString);

	/** Unregisters an esc control sequence
	 */
	void removeEscapeStringSubstitute(const char *findString);

	/** This function performs the substitution of escapeStrings */
	bool substituteEscapeString(SWBuf &buf, const char *escString);

	/** This passes allowed escapeStrings */
	bool passAllowedEscapeString(SWBuf &buf, const char *escString);

	/** This appends escString to buf as an entity */
	void appendEscapeString(SWBuf &buf, const char *escString);

	/** Are tokens case sensitive (like in GBF) or not? Call this
	 *	function before addTokenSubstitute()
	 */
	void setTokenCaseSensitive(bool val);

	/** Registers a simple token substitutions.  Usually called from the
	 *	c-tor of a subclass
	 */
	void addTokenSubstitute(const char *findString, const char *replaceString);

	/** Unregisters a simple token substitute
	 */
	void removeTokenSubstitute(const char *findString);

	/** This function performs the substitution of tokens */
	bool substituteToken(SWBuf &buf, const char *token);

	/** This function is called for every token encountered in the input text.
	 * @param buf the output buffer
	 * @param token the token (e.g. <code>"p align='left'"</code>
	 * @param userData user storage space for data transient to 1 full buffer parse
	 * @return subclasses should return true if they handled the token, or false if they did not.
	 */
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);

	virtual bool processStage(char /*stage*/, SWBuf &/*text*/, char *&/*from*/, BasicFilterUserData * /*userData*/) { return false; }
	virtual void setStageProcessing(char stages) { processStages = stages; }	// see STATICs up above

	/** This function is called for every escape sequence encountered in the input text.
	 * @param buf the output buffer 
	 * @param escString the escape sequence (e.g. <code>"amp"</code> for &amp;amp;)
	 * @param userData user storage space for data transient to 1 full buffer parse
	 * @return <code>false</code> if was not handled and should be handled in
	 * @return subclasses should return true if they handled the esc seq, or false if they did not.
	 */
	virtual bool handleEscapeString(SWBuf &buf, const char *escString, BasicFilterUserData *userData);

	/** This function is called for all numeric escape sequences. If passThrough
	 * @param buf the output buffer 
	 * @param escString the escape sequence (e.g. <code>"#235"</code> for &amp;235;)
	 * @return subclasses should return true if they handled the esc seq, or false if they did not.
         */
	virtual bool handleNumericEscapeString(SWBuf &buf, const char *escString);


};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/FullScreenView.h<|end_filename|>
//
//  FullScreenView.h
//  Eloquent
//
//  Created by <NAME> on 09.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "ProtocolHelper.h"

@class ConfirmationSheetController;
@class ToolbarController;

@interface FullScreenView : NSView <FullScreenCapability> {
    IBOutlet ToolbarController *toolbarController;
    IBOutlet id delegate;
}

@property (readwrite) id delegate;
@property (readwrite) ToolbarController *toolbarController;

- (BOOL)isFullScreenMode;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/nullim.h<|end_filename|>
/******************************************************************************
 *
 *  nullim.h -	Implementation of NullIM
 *
 * $Id: nullim.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef NULLIM_H
#define NULLIM_H

#include <swinputmeth.h>
#include <defs.h>
SWORD_NAMESPACE_START

class SWDLLEXPORT NullIM : public SWInputMethod {

public:
	NullIM();
	int * translate(char ch);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/ConfirmationDialog/ConfirmationSheetController.h<|end_filename|>
/* MBConfirmationSheetController */

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

enum SheetReturnCode {
	SheetDefaultButtonCode = 0,
	SheetAlternateButtonCode,
	SheetOtherButtonCode
};

// name of the nib
#define CONFIRMATION_SHEET_NIB_NAME     @"ConfirmationDialog"

@interface ConfirmationSheetController : NSWindowController {
    IBOutlet NSTextField *titleTextField;
    IBOutlet NSTextField *textTextField;
    IBOutlet NSButton *askAgainButton;
    IBOutlet NSButton *defaultButton;
    IBOutlet NSButton *alternateButton;
    IBOutlet NSButton *otherButton;
}

@property (strong, readwrite) id contextInfo;
@property (readonly) int sheetReturnCode;
@property (strong, readwrite) id delegate;
@property (strong, readwrite) NSString *defaultsAskAgainKey;
@property (strong, readwrite) NSString *confirmationTitle;
@property (strong, readwrite) NSString *confirmationText;
@property (strong, readwrite) NSString *defaultButtonText;
@property (strong, readwrite) NSString *alternateButtonText;
@property (strong, readwrite) NSString *otherButtonText;
@property (strong, readwrite) NSString *askAgainButtonText;
@property (strong, readwrite) NSWindow *sheetWindow;

- (id)initWithSheetTitle:(NSString *)aTitle 
                 message:(NSString *)msg 
           defaultButton:(NSString *)defaultTxt
         alternateButton:(NSString *)alternateTxt
             otherButton:(NSString *)otherTxt
          askAgainButton:(NSString *)askAgainTxt
     defaultsAskAgainKey:(NSString *)defaultsKey
             contextInfo:(id)aContextInfo
               docWindow:(NSWindow *)aWindow;

// window title
- (void)setSheetTitle:(NSString *)aTitle;
- (NSString *)sheetTitle;
// sheet return code
- (int)sheetReturnCode;

- (void)beginSheet;
- (void)endSheet;

// run modal for window usage
- (NSInteger)runModal;

// actions
- (IBAction)defaultButton:(id)sender;
- (IBAction)alternateButton:(id)sender;
- (IBAction)otherButton:(id)sender;

@end


<|start_filename|>src/Indexing/Highlighter.h<|end_filename|>
//
//  Highlighter.h
//  Eloquent
//
//  Created by <NAME> on 20.06.07.
//  Copyright 2007 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface Highlighter : NSObject {

}

+ (NSString *)stripSearchQuery:(NSString *)searchQuery;
+ (NSAttributedString *)highlightText:(NSString *)text forTokens:(NSString *)tokenStr attributes:(NSDictionary *)attributes;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/zstr.h<|end_filename|>
/*****************************************************************************
 *
 *  zstr.h -	code for class 'zStr'- a module that reads compressed text
 *	       	files.
 *		and provides lookup and parsing functions based on
 *		class StrKey
 *
 * $Id: zstr.h 2980 2013-09-14 21:51:47Z scribe $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ZSTR_H
#define ZSTR_H

#include <defs.h>

SWORD_NAMESPACE_START

class SWCompress;
class EntriesBlock;
class FileDesc;
class SWBuf;

class SWDLLEXPORT zStr {

private:
	static int instance;		// number of instantiated zStr objects or derivitives
	mutable EntriesBlock *cacheBlock;
	mutable long cacheBlockIndex;
	mutable bool cacheDirty;
	char *path;
	bool caseSensitive;
	mutable long lastoff;		// for caching and optimization
	long blockCount;
	SWCompress *compressor;

protected:
	FileDesc *idxfd;
	FileDesc *datfd;
	FileDesc *zdxfd;
	FileDesc *zdtfd;
	static const int IDXENTRYSIZE;
	static const int ZDXENTRYSIZE;

	void getCompressedText(long block, long entry, char **buf) const;
	void flushCache() const;
	void getKeyFromDatOffset(long ioffset, char **buf) const;
	void getKeyFromIdxOffset(long ioffset, char **buf) const;

public:
	zStr(const char *ipath, int fileMode = -1, long blockCount = 100, SWCompress *icomp = 0, bool caseSensitive = false);
	virtual ~zStr();
	signed char findKeyIndex(const char *ikey, long *idxoff, long away = 0) const;
	void getText(long index, char **idxbuf, char **buf) const;
	void setText(const char *ikey, const char *buf, long len = -1);
	void linkEntry(const char *destkey, const char *srckey);
	virtual void rawZFilter(SWBuf &buf, char direction = 0) const { (void) buf; (void) direction; }
	static signed char createModule (const char *path);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawverse.h<|end_filename|>
/******************************************************************************
 *
 *  rawverse.h -	code for class 'RawVerse'- a module that reads raw text
 *			files:  ot and nt using indexs ??.bks ??.cps ??.vss
 *			and provides lookup and parsing functions based on
 *			class VerseKey
 *
 * $Id: rawverse.h 3134 2014-03-17 09:30:15Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWVERSE_H
#define RAWVERSE_H


#include <defs.h>

SWORD_NAMESPACE_START

class FileDesc;
class SWBuf;

class SWDLLEXPORT RawVerse {


	static int instance;		// number of instantiated RawVerse objects or derivitives
protected:
	FileDesc *idxfp[2];
	FileDesc *textfp[2];

	char *path;
	void doSetText(char testmt, long idxoff, const char *buf, long len = -1);
	void doLinkEntry(char testmt, long destidxoff, long srcidxoff);

public:
	static const char nl;
	RawVerse(const char *ipath, int fileMode = -1);
	virtual ~RawVerse();
	void findOffset(char testmt, long idxoff, long *start,	unsigned short *end) const;
	void readText(char testmt, long start, unsigned short size, SWBuf &buf) const;
	static char createModule(const char *path, const char *v11n = "KJV");
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/gbfosis.h<|end_filename|>
/***************************************************************************
 *
 *  gbfosis.h -	Implementation of GBFOSIS
 *
 * $Id: gbfosis.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef GBFOSIS_H
#define GBFOSIS_H

#include <swfilter.h>
#include <stack>
#include <swbuf.h>

SWORD_NAMESPACE_START


class SWDLLEXPORT QuoteStack {
private:
	class QuoteInstance {
	public:
		char startChar;
		char level;
		SWBuf uniqueID;
		char continueCount;
		QuoteInstance(char startChar = '\"', char level = 1, SWBuf uniqueID = "", char continueCount = 0) {
			this->startChar     = startChar;
			this->level         = level;
			this->uniqueID      = uniqueID;
			this->continueCount = continueCount;
		}
		void pushStartStream(SWBuf &text);
	};

	typedef std::stack<QuoteInstance> QuoteInstanceStack;
	QuoteInstanceStack quotes;
public:
	QuoteStack();
	virtual ~QuoteStack();
	void handleQuote(char *buf, char *quotePos, SWBuf &text);
	void clear();
	bool empty() { return quotes.empty(); }
};

/** this filter converts GBF text to OSIS text
 */
class SWDLLEXPORT GBFOSIS : public SWFilter {
public:
	GBFOSIS();
	virtual ~GBFOSIS();
	char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif /* THMLOSIS_H */


<|start_filename|>src/UserInterface/SearchTextObject.h<|end_filename|>
//
//  SearchTextObject.h
//  Eloquent
//
//  Created by <NAME> on 21.11.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "Indexer.h"

@interface SearchTextObject : NSObject <NSCoding> {
    // texts for search type
    NSMutableDictionary *searchTextsForTypes;
    // recent search arrays for search type
    NSMutableDictionary *recentSearchesForTypes;
    // the search type
    SearchType searchType;
}

@property (readwrite) SearchType searchType;

- (NSString *)searchTextForType:(SearchType)aType;
- (void)setSearchText:(NSString *)aText forSearchType:(SearchType)aType;
- (NSMutableArray *)recentSearchsForType:(SearchType)aType;
- (void)setRecentSearches:(NSMutableArray *)searches forSearchType:(SearchType)aType;

// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/teirtf.h<|end_filename|>
/******************************************************************************
 *
 *  teirtf.h -	Implementation of TEIRTF
 *
 * $Id: teirtf.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2006-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef TEIRTF_H
#define TEIRTF_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts TEI text to RTF text
 */
class SWDLLEXPORT TEIRTF : public SWBasicFilter {
private:

protected:
	class MyUserData : public BasicFilterUserData {
	public:
		bool isBiblicalText;
		bool inOsisRef;
		SWBuf w;
		SWBuf version;
		MyUserData(const SWModule *module, const SWKey *key);
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	TEIRTF();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/defs.h<|end_filename|>
/******************************************************************************
 *
 *  defs.h -	Global defines, mostly platform-specific stuff
 *
 * $Id: defs.h 3029 2014-02-25 13:00:49Z scribe $
 *
 * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */
// ----------------------------------------------------------------------------
// 
// ----------------------------------------------------------------------------
#ifndef SWORDDEFS_H
#define SWORDDEFS_H

// TODO: What is this? jansorg, why does NO_SWORD_NAMESPACE still define
// a C++ namespace, and then force using it?  This makes no sense to me.
// see commit 1195
#ifdef NO_SWORD_NAMESPACE
 #define SWORD_NAMESPACE_START namespace sword {
 #define SWORD_NAMESPACE_END }; using namespace sword;
#elif defined(__cplusplus)
 #define SWORD_NAMESPACE_START namespace sword {
 #define SWORD_NAMESPACE_END }
#else
 #define SWORD_NAMESPACE_START 
 #define SWORD_NAMESPACE_END 
#endif

SWORD_NAMESPACE_START

#define SWTRY try
#define SWCATCH(x) catch (x)

#ifdef _WIN32_WCE
#define SWTRY
#define SWCATCH(x) if (0)
#define GLOBCONFPATH "/Program Files/sword/sword.conf"
#endif

#ifdef ANDROID
#define _NO_IOSTREAM_
#undef SWTRY
#undef SWCATCH
#define SWTRY
#define SWCATCH(x) if (0)
#endif

// _declspec works in BC++ 5 and later, as well as VC++
#if defined(_MSC_VER)

#  ifdef SWMAKINGDLL
#    define SWDLLEXPORT _declspec( dllexport )
#    define SWDLLEXPORT_DATA(type) _declspec( dllexport ) type
#    define SWDLLEXPORT_CTORFN
#  elif defined(SWUSINGDLL)
#    define SWDLLEXPORT _declspec( dllimport )
#    define SWDLLEXPORT_DATA(type) _declspec( dllimport ) type
#    define SWDLLEXPORT_CTORFN
#  else
#    define SWDLLEXPORT
#    define SWDLLEXPORT_DATA(type) type
#    define SWDLLEXPORT_CTORFN
#  endif

#  define SWDEPRECATED __declspec(deprecated("** WARNING: deprecated method **"))


#elif defined(__SWPM__)

#  ifdef SWMAKINGDLL
#    define SWDLLEXPORT _Export
#    define SWDLLEXPORT_DATA(type) _Export type
#    define SWDLLEXPORT_CTORFN
#  elif defined(SWUSINGDLL)
#    define SWDLLEXPORT _Export
#    define SWDLLEXPORT_DATA(type) _Export type
#    define SWDLLEXPORT_CTORFN
#  else
#    define SWDLLEXPORT
#    define SWDLLEXPORT_DATA(type) type
#    define SWDLLEXPORT_CTORFN
#  endif

#  define SWDEPRECATED 


#elif defined(__GNUWIN32__)

#  ifdef SWMAKINGDLL
#    define SWDLLEXPORT __declspec( dllexport )
#    define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
#    define SWDLLEXPORT_CTORFN
#  elif defined(SWUSINGDLL)
#    define SWDLLEXPORT __declspec( dllimport )
#    define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
#    define SWDLLEXPORT_CTORFN
#  else
#    define SWDLLEXPORT
#    define SWDLLEXPORT_DATA(type) type
#    define SWDLLEXPORT_CTORFN
#  endif

#  define SWDEPRECATED  __attribute__((__deprecated__))


#elif defined(__BORLANDC__)
#  ifdef SWMAKINGDLL
#    define SWDLLEXPORT _export
#    define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
#    define SWDLLEXPORT_CTORFN
#  elif defined(SWUSINGDLL)
#    define SWDLLEXPORT __declspec( dllimport )
#    define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
#    define SWDLLEXPORT_CTORFN
#  else
#    define SWDLLEXPORT
#    define SWDLLEXPORT_DATA(type) type
#    define SWDLLEXPORT_CTORFN
#  endif

#define COMMENT SLASH(/)
#define SLASH(s) /##s
#  define SWDEPRECATED COMMENT


#elif defined(__GNUC__)
#  define SWDLLEXPORT
#  define SWDLLEXPORT_DATA(type) type
#  define SWDLLEXPORT_CTORFN
#  define SWDEPRECATED  __attribute__((__deprecated__))


#else
#  define SWDLLEXPORT
#  define SWDLLEXPORT_DATA(type) type
#  define SWDLLEXPORT_CTORFN
#  define SWDEPRECATED
#endif


// For ostream, istream ofstream
#if defined(__BORLANDC__) && defined( _RTLDLL )
#  define SWDLLIMPORT __import
#else
#  define SWDLLIMPORT
#endif



#ifdef __cplusplus
enum {DIRECTION_LTR = 0, DIRECTION_RTL, DIRECTION_BIDI};
enum {FMT_UNKNOWN = 0, FMT_PLAIN, FMT_THML, FMT_GBF, FMT_HTML, FMT_HTMLHREF, FMT_RTF, FMT_OSIS, FMT_WEBIF, FMT_TEI, FMT_XHTML, FMT_LATEX};
enum {ENC_UNKNOWN = 0, ENC_LATIN1, ENC_UTF8, ENC_SCSU, ENC_UTF16, ENC_RTF, ENC_HTML};
enum {BIB_BIBTEX = 0, /* possible future formats: BIB_MARCXML, BIB_MARC21, BIB_DCMI BIB_OSISHEADER, BIB_SBL_XHTML, BIB_MLA_XHTML, BIB_APA_XHTML, BIB_CHICAGO_XHTML */};
#endif

SWORD_NAMESPACE_END
#endif //SWORDDEFS_H


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/markupfiltmgr.h<|end_filename|>
/******************************************************************************
 *
 *  markupfiltmgr.h -	definition of class SWMarkupMgr, subclass of
 *			used to transcode all module text to a requested
 *			markup
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef MARKUPFILTMGR_H
#define MARKUPFILTMGR_H

#include <encfiltmgr.h>

SWORD_NAMESPACE_START

/** This class is like a normal SWEncodingMgr,
* but you can additonally specify which markup
* you want to use.
*/
class SWDLLEXPORT MarkupFilterMgr : public EncodingFilterMgr {
protected:
        SWFilter* fromthml;
        SWFilter* fromgbf;
        SWFilter* fromplain;
        SWFilter* fromosis;
        SWFilter* fromtei;

				/**
	 			* current markup value
	 			*/
        char markup;

        void CreateFilters(char markup);
public:
	/** Constructor of SWMarkupMgr.
	 *
	 * @param encoding The desired encoding.
	 * @param markup The desired markup format.
	 */
        MarkupFilterMgr(char markup = FMT_THML, char encoding = ENC_UTF8);

	/**
	 * The destructor of SWMarkupMgr.
	 */
        ~MarkupFilterMgr();

	/** Markup sets/gets the markup after initialization
	 * 
	 * @param m The new markup or FMT_UNKNOWN if you just want to get the current markup.
	 * @return The current (possibly changed) markup format.
	 */
        char Markup(char m = FMT_UNKNOWN);

	/**
	 * Adds the render filters which are defined in "section" to the SWModule object "module".
	 * @param module To this module the render filter(s) are added
	 * @param section We use this section to get a list of filters we should apply to the module
	 */	
        virtual void AddRenderFilters(SWModule *module, ConfigEntMap &section);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/filemgr.h<|end_filename|>
/******************************************************************************
 *
 *  filemgr.h -	definition of class FileMgr used for pooling file handles
 *
 * $Id: filemgr.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 1998-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef FILEMGR_H
#define FILEMGR_H

#include <sys/stat.h>
#include <fcntl.h>

#include <defs.h>
#include <swcacher.h>
#include <swbuf.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT FileDesc;

struct SWDLLEXPORT DirEntry {
public:
	SWBuf name;
	unsigned long size;
	bool isDirectory;
};

/**
 * This class isolates all file io for SWORD, making OS
 * level quirks easier to fix.  This class is typically
 * copied and replaced if necessary to get SWORD to run on
 * a specific platform (e.g., Windows Mobile), but in
 * the future, statics should be removed to make possible to
 * instead simply subclass and override necessary methods.
 *
 * This class also provides many convenience methods which
 * make working with data storage easier.
 *
 * Conceptually, this factory exposes an interface which
 * allows SWORD to 'open' every file it wants, without
 * worrying about OS limits, and takes care of opening and
 * closing the actual file descriptors when necessary.
 */
class SWDLLEXPORT FileMgr : public SWCacher {

	friend class FileDesc;
	friend class __staticsystemFileMgr;

	FileDesc *files;
	int sysOpen(FileDesc * file);
protected:
	static FileMgr *systemFileMgr;
public:
	static int CREAT;
	static int APPEND;
	static int TRUNC;
	static int RDONLY;
	static int RDWR;
	static int WRONLY;
	static int IREAD;
	static int IWRITE;

	/** Maximum number of open files set in the constructor.
	* determines the max number of real system files that
	* filemgr will open.  Adjust for tuning.
	*/
	int maxFiles;
	
	static FileMgr *getSystemFileMgr();
	static void setSystemFileMgr(FileMgr *newFileMgr);

	/** Constructor.
	* @param maxFiles The number of files that this FileMgr may open in parallel, if necessary.
	*/
	FileMgr(int maxFiles = 35);

	/**
	* Destructor. Clean things up. Will close all files opened by this FileMgr object.
	*/
	~FileMgr();

	/** Open a file and return a FileDesc for it.
	* The file itself will only be opened when FileDesc::getFd() is called.
	* @param path Filename.
	* @param mode File access mode.
	* @param tryDowngrade
	* @return FileDesc object for the requested file.
	*/
	FileDesc *open(const char *path, int mode, bool tryDowngrade);

	/** Open a file and return a FileDesc for it.
	* The file itself will only be opened when FileDesc::getFd() is called.
	* @param path Filename.
	* @param mode File access mode.
	* @param perms Permissions.
	* @param tryDowngrade
	* @return FileDesc object for the requested file.
	*/
	FileDesc *open(const char *path, int mode, int perms = IREAD | IWRITE, bool tryDowngrade = false);

	/** Close a given file and delete its FileDesc object.
	* Will only close the file if it was created by this FileMgr object.
	* @param file The file to close.
	*/
	void close(FileDesc *file);

	/** Cacher methods overridden
	 */
	virtual void flush();
	virtual long resourceConsumption();

	/** Checks for the existence and readability of a file.
	* @param ipath Path to file.
	* @param ifileName Name of file to check for.
	*/
	static signed char existsFile(const char *ipath, const char *ifileName = 0);

	/** Checks for the existence and readability of a directory.
	* @param ipath Path to directory.
	* @param idirName Name of directory to check for.
	*/
	static signed char existsDir(const char *ipath, const char *idirName = 0);

	/** Truncate a file at its current position
	* leaving byte at current possition intact deleting everything afterward.
	* @param file The file to operate on.
	*/
	signed char trunc(FileDesc *file);

	static char isDirectory(const char *path);
	static int createParent(const char *pName);
	static int createPathAndFile(const char *fName);

	/** attempts to open a file readonly
	 * @param fName filename to open
	 * @return fd; < 0 = error
	 */
	static int openFileReadOnly(const char *fName);
	static int copyFile(const char *srcFile, const char *destFile);
	static int copyDir(const char *srcDir, const char *destDir);
	static int removeDir(const char *targetDir);
	static int removeFile(const char *fName);
	static char getLine(FileDesc *fDesc, SWBuf &line);

	/**
	 * Determines where SWORD looks for the user's home folder.  This is
	 * typically used as a place to find any additional personal SWORD
	 * modules which a user might wish to be added to a system-wide
	 * library (e.g., added from ~/.sword/mods.d/ or ~/sword/mods.d/)
	 *
	 * or if a user or UI wishes to override SWORD system configuration
	 * settings (e.g., /etc/sword.conf) with a custom configuration
	 * (e.g., ~/.sword/sword.conf)
	 */
	SWBuf getHomeDir();

};

/**
* This class represents one file. It works with the FileMgr object.
*/
class SWDLLEXPORT FileDesc {

	friend class FileMgr;

	long offset;
	int fd;			// -77 closed;
	FileMgr *parent;
	FileDesc *next;

	FileDesc(FileMgr * parent, const char *path, int mode, int perms, bool tryDowngrade);
	virtual ~FileDesc();

public:
	/** @return File handle.
	 * NOTE: magic file descriptor -77 = closed to avoid os limits
	*/
	inline int getFd() {
		if (fd == -77)
			fd = parent->sysOpen(this);
//		if ((fd < -1) && (fd != -77))  // kludge to handle ce
//			return 777;
		return fd;
	}

	long seek(long offset, int whence);
	long read(void *buf, long count);
	long write(const void *buf, long count);

	/** Path to file.
	*/
	char *path;
	/** File access mode.
	*/
	int mode;
	/** File permissions.
	*/
	int perms;
	/**
	*/
	bool tryDowngrade;
};


SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osisosis.h<|end_filename|>
/******************************************************************************
 *
 *  osisosis.h -	Implementation of OSISOSIS
 *
 * $Id: osisosis.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2004-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISOSIS_H
#define OSISOSIS_H

#include <swbasicfilter.h>
#include <utilxml.h>

SWORD_NAMESPACE_START

/** this filter converts internal OSIS text to public OSIS text
 */
class SWDLLEXPORT OSISOSIS : public SWBasicFilter {
private:
protected:
	class MyUserData : public BasicFilterUserData {
	public:
		bool osisQToTick;
		bool inBold;
		SWBuf lastTransChange;
		SWBuf w;
		SWBuf fn;
		XMLTag startTag;
		MyUserData(const SWModule *module, const SWKey *key);
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual char processText(SWBuf &text, const SWKey *key, const SWModule *module);
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	OSISOSIS();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordDictionary.h<|end_filename|>
/*	SwordDict.h - Sword API wrapper for lexicons and Dictionaries.

    Copyright 2008 <NAME>
    Based on code by <NAME>

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation version 2.

	This program 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
	General Public License for more details. (http://www.gnu.org/licenses/gpl.html)
*/

#import <Foundation/Foundation.h>

@class SwordManager, SwordModule;

@interface SwordDictionary : SwordModule

- (NSArray *)allKeys;
- (NSString *)entryForKey:(NSString *)aKey;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/gbfwebif.h<|end_filename|>
/******************************************************************************
 *
 *  gbfwebif.h -	Implementation of GBFWEBIF
 *
 * $Id: gbfwebif.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef GBFWEBIF_H
#define GBFWEBIF_H

#include <gbfxhtml.h>

SWORD_NAMESPACE_START

/** this filter converts GBF text to classed XHTML for web interfaces
 */
class SWDLLEXPORT GBFWEBIF : public GBFXHTML {
	const SWBuf baseURL;
	const SWBuf passageStudyURL;

protected:
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	GBFWEBIF();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/bz2comprs.h<|end_filename|>
/******************************************************************************
 *
 *  bz2comprs.h -	Bzip2Compress, a driver class that provides bzip2
 *			compression (Burrows–Wheeler with Huffman coding)
 *
 * $Id: bz2comprs.h 3045 2014-03-02 07:53:52Z chrislit $
 *
 * Copyright 2000-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef BZ2COMPRS_H
#define BZ2COMPRS_H

#include <swcomprs.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT Bzip2Compress : public SWCompress {

protected:
public:
	Bzip2Compress();
	virtual ~Bzip2Compress();

	virtual void Encode(void);
	virtual void Decode(void);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordBibleChapter.h<|end_filename|>
//
//  SwordBibleChapter.h
//  MacSword2
//
//  Created by <NAME> on 19.02.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class SwordBibleBook;

@interface SwordBibleChapter : NSObject

@property (readonly) int number;
@property (retain, readonly) SwordBibleBook *book;

- (id)initWithBook:(SwordBibleBook *)aBook andChapter:(int)aNumber;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swcipher.h<|end_filename|>
/******************************************************************************
 *
 *  swcipher.h -	definition of Class SWCipher used for data
 *			cipher/decipher
 *
 * $Id: swcipher.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWCIPHER_H
#define SWCIPHER_H

#include <sapphire.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT SWCipher
{

  sapphire master;
  sapphire work;

  char *buf;
  bool cipher;
  unsigned long len;
protected:
public:
    SWCipher (unsigned char *key);
  virtual void setCipherKey (const char *key);
    virtual ~ SWCipher ();
  virtual char *Buf (const char *buf = 0, unsigned long len = 0);
  virtual char *cipherBuf (unsigned long *len, const char *buf = 0);
  virtual void Encode (void);
  virtual void Decode (void);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/ProgressOverlayView/ProgressOverlayViewController.h<|end_filename|>
//
//  ProgressOverlayViewController.h
//  Eloquent
//
//  Created by <NAME> on 10.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@interface ProgressOverlayViewController : NSViewController <IndexCreationProgressing> {
    // Progress overlay view
    IBOutlet NSProgressIndicator *progressIndicator;
    IBOutlet NSProgressIndicator *barProgressIndicator;
    IBOutlet id __strong delegate;
    IBOutlet NSView *barProgressView;
}

@property (strong, readwrite) id delegate;
@property (readonly) NSView *barProgressView;

+ (ProgressOverlayViewController *)defaultController;

/**
 when using this initializer, the delegate should implement -contentViewInitFinished:
 in order to be notified when the loading of progress indcator is done
 */
- (id)initWithDelegate:(id)aDelegate;

- (void)startProgressAnimation;
- (void)stopProgressAnimation;

- (void)addToMaxProgressValue:(double)val;
- (void)setProgressMaxValue:(double)max;
- (void)setProgressCurrentValue:(double)val;
- (void)setProgressIndeterminate:(BOOL)flag;
- (void)incrementProgressBy:(double)increment;

@end


<|start_filename|>src/Sword/SwordModule+SearchKitIndex.h<|end_filename|>
//
//  SwordSearching.h
//  Eloquent
//
// Copyright 2008 <NAME>
// Based on code by <NAME>
//

#import <Foundation/Foundation.h>
#import <ObjCSword/SwordModule.h>
#import <ObjCSword/SwordBible.h>
#import <ObjCSword/SwordCommentary.h>
#import <ObjCSword/SwordDictionary.h>
#import <ObjCSword/SwordBook.h>

@class Indexer;
@class SwordVerseKey;

@protocol IndexCreationProgressing

- (void)addToMaxProgressValue:(double)val;
- (void)setProgressMaxValue:(double)max;
- (void)setProgressCurrentValue:(double)val;
- (void)setProgressIndeterminate:(BOOL)flag;
- (void)incrementProgressBy:(double)increment;

@end

@interface SwordModule(SearchKitIndex)

- (BOOL)hasSKSearchIndex;
- (void)createSKSearchIndex;
- (void)createSKSearchIndexWithProgressIndicator:(id<IndexCreationProgressing>)progressIndicator;
- (void)deleteSKSearchIndex;
- (void)recreateSKSearchIndex;
- (void)createSKSearchIndexThreadedWithDelegate:(id)aDelegate progressIndicator:(id<IndexCreationProgressing>)progressIndicator;
- (NSArray *)performSKIndexSearch:(NSString *)searchString;
- (NSArray *)performSKIndexSearch:(NSString *)searchString constrains:(id)constrains maxResults:(int)maxResults;

@end


<|start_filename|>src/globals.h<|end_filename|>
/*
 *  globals.h
 *  Eloquent
 *
 *  Created by <NAME> on 03.06.05.
 *  Copyright 2007 mabe. All rights reserved.
 *
 */

#import <Cocoa/Cocoa.h>
#import <CoreFoundation/CoreFoundation.h>

#define BUNDLEVERSION               CFBundleGetVersionNumber(CFBundleGetMainBundle())
#define BUNDLEVERSIONSTRING         CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey)
#define APPNAME                     @"Eloquent"
#define SWINSTALLMGR_NAME           @"InstallMgr"
#define PREFS_FILE                  [@"~/Library/Preferences/org.crosswire.Eloquent.plist" stringByExpandingTildeInPath]

// OS version
#define OSVERSION [[NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"] objectForKey:@"ProductVersion"]

// table and outlineview fonts
#define FontTiny [NSFont fontWithName: @"Helvetica" size:9]
#define FontSmall [NSFont fontWithName: @"Helvetica" size:10]
#define FontStd [NSFont fontWithName: @"Helvetica" size: 11]
#define FontStdBold [NSFont fontWithName: @"Helvetica Bold" size: 11]
#define FontLarge [NSFont fontWithName: @"Helvetica" size: 12]
#define FontLargeBold [NSFont fontWithName: @"Helvetica Bold" size: 12]
#define FontMoreLarge [NSFont fontWithName: @"Helvetica" size: 14]
#define FontMoreLargeBold [NSFont fontWithName: @"Helvetica Bold" size: 14]

// define for userdefaults
#define UserDefaults [NSUserDefaults standardUserDefaults]
// define for default SwordManager
#define DefaultSwordManager [SwordManager defaultManager]

// Notification identifiers

/**
 \brief this notification is send when the user clicks on a link in ExtTextView or the tooltip sows up
 */
#define NotificationShowPreviewData @"NotificationShowPreviewData"
#define SendNotifyShowPreviewData(X) [[NSNotificationCenter defaultCenter] postNotificationName:NotificationShowPreviewData object:X]

/**
 \brief this notification is send when among the currently displayed and active modules is a dictionary or genbook
 */
#define NotificationSetHUDContentView @"NotificationSetHUDContentView"
#define SendNotifySetHUDContentView(X) [[NSNotificationCenter defaultCenter] postNotificationName:NotificationSetHUDContentView object:X];

/**
 \brief this notification is send, when the modules have changed (updated, added, removed)
 */
#define NotificationModulesChanged @"NotificationModulesChanged"
#define SendNotifyModulesChanged(X) [[NSNotificationCenter defaultCenter] postNotificationName:NotificationModulesChanged object:X]


<|start_filename|>src/Sword/EloquentFilterProvider.h<|end_filename|>
//
// Created by mbergmann on 18.12.12.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>
#import <ObjCSword/DefaultFilterProvider.h>

@interface EloquentFilterProvider : DefaultFilterProvider
@end

<|start_filename|>src/UserInterface/SearchOptionsViewController.h<|end_filename|>
//
//  SearchOptionsViewController.h
//  MacSword2
//
//  Created by <NAME> on 14.07.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <CocoLogger/CocoLogger.h>
#import <HostableViewController.h>
#import <Indexer.h>

@interface SearchOptionsViewController : HostableViewController {
    
    IBOutlet NSView *referenceSearchOptionsView;
    IBOutlet NSView *indexSearchOptionsView;
    IBOutlet NSView *viewSearchOptionsView;
    
    IBOutlet id target;    
    
    NSSize referenceSearchOptionsViewSize;
    NSSize indexSearchOptionsViewSize;
    NSSize viewSearchOptionsViewSize;    
}

@property (assign, readwrite) id target;

// initializers
- (id)initWithDelegate:(id)aDelegate;
- (id)initWithDelegate:(id)aDelegate andTarget:(id)aTarget;

// methods
- (NSView *)optionsViewForSearchType:(SearchType)aType;
- (NSSize)optionsViewSizeForSearchType:(SearchType)aType;

@end


<|start_filename|>src/Indexing/SearchResultEntry.h<|end_filename|>
//
//  SearchResultEntry.h
//  Eloquent
//
//  Created by <NAME> on 02.06.07.
//  Copyright 2007 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

// result dictionary property key names
#define IndexPropDocName @"DocumentName"
#define IndexPropDocScore @"DocumentScore"
#define IndexPropSwordKeyString @"SwordKeyString"
#define IndexPropSwordStrongString @"SwordStrongString"

@interface SearchResultEntry : NSObject
{
    NSMutableDictionary *properties;
}

- (id)init;
- (id)initWithDictionary:(NSDictionary *)aDict;

// general methods for adding and getting properties
- (void)addObject:(NSObject *)object forKey:(NSObject *)key;
- (id)objectForKey:(NSObject *)key;

// convenient methods
- (NSString *)documentName;
- (NSNumber *)documentScore;
- (NSString *)keyString;

/**
 \brief take care for compare: operations
 this method returns the document name property
 */
- (NSString *)description;

@end


<|start_filename|>src/About/MBAboutWindowController.h<|end_filename|>
/* MBAboutWindowController */

//  Created by <NAME> on 25.07.05.
//  Copyright 2005 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@interface MBAboutWindowController : NSWindowController {
    IBOutlet NSTextField *appNameLabel;
    IBOutlet NSTextField *copyrightLabel;
    IBOutlet NSTextView *creditsTextView;
    IBOutlet NSTextField *versionLabel;
}

@end


<|start_filename|>src/ProgressOverlayView/ProgressOverlayView.h<|end_filename|>
//
//  ProgressOverlayView.h
//  Eloquent
//
//  Created by <NAME> on 10.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface ProgressOverlayView : NSView {
    NSColor *fillColor;
}

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swmgr.h<|end_filename|>
/******************************************************************************
 *
 *  swmgr.h -	definition of class SWMgr used to interact with an install
 *		base of sword modules.
 *
 * $Id: swmgr.h 3541 2017-12-03 18:40:33Z scribe $
 *
 * Copyright 1997-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

/** @mainpage The SWORD Project - API documentation
 * This is the API documentation for The SWORD Project.
 * It describes the structure of the SWORD library and documents the functions of the classes.
 * From time to time this documentation gives programming examples, too.
 *
 * SWORD provides a simple to use engine for working with many types of texts including Bibles,
 *	commentaries, lexicons, glossaries, daily devotionals, and others.
 *
 * Some main classes:
 *
 * SWMgr gives access to an installed library of modules (books).
 * SWModule represents an individual module
 * SWKey represents a location into a module (e.g. "John 3:16")
 *
 * An API Primer can be found at:
 *
 * http://crosswire.org/sword/develop/swordapi/apiprimer.jsp
 *
 * If you're interested in working on a client which uses SWORD, please first have a look at
 *	some of the existing ones.  They can always use help, and will also prove to be good examples
 *	if you decide to start a new project.
 *
 * Well known frontends are:
 *	-BibleTime
 *	-BPBible
 *	-Eloquent
 *	-PocketSword
 *	-The SWORD Projectfor Windows
 *	-Xiphos
 * See http://crosswire.org/applications.jsp for links to each and a more
 * complete list.
 */

#ifndef SWMGR_H
#define SWMGR_H

#include <map>
#include <list>
#include <swbuf.h>
#include <swconfig.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWModule;
class SWFilter;
class SWOptionFilter;
class SWFilterMgr;
class SWBuf;
class SWKey;

typedef std::map < SWBuf, SWModule *, std::less < SWBuf > >ModMap;
typedef std::map < SWBuf, SWFilter * >FilterMap;
typedef std::map < SWBuf, SWOptionFilter * >OptionFilterMap;
typedef std::list < SWBuf >StringList;
typedef std::list < SWFilter* >FilterList;
typedef std::list < SWOptionFilter* >OptionFilterList;

class FileDesc;
class SWOptionFilter;

/** SWMgr exposes an installed module set
 *
 * SWMgr exposes an installed module set and can be asked to configure the desired
 *	markup and options which modules will produce.
 *
 * @version $Id: swmgr.h 3541 2017-12-03 18:40:33Z scribe $
 */
class SWDLLEXPORT SWMgr {
private:
	bool mgrModeMultiMod;
	bool augmentHome;
	void commonInit(SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr, bool multiMod = false);

protected:
	SWFilterMgr *filterMgr;		//made protected because because BibleTime needs it
	SWConfig *myconfig;		//made protected because because BibleTime needs it
	SWConfig *mysysconfig;
	SWConfig *homeConfig;
	/**
	 * Deprecated. Use createAllModules instead
	 */
	SWDEPRECATED void CreateMods(bool multiMod = false) { createAllModules(multiMod); };
	SWDEPRECATED void DeleteMods() { deleteAllModules(); }
	char configType;		// 0 = file; 1 = directory
	OptionFilterMap optionFilters;
	FilterMap cipherFilters;
	SWFilter *gbfplain;
	SWFilter *thmlplain;
	SWFilter *osisplain;
	SWFilter *teiplain;
	SWOptionFilter *transliterator;
	FilterList cleanupFilters;
	FilterMap extraFilters;
	StringList options;
	/**
	 * method to create all modules from configuration.
	 *
	 * Override to add any special processing before or after
	 * calling SWMgr::createAllModules
	 *
	 * e.g., augmenting a localConfig.conf to SWMgr::config
	 * that might store CipheyKey or Font preferences per module
	 * before actual construction of modules
	 *
	 */
	virtual void createAllModules(bool multiMod = false);
	/**
	 * called to delete all contructed modules.  Undoes createAllModules
	 * override to clean anything up before or after all modules are
	 * deleted
	 */
	virtual void deleteAllModules();

	/**
	 * called to create exactly one module from a config entry
	 * override to do any extra work before or after each module
	 * is created
	 */
	virtual SWModule *createModule(const char *name, const char *driver, ConfigEntMap &section);

	/**
	 * call by every constructor to initialize SWMgr object
	 * override to include any addition common initialization
	 */
	virtual void init();


	/**
	 * Deprecated.  Use addGlobalOptionFilters instead.
	 */
	SWDEPRECATED virtual void AddGlobalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { addGlobalOptionFilters(module, section); }
	/**
	 * Adds appropriate global option filters to a module.  Override to add any special
	 *	global option filters. Global option filters typically update SourceType markup
	 *	to turn on and off specific features of a text when a user has optionally chosen
	 *	to show or hide that feature, e.g. Strongs, Footnotes, Headings, etc.
	 *	Global options can also have more than On and Off values, but these are the most
	 *	common.
	 *	A set of all global options included from an entire library of installed modules
	 *	can be obtained from getGlobalOptions and presented to the user.  Values to
	 *	which each global option may be set can be obtain from getGlobalOptionValues,
	 *	and similar.  See that family of methods for more information.
	 * See the module.conf GlobalOptionFilter= entries.
	 * @param module module to which to add encoding filters
	 * @param section configuration information for module
	 */
	virtual void addGlobalOptionFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Deprecated.  Use addLocalOptionFilters instead.
	 */
	SWDEPRECATED virtual void AddLocalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { addLocalOptionFilters(module, section); }
	/**
	 * Adds appropriate local option filters to a module.  Override to add any special
	 *	local option filters.  Local options are similar to global options in that
	 *	they may be toggled on or off or set to some value from a range of choices
	 *	but local option
	 * See the module.conf LocalOptionFilter= entries.
	 * @param module module to which to add encoding filters
	 * @param section configuration information for module
	 */
	virtual void addLocalOptionFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Deprecated.  Use addEncodingFilters instead
	 */
	SWDEPRECATED virtual void AddEncodingFilters(SWModule *module, ConfigEntMap &section) { addEncodingFilters(module, section); }
	/**
	 * Adds appropriate encoding filters to a module.  Override to add any special
	 *	encoding filters.
	 * See the module.conf Encoding= entry.
	 * @param module module to which to add encoding filters
	 * @param section configuration information for module
	 */
	virtual void addEncodingFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Deprecated.  Use addRenderFilters instead.
	 */
	SWDEPRECATED virtual void AddRenderFilters(SWModule *module, ConfigEntMap &section) { addRenderFilters(module, section); }
	/**
	 * Add appropriate render filters to a module.  Override to add any special
	 *	render filters. Render filters are used for preparing a text for
	 *	display and typically convert markup from SourceType
	 *	to desired display markup.
	 * See the module.conf SourceType= entry.
	 * @param module module to which to add render filters
	 * @param section configuration information for module
	 */
	virtual void addRenderFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Deprecated.  Use addStripFilters instead.
	 */
	SWDEPRECATED virtual void AddStripFilters(SWModule *module, ConfigEntMap &section) { addStripFilters(module, section); }
	/**
	 * Adds appropriate strip filters to a module.  Override to add any special
	 *	strip filters. Strip filters are used for preparing text for searching
	 *	and typically strip out all markup and leave only searchable words
	 * See the module.conf SourceType= entry.
	 * @param module module to which to add strip filters
	 * @param section configuration information for module
	 */
	virtual void addStripFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Deprecated.  Use addLocalStripFilters instead.
	 */
	SWDEPRECATED virtual void AddStripFilters(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { addLocalStripFilters(module, section); }
	/**
	 * Adds manually specified strip filters specified in module configuration
	 * as LocalStripFilters.  These might take care of special cases of preparation
	 * for searching, e.g., removing ()[] and underdot symbols from manuscript modules
	 * @param module module to which to add local strip filters
	 * @param section configuration information for module
	 */
	virtual void addLocalStripFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Deprecated.  Use addRawFilters instead.
	 */
	SWDEPRECATED virtual void AddRawFilters(SWModule *module, ConfigEntMap &section) { addRawFilters(module, section); }
	/**
	 * Add appropriate raw filters to a module.  Override to add any special
	 *	raw filters.  Raw filters are used to manipulate a buffer
	 *	immediately after it has been read from storage.  For example,
	 *	any decryption that might need to be done.
	 * See the module.conf CipherKey= entry.
	 * @param module module to which to add raw filters
	 * @param section configuration information for module
	 */
	virtual void addRawFilters(SWModule *module, ConfigEntMap &section);


	// still to be normalized below ...
	//
	StringList augPaths;
	virtual char AddModToConfig(FileDesc *conffd, const char *fname);
	virtual void loadConfigDir(const char *ipath);

public:

	// constants which represent module types used in SWModule::getType
	static const char *MODTYPE_BIBLES;
	static const char *MODTYPE_COMMENTARIES;
	static const char *MODTYPE_LEXDICTS;
	static const char *MODTYPE_GENBOOKS;
	static const char *MODTYPE_DAILYDEVOS;


	static bool isICU;
	static const char *globalConfPath;

	/**
	 * Deprecated.  Used FileMgr::getSystemFileMgr()->getHomeDir() instead.
	 */
	SWDEPRECATED static SWBuf getHomeDir();

	/**
	 * Perform all the logic to discover a SWORD configuration and libraries on a system
	 */
	static void findConfig(char *configType, char **prefixPath, char **configPath, StringList *augPaths = 0, SWConfig **providedSysConf = 0);

	/**
	 * The configuration of a loaded library of SWORD modules
	 * e.g., from /usr/share/sword/mods.d/
	 * 	augmented with ~/.sword/mods.d/
	 * 
	 * This represents all discovered modules and their configuration
	 * compiled into a single SWConfig object with each [section]
	 * representing each module. e.g. [KJV]
	 */
	SWConfig *config;

	/**
	 * The configuration file for SWORD
	 * e.g., /etc/sword.conf
	 */
	SWConfig *sysConfig;

	/** The path to main module set and locales
	 */
	char *prefixPath;

	/** path to main module set configuration 
	 */
	char *configPath;


	/**
	 * Deprecated.  Use getModules instead.
	 */
	ModMap Modules;
	/** The map of available modules.
	 *	This map exposes the installed modules.
	 *
	 *	Here's an example how to iterate over all
	 *	the installed modules and check the module name
	 *	and type of each module and do something special
	 *	if the module type is a Bible.
	 *
	 * @code
	 *
	 * for (ModMap::iterator it = getModules().begin(); it != getModules().end(); ++it) {
	 *
	 * 	SWBuf modName = it->first;
	 * 	SWModule *mod = it->second;
	 *
	 * 	SWBuf modType = mod->getType();
	 *
	 * 	if (modType == SWMgr::MODTYPE_BIBLES) {
	 * 		// do something with mod
	 * 	}
	 * }
	 * @endcode
	 */
	ModMap &getModules();
	const ModMap &getModules() const { return const_cast<SWMgr *>(this)->getModules(); }

	/** Gets a specific module by name.  e.g. SWModule *kjv = myManager.getModule("KJV");
	 * @param modName the name of the module to retrieve
	 * @return the module, if found, otherwise 0
	 */
	SWModule *getModule(const char *modName) { ModMap::iterator it = getModules().find(modName); return ((it != getModules().end()) ? it->second : 0); }
	const SWModule *getModule(const char *modName) const { ModMap::const_iterator it = getModules().find(modName); return ((it != getModules().end()) ? it->second : 0); }


	/** Constructs an instance of SWMgr
	 *
	 * @param iconfig manually supply a configuration.  If not supplied, SWMgr will look on the system
	 *	using a complex hierarchical search.  See README for detailed specifics.
	 * @param isysconfig manually supply a an isysconfig (e.g. /etc/sword.conf)
	 * @param autoload whether or not to immediately load modules on construction of this SWMgr.
	 *	If you reimplemented SWMgr you can set this to false and call SWMgr::load() after you have
	 *	completed the contruction and setup of your SWMgr subclass.
	 * @param filterMgr an SWFilterMgr subclass to use to manager filters on modules
	 *	SWMgr TAKES OWNERSHIP FOR DELETING THIS OBJECT
	 *	For example, this will create an SWMgr and cause its modules to produce HTMLHREF formatted output
	 *	when asked for renderable text:
	 *
	 *	SWMgr *myMgr = new SWMgr(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF));
	 */
	SWMgr(SWConfig *iconfig = 0, SWConfig *isysconfig = 0, bool autoload = true, SWFilterMgr *filterMgr = 0, bool multiMod = false);

	/**
	 */
	SWMgr(SWFilterMgr *filterMgr, bool multiMod = false);

	/**
	 * @param iConfigPath provide a custom path to use for module set location, instead of
	 *	searching the system for it.
	 */
	SWMgr(const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0, bool multiMod = false, bool augmentHome = true);

	/** The destructor of SWMgr.
	 * This function cleans up the modules and deletes the created object.
	 * Destroying the SWMgr causes all retrieved SWModule object to be invalid, so
	 *	be sure to destroy only when retrieved objects are no longer needed.
	 */
	virtual ~SWMgr();

	/**
	 * Adds books from a new path to the library
	 * @param path the path in which to search for books
	 * @param multiMod whether or not to keep multiple copies of the same book if found in different paths
	 *		default - false, uses last found version of the book
	 */
	virtual void augmentModules(const char *path, bool multiMod = false);

	void deleteModule(const char *);

	/** Looks for any newly installed module.conf file in the path provided,
	 *	displays the copyright information to the user, and then copies the
	 *	module.conf to the main module set's mods.d directory
	 * @param dir where to search for new modules
	 */
	virtual void InstallScan(const char *dir);

	/**
	 * Deprecated.  Use load
	 */
	SWDEPRECATED virtual signed char Load() { return load(); }
	/** Loads installed library of SWORD modules.
	 * Should only be manually called if SWMgr was constructed
	 *	without autoload; otherwise, this will be called on SWMgr construction
	 * Reimplement this function to supply special functionality when modules are
	 * initially loaded. This includes
	 * discovery of config path with SWMgr::fileconfig,
	 * loading of composite SWMgr::config,
	 * and construction of all modules from config using SWMgr::createAllModules
	 */
	virtual signed char load();

	/** Change the values of global options (e.g. Footnotes, Strong's Number, etc.)
	 * @param option The name of the option, for which you want to change the
	 * value. Well known and often used values are "Footnotes" or "Strong's Numbers"
	 * @param value new value. Common values are "On" and "Off"
	 */
	virtual void setGlobalOption(const char *option, const char *value);

	/** Get the current value of the given option
	 * @param option the name of the option, who's value is desired
	 * @return the value of the given option
	 */
	virtual const char *getGlobalOption(const char *option);

	/** Gets a brief description for the given option
	 * @param option the name of the option, who's tip is desired
	 * @return description text
	 * @see setGlobalOption, getGlobalOption, getGlobalOptions
	 */
	virtual const char *getGlobalOptionTip(const char *option);

	/** Gets a list of all available option names
	 * @return list of option names
	 */
	virtual StringList getGlobalOptions();

	/** Gets a list of legal values to which a specific option 
	 *	may be set
	 * @param option the name of the option, who's legal values are desired
	 * @return a list of legal values for the given option
	 */
	virtual StringList getGlobalOptionValues(const char *option);

	/** Filters a buffer thru a named filter
	 * @param filterName
	 * @param text buffer to filter
	 * @param key context key if filter needs this for processing
	 * @param module context module if filter needs this for processing
	 * @return error status
	 */
	virtual char filterText(const char *filterName, SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);

	/**
	 * Sets the cipher key for the given module. This function updates the key
	 * at runtime, but it does not write to the config file.
	 * This method is NOT the recommended means for applying a CipherKey
	 * to a module.
	 *
	 * Typically CipherKey entries and other per module user configuration
	 * settings are all saved in a separate localConfig.conf that is updated
	 * by a UI or other client of the library. e.g.,
	 *
	 *
	 * [KJV]
	 * Font=Arial
	 * LocalOptionFilter=SomeSpecialFilterMyUIAppliesToTheKJV
	 *
	 * [ISV]
	 * CipherKey=xyzzy
	 *
	 * [StrongsGreek]
	 * SomeUISetting=false
	 *
	 *
	 * Then these extra config settings in this separate file are applied
	 * just before module creation by overriding SWMgr::createAllModules and
	 * augmenting SWMgr::config with code like this:
	 *
	 * @code
	 * void createAllModules(bool multiMod) {
	 *
	 * 	// after SWMgr::config is loaded
	 *	// see if we have our own local settings
	 * 	SWBuf myExtraConf = "~/.myapp/localConf.conf";
	 * 	bool exists = FileMgr::existsFile(extraConf);
	 * 	if (exists) {
	 * 		SWConfig addConfig(extraConf);
	 * 		this->config->augment(addConfig);
	 * 	}
	 *
	 * 	// now that we've augmented SWMgr::config with our own custom
	 * 	// settings, proceed on with creating modules
	 *
	 * 	SWMgr::createAllModules(multiMod);
	 *
	 * }
	 * @endcode
	 *
	 * The above convention is preferred to using this setCipherKey method
	 *
	 * @param modName For this module we change the unlockKey
	 * @param key This is the new unlock key we use for the module.
	 */
	virtual signed char setCipherKey(const char *modName, const char *key);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/Bookmarks/BookmarkManager.h<|end_filename|>
//
//  BookmarkManager.h
//  Eloquent
//
//  Created by <NAME> on 21.10.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class Bookmark;
@class SwordVerseKey;

@interface BookmarkManager : NSObject {
    NSMutableArray *bookmarks;
}

@property (strong, readwrite) NSMutableArray *bookmarks;

+ (BookmarkManager *)defaultManager;
- (void)saveBookmarks;

- (Bookmark *)bookmarkForReference:(SwordVerseKey *)aVerseKey;

- (BOOL)deleteBookmark:(Bookmark *)aBookmark;

- (BOOL)deleteBookmarkForPath:(NSIndexPath *)path;
- (NSIndexPath *)indexPathForBookmark:(Bookmark *)bm;

@end


<|start_filename|>Resources/CocoPCRE.framework/Versions/A/Headers/CocoPCRE.h<|end_filename|>
/*
 *  CocoPCRE.h
 *  CocoPCRE
 *
 *  Created by <NAME> on 13.01.08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#import <CocoPCRE/Regex.h>
#import <CocoPCRE/MatchResult.h>


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swversion.h<|end_filename|>
/******************************************************************************
 *
 *  swversion.h -	definition of class SWVersion used to compare version
 *			info
 *
 * $Id: swversion.h 3524 2017-11-07 03:08:49Z scribe $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWVERSION_H
#define SWVERSION_H

#define SWORD_VERSION_NUM 107905000
#define SWORD_VERSION_STR "1.7.905"
#define SWORD_VERSION_MAJOR 1
#define SWORD_VERSION_MINOR 7
#define SWORD_VERSION_MICRO 905
#define SWORD_VERSION_NANO 0

#include <defs.h>
SWORD_NAMESPACE_START

/** A basic tool class to handle program version numbers.
*/
class SWDLLEXPORT SWVersion {
	public:
	/** The different version subnumbers.
	*/
	int major, minor, minor2, minor3;
	/**The constructor.
	* @param version Version string to be parsed.
	*/
	SWVersion(const char *version = "0.0");
	/** Compare 2 Versions with each other.
	* @param vi Version number to compare with.
	* @return >0:this>vi; 0:this==vi; <0:this<vi
	*/
	int compare(const SWVersion &vi) const;
	/** @return The parsed version number text.
	*/
	const char *getText() const;
	/** @return The parsed version number text.
	*/
	operator const char *() const { return getText(); }
	bool operator>(const SWVersion &vi) const {return (compare(vi) > 0);}
	bool operator<(const SWVersion &vi) const {return (compare(vi) < 0);}
	bool operator>=(const SWVersion &vi) const {return (compare(vi) >= 0);}
	bool operator<=(const SWVersion &vi) const {return (compare(vi) <= 0);}
	bool operator==(const SWVersion &vi) const {return (compare(vi) == 0);}

	/** Current sword library version.
	* Use this to check (e.g. at compile time) if the
	* version of the sword lib is recent enough for your program.
	*/
	static SWVersion currentVersion;
};

SWORD_NAMESPACE_END
#endif



<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/ftplibftpt.h<|end_filename|>
/******************************************************************************
 *
 *  ftplibftpt.h -	code for ftplib impl of FTP Transport
 *			(FTPLibFTPTransport)
 *
 * $Id: ftplibftpt.h 2980 2013-09-14 21:51:47Z scribe $
 *
 * Copyright 2004-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef FTPLIBFTPT_H
#define FTPLIBFTPT_H

#include <defs.h>
#include <remotetrans.h>

typedef struct NetBuf netbuf;

SWORD_NAMESPACE_START


class SWDLLEXPORT FTPLibFTPTransport : public RemoteTransport {
	netbuf *ftpConnection;

	char assureLoggedIn();

public:
	FTPLibFTPTransport(const char *host, StatusReporter *statusReporter = 0);
	~FTPLibFTPTransport();
	char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0);
};


SWORD_NAMESPACE_END

#endif


<|start_filename|>src/UserInterface/WorkspaceViewHostController.h<|end_filename|>
//
//  WorkspaceViewHostController.h
//  Eloquent
//
//  Created by <NAME> on 06.11.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <ObjCSword/SwordModule.h>
#import "PSMTabBarControl.h"
#import "PSMTabStyle.h"
#import "WindowHostController.h"

@class ContentDisplayingViewController;
@class SwordModule;
@class FileRepresentation;
@class InitialInfoViewController;

@interface WorkspaceViewHostController : WindowHostController <NSCoding, PSMTabBarControlDelegate> {

    /** the view switcher */
    //IBOutlet NSSegmentedControl *tabControl;
    IBOutlet PSMTabBarControl *tabControl;
    IBOutlet NSTabView *tabView;
    
    IBOutlet InitialInfoViewController *initialViewController;
    IBOutlet NSView *defaultMainView;
    
    /** each tabItem should have this menu */
    IBOutlet NSMenu *tabItemMenu;

    /** one view controller for each tab */
    NSMutableArray *viewControllers;
    
    /** array of search text objects */
    NSMutableArray *searchTextObjs;
}

// methods
- (NSView *)contentView;
- (void)setContentView:(NSView *)aView;
- (NSString *)computeTabTitle;
- (void)updateTabTitles;

// actions
- (IBAction)addTab:(id)sender;
- (IBAction)menuItemSelected:(id)sender;
- (IBAction)openModuleInstaller:(id)sender;

// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

@end


<|start_filename|>externals/PSMTabBarControl/source/PSMYosemiteTabStyle.h<|end_filename|>
//
//  PSMYosemiteTabStyle.h
//  PSMTabBarControl
//
//  Created by <NAME> on 2/17/06.
//  Copyright 2006 Positive Spin Media. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "PSMTabStyle.h"

@interface PSMYosemiteTabStyle : NSObject<NSCoding, PSMTabStyle>

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swcom.h<|end_filename|>
/******************************************************************************
 *
 *  swcom.h -	code for base class 'SWCom'.  SWCom is the basis for all
 *		types of commentary modules.
 *		It is traditionally close to the same as the SWText
 *		module type, but has defaults set which more
 *		closely represent how a commentary will be used and how
 *		the bulk of our commentaries expect to be used.  For example,
 *		most commentaries consist of entries for a range of text
 *		(Matt.1.1-6: "Matthew begins with by telling us...").  This
 *		same entry will be returned when any verse between Matt.1.1-6
 *		is requested from the engine.  This is done with verse linking.
 *		Since linking is used heavily in commentaries, the flag
 *		skipConsecutiveLinks is defaulted to true so when the
 *		commentary is incremented, it will go to the next ENTRY,
 *		not the next verse (likely Matt.1.7, from our example above).
 *
 * $Id: swcom.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWCOM_H
#define SWCOM_H

#include <swmodule.h>

#include <defs.h>

SWORD_NAMESPACE_START

class VerseKey;
class SWKey;

  /** The basis for all commentary modules
  */
class SWDLLEXPORT SWCom : public SWModule {

	mutable VerseKey *tmpVK1;
	mutable VerseKey *tmpVK2;
        mutable bool tmpSecond;
	char *versification;

protected:
	VerseKey &getVerseKey(const SWKey *key = 0) const;


public:

	/** Initializes data for instance of SWCom
	*/
	SWCom(const char *imodname = 0, const char *imoddesc = 0,
			SWDisplay *idisp = 0, SWTextEncoding enc = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup mark = FMT_UNKNOWN, const char *ilang = 0,
			const char *versification = "KJV");

	virtual ~SWCom();
	virtual SWKey *createKey() const;

	virtual long getIndex() const;
	virtual void setIndex(long iindex);



	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/canon_calvin.h<|end_filename|>
/******************************************************************************
 *
 *  canon_calvin.h -	Versification data for French Bibles de Genève
 *                      (Bibles de Genève, Épée, Martin, Ostervald)
 *
 *  $Id$
 *
 * Copyright 1998-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef CANON_CALVIN_H
#define CANON_CALVIN_H

SWORD_NAMESPACE_START


// Versification system: Calvin

/* Book order:
   Gen Exod Lev Num Deut Josh Judg Ruth 1Sam 2Sam 1Kgs 2Kgs 1Chr 2Chr
   Ezra Neh Esth Job Ps Prov Eccl Song Isa Jer Lam Ezek Dan Hos Joel
   Amos Obad Jonah Mic Nah Hab Zeph Hag Zech Mal Matt Mark Luke John
   Acts Rom 1Cor 2Cor Gal Eph Phil Col 1Thess 2Thess 1Tim 2Tim Titus
   Phlm Heb Jas 1Pet 2Pet 1John 2John 3John Jude Rev
*/

/* The first Bible de Genève, a revision of the Bible d'Olivétan, was
   released in 1560 by <NAME>. The Bible d'Olivétan was printed
   without verse division.
   Because Bibles employing this versification system, introduced by
   Robert 'Stephanus' Estienne in 1553 differ subtly in versification,
   this is not based on any single edition, although some may
   eventually match, but on multiple editions of these bibles.
*/

// Apocryphal books are not included.


/******************************************************************************
 * [on]tbooks_calvin - initialize static instance for all canonical
 *		 text names and chapmax
 *
 * for otbooks_calvin, use otbooks
 *
 * for ntbooks_calvin, use ntbooks
 *
 ******************************************************************************/


/******************************************************************************
 *	Maximum verses per chapter
 */

int vm_calvin[] = {
  // Genesis
  31, 25, 24, 26, 32, 22, 24, 22, 29, 32,
  32, 20, 18, 24, 21, 16, 27, 33, 38, 18,
  34, 24, 20, 67, 34, 35, 46, 22, 35, 43,
  55, 32, 20, 31, 29, 43, 36, 30, 23, 23,
  57, 38, 34, 34, 28, 34, 31, 22, 33, 26,
  // Exodus
  22, 25, 22, 31, 23, 30, 25, 32, 35, 29,
  10, 51, 22, 31, 27, 36, 16, 27, 25, 26,
  36, 31, 33, 18, 40, 37, 21, 43, 46, 38,
  18, 35, 23, 35, 35, 38, 29, 31, 43, 38,
  // Leviticus
  17, 16, 17, 35, 19, 30, 38, 36, 24, 20,
  47, 8, 59, 57, 33, 34, 16, 30, 37, 27,
  24, 33, 44, 23, 55, 46, 34,
  // Numbers
  54, 34, 51, 49, 31, 27, 89, 26, 23, 36,
  35, 15, 34, 45, 41, 50, 13, 32, 22, 29,
  35, 41, 30, 25, 18, 65, 23, 31, 39, 17,
  54, 42, 56, 29, 34, 13,
  // Deuteronomy
  46, 37, 29, 49, 33, 25, 26, 20, 29, 22,
  32, 32, 18, 29, 23, 22, 20, 22, 21, 20,
  23, 30, 25, 22, 19, 19, 26, 68, 29, 20,
  30, 52, 29, 12,
  // Joshua
  18, 24, 17, 24, 15, 27, 26, 35, 27, 43,
  23, 24, 33, 15, 63, 10, 18, 28, 51, 9,
  45, 34, 16, 33,
  // Judges
  36, 23, 31, 24, 31, 40, 25, 35, 57, 18,
  40, 15, 25, 20, 20, 31, 13, 31, 30, 48,
  25,
  // Ruth
  22, 23, 18, 22,
  // I Samuel
  28, 36, 21, 22, 12, 21, 17, 22, 27, 27,
  15, 25, 23, 52, 35, 23, 58, 30, 24, 43,
  15, 23, 28, 23, 44, 25, 12, 25, 11, 31,
  13,
  // II Samuel
  27, 32, 39, 12, 25, 23, 29, 18, 13, 19,
  27, 31, 39, 33, 37, 23, 29, 33, 43, 26,
  22, 51, 39, 25,
  // I Kings
  53, 46, 28, 34, 18, 38, 51, 66, 28, 29,
  43, 33, 34, 31, 34, 34, 24, 46, 21, 43,
  29, 54,
  // II Kings
  18, 25, 27, 44, 27, 33, 20, 29, 37, 36,
  21, 21, 25, 29, 38, 20, 41, 37, 37, 21,
  26, 20, 37, 20, 30,
  // I Chronicles
  54, 55, 24, 43, 26, 81, 40, 40, 44, 14,
  47, 40, 14, 17, 29, 43, 27, 17, 19, 8,
  30, 19, 32, 31, 31, 32, 34, 21, 30,
  // II Chronicles
  17, 18, 17, 22, 14, 42, 22, 18, 31, 19,
  23, 16, 22, 15, 19, 14, 19, 34, 11, 37,
  20, 12, 21, 27, 28, 23, 9, 27, 36, 27,
  21, 33, 25, 33, 27, 23,
  // Ezra
  11, 70, 13, 24, 17, 22, 28, 36, 15, 44,
  // Nehemiah
  11, 20, 32, 23, 19, 19, 73, 18, 38, 39,
  36, 47, 31,
  // Esther
  22, 23, 15, 17, 14, 14, 10, 17, 32, 3,
  // Job
  22, 13, 26, 21, 27, 30, 21, 22, 35, 22,
  20, 25, 28, 22, 35, 22, 16, 21, 29, 29,
  34, 30, 17, 25, 6, 14, 23, 28, 25, 31,
  40, 22, 33, 37, 16, 33, 24, 38, 38, 28,
  25, 17,
  // Psalms
  6, 12, 9, 9, 13, 11, 18, 10, 21, 18,
  7, 9, 6, 7, 5, 11, 15, 51, 15, 10,
  14, 32, 6, 10, 22, 12, 14, 9, 11, 13,
  25, 11, 22, 23, 28, 13, 40, 23, 14, 18,
  14, 12, 5, 27, 18, 12, 10, 15, 21, 23,
  21, 11, 7, 9, 24, 14, 12, 12, 18, 14,
  9, 13, 12, 11, 14, 20, 8, 36, 37, 6,
  24, 20, 28, 23, 11, 13, 21, 72, 13, 20,
  17, 8, 19, 13, 14, 17, 7, 19, 53, 17,
  16, 16, 5, 23, 11, 13, 12, 9, 9, 5,
  8, 29, 22, 35, 45, 48, 43, 14, 31, 7,
  10, 10, 9, 8, 18, 19, 2, 29, 176, 7,
  8, 9, 4, 8, 5, 6, 5, 6, 8, 8,
  3, 18, 3, 3, 21, 26, 9, 8, 24, 14,
  10, 8, 12, 15, 21, 10, 20, 14, 9, 6,
  // Proverbs
  33, 22, 35, 27, 23, 35, 27, 36, 18, 32,
  31, 28, 25, 35, 33, 33, 28, 24, 29, 30,
  31, 29, 35, 34, 28, 28, 27, 28, 27, 33,
  31,
  // Ecclesiastes
  18, 26, 22, 16, 20, 12, 29, 17, 18, 20,
  8, 16,
  // Song of Solomon
  17, 17, 11, 16, 16, 13, 13, 14,
  // Isaiah
  31, 22, 26, 6, 30, 13, 25, 23, 20, 34,
  16, 6, 22, 32, 9, 14, 14, 7, 25, 6,
  17, 25, 18, 23, 12, 21, 13, 29, 24, 33,
  9, 20, 24, 17, 10, 22, 38, 22, 8, 31,
  29, 25, 28, 28, 25, 13, 15, 22, 26, 11,
  23, 15, 12, 17, 13, 12, 21, 14, 21, 22,
  11, 12, 19, 12, 25, 24,
  // Jeremiah
  19, 37, 25, 31, 31, 30, 34, 22, 26, 25,
  23, 17, 27, 22, 21, 21, 27, 23, 15, 18,
  14, 30, 40, 10, 38, 24, 22, 17, 32, 24,
  40, 44, 26, 22, 19, 32, 21, 28, 18, 16,
  18, 22, 13, 30, 5, 28, 7, 47, 39, 46,
  64, 34,
  // Lamentations
  22, 22, 66, 22, 22,
  // Ezekiel
  28, 10, 27, 17, 17, 14, 27, 18, 11, 22,
  25, 28, 23, 23, 8, 63, 24, 32, 14, 44,
  37, 31, 49, 27, 17, 21, 36, 26, 21, 26,
  18, 32, 33, 31, 15, 38, 28, 23, 29, 49,
  26, 20, 27, 31, 25, 24, 23, 35,
  // Daniel
  21, 49, 30, 37, 31, 28, 28, 27, 27, 21,
  45, 13,
  // Hosea
  11, 23, 5, 19, 15, 11, 16, 14, 17, 15,
  11, 15, 16, 9,
  // Joel
  20, 32, 21,
  // Amos
  15, 16, 15, 13, 27, 14, 17, 14, 15,
  // Obadiah
  21,
  // Jonah
  16, 11, 10, 11,
  // Micah
  16, 13, 12, 13, 15, 16, 20,
  // Nahum
  15, 13, 19,
  // Habakkuk
  17, 20, 19,
  // Zephaniah
  18, 15, 20,
  // Haggai
  15, 23,
  // Zechariah
  21, 13, 10, 14, 11, 15, 14, 23, 17, 12,
  17, 14, 9, 21,
  // Malachi
  14, 17, 18, 6,
  // -----------------------------------------------------------------
  // Matthew
  25, 23, 17, 25, 48, 34, 29, 34, 38, 42,
  30, 50, 58, 36, 39, 28, 27, 35, 30, 34,
  46, 46, 39, 51, 46, 75, 66, 20,
  // Mark
  45, 28, 35, 41, 43, 56, 37, 38, 51, 53,
  33, 44, 37, 72, 47, 20,
  // Luke
  80, 52, 38, 44, 39, 49, 50, 56, 62, 42,
  54, 59, 35, 35, 32, 31, 37, 43, 48, 47,
  38, 71, 56, 53,
  // John
  51, 25, 36, 54, 47, 71, 53, 59, 41, 42,
  57, 50, 38, 31, 27, 33, 26, 40, 42, 31,
  25,
  // Acts
  26, 47, 26, 37, 42, 15, 60, 40, 43, 48,
  30, 25, 52, 28, 41, 40, 34, 28, 40, 38,
  40, 30, 35, 28, 27, 32, 44, 31,
  // Romans
  32, 29, 30, 25, 21, 23, 25, 38, 33, 21,
  36, 21, 14, 23, 33, 27,
  // I Corinthians
  31, 16, 22, 21, 13, 20, 40, 13, 27, 33,
  34, 31, 13, 40, 58, 24,
  // II Corinthians
  24, 17, 18, 18, 21, 18, 16, 24, 15, 18,
  33, 21, 13,
  // Galatians
  24, 21, 29, 31, 26, 18,
  // Ephesians
  23, 22, 21, 32, 33, 24,
  // Philippians
  30, 30, 21, 23,
  // Colossians
  29, 23, 25, 18,
  // I Thessalonians
  10, 20, 13, 18, 28,
  // II Thessalonians
  12, 17, 18,
  // I Timothy
  20, 15, 16, 16, 25, 21,
  // II Timothy
  18, 26, 17, 22,
  // Titus
  16, 15, 15,
  // Philemon
  25,
  // Hebrews
  14, 18, 19, 16, 14, 20, 28, 13, 28, 39,
  40, 29, 25,
  // James
  27, 26, 18, 17, 20,
  // I Peter
  25, 25, 22, 19, 14,
  // II Peter
  21, 22, 18,
  // I John
  10, 29, 24, 21, 21,
  // II John
  13,
  // III John
  15,
  // Jude
  25,
  // Revelation of John
  20, 29, 22, 11, 14, 17, 17, 13, 21, 11,
  19, 18, 18, 20, 8, 21, 18, 24, 21, 15,
  27, 21
};

unsigned char mappings_calvin[] = {
    0,
    4,   13,  1,   0,   12,  16,  0,
    4,   13,  2,   0,   13,  1,   0,
    4,   30,  1,   0,   29,  40,  0,
    4,   30,  2,   0,   30,  1,   0,
    9,   20,  43,  0,   20,  42,  0,
    9,   24,  1,   0,   23,  29,  0,
    9,   24,  2,   0,   24,  1,   0,
    11,  22,  44,  0,   22,  43,  0,
    18,  39,  1,   0,   38,  39,  0,
    18,  39,  4,   0,   39,  1,   0,
    18,  39,  34,  0,   40,  1,   0,
    18,  40,  1,   0,   40,  6,   0,
    18,  40,  20,  0,   41,  1,   0,
    18,  41,  1,   0,   41,  10,  0,
    19,  3,   2,   0,   3,   1,   0,
    19,  4,   2,   0,   4,   1,   0,
    19,  5,   2,   0,   5,   1,   0,
    19,  6,   2,   0,   6,   1,   0,
    19,  7,   2,   0,   7,   1,   0,
    19,  8,   2,   0,   8,   1,   0,
    19,  9,   2,   0,   9,   1,   0,
    19,  12,  2,   0,   12,  1,   0,
    19,  18,  2,   0,   18,  1,   0,
    19,  19,  2,   0,   19,  1,   0,
    19,  20,  2,   0,   20,  1,   0,
    19,  21,  2,   0,   21,  1,   0,
    19,  22,  2,   0,   22,  1,   0,
    19,  30,  2,   0,   30,  1,   0,
    19,  31,  2,   0,   31,  1,   0,
    19,  34,  2,   0,   34,  1,   0,
    19,  36,  2,   0,   36,  1,   0,
    19,  38,  2,   0,   38,  1,   0,
    19,  39,  2,   0,   39,  1,   0,
    19,  40,  2,   0,   40,  1,   0,
    19,  41,  2,   0,   41,  1,   0,
    19,  42,  2,   0,   42,  1,   0,
    19,  44,  2,   0,   44,  1,   0,
    19,  45,  2,   0,   45,  1,   0,
    19,  46,  2,   0,   46,  1,   0,
    19,  47,  2,   0,   47,  1,   0,
    19,  48,  2,   0,   48,  1,   0,
    19,  49,  2,   0,   49,  1,   0,
    19,  51,  2,   0,   51,  1,   0,
    19,  51,  3,   0,   51,  1,   0,
    19,  52,  2,   0,   52,  1,   0,
    19,  52,  3,   0,   52,  1,   0,
    19,  53,  2,   0,   53,  1,   0,
    19,  54,  3,   0,   54,  1,   0,
    19,  55,  2,   0,   55,  1,   0,
    19,  56,  2,   0,   56,  1,   0,
    19,  57,  2,   0,   57,  1,   0,
    19,  58,  2,   0,   58,  1,   0,
    19,  59,  2,   0,   59,  1,   0,
    19,  60,  2,   0,   60,  1,   0,
    19,  60,  3,   0,   60,  1,   0,
    19,  61,  2,   0,   61,  1,   0,
    19,  62,  2,   0,   62,  1,   0,
    19,  63,  2,   0,   63,  1,   0,
    19,  64,  2,   0,   64,  1,   0,
    19,  65,  2,   0,   65,  1,   0,
    19,  67,  2,   0,   67,  1,   0,
    19,  68,  2,   0,   68,  1,   0,
    19,  69,  2,   0,   69,  1,   0,
    19,  70,  2,   0,   70,  1,   0,
    19,  75,  2,   0,   75,  1,   0,
    19,  76,  2,   0,   76,  1,   0,
    19,  77,  2,   0,   77,  1,   0,
    19,  80,  2,   0,   80,  1,   0,
    19,  81,  2,   0,   81,  1,   0,
    19,  83,  2,   0,   83,  1,   0,
    19,  84,  2,   0,   84,  1,   0,
    19,  85,  2,   0,   85,  1,   0,
    19,  88,  2,   0,   88,  1,   0,
    19,  89,  2,   0,   89,  1,   0,
    19,  92,  2,   0,   92,  1,   0,
    19,  102, 2,   0,   102, 1,   0,
    19,  108, 2,   0,   108, 1,   0,
    19,  140, 2,   0,   140, 1,   0,
    19,  142, 2,   0,   142, 1,   0,
    21,  12,  1,   0,   11,  9,   0,
    21,  12,  3,   0,   12,  1,   0,
    23,  8,   23,  0,   9,   1,   0,
    23,  9,   1,   0,   9,   2,   0,
    26,  21,  1,   0,   20,  45,  0,
    26,  21,  6,   0,   21,  1,   0,
    28,  12,  1,   0,   11,  12,  0,
    28,  12,  2,   0,   12,  1,   0,
    32,  2,   1,   0,   1,   17,  0,
    32,  2,   2,   0,   2,   1,   0,
    41,  9,   51,  0,   9,   50,  0,
    41,  10,  53,  0,   10,  52,  0,
    44,  19,  40,  0,   19,  41,  0,
    45,  3,   23,  0,   3,   24,  0,
    46,  3,   22,  0,   3,   23,  0,
    64,  1,   15,  0,   1,   14,  0,
    66,  12,  18,  0,   13,  1,   0,
    0
};

SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/thmlwebif.h<|end_filename|>
/******************************************************************************
 *
 *  thmlwebif.h -	Implementation of ThMLWEBIF
 *
 * $Id: thmlwebif.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef _ThMLWEBIF_H
#define _ThMLWEBIF_H

#include <thmlxhtml.h>

SWORD_NAMESPACE_START

/** this filter converts ThML text to HTML text with hrefs
 */
class SWDLLEXPORT ThMLWEBIF : public ThMLXHTML {
	const SWBuf baseURL;
	const SWBuf passageStudyURL;

protected:
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	ThMLWEBIF();
};

SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osislatex.h<|end_filename|>
/******************************************************************************
 *
 *  osislatex.h -	Render filter for LaTeX of an OSIS module
 *
 * $Id: osislatex.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2011-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISLATEX_H
#define OSISLATEX_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts OSIS text to classed XHTML
 */
class SWDLLEXPORT OSISLaTeX : public SWBasicFilter {
private:
	bool morphFirst;
	bool renderNoteNumbers;
protected:

	class TagStack;
	// used by derived classes so we have it in the header
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);


	class MyUserData : public BasicFilterUserData {
	public:
		bool osisQToTick;
		bool inXRefNote;
		bool isBiblicalText;
		int suspendLevel;
		bool firstCell; // for tables, indicates whether a cell is the first one in a row
		SWBuf wordsOfChristStart;
		SWBuf wordsOfChristEnd;
		SWBuf divLevel;  // divLevel "module", "testament, "bookgroup", "book", "majorsection", "section", "paragraph" , ignore others.
		
		TagStack *quoteStack;
		TagStack *hiStack;
		TagStack *titleStack;
		TagStack *lineStack;
		int consecutiveNewlines;
		SWBuf lastTransChange;
		SWBuf w;
		SWBuf fn;
		SWBuf version;

		MyUserData(const SWModule *module, const SWKey *key);
		~MyUserData();
		void outputNewline(SWBuf &buf);
	};
public:
	OSISLaTeX();
	void setMorphFirst(bool val = true) { morphFirst = val; }
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
	virtual const char *getHeader() const;
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/WindowHostController+SideBars.h<|end_filename|>
//
//  WindowHostController+SideBars.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "WindowHostController.h"

@interface WindowHostController (SideBars)

- (BOOL)toggleLSB;
- (BOOL)toggleRSB;
- (void)showLeftSideBar:(BOOL)flag;
- (void)showRightSideBar:(BOOL)flag;
- (BOOL)showingLSB;
- (BOOL)showingRSB;
- (void)restoreLeftSideBarWithWidth:(float)width;
- (void)restoreRightSideBarWithWidth:(float)width;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/treekeyidx.h<|end_filename|>
/******************************************************************************
 *
 *  treekeyidx.h -	code for class 'TreeKeyIdx'
 *
 * $Id: treekeyidx.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef TREEKEYIDX_H
#define TREEKEYIDX_H

#include <treekey.h>
#include <sysdata.h>

SWORD_NAMESPACE_START

class FileDesc;

/**
 * Class TreeKeyIdx
 * The TreeKey implementation used for all tree-based modules in Sword, such as GenBooks.
 */
class SWDLLEXPORT TreeKeyIdx : public TreeKey {
		
	class TreeNode {
	public:
		TreeNode();
		~TreeNode();
		void clear();
		__s32 offset;
		__s32 parent;
		__s32 next;
		__s32 firstChild;
		char *name;
		__u16 dsize;
		char *userData;
	} currentNode;

	static SWClass classdef;

	char *path;

	FileDesc *idxfd;
	FileDesc *datfd;

	void init();

	void getTreeNodeFromDatOffset(long ioffset, TreeNode *buf) const;
	char getTreeNodeFromIdxOffset(long ioffset, TreeNode *node) const;
	void saveTreeNode(TreeNode *node);
	void saveTreeNodeOffsets(TreeNode *node);


public:
	TreeKeyIdx(const TreeKeyIdx &ikey);
	TreeKeyIdx(const char *idxPath, int fileMode = -1);
	virtual ~TreeKeyIdx();

	virtual SWKey *clone() const;

	virtual const char *getLocalName();
	virtual const char *setLocalName(const char *);

	virtual const char *getUserData(int *size = 0) const;
	virtual void setUserData(const char *userData, int size = 0);

	virtual void root();
	virtual bool parent();

	virtual bool firstChild();
	virtual bool nextSibling();
	virtual bool previousSibling();

	virtual bool hasChildren();

	virtual void append();
	virtual void appendChild();
	virtual void insertBefore();

	virtual void remove();
	virtual void save();

	virtual void copyFrom(const TreeKeyIdx &ikey);
	virtual void copyFrom(const SWKey &ikey);

	void setOffset(unsigned long offset);
	unsigned long getOffset() const;

	virtual int getLevel();


	// OPERATORS ------------------------------------------------------------


	virtual SWKey &operator = (const TreeKeyIdx &ikey) { copyFrom(ikey); return *this; }
	SWKEY_OPERATORS

	virtual void setText(const char *ikey);
	virtual void setPosition(SW_POSITION p);
	virtual const char *getText() const;
	virtual int _compare (const TreeKeyIdx & ikey);
	virtual int compare(const SWKey &ikey);
	virtual void decrement(int steps = 1);
	virtual void increment(int steps = 1);
	virtual bool isTraversable() const { return true; }

	static signed char create(const char *path);
};

SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/gbflatex.h<|end_filename|>
/******************************************************************************
 *
 *  gbflatex.h -	Implementation of GBFLaTeX
 *
 * $Id: gbflatex.h 3074 2014-03-05 00:30:21Z chrislit $
 *
 * Copyright 2011-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef GBFLATEX_H
#define GBFLATEX_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts GBF text to classed LaTeX text
 */
class SWDLLEXPORT GBFLaTeX : public SWBasicFilter {
	bool renderNoteNumbers;
protected:
	class MyUserData : public BasicFilterUserData {
	public:
		MyUserData(const SWModule *module, const SWKey *key);
		bool hasFootnotePreTag;
		SWBuf version;
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	GBFLaTeX();
	virtual const char *getHeader() const;
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swdisp.h<|end_filename|>
/******************************************************************************
 *
 *  swdisp.h -	code for base class 'swdisp'.  swdisp is the basis for all
 *		types of displays (e.g. raw textout, curses, xwindow, etc.)
 *
 * $Id: swdisp.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1996-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWDISP_H
#define SWDISP_H

#include <swobject.h>
#include <defs.h>

SWORD_NAMESPACE_START

class SWModule;

/** swdisp is the basis for all types of displays
* (e.g. raw textout, curses, xwindow, etc.)
*/
class SWDLLEXPORT SWDisplay : public SWObject {
  static SWClass classdef;
public:
  SWDisplay() { myclass = &classdef; };
  virtual ~SWDisplay() {};
  
  /** casts a module to a character pointer and displays it to
  * raw output (overriden for different display types and
  * module types if necessary)
  *
  * @param imodule module to display
  * @return error status
  */
  virtual char display(SWModule &imodule) = 0;
  SWDEPRECATED char Display(SWModule &imodule) { return display(imodule); }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/SideBarViewController.h<|end_filename|>
//
//  SideBarViewController.h
//  Eloquent
//
//  Created by <NAME> on 26.10.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "HostableViewController.h"

@class ModulesUIController, BookmarksUIController, NotesUIController;

@interface SideBarViewController : HostableViewController {
    IBOutlet NSOutlineView *outlineView;
}

// initialitazion
- (id)initWithDelegate:(WindowHostController *)aDelegate;

- (ModulesUIController *)modulesUIController;
- (BookmarksUIController *)bookmarksUIController;
- (NotesUIController *)notesUIController;

@end


<|start_filename|>src/UserInterface/InitialInfoViewController.h<|end_filename|>
//
//  InitialInfoViewController.h
//  Eloquent
//
//  Created by <NAME> on 05.10.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@class WindowHostController;

@interface InitialInfoViewController : NSViewController {
    IBOutlet NSTextField *installedModulesLabel;
    IBOutlet NSTextField *openBibleLabel;
}

@property (strong, nonatomic) IBOutlet WindowHostController *host;

- (NSString *)installedModulesLabel;
- (NSString *)openBibleLabel;

- (IBAction)openModuleManager:(id)sender;
- (IBAction)openDefaultBible:(id)sender;

@end


<|start_filename|>src/UserInterface/ThickDividerSplitView.h<|end_filename|>
//
//  ThickDividerSplitView.h
//  Eloquent
//
//  Created by <NAME> on 15.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface ThickDividerSplitView : NSSplitView {
	NSImage *bar;
	NSImage *grip;
}

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/gbfredletterwords.h<|end_filename|>
/***************************************************************************
 *
 *  gbfredletterwords.h -	Implementation of GBFRedLetterWords
 *
 * $Id: gbfredletterwords.h 3451 2017-03-29 22:42:00Z scribe $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef GBFREDLETTERWORDS_H
#define GBFREDLETTERWORDS_H

#include <swoptfilter.h>

SWORD_NAMESPACE_START

/** This Filter shows/hides "red letter tags" (marking the
 * words of Jesus) in a GBF text. Turn this off if you don't want
 * to have this kind of markup in the text.
 */
class SWDLLEXPORT GBFRedLetterWords : public SWOptionFilter {
public:
	GBFRedLetterWords();
	virtual ~GBFRedLetterWords();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/DefaultFilterProvider.h<|end_filename|>
//
// Created by mbergmann on 18.12.12.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>
#import "SwordFilter.h"

@protocol FilterProvider

/** autoreleased factories */
- (SwordFilter *)newOsisRenderFilter;
- (SwordFilter *)newOsisPlainFilter;
- (SwordFilter *)newGbfRenderFilter;
- (SwordFilter *)newGbfPlainFilter;
- (SwordFilter *)newThmlRenderFilter;
- (SwordFilter *)newThmlPlainFilter;
- (SwordFilter *)newTeiRenderFilter;
- (SwordFilter *)newTeiPlainFilter;

@end

@interface DefaultFilterProvider : NSObject <FilterProvider>

- (SwordFilter *)newOsisRenderFilter;
- (SwordFilter *)newOsisPlainFilter;
- (SwordFilter *)newGbfRenderFilter;
- (SwordFilter *)newGbfPlainFilter;
- (SwordFilter *)newThmlRenderFilter;
- (SwordFilter *)newThmlPlainFilter;
- (SwordFilter *)newTeiRenderFilter;
- (SwordFilter *)newTeiPlainFilter;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawcom.h<|end_filename|>
/******************************************************************************
 *
 *  rawcom.h -	code for class 'RawCom'- a module that reads raw commentary
 *		files:	ot and nt using indexs ??.bks ??.cps ??.vss
 *
 * $Id: rawcom.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWCOM_H
#define RAWCOM_H

#include <rawverse.h>
#include <swcom.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT RawCom : public RawVerse, public SWCom {


public:
    
	RawCom(const char *ipath, const char *iname = 0, const char *idesc = 0,
			SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
			const char *ilang = 0, const char *versification = "KJV");
	virtual ~RawCom();

	virtual SWBuf &getRawEntryBuf() const;

	virtual void increment(int steps = 1);
	virtual void decrement(int steps = 1) { increment(-steps); }

	// write interface ----------------------------
	virtual bool isWritable() const;
	static char createModule(const char *path, const char *v11n = "KJV") { return RawVerse::createModule(path, v11n); }
	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
	virtual void linkEntry(const SWKey *linkKey);	// Link current module entry to other module entry
	virtual void deleteEntry();	// Delete current module entry
	// end write interface ------------------------

	virtual bool isLinked(const SWKey *k1, const SWKey *k2) const;
	virtual bool hasEntry(const SWKey *k) const;


	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/OSXConfiguration.h<|end_filename|>
//
//  OSXConfiguration.h
//  ObjCSword
//
//  Created by <NAME> on 12.06.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Configuration.h"

@interface OSXConfiguration : Configuration <Configuration> {
}

- (NSString *)osVersion;
- (NSString *)bundleVersion;
- (NSString *)defaultModulePath;
- (NSString *)defaultAppSupportPath;
- (NSString *)tempFolder;
- (NSString *)logFile;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawtext.h<|end_filename|>
/******************************************************************************
 *
 *  rawtext.h -	code for class 'RawText'- a module that reads raw text files:
 *		ot and nt using indexs ??.bks ??.cps ??.vss
 *
 * $Id: rawtext.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWTEXT_H
#define RAWTEXT_H

#include <rawverse.h>
#include <swtext.h>

#include <defs.h>

SWORD_NAMESPACE_START

class RawStr;

class SWDLLEXPORT RawText : public SWText, public RawVerse {

public:
  
	RawText(const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, const char *versification = "KJV");
	virtual ~RawText();
	virtual SWBuf &getRawEntryBuf() const;
	virtual void increment(int steps = 1);
	virtual void decrement(int steps = 1) { increment(-steps); }
	// write interface ----------------------------
	virtual bool isWritable() const;
	static char createModule(const char *path, const char *v11n = "KJV") { return RawVerse::createModule(path, v11n); }
	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
	virtual void linkEntry(const SWKey *linkKey);	// Link current module entry to other module entry
	virtual void deleteEntry();	// Delete current module entry
	// end write interface ------------------------

	virtual bool isLinked(const SWKey *k1, const SWKey *k2) const;
	virtual bool hasEntry(const SWKey *k) const;
	

	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osisreferencelinks.h<|end_filename|>
/******************************************************************************
 *
 *  osisreferencelinks.h -	SWFilter descendant to toggle OSIS reference
 *				links with specified type/subType
 *
 * $Id: osisreferencelinks.h 2989 2013-10-09 08:22:21Z chrislit $
 *
 * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
 *      CrossWire Bible Society
 *      P. O. Box 2528
 *      Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISREFERENCELINKS_H
#define OSISREFERENCELINKS_H

#include <swoptfilter.h>

SWORD_NAMESPACE_START

/** This Filter hides reference links with a particular type/subtype in an OSIS text
 */
class SWDLLEXPORT OSISReferenceLinks : public SWOptionFilter {
	SWBuf optionName;
	SWBuf optionTip;
	SWBuf type;
	SWBuf subType;
public:

	/**
	 * @param optionName - name of this option
	 * @param optionTip - user help tip for this option
	 * @param type - which reference types to hide
	 * @param subType - which reference subTypes to hide (optional)
	 * @param defaultValue - default value of option "On" or "Off" (optional)
	 */
	OSISReferenceLinks(const char *optionName, const char *optionTip, const char *type, const char *subType = 0, const char *defaultValue = "On");
	virtual ~OSISReferenceLinks();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif




<|start_filename|>test/ObjectAssotiationsTest.h<|end_filename|>
//
//  ObjectAssotiationsTest.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <XCTest/XCTest.h>
#import "ObjectAssociations.h"

@interface ObjectAssotiationsTest : XCTestCase {
    ObjectAssociations *objAsso;
    NSObject *assoObject;
    NSObject *anObject;
}

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordBible.h<|end_filename|>
/*	SwordBible.h - Sword API wrapper for Biblical Texts.

    Copyright 2008 <NAME>
    Based on code by <NAME>

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation version 2.

	This program 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
	General Public License for more details. (http://www.gnu.org/licenses/gpl.html)
*/

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#import "versekey.h"
#endif

@class SwordModule, SwordManager, SwordBibleBook, SwordModuleTextEntry, SwordBibleTextEntry;
@class SwordKey;

typedef enum {
	OldTestament = 1,
	NewTestament
}Testament;

@interface SwordBible : SwordModule

// ----------- class methods -------------
+ (void)decodeRef:(NSString *)ref intoBook:(NSString **)bookName book:(int *)book chapter:(int *)chapter verse:(int *)verse;
+ (NSString *)firstRefName:(NSString *)abbr;
+ (NSString *)context:(NSString *)abbr;
#ifdef __cplusplus
+ (int)bookIndexForSWKey:(sword::VerseKey *)key;
#endif


- (BOOL)hasReference:(NSString *)ref;
- (int)numberOfVerseKeysForReference:(NSString *)aReference;

// book lists
- (NSArray *)bookList;

- (NSString *)bookIntroductionFor:(SwordBibleBook *)aBook;
- (NSString *)chapterIntroductionIn:(SwordBibleBook *)aBook forChapter:(int)chapter;
- (NSString *)moduleIntroduction;

// some numbers
- (SwordBibleBook *)bookWithNamePrefix:(NSString *)aPrefix;
- (SwordBibleBook *)bookForName:(NSString *)bookName;
- (int)chaptersForBookName:(NSString *)bookName;
- (int)versesForChapter:(int)chapter bookName:(NSString *)bookName;
- (int)versesForBible;

// Text pulling

/**
 * Delegates to textEntriesForReference:context:textType:
 * @param aReference the reference like 'Gen 1'
 * @param context a context setting. when set > 0 then verses surrounding a key will also be retrieved.
 * @return
 */
- (NSArray *)strippedTextEntriesForReference:(NSString *)aReference context:(int)context;

/**
 * Delegates to textEntriesForReference:context:textType:
 * @param aReference the reference like 'Gen 1'
 * @param context a context setting. when set > 0 then verses surrounding a key will also be retrieved.
 * @return
 */
- (NSArray *)renderedTextEntriesForReference:(NSString *)aReference context:(int)context;

/**
 Override from super class
 Delegates to textEntriesForReference:context:textType:

 The block received an instance of SwordBibleTextEntry

 @return Array of SwordBibleTextEntry
 */
- (NSArray *)textEntriesForReference:(NSString *)aReference
                          renderType:(RenderType)aType
                           withBlock:(void(^)(SwordModuleTextEntry *))entryResult;

/**
 * The actual implementation.
 *
 * It locks and unlock the module.
 *
 * The block received an instance of SwordBibleTextEntry
 *
 * @param aReference
 * @param context
 * @param aType
 * @return
 */
- (NSArray *)textEntriesForReference:(NSString *)aReference
                             context:(int)context
                          renderType:(RenderType)aType
                           withBlock:(void(^)(SwordModuleTextEntry *))entryResult;

/**
 * Overriding from SwordModule to return SwordBibleTextEntry.
 * @param aReference
 * @param aType
 * @return
 */
- (SwordModuleTextEntry *)textEntryForReference:(NSString *)aReference renderType:(RenderType)aType;

@end

<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/FilterProviderFactory.h<|end_filename|>
//
// Created by mbergmann on 18.12.12.
//
//

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#include <swmgr.h>		// C++ Sword API
#endif

@protocol FilterProvider;

/**
* This factory has to be initialized before any Modules are loaded through SwordManager.
*/
@interface FilterProviderFactory : NSObject

+ (FilterProviderFactory *)factory;

- (void)initWith:(id<FilterProvider>)aFilterProvider;
- (id<FilterProvider>)get;

@end


<|start_filename|>src/UserInterface/NSTextView+LookupAdditions.h<|end_filename|>
//
//  NSTextView+LookupAdditions.h
//  Eloquent
//
//  Created by <NAME> on 09.12.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>


@interface NSTextView (LookupAdditions)

- (NSRange)rangeOfFirstLineWithLineRect:(NSRect *)lineRect;
- (NSRange)rangeOfLineAtIndex:(NSUInteger)index;
- (NSRect)rectOfFirstLine;
- (NSRect)rectOfLastLine;
- (NSRange)rangeOfVisibleText;
- (NSRange)rangeOfTextToken:(NSString *)token lastFound:(NSRange)lastFoundRange directionRight:(BOOL)right;
- (NSRect)rectForTextRange:(NSRange)range;
- (NSRect)rectForAttributeName:(NSString *)attrName attributeValue:(id)attrValue;
- (NSAttributedString *)selectedAttributedString;
- (NSString *)selectedString;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/femain.h<|end_filename|>
/******************************************************************************
 *
 *  femain.h -	Implementation of FEMain
 *
 * $Id: femain.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1998-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef FEMAIN_H
#define FEMAIN_H

class FEMain
{
public:
  FEMain ();
  virtual ~FEMain ();
  list < SWDisplay * >displays;	// so we can delete each display we create
};

#endif


<|start_filename|>src/AppController.h<|end_filename|>
/* AppController */

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import <ObjCSword/ObjCSword.h>

#ifndef APPSTORE
#import <Sparkle/Sparkle.h>
#endif

@class SingleViewHostController;
@class WorkspaceViewHostController;
@class HUDPreviewController;
@class DailyDevotionPanelController;
@class MBAboutWindowController;
@class FileRepresentation;
@class MBPreferenceController;
@class SwordModule;

@interface AppController : NSObject <NSApplicationDelegate> {

    IBOutlet HUDPreviewController *previewController;
    IBOutlet DailyDevotionPanelController *dailyDevotionController;
    IBOutlet NSWindow *createModuleWindow;
    IBOutlet NSTextField *createModuleNameTextField;
    IBOutlet NSButton *createModuleOKButton;
    
    // the help menu. we'll ad this reference here to be able to add the Sparkle updater menu item dynamically
    IBOutlet NSMenu *helpMenu;

    MBAboutWindowController *aboutWindowController;
    MBPreferenceController *preferenceController;
    
    BOOL isPreferencesShowing;
    BOOL isPreviewShowing;
    BOOL isDailyDevotionShowing;
    
#ifndef APPSTORE
    SUUpdater *sparkleUpdater;
#endif
}

+ (AppController *)defaultAppController;

- (SingleViewHostController *)openSingleHostWindowForModuleType:(ModuleType)aModuleType;
- (SingleViewHostController *)openSingleHostWindowForModule:(SwordModule *)mod;
- (SingleViewHostController *)openSingleHostWindowForNote:(FileRepresentation *)fileRep;

/** stores the session to file */
- (IBAction)saveSessionAs:(id)sender;
/** stores as default session */
- (IBAction)saveAsDefaultSession:(id)sender;
/** loads session from file */
- (IBAction)openSession:(id)sender;
/** open the default session */
- (IBAction)openDefaultSession:(id)sender;

// NSApplication delegate methods
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames;

- (IBAction)openNewSingleBibleHostWindow:(id)sender;
- (IBAction)openNewSingleCommentaryHostWindow:(id)sender;
- (IBAction)openNewSingleDictionaryHostWindow:(id)sender;
- (IBAction)openNewSingleGenBookHostWindow:(id)sender;
- (IBAction)openNewWorkspaceHostWindow:(id)sender;
- (IBAction)createAndOpenNewStudyNote:(id)sender;
- (IBAction)showPreferenceSheet:(id)sender;
- (IBAction)showAboutWindow:(id)sender;
- (IBAction)showModuleManager:(id)sender;
- (IBAction)showPreviewPanel:(id)sender;
- (IBAction)showDailyDevotionPanel:(id)sender;
- (IBAction)showCreateModuleWindow:(id)sender;
- (IBAction)openEloquentWikiPage:(id)sender;
- (IBAction)openEloquentHomePage:(id)sender;
- (IBAction)openMacSwordForumPage:(id)sender;

#ifndef APPSTORE
// linking SWORD utils
- (IBAction)linkSwordUtils:(id)sender;
- (IBAction)unlinkSwordUtils:(id)sender;
#endif

// module creation
- (IBAction)createCommentaryOk:(id)sender;
- (IBAction)createCommentaryCancel:(id)sender;

// host delegate method
- (void)hostClosing:(NSWindowController *)aHost;
- (void)auxWindowClosing:(NSWindowController *)aController;

#ifndef APPSTORE
- (IBAction)checkForUpdates:(id)sender;
#endif

@end


<|start_filename|>src/UserInterface/GenBookViewController.h<|end_filename|>
//
//  GenBookViewController.h
//  Eloquent
//
//  Created by <NAME> on 25.08.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ModuleViewController.h"

@class SwordBook;

#define GENBOOKVIEW_NIBNAME   @"GenBookView"

/** the view of this view controller is a ScrollSynchronizableView */
@interface GenBookViewController : ModuleViewController <NSCoding, NSOutlineViewDataSource, NSOutlineViewDelegate> {
    IBOutlet NSPopUpButton *modulePopBtn;

    IBOutlet NSView *sideBarView;
    IBOutlet NSOutlineView *entriesOutlineView;
}

// ---------- initializers ---------
- (id)initWithModule:(SwordBook *)aModule;
- (id)initWithModule:(SwordBook *)aModule delegate:(id)aDelegate;
- (id)initWithDelegate:(id)aDelegate;

// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/hrefcom.h<|end_filename|>
/******************************************************************************
 *
 *  hrefcom.h -	code for class 'HREFCom'- a module that produces HTML HREFs
 *	       	pointing to actual text desired.  Uses standard
 *		files:	ot and nt using indexs ??.bks ??.cps ??.vss
 *
 * $Id: hrefcom.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1998-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef HREFCOM_H
#define HREFCOM_H

#include <rawverse.h>
#include <swcom.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT HREFCom:public RawVerse, public SWCom {
	char *prefix;

public:


	HREFCom(const char *ipath, const char *prefix, const char *iname = 0,
			const char *idesc = 0, SWDisplay * idisp = 0);
	virtual ~HREFCom();
	virtual SWBuf &getRawEntryBuf() const;

	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/MBTextView.h<|end_filename|>
//
//  MBTextView.h
//  Eloquent
//
//  Created by <NAME> on 31.01.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>


@interface MBTextView : NSTextView {
}

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/Notifications.h<|end_filename|>
/*
 *  globals.h
 *  ObjCSword
 *
 *  Created by <NAME> on 03.06.05.
 *  Copyright 2007 mabe. All rights reserved.
 *
 */

// Notification identifiers


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swconfig.h<|end_filename|>
/******************************************************************************
 *
 *  swconfig.h -	definition of Class SWConfig used for saving and
 *			retrieval of configuration information
 *
 * $Id: swconfig.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWCONFIG_H
#define SWCONFIG_H

#include <map>

#include <defs.h>
#include <multimapwdef.h>
#include <swbuf.h>

SWORD_NAMESPACE_START

typedef multimapwithdefault < SWBuf, SWBuf, std::less < SWBuf > >ConfigEntMap;
typedef std::map < SWBuf, ConfigEntMap, std::less < SWBuf > >SectionMap;

/** The class to read and save settings using a file on disk.
*
*/
class SWDLLEXPORT SWConfig {
public:
	/** Map of available sections
	* The map of available sections.
	*/

	/** Constructor of SWConfig
	 * @param fileName The storage path for this config.
	 */
	SWConfig(const char *fileName);
	SWConfig();
	virtual ~SWConfig();

	/** Get the section map for the config
	 */
	virtual SectionMap &getSections();
	const SectionMap &getSections() const { return const_cast<SWConfig *>(this)->getSections(); }

	/** Load the content from datastore
	 */
	virtual void load();

	/** Save the content of this config object to the datastore
	 */
	virtual void save() const;

	/** Merges into this config the values from addFrom
	 * @param addFrom The config which values should be merged to this config object. Already existing values will be overwritten.
	 */
	virtual void augment(SWConfig &addFrom);

	/** Get a specified section from config, creating the section if needed
	 * There is no const version of this method because it returns a ConfigEntMap reference, creating the requested section if it doesn't exist.
	 * @param section section name to retrieve
	 */
	ConfigEntMap &getSection(const char *section) { return getSections()[section]; }


	/** This operator provides a conventient syntax to get and store config values
	 *
	 * config[section][key] = value;
	 * value = config[section][key];
	 *
	 * The following will work:\n
	 *
	 * @code
	 * SWConfig config("/home/user/.settings");
	 * config["Colors"]["Background"] = "red";
	 * @endcode
	 */
	ConfigEntMap &operator [](const char *section) { return getSection(section); }

	/** shorthand operator for augment
	 */
	SWConfig &operator +=(SWConfig &addFrom) { augment(addFrom); return *this; }

	/** get a value from a [section] key=value
	 * @param section  the section name containing the key
	 * @param key      the key to which the value is associated
	 * @return         the value associated with the key in the provided section
	 */
	SWBuf getValue(const char *section, const char *key) {
		return (*this)[section][key];
	}

	/** set a value for a specified key in a [section]
	 * @param section  the section name to contain the key
	 * @param key      the key to which to associate the value
	 * @param value    the value to associated with the key
	 */
	void setValue(const char *section, const char *key, const char *value) {
		(*this)[section][key] = value;
	}

	/** The storage path used by this SWConfig object
	 */
	SWBuf getFileName() const;


	// ****** Deprecated methods for removal in 2.0

	/**
	 * @deprecated Use getSections() instead.
	 */
	SWDEPRECATED SectionMap Sections;

	/**
	 * @deprecated Use getFileName() instead.
	 */
	SWDEPRECATED SWBuf filename;

	/**
	 * @deprecated Use load() instead.
	 */
	SWDEPRECATED void Load() { load(); }

	/**
	 * @deprecated Use save() instead.
	 */
	SWDEPRECATED void Save() { save(); }

};
SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swbuf.h<|end_filename|>
/******************************************************************************
 *
 *  swbuf.h -	code for SWBuf used as a transport and utility for data buffers
 *
 * $Id: swbuf.h 3541 2017-12-03 18:40:33Z scribe $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWBUF_H
#define SWBUF_H

#include <defs.h>
#include <stdlib.h>
#include <string.h>
#ifdef __BORLANDC__
#include <mem.h>
#endif

SWORD_NAMESPACE_START


#define JUNKBUFSIZE 65534

/**
* This class is used as a transport and utility for data buffers.
*
* @warning This class does not perform pointer validity checks (for speed reasons). 
*	Therefore, never try to pass an invalid string (const char* 0) as an argument-
*	it will crash your program. You need to perform the checks yourself!
*/
class SWDLLEXPORT SWBuf {
	char *buf;
	char *end;
	char *endAlloc;
	char fillByte;
	unsigned long allocSize;

	inline void assureMore(size_t pastEnd) {
		if (size_t(endAlloc-end) < pastEnd) {
			assureSize(allocSize + pastEnd);
		}
	}

	inline void assureSize(size_t checkSize) {
		if (checkSize > allocSize) {
			long size = (end - buf);
			checkSize += 128;
			buf = (char *)((allocSize) ? realloc(buf, checkSize) : malloc(checkSize));
			allocSize = checkSize;
			end = (buf + size);
			*end = 0;
			endAlloc = buf + allocSize - 1;
		}
	}

	inline void init(size_t initSize) {
		fillByte = ' ';
		allocSize = 0;
		buf = nullStr;
		end = buf;
		endAlloc = buf;
		if (initSize)
			assureSize(initSize);
	}


public:

	static char *nullStr;

	/******************************************************************************
	* SWBuf Constructor - Creates an empty SWBuf object
	*
	*/
	inline SWBuf() {
		init(0);
	}

	/******************************************************************************
	* SWBuf Constructor - Creates an empty SWBuf object or an SWBuf initialized
	* 		to a value from a const char *
	*
	*/
	inline SWBuf(const char *initVal, unsigned long initSize = 0) {
		init(initSize);
		if (initVal)
			set(initVal);
	}

	/******************************************************************************
	* SWBuf Constructor - Creates an SWBuf initialized
	* 		to a value from another SWBuf
	*
	*/
	inline SWBuf(const SWBuf &other, unsigned long initSize = 0) {
		init(initSize);
		set(other);
	}

	/******************************************************************************
	* SWBuf Constructor - Creates an SWBuf initialized
	* 		to a value from a char
	*
	*/
	inline SWBuf(char initVal, unsigned long initSize = 0) {
		init(initSize+1);
		*buf = initVal;
		end = buf+1;
		*end = 0;
	}
//	SWBuf(unsigned long initSize);


	/******************************************************************************
	* SWBuf Destructor - Cleans up instance of SWBuf
	*/
	inline ~SWBuf() {
		if ((buf) && (buf != nullStr))
			free(buf);
	}

	/**
	* SWBuf::setFillByte - Set the fillByte character
	*
	* @param ch This character is used when the SWBuf is (re)sized.
	*   The memory will be filled with this character. \see setSize() \see resize()
	*/
	inline void setFillByte(char ch) { fillByte = ch; }

	/**
	* SWBuf::getFillByte - Get the fillByte character
	*
	* @return The character used for filling memory. \see setFillByte.
	*/
	inline char getFillByte() { return fillByte; }

	/**
	* @return a pointer to the buffer content (null-terminated string)
	*/
	inline const char *c_str() const{ return buf; }

	/**
	*	@param pos The position of the requested character.
	* @return The character at the specified position
	*/
	inline char &charAt(unsigned long pos) { return ((pos <= (unsigned long)(end - buf)) ? buf[pos] : (*nullStr)); }

	/** 
	* @return size() and length() return only the number of characters of the string.
	* Add one for the following null and one for each char to be appended!
	*/
	inline unsigned long size() const { return length(); }

	/** 
	 * set's the size of the buffer.  This is a quick inline method which checks
	 * for changes before actually calling setSize().
	 * @param newSize new size of the buffer
	 */
	inline void size(unsigned long newSize) { if (end - buf - newSize) setSize(newSize); }

	/**
	* @return size() and length() return only the number of characters of the string.
	*/
	inline unsigned long length() const { return end - buf; }

	/**
	* SWBuf::set - sets this buf to a new value
	* If the allocated memory is bigger than the new string, it will NOT be resized.
	* @param newVal the value to set this buffer to. 
	*/
	inline void set(const SWBuf &newVal) {
		unsigned long len = newVal.length() + 1;
		assureSize(len);
//		const char *n = newVal.c_str();
//		for (end = buf;len;len--) *end++ = *n++;
		memcpy(buf, newVal.c_str(), len);
		end = buf + (len - 1);
	}

	/**
	* SWBuf::set - sets this buf to a new value.
	* If the allocated memory is bigger than the new string, it will NOT be resized.
	* @param newVal the value to set this buffer to. 
	*/
	inline void set(const char *newVal) {
		if (newVal) {
			unsigned long len = strlen(newVal) + 1;
			assureSize(len);
			memcpy(buf, newVal, len);
			end = buf + (len - 1);
		}
		else {
			assureSize(1);
			end = buf;
			*end = 0;
		}
	}

	/**
	* SWBuf::setFormatted - sets this buf to a formatted string.
	* If the allocated memory is bigger than the new string, it will NOT be resized.
	*
	* @warning This function can only write at most JUNKBUFSIZE to the string per call.
	*
	* @warning This function is not very fast. For loops with many iterations you might
	*  consider replacing it by other calls. 
	*  Example: 
	*    \code SWBuf buf.setFormatted("<%s>", stringVal); \endcode 
	*  should be replaced by: 
	*    \code buf.set("<"); buf.append(stringVal); buf.append(">"); \endcode
	*  This will produce much faster results.
	*
	* @param format The format string. Same syntax as printf, for example.
	* @param ... Add all arguments here.
	*/
	SWBuf &setFormatted(const char *format, ...);

	/**
	* SWBuf::setSize - Size this buffer to a specific length.
	* @param len The new size of the buffer. One byte for the null will be added.
	*/
	inline void setSize(unsigned long len) {
		assureSize(len+1);
		if ((unsigned)(end - buf) < len)
			memset(end, fillByte, len - (end-buf));
		end = buf + len;
		*end = 0;
	}
	/**
	* SWBuf::resize - Resize this buffer to a specific length.
	* @param len The new size of the buffer. One byte for the null will be added.
	*/
	inline void resize(unsigned long len) { setSize(len); }

	/**
	* SWBuf::append - appends a value to the current value of this SWBuf.
	* If the allocated memory is not enough, it will be resized accordingly.
	* @param str Append this.
	* @param max Append only max chars.
	*/
	inline SWBuf &append(const char *str, long max = -1) {
	//	if (!str) //A null string was passed
	//		return;
		if (max < 0)
			max = strlen(str);
		assureMore(max+1);
		for (;((max)&&(*str));max--)
			*end++ = *str++;
		*end = 0;
		return *this;
	}

	/**
	* SWBuf::append - appends a value to the current value of this SWBuf
	* If the allocated memory is not enough, it will be resized accordingly.
	* @param str Append this.
	* @param max Append only max chars.
	*/
	inline SWBuf &append(const SWBuf &str, long max = -1) { return append(str.c_str(), max); }

	/**
	* SWBuf::append - appends a value to the current value of this SWBuf
	* If the allocated memory is not enough, it will be resized accordingly.
	* @param ch Append this.
	*/
	inline SWBuf &append(char ch) {
		assureMore(1);
		*end++ = ch;
		*end = 0;
		return *this;
	}
	inline SWBuf &append(const unsigned char ch) {
		assureMore(1);
		*end++ = ch;
		*end = 0;
		return *this;
	}

	/**
	* SWBuf::append - appends a wide charachter value to the current value of this SWBuf
	* If the allocated memory is not enough, it will be resized accordingly.
	* NOTE: This is dangerous, as wchar_t is currently different sizes on different
	* platforms (stupid windoze; stupid c++ spec for not mandating 4byte).
	* @param wch Append this.
	*/
	inline SWBuf &append(wchar_t wch) {
		assureMore(sizeof(wchar_t)*2);
		for (unsigned int i = 0; i < sizeof(wchar_t); i++) *end++ = ((char *)&wch)[i];
		for (unsigned int i = 0; i < sizeof(wchar_t); i++) end[i] = 0;
		return *this;
	}

	/**
	* SWBuf::appendFormatted - appends formatted strings to the current value of this SWBuf.
	*
	* @warning This function can only write at most JUNKBUFSIZE to the string per call.
	*
	* @warning This function is not very fast. For loops with many iterations you might
	*  consider replacing it by other calls. 
	*  Example: 
	*    \code SWBuf buf.appendFormatted("<%s>", stringVal); \endcode 
	*  should be replaced by: 
	*    \code buf.append("<"); buf.append(stringVal); buf.append(">"); \endcode
	*  This will produce much faster results.
	*
	* @param format The format string. Same syntax as printf, for example.
	* @param ... Add all arguments here.
	*/
	SWBuf &appendFormatted(const char *format, ...);
	
	/** 
	* SWBuf::insert - inserts the given string at position into this string
	* @param pos The position where to insert. pos=0 inserts at the beginning, pos=1 after the first char, etc. Using pos=length() is the same as calling append(s)
	* @param str string to be inserted
	* @param start start from this position in the string to be inserted
	* @param max Insert only max chars.
	*/
	void insert(unsigned long pos, const char* str, unsigned long start = 0, signed long max = -1);

	/** 
	* SWBuf::insert - inserts the given string at position into this string
	* @param pos The position where to insert. pos=0 inserts at the beginning, pos=1 after the first char, etc. Using pos=length() is the same as calling append(s)
	* @param str string to be inserted
	* @param start start from this position in the string to be inserted
	* @param max Insert only max chars.
	*/
	inline void insert(unsigned long pos, const SWBuf &str, unsigned long start = 0, signed long max = -1) {
		insert(pos, str.c_str(), start, max);
	};

	/** 
	* SWBuf::insert - inserts the given character at position into this string
	* @param pos The position where to insert. pos=0 inserts at the beginning, pos=1 after the first char, etc. Using pos=length() is the same as calling append(s)
	* @param c Insert this.
	*/
	inline void insert(unsigned long pos, char c) {
		insert(pos, SWBuf(c));
	}

	/** SWBuf::getRawData
	*
	* @warning be careful! Probably setSize needs to be called in conjunction before and maybe after
	*
	* @return Pointer to the allocated memory of the SWBuf.
	*/
	inline char *getRawData() { return buf; }

	inline operator const char *() const { return c_str(); }
	inline char &operator[](unsigned long pos) { return charAt(pos); }
	inline char &operator[](long pos) { return charAt((unsigned long)pos); }
	inline char &operator[](unsigned int pos) { return charAt((unsigned long)pos); }
	inline char &operator[](int pos) { return charAt((unsigned long)pos); }
	inline SWBuf &operator =(const char *newVal) { set(newVal); return *this; }
	inline SWBuf &operator =(const SWBuf &other) { set(other); return *this; }
	inline SWBuf &operator +=(const char *str) { append(str); return *this; }
	inline SWBuf &operator +=(char ch) { append(ch); return *this; }

	/**
	 * Decrease the buffer size, discarding the last characters
	 * @param len how many bytes to decrease the buffer size
	 */
	inline SWBuf &operator -=(unsigned long len) { setSize(length()-len); return *this; }

	/**
	 * Decrease the buffer size, discarding the last character
	 */
	inline SWBuf &operator --(int) { operator -=(1); return *this; }

	/**
	 * Shift the buffer to the left, discarding the first bytes, decreasing the buffer size
	 */
	inline SWBuf &operator <<(unsigned long n) { if (n && length()) { n = (n<=length())?n:(length()-1); memmove(buf, buf+n, length()-n); (*this)-=n; } return *this; }

	/**
	 * Shift the buffer to the right, increasing the buffer size
	 */
	inline SWBuf &operator >>(unsigned long n) { setSize(length()+n); memmove(buf+n, buf, length()-n); return *this; }

	/**
	 * Concatenate another buffer to the end of this buffer
	 */
	inline SWBuf operator +(const SWBuf &other) const {
		SWBuf retVal = buf;
		retVal += other;
		return retVal;
	}

	/**
	 * Concatenate a byte to the end of this buffer
	 */
	inline SWBuf operator +(char ch) const { return (*this) + SWBuf(ch); }

	/**
	 * Trim whitespace from the start of this buffer, shifting the buffer left as necessary
	 */
	inline SWBuf &trimStart() { while (size() && (strchr("\t\r\n ", *(buf)))) *this << 1; return *this; }

	/**
	 * Trim whitespace from the end of this buffer, decreasing the size as necessary
	 */
	inline SWBuf &trimEnd() { while (size() && (strchr("\t\r\n ", *(end-1)))) setSize(size()-1); return *this; }

	/**
	 * Trim whitespace from the start and end of this buffer, shifting left and decreasing size as necessary
	 */
	inline SWBuf &trim() { trimStart(); return trimEnd(); }


	/**
	 * Strip a prefix from this buffer up to a separator byte.
	 * Returns the prefix and modifies this buffer, shifting left to remove prefix
	 * @param separator to use (e.g. ':')
	 * @param endOfStringAsSeparator - also count end of string as separator.
	 *                                 this is useful for tokenizing entire string like:
	 *                                 x|y|z
	 *                                 if true it will also include 'z'.
	 *
	 * @return prefix if separator character found; otherwise, null and leaves buffer unmodified
	 */
	inline const char *stripPrefix(char separator, bool endOfStringAsSeparator = false) { const char *m = strchr(buf, separator); if (!m && endOfStringAsSeparator) { if (*buf) { operator >>(1); *buf=0; end = buf; return buf + 1;} else return buf; } if (m) { int len = (int)(m-buf); char *hold = new char[len]; memcpy(hold, buf, len); *this << (len+1); memcpy(end+1, hold, len); delete [] hold; end[len+1] = 0; } return (m) ? end+1 : 0; }  // safe.  we know we don't actually realloc and shrink buffer when shifting, so we can place our return val at end.

	// this could be nicer, like replacing a contiguous series of target bytes with single replacement; offering replacement const char *
	/**
	 * Replace with a new byte value all occurances in this buffer of any byte value specified in a set
	 * @param targets a set of bytes, any of which will be replaced
	 * @param newByte value to use as replacement.
	 *
	 * Example: replaceBytes("abc", 'z');  // replaces all occurances of 'a', 'b', and 'c' with 'z'
	 */
	inline SWBuf &replaceBytes(const char *targets, char newByte) { for (unsigned int i = 0; (i < size()); i++) { if (strchr(targets, buf[i])) buf[i] = newByte; } return *this; }

	/**
	 * @return returns true if this buffer starts with the specified prefix
	 */
	inline bool startsWith(const SWBuf &prefix) const { return !strncmp(c_str(), prefix.c_str(), prefix.size()); }

	/**
	 * @return returns true if this buffer ends with the specified postfix
	 */
	inline bool endsWith(const SWBuf &postfix) const { return (size() >= postfix.size())?!strncmp(end-postfix.size(), postfix.c_str(), postfix.size()):false; }

	/**
	 * @return returns the index of a substring if it is found in this buffer; otherwise, returns < 0
	 */
	inline long indexOf(const SWBuf &needle) const { const char *ch = strstr(buf, needle.c_str()); return (ch) ? ch - buf : -1; }
	
	inline int compare(const SWBuf &other) const { return strcmp(c_str(), other.c_str()); }
	inline bool operator ==(const SWBuf &other) const { return compare(other) == 0; }
	inline bool operator !=(const SWBuf &other) const { return compare(other) != 0; }
	inline bool operator > (const SWBuf &other) const { return compare(other) > 0; }
	inline bool operator < (const SWBuf &other) const { return compare(other) < 0; }
	inline bool operator <=(const SWBuf &other) const { return compare(other) <= 0; }
	inline bool operator >=(const SWBuf &other) const { return compare(other) >= 0; }

	/**
	 * @return returns true if this buffer starts with the specified prefix
	 */
	inline bool startsWith(const char *prefix) const { return !strncmp(c_str(), prefix, strlen(prefix)); }

	/**
	 * @return returns true if this buffer ends with the specified postfix
	 */
	inline bool endsWith(const char *postfix) const { unsigned int psize = (unsigned int)strlen(postfix); return (size() >= psize)?!strncmp(end-psize, postfix, psize):false; }

	// be sure we've been given a valid pointer to compare.  If not, we return !=; specifically less-than, for lack of better options
	inline int compare(const char *other) const { return (other?strcmp(c_str(), other):-1); }
	inline bool operator ==(const char *other) const { return compare(other) == 0; }
	inline bool operator !=(const char *other) const { return compare(other) != 0; }
	inline bool operator > (const char *other) const { return other && compare(other) > 0; }
	inline bool operator < (const char *other) const { return other && compare(other) < 0; }
	inline bool operator <=(const char *other) const { return other && compare(other) <= 0; }
	inline bool operator >=(const char *other) const { return other && compare(other) >= 0; }
};



SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/versetreekey.h<|end_filename|>
/******************************************************************************
 *
 *  versetreekey.h -	code for class 'VerseTreeKey'- a standard Biblical
 *			verse key
 *
 * $Id: versetreekey.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2006-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef VERSETREEKEY_H
#define VERSETREEKEY_H

#include <versekey.h>
#include <treekey.h>
#include <swmacs.h>
#include <listkey.h>

#include <defs.h>

SWORD_NAMESPACE_START

/**
 * Class VerseKey
 * The SWKey implementation used for verse based modules like Bibles or commentaries.
 */
class SWDLLEXPORT VerseTreeKey : public VerseKey, public TreeKey::PositionChangeListener {

	static SWClass classdef;
	TreeKey *treeKey;
//	vector<struct sbook> books;

	void init(TreeKey *treeKey);
	void syncVerseToTree();
	long lastGoodOffset;

protected:
	virtual int getBookFromAbbrev(const char *abbr) const;

public:

	/**
	* VerseKey Constructor - initializes Instance of VerseKey
	*
	* @param treeKey a TreeKey which will form the basis of this VerseTreeKey
	* @param ikey text key (will take various forms of 'BOOK CH:VS'.
	* See parse() for more detailed information)
	*/
	VerseTreeKey(TreeKey *treeKey, const char *ikey = 0);
	
	/**
	* VerseKey Constructor - initializes instance of VerseKey
	*
	* @param treeKey a TreeKey which will form the basis of this VerseTreeKey
	* @param ikey base key (will take various forms of 'BOOK CH:VS'.
	*	See parse() for more detailed information)
	*/	
	VerseTreeKey(TreeKey *treeKey, const SWKey *ikey);
	
	/** VerseKey Constructor - initializes instance of VerseKey
	* with boundariess - see also LowerBound()
	* and UpperBound()
	* @param treeKey a TreeKey which will form the basis of this VerseTreeKey
	* @param min the lower boundary of the new	VerseKey
	* @param max the upper boundary of the new	VerseKey
	*/	
	VerseTreeKey(TreeKey *treeKey, const char *min, const char *max);
	
	/**	VerseKey Copy Constructor - will create a new	VerseKey
	* based on an existing one
	*
	* @param k the	VerseKey to copy from
	*/
	VerseTreeKey(const VerseTreeKey &k);
	

	/**	VerseKey Destructor
	* Cleans up an instance of VerseKey
	*/
	virtual ~VerseTreeKey();

	/** Creates a new	SWKey based on the current	VerseKey
	* see also the Copy Constructor
	*/
	virtual SWKey *clone() const;
	
	virtual bool isTraversable() const { return true; }

	virtual TreeKey *getTreeKey();

	// TreeKey::PositionChangeListener interface
	virtual void positionChanged();
	bool internalPosChange;

	virtual void decrement(int steps = 1);
	virtual void increment(int steps = 1);
	
	virtual void Normalize(char autocheck = 0);

	virtual void setPosition(SW_POSITION newpos);
	virtual long NewIndex() const;
	// OPERATORS --------------------------------------------------------------------


	SWKEY_OPERATORS

	virtual SWKey & operator = (const VerseKey & ikey) { copyFrom(ikey); return *this; }
//	virtual void copyFrom(const VerseTreeKey &ikey);
};

SWORD_NAMESPACE_END

#endif //VERSETREEKEY_H


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swmacs.h<|end_filename|>
/******************************************************************************
 *
 *  swmacs.h -	generic macros
 *
 * $Id: swmacs.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1996-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWMACS_H
#define SWMACS_H

#include <defs.h>

SWORD_NAMESPACE_START
// Maximum positive value of a signed numeric type
#define MAXPOS(x) ((x)((unsigned x)(1L << (sizeof(x)*8-1)) - 1))

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordModuleTreeEntry.h<|end_filename|>
//
//  SwordTreeEntry.h
//  MacSword2
//
//  Created by <NAME> on 29.08.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface SwordModuleTreeEntry : NSObject

@property (retain, readwrite) NSString *key;
@property (retain, readwrite) NSArray *content;

- (id)initWithKey:(NSString *)aKey content:(NSArray *)aContent;

@end


<|start_filename|>src/UserInterface/WorkspaceHostWindow.h<|end_filename|>
//
//  WorkspaceHostWindow.h
//  Eloquent
//
//  Created by <NAME> on 16.08.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "HostWindow.h"

/**
 This class is used as first responder for all the main menu actions.
 */
@interface WorkspaceHostWindow : HostWindow {
}

- (IBAction)addTab:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/teilatex.h<|end_filename|>
/******************************************************************************
 *
 *  teilatex.h -	Implementation of TEILaTeX
 *
 * $Id: teilatex.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2012-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef TEILATEX_H
#define TEILATEX_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts TEI text to LaTeX text
 */
class SWDLLEXPORT TEILaTeX : public SWBasicFilter {
private:
	bool renderNoteNumbers;

protected:
	class MyUserData : public BasicFilterUserData {
	public:
		bool isBiblicalText;
		SWBuf lastHi;
		bool firstCell; // for tables, indicates whether a cell is the first one in a row
		int consecutiveNewlines;
		
		SWBuf version;
		MyUserData(const SWModule *module, const SWKey *key);
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	TEILaTeX();
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swfiltermgr.h<|end_filename|>
/******************************************************************************
 *
 *  swfiltermgr.h -	definition of class SWFilterMgr used as an interface to
 *			manage filters on a module
 *
 * $Id: swfiltermgr.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWFILTERMGR_H
#define SWFILTERMGR_H

#include <defs.h>
#include <swconfig.h>

SWORD_NAMESPACE_START

class SWModule;
class SWMgr;

/** Class to manage different kinds of filters.
*/
class SWDLLEXPORT SWFilterMgr {

private:
	SWMgr *parentMgr;

public:
  SWFilterMgr();
  virtual ~SWFilterMgr();

  virtual void setParentMgr(SWMgr *parentMgr);
  virtual SWMgr *getParentMgr();

  virtual void AddGlobalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start,
				 ConfigEntMap::iterator end);
  virtual void AddLocalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start,
				ConfigEntMap::iterator end);


  /**
    * Adds the encoding filters which are defined in "section" to the SWModule object "module".
    * @param module To this module the encoding filter(s) are added
    * @param section We use this section to get a list of filters we should apply to the module
    */
  virtual void AddEncodingFilters(SWModule *module, ConfigEntMap &section);


    /**
    * Adds the render filters which are defined in "section" to the SWModule object "module".
    * @param module To this module the render filter(s) are added
    * @param section We use this section to get a list of filters we should apply to the module
    */
  virtual void AddRenderFilters(SWModule *module, ConfigEntMap &section);


  /**
    * Adds the strip filters which are defined in "section" to the SWModule object "module".
    * @param module To this module the strip filter(s) are added
    * @param section We use this section to get a list of filters we should apply to the module
    */
  virtual void AddStripFilters(SWModule *module, ConfigEntMap &section);


  /**
    * Adds the raw filters which are defined in "section" to the SWModule object "module".
    * @param module To this module the raw filter(s) are added
    * @param section We use this section to get a list of filters we should apply to the module
    */
  virtual void AddRawFilters(SWModule *module, ConfigEntMap &section);

};
SWORD_NAMESPACE_END
#endif


<|start_filename|>src/ObjectAssotiations/ObjectAssociations.h<|end_filename|>
//
//  ObjectAssociations.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#define Associater [ObjectAssociations associations]

@class WindowHostController;

@interface ObjectAssociations : NSObject {
    NSMutableDictionary *associations;
    WindowHostController *__strong currentInitialisationHost;
}

@property (strong, readwrite) WindowHostController *currentInitialisationHost;

+ (ObjectAssociations *)associations;

- (void)registerObject:(id)anObject forAssociatedObject:(id)assoObject withKey:(void *)aKey;
- (void)unregisterForAssociatedObject:(id)assoObject withKey:(void *)aKey;
- (id)objectForAssociatedObject:(id)assoObject withKey:(void *)aKey;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/flatapi.h<|end_filename|>
/******************************************************************************
 *
 *  flatapi.h -	This file contains an api usable by non-C++ environments
 *
 * $Id: flatapi.h 3561 2018-01-07 06:45:42Z greg.hellings $
 *
 * Copyright 2002-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWORDFLATAPI_H
#define SWORDFLATAPI_H

#include <inttypes.h>
#include "defs.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SWHANDLE intptr_t

struct org_crosswire_sword_ModInfo {
	char *name;
	char *description;
	char *category;
	char *language;
	char *version;
	char *delta;
};


struct org_crosswire_sword_SearchHit {
	const char *modName;
	char *key;
	long  score;
};


#undef org_crosswire_sword_SWModule_SEARCHTYPE_REGEX
#define org_crosswire_sword_SWModule_SEARCHTYPE_REGEX 1L
#undef org_crosswire_sword_SWModule_SEARCHTYPE_PHRASE
#define org_crosswire_sword_SWModule_SEARCHTYPE_PHRASE -1L
#undef org_crosswire_sword_SWModule_SEARCHTYPE_MULTIWORD
#define org_crosswire_sword_SWModule_SEARCHTYPE_MULTIWORD -2L
#undef org_crosswire_sword_SWModule_SEARCHTYPE_ENTRYATTR
#define org_crosswire_sword_SWModule_SEARCHTYPE_ENTRYATTR -3L
#undef org_crosswire_sword_SWModule_SEARCHTYPE_LUCENE
#define org_crosswire_sword_SWModule_SEARCHTYPE_LUCENE -4L

    const int org_crosswire_sword_SWModule_VERSEKEY_TESTAMENT = 0;
    const int org_crosswire_sword_SWModule_VERSEKEY_BOOK = 1;
    const int org_crosswire_sword_SWModule_VERSEKEY_CHAPTER = 2;
    const int org_crosswire_sword_SWModule_VERSEKEY_VERSE = 3;
    const int org_crosswire_sword_SWModule_VERSEKEY_CHAPMAX = 4;
    const int org_crosswire_sword_SWModule_VERSEKEY_VERSEMAX = 5;
    const int org_crosswire_sword_SWModule_VERSEKEY_BOOKNAME = 6;
    const int org_crosswire_sword_SWModule_VERSEKEY_OSISREF = 7;
    const int org_crosswire_sword_SWModule_VERSEKEY_SHORTTEXT = 8;
    const int org_crosswire_sword_SWModule_VERSEKEY_BOOKABBREV = 9;

    
    
    
    
/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    terminateSearch
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_SWModule_terminateSearch
  (SWHANDLE hSWModule);

typedef void (*org_crosswire_sword_SWModule_SearchCallback)(int);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    search
 * Signature: (Ljava/lang/String;IJLjava/lang/String;Lorg/crosswire/android/sword/SWModule/SearchProgressReporter;)[Lorg/crosswire/android/sword/SWModule/SearchHit;
 */
const struct org_crosswire_sword_SearchHit * SWDLLEXPORT org_crosswire_sword_SWModule_search
  (SWHANDLE hSWModule, const char *searchString, int searchType, long flags, const char *scope, org_crosswire_sword_SWModule_SearchCallback progressReporter);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    error
 * Signature: ()C
 */
char SWDLLEXPORT org_crosswire_sword_SWModule_popError
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getEntrySize
 * Signature: ()J
 */
long SWDLLEXPORT org_crosswire_sword_SWModule_getEntrySize
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getEntryAttribute
 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWModule_getEntryAttribute
  (SWHANDLE hSWModule, const char *level1, const char *level2, const char *level3, char filteredBool);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    parseKeyList
 * Signature: (Ljava/lang/String;)[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWModule_parseKeyList
  (SWHANDLE hSWModule, const char *keyText);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    setKeyText
 * Signature: (Ljava/lang/String;)V
 */
// Special values handled for VerseKey modules:
//	[+-][book|chapter]	- [de|in]crement by chapter or book
//	(e.g.	"+chapter" will increment the VerseKey 1 chapter)
//	[=][key]		- position absolutely and don't normalize
//	(e.g.	"jn.1.0" for John Chapter 1 intro; "jn.0.0" For Book of John Intro)
void SWDLLEXPORT org_crosswire_sword_SWModule_setKeyText
  (SWHANDLE hSWModule, const char *key);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getKeyText
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getKeyText
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    hasKeyChildren
 * Signature: ()Z
 */
char SWDLLEXPORT org_crosswire_sword_SWModule_hasKeyChildren
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getKeyChildren
 * Signature: ()[Ljava/lang/String;
 */

// This method returns child nodes for a genbook,
// but has special handling if called on a VerseKey module:
//  [0..7] [testament, book, chapter, verse, chapterMax, verseMax, bookName, osisRef]
const char ** SWDLLEXPORT org_crosswire_sword_SWModule_getKeyChildren
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getName
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getName
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getDescription
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getDescription
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getCategory
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getCategory
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getKeyParent
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getKeyParent
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    previous
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_SWModule_previous
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    next
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_SWModule_next
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    begin
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_SWModule_begin
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getStripText
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_stripText
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getRenderText
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_renderText
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getRenderHeader
 * Signature: ()Ljava/lang/String;
 */
// CSS styles associated with this text
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getRenderHeader
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getRawEntry
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getRawEntry
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    setRawEntry
 * Signature: (Ljava/lang/String;)V
 */
void SWDLLEXPORT org_crosswire_sword_SWModule_setRawEntry
  (SWHANDLE hSWModule, const char *entryBuffer);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    getConfigEntry
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWModule_getConfigEntry
  (SWHANDLE hSWModule, const char *key);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    deleteSearchFramework
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_SWModule_deleteSearchFramework
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWModule
 * Method:    hasSearchFramework
 * Signature: ()Z
 */
char SWDLLEXPORT org_crosswire_sword_SWModule_hasSearchFramework
  (SWHANDLE hSWModule);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    new
 * Signature: ()V
 */
SWHANDLE SWDLLEXPORT org_crosswire_sword_SWMgr_new
  ();


/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    newWithPath
 * Signature: ()V
 * Signature: (Ljava/lang/String;)V
 */
SWHANDLE SWDLLEXPORT org_crosswire_sword_SWMgr_newWithPath
  (const char *path);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    delete
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_SWMgr_delete
  (SWHANDLE hSWMgr);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    version
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_version
  (SWHANDLE hSWMgr);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getModInfoList
 * Signature: ()[Lorg/crosswire/android/sword/SWMgr/ModInfo;
 */
const struct org_crosswire_sword_ModInfo * SWDLLEXPORT org_crosswire_sword_SWMgr_getModInfoList
  (SWHANDLE hSWMgr);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getModuleByName
 * Signature: (Ljava/lang/String;)Lorg/crosswire/android/sword/SWModule;
 */
SWHANDLE SWDLLEXPORT org_crosswire_sword_SWMgr_getModuleByName
  (SWHANDLE hSWMgr, const char *moduleName);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getPrefixPath
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_getPrefixPath
  (SWHANDLE hSWMgr);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getConfigPath
 * Signature: ()Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_getConfigPath
  (SWHANDLE hSWMgr);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    setGlobalOption
 * Signature: (Ljava/lang/String;Ljava/lang/String;)V
 */
void SWDLLEXPORT org_crosswire_sword_SWMgr_setGlobalOption
  (SWHANDLE hSWMgr, const char *option, const char *value);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getGlobalOption
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_getGlobalOption
  (SWHANDLE hSWMgr, const char *option);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getGlobalOptionTip
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_getGlobalOptionTip
  (SWHANDLE hSWMgr, const char *option);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    filterText
 * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_filterText
  (SWHANDLE hSWMgr, const char *filterName, const char *text);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getGlobalOptions
 * Signature: ()[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWMgr_getGlobalOptions
  (SWHANDLE hSWMgr);


/*
 * Class:     org_crosswire_sword_SWConfig
 * Method:    getSections
 * Signature: ()[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWConfig_getSections
		(const char *confPath);

/*
 * Class:     org_crosswire_sword_SWConfig
 * Method:    getSectionKeys
 * Signature: (Ljava/lang/String;)[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWConfig_getSectionKeys
		(const char *confPath, const char *section);

/*
 * Class:     org_crosswire_sword_SWConfig
 * Method:    getKeyValue
 * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWConfig_getKeyValue
		(const char *confPath, const char *section, const char *key);

/*
 * Class:     org_crosswire_sword_SWConfig
 * Method:    setKeyValue
 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
 */
void SWDLLEXPORT org_crosswire_sword_SWConfig_setKeyValue
		(const char *confPath, const char *section, const char *key, const char *value);

/*
 * Class:     org_crosswire_sword_SWConfig
 * Method:    augmentConfig
 * Signature: (Ljava/lang/String;)[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWConfig_augmentConfig
		(const char *confPath, const char *configBlob);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getGlobalOptionValues
 * Signature: (Ljava/lang/String;)[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWMgr_getGlobalOptionValues
  (SWHANDLE hSWMgr, const char *option);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    setCipherKey
 * Signature: (Ljava/lang/String;Ljava/lang/String;)V
 */
void SWDLLEXPORT org_crosswire_sword_SWMgr_setCipherKey
  (SWHANDLE hSWMgr, const char *modName, const char *key);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    setJavascript
 * Signature: (Z)V
 */
void SWDLLEXPORT org_crosswire_sword_SWMgr_setJavascript
  (SWHANDLE hSWMgr, char valueBool);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    getAvailableLocales
 * Signature: ()[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_SWMgr_getAvailableLocales
  (SWHANDLE hSWMgr);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    setDefaultLocale
 * Signature: (Ljava/lang/String;)V
 */
void SWDLLEXPORT org_crosswire_sword_SWMgr_setDefaultLocale
  (SWHANDLE hSWMgr, const char *name);

/*
 * Class:     org_crosswire_sword_SWMgr
 * Method:    translate
 * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 */
const char * SWDLLEXPORT org_crosswire_sword_SWMgr_translate
  (SWHANDLE hSWMgr, const char *text, const char *localeName);





//
// InstallMgr methods
//
//

typedef void (*org_crosswire_sword_InstallMgr_StatusCallback)(const char *, unsigned long, unsigned long);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    new
 * Signature: (Ljava/lang/String;Lorg/crosswire/android/sword/SWModule/SearchProgressReporter;)V
 */
SWHANDLE SWDLLEXPORT org_crosswire_sword_InstallMgr_new
  (const char *baseDir, org_crosswire_sword_InstallMgr_StatusCallback statusReporter);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    delete
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_InstallMgr_delete
  (SWHANDLE hInstallMgr);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    setUserDisclaimerConfirmed
 * Signature: ()V
 */
void SWDLLEXPORT org_crosswire_sword_InstallMgr_setUserDisclaimerConfirmed
  (SWHANDLE hInstallMgr);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    syncConfig
 * Signature: ()I
 */
int SWDLLEXPORT org_crosswire_sword_InstallMgr_syncConfig
  (SWHANDLE hInstallMgr);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    uninstallModule
 * Signature: (Lorg/crosswire/android/sword/SWMgr;Ljava/lang/String;)I
 */
int SWDLLEXPORT org_crosswire_sword_InstallMgr_uninstallModule
  (SWHANDLE hInstallMgr, SWHANDLE hSWMgr_removeFrom, const char *modName);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    getRemoteSources
 * Signature: ()[Ljava/lang/String;
 */
const char ** SWDLLEXPORT org_crosswire_sword_InstallMgr_getRemoteSources
  (SWHANDLE hInstallMgr);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    refreshRemoteSource
 * Signature: (Ljava/lang/String;)I
 */
int SWDLLEXPORT org_crosswire_sword_InstallMgr_refreshRemoteSource
  (SWHANDLE hInstallMgr, const char *sourceName);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    getRemoteModInfoList
 * Signature: (Lorg/crosswire/android/sword/SWMgr;Ljava/lang/String;)[Lorg/crosswire/android/sword/SWMgr/ModInfo;
 */
const struct org_crosswire_sword_ModInfo * SWDLLEXPORT org_crosswire_sword_InstallMgr_getRemoteModInfoList
  (SWHANDLE hInstallMgr, SWHANDLE hSWMgr_deltaCompareTo, const char *sourceName);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    remoteInstallModule
 * Signature: (Lorg/crosswire/android/sword/SWMgr;Ljava/lang/String;Ljava/lang/String;)I
 */
int SWDLLEXPORT org_crosswire_sword_InstallMgr_remoteInstallModule
  (SWHANDLE hInstallMgr_from, SWHANDLE hSWMgr_to, const char *sourceName, const char *modName);

/*
 * Class:     org_crosswire_sword_InstallMgr
 * Method:    getRemoteModuleByName
 * Signature: (Ljava/lang/String;Ljava/lang/String;)Lorg/crosswire/android/sword/SWModule;
 */
SWHANDLE SWDLLEXPORT org_crosswire_sword_InstallMgr_getRemoteModuleByName
  (SWHANDLE hInstallMgr, const char *sourceName, const char *modName);

void SWDLLEXPORT org_crosswire_sword_SWlog_logError(const char *msg);
void SWDLLEXPORT org_crosswire_sword_SWlog_logDebug(const char *msg);
void SWDLLEXPORT org_crosswire_sword_SWlog_logWarning(const char *msg);
void SWDLLEXPORT org_crosswire_sword_SWlog_logInformation(const char *msg);
void SWDLLEXPORT org_crosswire_sword_SWlog_logTimedInformation(const char *msg);

#ifdef __cplusplus
}
#endif
#endif


<|start_filename|>src/ThreadedProgressSheet/MBThreadedProgressSheetController.h<|end_filename|>
//
//  MBThreadedProgressSheetController.h
//  Eloquent
//
//  Created by <NAME> on 26.12.07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

/* MBThreadedProgressSheetController */

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

// the progress actions
enum ThreadedProgressAction {
	NONE_PROGRESS_ACTION = 0,
	INDEXING_PROGRESS_ACTION,
	SEARCHING_PROGRESS_ACTION,
};

enum ThreadedeProgressReturnCode {
    NORMAL_END,
    CANCELED_END
};

// name of the nib
#define THREADED_PROGRESS_SHEET_NIB_NAME @"ThreadedProgressSheet"

@interface MBThreadedProgressSheetController : NSWindowController {

    IBOutlet NSTextField *actionLabel;
	IBOutlet NSTextField *currentStepLabel;
    IBOutlet NSButton *cancelButton;
    IBOutlet NSProgressIndicator *progressIndicator;
    IBOutlet NSWindow *sheet;
	
	// delegate
	id delegate;
	// the window the sheet will be brought up
	NSWindow *sheetWindow;
	// return code of sheet
	int sheetReturnCode;
	// should keep track of progress
	BOOL shouldKeepTrackOfProgress;
	// the action
	int progressAction;
}

+ (MBThreadedProgressSheetController *) standardProgressSheetController;

// delegate
- (void)setDelegate:(id)anObject;
- (id)delegate;
// threaded
- (void)setIsThreaded:(NSNumber *)aSetting;
- (BOOL)isThreaded;
// window title
- (void)setSheetTitle:(NSString *)aTitle;
- (NSString *)sheetTitle;
// sheet Window
- (void)setSheetWindow:(NSWindow *)aWindow;
- (NSWindow *)sheetWindow;
// action message
- (void)setActionMessage:(NSString *)aMessage;
// action message
- (void)setCurrentStepMessage:(NSString *)aMessage;
// sheet return code
- (int)sheetReturnCode;
// keep track of progress
- (void)setShouldKeepTrackOfProgress:(NSNumber *)aSetting;
- (BOOL)shouldKeepTrackOfProgress;
// set and get action
- (void)setProgressAction:(NSNumber *)aAction;
- (int)progressAction;
// reset progressValue
- (void)reset;
// reset returnCode
- (void)resetReturnCode;

// dealing with progress
- (void)setIsIndeterminateProgress:(NSNumber *)aSetting;
- (BOOL)isIndeterminateProgress;
- (void)setIsDisplayedWhenStopped:(NSNumber *)aSetting;
- (BOOL)isDisplayedWhenStopped;
- (void)setMaxProgressValue:(NSNumber *)aValue;
- (double)maxProgressValue;
- (void)setMinProgressValue:(NSNumber *)aValue;
- (double)minProgressValue;
- (void)setProgressValue:(NSNumber *)aValue;
- (double)progressValue;
- (void)incrementProgressBy:(NSNumber *)aValue;
- (void)startProgressAnimation;
- (void)stopProgressAnimation;

// begin sheet
- (void)beginSheetForWindow:(NSWindow *)docWindow;
- (void)beginSheet;
- (void)endSheet;

// end sheet callback
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;

// actions
- (IBAction)cancelButton:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osisxhtml.h<|end_filename|>
/******************************************************************************
 *
 *  osisxhtml.h -	Render filter for classed XHTML of an OSIS module
 *
 * $Id: osisxhtml.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2011-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISXHTML_H
#define OSISXHTML_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts OSIS text to classed XHTML
 */
class SWDLLEXPORT OSISXHTML : public SWBasicFilter {
private:
	bool morphFirst;
	bool renderNoteNumbers;
protected:

	class TagStack;
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);


	// used by derived classes so we have it in the header
	class MyUserData : public BasicFilterUserData {
	public:
		bool osisQToTick;
		bool inXRefNote;
		bool isBiblicalText;
		int suspendLevel;
		SWBuf wordsOfChristStart;
		SWBuf wordsOfChristEnd;
		SWBuf interModuleLinkStart;
		SWBuf interModuleLinkEnd;
		TagStack *quoteStack;
		TagStack *hiStack;
		TagStack *titleStack;
		TagStack *lineStack;
		int consecutiveNewlines;
		SWBuf lastTransChange;
		SWBuf w;
		SWBuf fn;
		SWBuf version;

		MyUserData(const SWModule *module, const SWKey *key);
		~MyUserData();
		void outputNewline(SWBuf &buf);
	};
public:
	OSISXHTML();
	void setMorphFirst(bool val = true) { morphFirst = val; }
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
	virtual const char *getHeader() const;
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/MouseTrackingScrollView.h<|end_filename|>
//
//  MouseTrackingScrollView.h
//  Eloquent
//
//  Created by <NAME> on 03.07.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@interface MouseTrackingScrollView : NSScrollView {
    id __strong delegate;
}

@property (strong, readwrite) id delegate;

- (void)updateMouseTracking;

@end


<|start_filename|>src/Indexing/IndexingManager.h<|end_filename|>
//
//  IndexingManager.h
//  Eloquent
//
//  Created by <NAME> on 28.05.07.
//  Copyright 2007 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@class SwordModule, SwordManager;
@class Indexer;

@interface IndexingManager : NSObject

@property (strong, readwrite) NSString *baseIndexPath;
@property (strong, readwrite) SwordManager *swordManager;
@property (strong, readwrite) NSMutableArray *searchBookSets;

/**
 \brief singleton convenient allocator and getter of instance
 */
+ (IndexingManager *)sharedManager;

// init
- (id)init;

/**
 \brief open or create index for the given parameters
 @return SKIndexRef or NULL on error
 */
- (SKIndexRef)openOrCreateIndexForModName:(NSString *)aModName textType:(NSString *)aModType;

/** stores to disk */
- (void)storeSearchBookSets;

/**
 calling this method will trigger checking for modules that do not have a valid index
 in a separate thread.
 */
- (void)triggerBackgroundIndexCheck;

/**
 stops the background indexer and removes the timer
 */
- (void)invalidateBackgroundIndexer;

/**
 the manager should be used to aquire indexers. the manager will keep track of already opened indexers and not open new ones if not necessary.
 */
- (Indexer *)indexerForModuleName:(NSString *)aName moduleType:(int)aType;
/**
 the manager should also be used to close the index.
 it only closes an index if no other instance is using it any longer.
 */
- (void)closeIndexer:(Indexer *)aIndexer;

/**
\brief returns the path of the index folder for the given module name
 @return NSString that is autoreleased
 */
- (NSString *)indexPathForModuleName:(NSString *)aModName textType:(NSString *)aModType;

/**
 \brief returns the path of the index folder for the given module name
 @return NSString that is autoreleased
 */
- (NSString *)indexFolderPathForModuleName:(NSString *)aModName;

/**
\brief checks whether an index already exists for the given module name and type
 @param[in] modName: the name of the module.
 @param[in] modType: the type of the module. depending on this, more than one index may be created for the module.
 @return: YES/NO
 */
- (BOOL)indexExistsForModuleName:(NSString *)modName;

/**
 removed the index for the given module name
 */
- (BOOL)removeIndexForModuleName:(NSString *)modName;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swkey.h<|end_filename|>
/******************************************************************************
 *
 *  swkey.h -	code for base class 'swkey'.  swkey is the basis for all
 *		types of keys for indexing into modules (e.g. verse, word,
 *		place, etc.)
 *
 * $Id: swkey.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 1998-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWKEY_H
#define SWKEY_H

#include <swobject.h>

#include <defs.h>
#include <sysdata.h>
#include <utilstr.h>

SWORD_NAMESPACE_START

#define KEYERR_OUTOFBOUNDS 1

#define SWKEY_OPERATORS \
  SWKey &operator =(const char *ikey) { setText(ikey); return *this; } \
  SWKey &operator =(const SWKey &ikey) { positionFrom(ikey); return *this; } \
  SWKey &operator =(SW_POSITION pos) { setPosition(pos); return *this; } \
  operator const char *() const { return getText(); } \
  bool operator ==(const SWKey &ikey) { return equals(ikey); } \
  bool operator !=(const SWKey &ikey) { return !equals(ikey); } \
  virtual bool operator >(const SWKey &ikey) { return (compare(ikey) > 0); } \
  virtual bool operator <(const SWKey &ikey) { return (compare(ikey) < 0); } \
  virtual bool operator >=(const SWKey &ikey) { return (compare(ikey) > -1); }  \
  virtual bool operator <=(const SWKey &ikey) { return (compare(ikey) < 1); } \
  SWKey &operator -=(int steps) { decrement(steps); return *this; } \
  SWKey &operator +=(int steps) { increment(steps); return *this; } \
  SWKey &operator ++()    { increment(1); return *this; } \
  SWKey  operator ++(int) { SWKey temp = *this; increment(1); return temp; } \
  SWKey &operator --()    { decrement(1); return *this; } \
  SWKey  operator --(int) { SWKey temp = *this; decrement(1); return temp; }


/** For use with = operator to position key.
*/
class SW_POSITION {
	char pos;
public:
	SW_POSITION(char ipos) { pos = ipos; }
	operator char() { return pos; }
};

#define POS_TOP ((char)1)
#define POS_BOTTOM ((char)2)

#define TOP SW_POSITION(POS_TOP)
#define BOTTOM SW_POSITION(POS_BOTTOM)

class SWLocale;

/** SWKey is used for positioning an SWModule to a specific entry.
 *	It always represents a possible location into a module and can additionally represent
 *	a domain of entries (e.g. "John 3:16" in the domain "John 1:1 - Mark 5:25")
 */
class SWDLLEXPORT SWKey : public SWObject {

	class LocaleCache {
	public:
		char *name;
		SWLocale *locale;
			LocaleCache() {
			name = 0;
			locale = 0;
		}
		 virtual ~LocaleCache() {
			if (name)
			delete[]name;
		}
	};
	static LocaleCache localeCache;
	// for caching; don't use directly, call getPrivateLocale()
	mutable SWLocale *locale;


	long index;
	static SWClass classdef;
	void init();


protected:
	char *keytext;
	mutable char *rangeText;
	mutable bool boundSet;
	bool persist;
	mutable char error;

	char *localeName;
	SWLocale *getPrivateLocale() const;


public:

	// misc storage for whatever
	__u64 userData;

	/** initializes instance of SWKey from a string
	 * All keys can be reduced to a string representation which should be able
	 *	to be used to again set the key to the same position
	 * @param ikey string to use for initializing this new key
	 */
	SWKey(const char *ikey = 0);

	/** Copy Constructor
	 * @param k The SWKey object to copy.
	 */
	SWKey(const SWKey &k);

	/** Destructor, cleans up this instance of SWKey
	 */
	virtual ~SWKey();

	/** Returns a new exact clone of this SWKey object.  This allocates
	 * a new SWKey which must be deleted by the caller
	 * @return new clone of this key
	 */
	virtual SWKey *clone() const;


	/** Gets whether this key should persist in any module to which it is set
	 * otherwise just a copy will be used in the module.
	 * @return 1 - persists in module; 0 - a copy is attempted
	 */
	bool isPersist() const;
	SWDEPRECATED char Persist() const { return isPersist(); }

	/** Sets whether this key should persist in any module to which it is set
	 * otherwise just a copy will be used in the module.
	 * @param ipersist value which to set persist;
	 * @return 1 - persists in module; 0 - a copy is attempted
	 */
	SWDEPRECATED char Persist(signed char ipersist) { setPersist(ipersist!=0); return isPersist(); }
	void setPersist(bool ipersist);

	/** Gets and clears error status
	 * @return error status
	 */
	SWDEPRECATED char Error() { return popError(); }
	virtual char popError();
	virtual char getError() { return error; }
	virtual void setError(char err) { error = err; }

	/** Sets this SWKey with a character string
	 * @param ikey string used to set this key
	 */
	virtual void setText(const char *ikey);

	/** Copies as much info (position, range, etc.) as possible from another SWKey object
	 * @param ikey other SWKey object from which to copy
	 */
	virtual void copyFrom(const SWKey &ikey);
	virtual void positionFrom(const SWKey &ikey) { copyFrom(ikey); }

	/** returns string representation of this key
	 */
	virtual const char *getText() const;
	virtual const char *getShortText() const { return getText(); }
	virtual const char *getRangeText() const;
	virtual const char *getOSISRefRangeText() const;
	virtual bool isBoundSet() const { return boundSet; }
	virtual void clearBound() const { boundSet = false; }

	/** Compares this key object to another SWKey object
	 * @param ikey key to compare with this one
	 * @return >0 if this key is greater than compare key;
	 *	<0 if this key is smaller than compare key;
	 *	0 if the keys are the same
	 */
	virtual int compare(const SWKey &ikey);

	/** test equality of this SWKey object's position with another SWKey
	 * @param ikey key to compare with this one
	 * @return true if the key positions are equal
	 */
	virtual bool equals(const SWKey &ikey) { return !compare(ikey); }

	virtual void setPosition(SW_POSITION);

	/** Decrements key a number of entry positions
	 * This is only valid if isTraversable is true
	 * @param steps Number of entries to jump backward
	 */
	virtual void decrement(int steps = 1);

	/** Increments key a number of entry positions
	 * This is only valid if isTraversable is true
	 * @param steps Number of entries to jump forward
	 */
	virtual void increment(int steps = 1);

	/** Whether or not this key can be ++ -- incremented
	 */
	virtual bool isTraversable() const { return false; }

	char *getLocale() const { return localeName; }
	void setLocale(const char *name) { stdstr(&localeName, name); locale = 0;	} // this will force an on demand lookup of our locale

	/** Use this function to get an index position within a module.
	 */
	virtual long getIndex() const { return index; }

	/** See documentation for @ref Index()
	 */
	virtual void setIndex(long iindex) { index = iindex; }

	SWKEY_OPERATORS

	};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordVerseManager.h<|end_filename|>
//
//  SwordVerseManager.h
//  MacSword2
//
//  Created by <NAME> on 19.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#include <versificationmgr.h>
#endif

#define SW_VERSIFICATION_KJV       @"KJV"

@interface SwordVerseManager : NSObject {
}

+ (SwordVerseManager *)defaultManager;

/** convenience method that returns the books for default scheme (KJV) */
- (NSArray *)books;
/** books for a versification scheme */
- (NSArray *)booksForVersification:(NSString *)verseScheme;

#ifdef __cplusplus
- (sword::VersificationMgr *)verseMgr;
#endif

@end


<|start_filename|>src/UserInterface/WindowHostController+SplitViewDelegate.h<|end_filename|>
//
//  WindowHostController+SplitViewDelegate.h
//  Eloquent
//
//  Created by <NAME> on 29.03.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "WindowHostController.h"

@interface WindowHostController (SplitViewDelegate)

- (void)resizeSplitView:(NSSplitView *)aSplitView;

@end


<|start_filename|>src/SwordUrlProtocol.h<|end_filename|>
//
//  SwordUrlProtocol.h
//  Eloquent
//
//  Created by <NAME> on 28.11.10.
//  Copyright 2010 CrossWire. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>


#define SwordUrlScheme @"sword"

@interface SwordUrlProtocol : NSURLProtocol {

}

+ (void)setup;

@end


<|start_filename|>src/UserInterface/NSImage+Additions.h<|end_filename|>
//
//  NSImage+Additions.h
//  Eloquent
//
//  Created by <NAME> on 28.02.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSImage (Additions)

- (NSImage *)rotateByDegrees:(int)degrees;
- (NSImage *)mirrorVertically;

@end


<|start_filename|>src/UserInterface/BibleViewController.h<|end_filename|>
//
//  BibleTextViewController.h
//  Eloquent
//
//  Created by <NAME> on 14.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "ModuleViewController.h"

@class SwordBible;
@class GradientCell;
@class SearchBookSetEditorController;

#define BIBLEVIEW_NIBNAME   @"BibleView"

@interface BibleViewController : ModuleViewController <NSCoding, NSOutlineViewDelegate, NSOutlineViewDataSource> {
    IBOutlet NSButton *closeBtn;
    IBOutlet NSPopUpButton *addPopBtn;
    IBOutlet NSPopUpButton *modulePopBtn;
    
    IBOutlet NSView *sideBarView;
    IBOutlet NSOutlineView *entriesOutlineView;

    NSMenu *biblesMenu;
    NSMenu *commentariesMenu;
    
    // booksets controller
    SearchBookSetEditorController *searchBookSetsController;
    
    // gradient cell for outline view
    GradientCell *gradientCell;
    
    // helper vars for rendering
    int lastChapter;
    int lastBook;
}

@property (strong, readwrite) NSMutableArray *bookSelection;
@property (strong, readwrite) NSDictionary *outlineViewItems;

// ---------- initializers ---------
- (id)initWithModule:(SwordBible *)aModule;
- (id)initWithModule:(SwordBible *)aModule delegate:(id)aDelegate;
- (id)initWithDelegate:(id)aDelegate;

// ----------- methods -------------
// searchBookSetsController
- (SearchBookSetEditorController *)searchBookSetsController;

- (void)populateAddPopupMenu;
- (void)populateBookmarksMenu;

// actions
- (IBAction)addBookmark:(id)sender;
- (IBAction)addVersesToBookmark:(id)sender;
- (IBAction)addModule:(id)sender;
- (IBAction)closeButton:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordListKey.h<|end_filename|>
//
//  SwordListKey.h
//  MacSword2
//
//  Created by <NAME> on 10.04.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SwordKey.h"

#ifdef __cplusplus
#include <swkey.h>
#include <listkey.h>
#endif

@class SwordBible, VerseEnumerator;
@class SwordVerseKey;

@interface SwordListKey : SwordKey {
}

+ (SwordListKey *)listKeyWithRef:(NSString *)aRef;
+ (SwordListKey *)listKeyWithRef:(NSString *)aRef v11n:(NSString *)scheme;
+ (SwordListKey *)listKeyWithRef:(NSString *)aRef headings:(BOOL)headings v11n:(NSString *)scheme;

#ifdef __cplusplus
+ (SwordListKey *)listKeyWithSWListKey:(sword::ListKey *)aLk;
- (SwordListKey *)initWithSWListKey:(sword::ListKey *)aLk;
- (sword::ListKey *)swListKey;
#endif

- (SwordListKey *)initWithRef:(NSString *)aRef;
- (SwordListKey *)initWithRef:(NSString *)aRef v11n:(NSString *)scheme;
- (SwordListKey *)initWithRef:(NSString *)aRef headings:(BOOL)headings v11n:(NSString *)scheme;

- (void)parse;
- (void)parseWithHeaders;
- (VerseEnumerator *)verseEnumerator;

- (NSInteger)numberOfVerses;
- (BOOL)containsKey:(SwordVerseKey *)aVerseKey;

@end


<|start_filename|>src/UserInterface/LeftSideBarViewController.h<|end_filename|>
//
//  LeftSideBarViewController.h
//  Eloquent
//
//  Created by <NAME> on 26.10.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "SideBarViewController.h"
#import "LeftSideBarAccessoryUIController.h"

@class BookmarksUIController;
@class BookmarkManager;
@class SwordManager;
@class ModulesUIController;
@class NotesManager;
@class NotesUIController;
@class ThreeCellsCell;
@class BookmarkCell;

@interface LeftSideBarViewController : SideBarViewController <NSOutlineViewDataSource, NSOutlineViewDelegate, LeftSideBarDelegate> {
        
    BookmarkManager *bookmarkManager;
    SwordManager *swordManager;    
    NotesManager *notesManager;
    
    NSImage *bookmarkGroupImage;
    NSImage *bookmarkImage;
    NSImage *lockedImage;
    NSImage *unlockedImage;
    NSImage *notesDrawerImage;
    NSImage *noteImage;
    
    // root outlineview items
    id modulesRootItem;
    id bookmarksRootItem;
    id notesRootItem;
    
    ThreeCellsCell *threeCellsCell;
    BookmarkCell *bookmarkCell;
    
    NSMutableArray *selectedItems;
}

- (id)initWithDelegate:(WindowHostController *)aDelegate;

// LeftSideBarDelegate
- (id)objectForClickedRow;
- (void)doubleClick;
- (void)reloadForController:(LeftSideBarAccessoryUIController *)aController;

@end


<|start_filename|>src/UserInterface/BookmarkDragItem.h<|end_filename|>
//
//  BookmarkDragItem.h
//  Eloquent
//
//  Created by <NAME> on 18.12.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

@class Bookmark;

@interface BookmarkDragItem : NSObject  <NSCoding> {
    NSIndexPath *path;
    Bookmark *bookmark;
}

@property (strong, readwrite) NSIndexPath *path;
@property (strong, readwrite) Bookmark *bookmark;

@end


<|start_filename|>src/UserInterface/LeftSideBarAccessoryUIController.h<|end_filename|>
//
//  LeftSideBarAccessoryUIController.h
//  Eloquent
//
//  Created by <NAME> on 30.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class LeftSideBarAccessoryUIController;

@protocol LeftSideBarDelegate

- (id)objectForClickedRow;
- (void)doubleClick;
- (void)reloadForController:(LeftSideBarAccessoryUIController *)aController;

@end

@class WindowHostController;

@interface LeftSideBarAccessoryUIController : NSObject {
    IBOutlet id<LeftSideBarDelegate> __strong delegate;
    IBOutlet WindowHostController *__strong hostingDelegate;
}

@property (strong, readwrite) id<LeftSideBarDelegate> delegate;
@property (strong, readwrite) WindowHostController *hostingDelegate;

- (id)initWithDelegate:(id<LeftSideBarDelegate>)aDelegate hostingDelegate:(WindowHostController *)aHostingDelegate;

- (void)delegateReload;
- (void)delegateDoubleClick;
- (id)delegateSelectedObject;

@end


<|start_filename|>src/UserInterface/ExtTextViewController.h<|end_filename|>
//
//  WebViewController.h
//  Eloquent
//
//  Created by <NAME> on 15.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

/*
 This class is the one webview controller class.
 It can be instanciated where ever needed and put in as subview.
 Delegate can be set to forward any WebView actions.
 A protocol is defined for these delegation methods.
 */

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "HostableViewController.h"

#define EXTTEXTVIEW_NIBNAME   @"ExtTextView"

@class MouseTrackingScrollView;
@class MBTextView;

@interface ExtTextViewController : HostableViewController <NSTextViewDelegate, MouseTracking, TextContentProviding> {
    IBOutlet MBTextView *textView;
    IBOutlet MouseTrackingScrollView *scrollView;
}

- (id)initWithDelegate:(id)aDelegate;

// TextContentProviding
- (MBTextView *)textView;
- (MouseTrackingScrollView *)scrollView;
- (NSMenu *)menuForEvent:(NSEvent *)event;
- (void)setAttributedString:(NSAttributedString *)aString;
- (void)setString:(NSString *)aString;
- (void)scrollToTop;

// MouseTracking
- (void)mouseEnteredView:(NSView *)theView;
- (void)mouseExitedView:(NSView *)theView;

@end


<|start_filename|>src/Preferences/NSDictionary+ModuleDisplaySettings.h<|end_filename|>
//
//  NSDictionary+ModuleDisplaySettings.h
//  Eloquent
//
//  Created by <NAME> on 15.12.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#define NormalDisplayFontFamilyNameKey  @"NormalDisplayFontFamilyNameKey"
#define BoldDisplayFontFamilyNameKey    @"BoldDisplayFontFamilyNameKey"
#define DisplayFontSizeKey              @"DisplayFontSizeKey"

@interface NSDictionary (ModuleDisplaySettings)

- (NSFont *)displayFont;
- (NSFont *)displayFontBold;
- (NSInteger)displayFontSize;

@end


<|start_filename|>Resources/CocoPCRE.framework/Versions/A/Headers/Regex.h<|end_filename|>
//
//  Regex.h
//  CocoPCRE
//
//  Created by <NAME> on 20.03.06.
//  Copyright 2006 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <CocoPCRE/MatchResult.h>
#import <CocoPCRE/pcre.h>						// Perl Compatible Regex

typedef enum _RegexResult {
	RegexNoMatch = 0,
	RegexMatch,
	RegexMatchError
}RegexResultType;

typedef enum _RegexOptions {
	RegexCaseSensitive = PCRE_CASELESS,
	RegexMultiline = PCRE_MULTILINE,
	RegexExtended = PCRE_EXTENDED
}RegexOptionsType;

/**
 \brief Error codes for Regex
 */
typedef enum _RegexErrorCodes {
	RegexSuccess = 0,				/** On success */
	RegexCompileError,			/** Error on compiling pattern */
	RegexError					/** General, unknown error */
}RegexErrorCodeType;


@class MatchResult;

@interface Regex : NSObject  {
	pcre *re;				// pointer to pcre structure
	pcre_extra *pe;			// pointer for study information
	
	int options;

	BOOL captureSubstrings;
	BOOL findAll;
	
	// the search pattern
	NSString *pattern;
	NSString *origPattern;		// the search pattern may vary to the original pattern
	
	// error handling
	NSString *errorMessageOfLastAction;
	int errorCodeOfLastAction;
}

// convevient allocator
+ (id)regexWithPattern:(NSString *)pat;
+ (id)regexWithPattern:(NSString *)pat options:(int)opts;

// alloc
- (id)initWithPattern:(NSString *)pat;
- (id)initWithPattern:(NSString *)pat options:(int)opts;

// study the pattern to speed things up
- (void)studyPattern;

// getter and setter for the pattern
- (void)setPattern:(NSString *)pat;
- (NSString *)pattern;
- (void)setOrigPattern:(NSString *)origPat;
- (NSString *)origPattern;

// options for pcre_compile
- (void)setMultiline:(BOOL)flag;
- (void)setCaseSensitive:(BOOL)flag;
- (void)setExtended:(BOOL)flag;

// general options
- (void)setCaptureSubstrings:(BOOL)flag;
- (BOOL)captureSubstrings;
- (void)setFindAll:(BOOL)flag;
- (BOOL)findAll;

// simple string matching
- (RegexResultType)matchIn:(NSString *)string matchResult:(MatchResult **)mResult;

// get number of captures in pattern
- (int)numberOfCapturingSubpatterns;

// error handling
- (NSString *)errorMessageOfLastAction;
- (int)errorCodeOfLastAction;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swsearchable.h<|end_filename|>
/******************************************************************************
 *
 *  swsearchable.h -	definition of class SWSearchable used to provide an
 *			interface for objects that be searched.
 *
 * $Id: swsearchable.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWSEARCHABLE_H
#define SWSEARCHABLE_H

#include <defs.h>

SWORD_NAMESPACE_START

class ListKey;
class SWKey;

/** used to provide an interface for objects that be searched.
 */
class SWDLLEXPORT SWSearchable {
public:
	SWSearchable();
	virtual ~SWSearchable();

	/**
	* This is the default callback function for searching.
	* This function is a placeholder and does nothing.
	* You can define your own function for search progress
	* evaluation, and pass it over to Search().
	*/
	static void nullPercent(char percent, void *userData);

	// search interface -------------------------------------------------

	/**
	 * Searches a module for a string
	 * @param istr string for which to search
	 * @param searchType type of search to perform
	 *			>=0 - regex
	 *			-1  - phrase
	 *			-2  - multiword
	 *			-3  - entryAttrib (eg. Word//Strongs/G1234/)
	 *			-4  - Lucene
	 * @param flags options flags for search
	 * @param scope Key containing the scope. VerseKey or ListKey are useful here.
	 * @param justCheckIfSupported if set, don't search,
	 * only tell if this function supports requested search.
	 * @param percent Callback function to get the current search status in %.
	 * @param percentUserData User data that is given to the callback function as parameter.
	 *
	 * @return ListKey set to verses that contain istr
	 */

	virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0,
			SWKey * scope = 0,
			bool * justCheckIfSupported = 0,
			void (*percent) (char, void *) = &nullPercent,
			void *percentUserData = 0) = 0;

	/**
	 * ask the object to build any indecies it wants for optimal searching
	 */
	virtual signed char createSearchFramework(
			void (*percent) (char, void *) = &nullPercent,
			void *percentUserData = 0);	// special search framework

	virtual void deleteSearchFramework();
	
	/**
	 * was SWORD compiled with code to optimize searching for this driver?
	 */
	virtual bool hasSearchFramework() { return false; }

	/**
	 * Check if the search is optimally supported (e.g. if index files are
	 * presnt and working)
	 * This function checks whether the search framework may work in the
	 * best way.
	 * @return true if the the search is optimally supported, false if
	 * it's not working in the best way.
	 */
	virtual bool isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swfilter.h<|end_filename|>
/******************************************************************************
 *
 *  swfilter.h -	definition of class SWFilter used to filter text between
 *		       	different formats
 *
 * $Id: swfilter.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWFILTER_H
#define SWFILTER_H

#include <defs.h>

SWORD_NAMESPACE_START

class SWKey;
class SWBuf;
class SWModule;


class SWModule;

/** Base class for all filters in sword.
* Filters are used to filter/convert text between different formats
* like GBF, HTML, RTF ...
*/
class SWDLLEXPORT  SWFilter {
public:
	virtual ~SWFilter() {}

	/** This method processes and appropriately modifies the text given it
	 *	for a particular filter task
	 *
	 * @param text The text to be filtered/converted
	 * @param key Current key That was used.
	 * @param module Current module.
	 * @return 0
	 */
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0) = 0;

	/** This method can supply a header associated with the processing done with this filter.
	 *	A typical example is a suggested CSS style block for classed containers.
	 */
	virtual const char *getHeader() const { return ""; }
};

	SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/ScrollSynchronizableView.h<|end_filename|>
//
//  ScrollSynchronizableView.h
//  Eloquent
//
//  Created by <NAME> on 20.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface ScrollSynchronizableView : NSView {
    IBOutlet NSScrollView *syncScrollView;
    IBOutlet NSTextView *textView;
}

@property (strong, readwrite) NSScrollView *syncScrollView;
@property (strong, readwrite) NSTextView *textView;

@end


<|start_filename|>src/Preferences/MBPreferenceController.h<|end_filename|>
/* MBPreferenceController */

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import <FooLogger/CocoLogger.h>

#define PREFERENCE_CONTROLLER_NIB_NAME @"Preferences"

typedef enum _VerseNumberingType {
    FullVerseNumbering = 0,
    VerseNumbersOnly = 1,
    NoVerseNumbering = 2
}VerseNumberingType;

// UserDefault defines

// text view margins
#define DefaultsTextContainerVerticalMargins        @"DefaultsTextContainerVerticalMargins"
#define DefaultsTextContainerHorizontalMargins      @"DefaultsTextContainerHorizontalMargins"

// printing
#define DefaultsPrintLeftMargin                     @"DefaultsPrintLeftMargin"
#define DefaultsPrintRightMargin                    @"DefaultsPrintRightMargin"
#define DefaultsPrintTopMargin                      @"DefaultsPrintTopMargin"
#define DefaultsPrintBottomMargin                   @"DefaultsPrintBottomMargin"
#define DefaultsPrintCenterHorizontally             @"DefaultsPrintCenterHorizontally"
#define DefaultsPrintCenterVertically               @"DefaultsPrintCenterVertically"

// bible display
#define DefaultsBibleTextShowBookNameKey            @"DefaultsBibleTextShowBookNameKey"
#define DefaultsBibleTextShowBookAbbrKey            @"DefaultsBibleTextShowBookAbbrKey"
#define DefaultsBibleTextVersesOnOneLineKey         @"DefaultsBibleTextVersesOnOneLineKey"
#define DefaultsBibleTextVerseNumberingTypeKey      @"DefaultsBibleTextVerseNumberingTypeKey"
#define DefaultsBibleTextHighlightBookmarksKey      @"DefaultsBibleTextHighlightBookmarksKey"

#define DefaultsBibleTextDisplayFontFamilyKey       @"DefaultsBibleTextDisplayFontFamilyKey"
#define DefaultsBibleTextDisplayBoldFontFamilyKey   @"DefaultsBibleTextDisplayBoldFontFamilyKey"
#define DefaultsBibleTextDisplayFontSizeKey         @"DefaultsBibleTextDisplayFontSizeKey"

#define DefaultsHeaderViewFontFamilyKey             @"DefaultsHeaderViewFontFamilyKey"
#define DefaultsHeaderViewFontSizeKey               @"DefaultsHeaderViewFontSizeKey"
#define DefaultsHeaderViewFontSizeBigKey            @"DefaultsHeaderViewFontSizeBigKey"

#define DefaultsStandardFontFamilyKey               @"DefaultsStandardFontFamilyKey"
#define DefaultsStandardFontSizeKey                 @"DefaultsStandardFontSizeKey"
#define DefaultsStandardFontSizeBigKey              @"DefaultsStandardFontSizeBigKey"

// Fullscreen stuff
#define DefaultsFullscreenFontSizeAddKey            @"DefaultsFullscreenFontSizeAddKey"

// module display settings
#define DefaultsModuleDisplaySettingsKey            @"DefaultsModuleDisplaySettingsKey"
#define DefaultsParagraphSpacingKey                 @"DefaultsParagraphSpacingKey"
#define DefaultsLineSpacingKey                      @"DefaultsLineSpacingKey"

// cipher keys
#define DefaultsModuleCipherKeysKey                 @"DefaultsModuleCipherKeysKey"

// define some userdefaults keys
#define DefaultsSessionPath                         @"DefaultsSessionPath"

// default bible
#define DefaultsBibleModule                         @"DefaultsBibleModule"
#define DefaultsDictionaryModule                    @"DefaultsDictionaryModule"
#define DefaultsStrongsHebrewModule                 @"DefaultsStrongsHebrewModule"
#define DefaultsStrongsGreekModule                  @"DefaultsStrongsGreekModule"
#define DefaultsMorphHebrewModule                   @"DefaultsMorphHebrewModule"
#define DefaultsMorphGreekModule                    @"DefaultsMorphGreekModule"
#define DefaultsDailyDevotionModule                 @"DefaultsDailyDevotionModule"

// indexing defaults
#define DefaultsBackgroundIndexerEnabled            @"DefaultsBackgroundIndexerEnabled"
#define DefaultsRemoveIndexOnModuleRemoval          @"DefaultsRemoveIndexOnModuleRemoval"
#define DefaultsIndexedSearchBookSets               @"DefaultsIndexedSearchBookSets"

// UI defaults
#define DefaultsShowLSBWorkspace                    @"DefaultsShowLSBWorkspace"
#define DefaultsShowLSBSingle                       @"DefaultsShowLSBSingle"
#define DefaultsShowRSBWorkspace                    @"DefaultsShowRSBWorkspace"
#define DefaultsShowRSBSingle                       @"DefaultsShowRSBSingle"
#define DefaultsLSBWidth                            @"DefaultsLSBWidth"
#define DefaultsRSBWidth                            @"DefaultsRSBWidth"
#define DefaultsShowHUDPreview                      @"DefaultsShowHUDPreview"
#define DefaultsShowDailyDevotionOnStartupKey       @"DefaultsShowDailyDevotionOnStartupKey"
#define DefaultsShowPreviewToolTip                  @"DefaultsShowPreviewToolTip"
#define DefaultsTextBackgroundColor                 @"DefaultsTextBackgroundColor"
#define DefaultsTextForegroundColor                 @"DefaultsTextForegroundColor"
#define DefaultsTextHighlightColor                  @"DefaultsTextHighlightColor"
#define DefaultsLinkUnderlineAttribute              @"DefaultsLinkUnderlineAttribute"
#define DefaultsLinkForegroundColor                 @"DefaultsLinkForegroundColor"
#define DefaultsLinkBackgroundColor                 @"DefaultsLinkBackgroundColor"
#define DefaultsHeadingsForegroundColor             @"DefaultsHeadingsForegroundColor"
#define DefaultsHeadingsBackgroundColor             @"DefaultsHeadingsBackgroundColor"

// confirmations
#define DefaultsShowFullScreenConfirm               @"DefaultsShowFullScreenConfirm"
#define DefaultsCreateCluceneConfirm                @"DefaultsCreateCluceneConfirm"
#define DefaultsModInstallerRestartReadConfirm      @"DefaultsModInstallerRestartReadConfirm"

@class SwordManager;

@interface MBPreferenceController : NSWindowController <NSTableViewDataSource, NSTableViewDelegate, NSWindowDelegate> {
	// global stuff
	IBOutlet NSButton *okButton;
	IBOutlet NSTabView *prefsTabView;
	
    IBOutlet NSFontManager *fontManager;
    IBOutlet NSTextField *bibleFontTextField;
    NSFont *bibleDisplayFont;
    
	// the views
	IBOutlet NSView *generalView;
    NSRect generalViewRect;

	IBOutlet NSView *bibleDisplayView;
    NSRect bibleDisplayViewRect;

    IBOutlet NSView *moduleFontsView;
    IBOutlet NSTableView *moduleFontsTableView;
    NSRect moduleFontsViewRect;
    NSString *currentModuleName;
	BOOL moduleFontAction;
    
    IBOutlet NSView *printPrefsView;
    NSRect printPrefsViewRect;
    
	// the window the sheet shall come up
	NSWindow *sheetWindow;
    
	// set delegate
	id __strong delegate;
	
	// return code of sheet
	int sheetReturnCode;
	
	// margins
	int northMargin;
	int southMargin;
	int sideMargin;
	int topTabViewMargin;
}

@property (strong, readwrite) id delegate;
@property (strong, readwrite) NSWindow *sheetWindow;

// the default prefs controller
+ (MBPreferenceController *)defaultPrefsController;
+ (void)registerDefaults;

- (id)initWithDelegate:(id)aDelegate;

/** returns a copy of the default web preferences */
- (WebPreferences *)defaultWebPreferences;
- (WebPreferences *)defaultWebPreferencesForModuleName:(NSString *)aModName;

- (NSArray *)moduleNamesOfTypeBible;
- (NSArray *)moduleNamesOfTypeDictionary;
- (NSArray *)moduleNamesOfTypeStrongsGreek;
- (NSArray *)moduleNamesOfTypeStrongsHebrew;
- (NSArray *)moduleNamesOfTypeDailyDevotion;

// get font for module
- (NSFont *)normalDisplayFontForModuleName:(NSString *)aModName;
- (NSFont *)boldDisplayFontForModuleName:(NSString *)aModName;

// begin sheet
- (void)beginSheetForWindow:(NSWindow *)docWindow;
- (void)endSheet;
// sheet return code
- (int)sheetReturnCode;
// end sheet callback
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;

// actions
- (IBAction)toggleBackgroundIndexer:(id)sender;
- (IBAction)openFontsPanel:(id)sender;
- (IBAction)resetModuleFont:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/localemgr.h<|end_filename|>
/******************************************************************************
 *
 *  localemgr.h -	definition of class LocaleMgr used to interact with
 *			registered locales for a sword installation
 *
 * $Id: localemgr.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef LOCALEMGR_H
#define LOCALEMGR_H

#include <map>
#include <list>

#include <defs.h>
#include <swbuf.h>

SWORD_NAMESPACE_START

class SWLocale;
 
typedef std::list<SWBuf> StringList;
typedef std::map < SWBuf, SWLocale *, std::less < SWBuf > > LocaleMap;
/**
* The LocaleMgr class handles all the different locales of Sword.
* It provides functions to get a list of all available locales,
* to get the default locale name and to get it.
* The other functions are not interesting for frontend programmers.
*
* To get the default locale name use @see getDefaultLocaleName
* To set the default locale name use @see setDefaultLocaleName
* To get the locale for a language name use @see getLocale
* To get a list of availble locales use @see getAvailableLocales
*/
class SWDLLEXPORT LocaleMgr {
private:
	void deleteLocales();
	char *defaultLocaleName;
	LocaleMgr(const LocaleMgr &);
	friend class __staticsystemLocaleMgr;
protected:
	LocaleMap *locales;
	static LocaleMgr *systemLocaleMgr;

public:

	/** Default constructor of  LocaleMgr
	* You do normally not need this constructor, use LocaleMgr::getSystemLocaleMgr() instead.
	*/
	LocaleMgr(const char *iConfigPath = 0);

	/**
	* Default destructor of LocaleMgr
	*/
	virtual ~LocaleMgr();

	/** Get the locale connected with the name "name".
	*
	* @param name The name of the locale you want to have. For example use getLocale("de") to get the locale for the German language.
	* @return Returns the locale object if the locale with the name given as parameter was found. If it wasn't found return NULL.
	*/
	virtual SWLocale *getLocale(const char *name);

	/** Get the list of available locales.
	*
	* @return Returns a list of strings, which contains the names of the available locales.
	*/
	virtual StringList getAvailableLocales();

	/** Returns translated text.
	* This function uses both parameters to return the translated version of the given text.
	*
	* @param text The text to translate into the language given by the first parameter.
	* @param localeName The name of the locale Sword should use
	* @return Returns the translated text.
	*/
	virtual const char *translate(const char *text, const char *localeName = 0);

	/** Get the default locale name. To set it use @see setDefaultLocaleName
	*
	* @return Returns the default locale name
	*/
	virtual const char *getDefaultLocaleName();

	/** Set the new standard locale of Sword.
	*
	* @param name The name of the new default locale  
	*/
	virtual void setDefaultLocaleName(const char *name);

	/** The LocaleMgr object used globally in the Sword world.
	* Do not create your own LocaleMgr, use this static object instead.
	*/
	static LocaleMgr *getSystemLocaleMgr();
	static void setSystemLocaleMgr(LocaleMgr *newLocaleMgr);

	/** Augment this localmgr with all locale.conf files in a directory
	*/
	virtual void loadConfigDir(const char *ipath);

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/url.h<|end_filename|>
/******************************************************************************
 *
 *  url.h -	code for an URL parser utility class
 *
 * $Id: url.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2004-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef URL_H
#define URL_H

#include <swbuf.h>
#include <map>

SWORD_NAMESPACE_START

/** URL provides URL parsing
 * The URL class provides an interface to work on the data of an URL like "http://www.crosswire.org/index.jsp?page=test&amp;user=nobody"
 */
class SWDLLEXPORT URL {
public:
	typedef std::map<SWBuf, SWBuf> ParameterMap;
	
	/** Constructor.
	 * @param url The url string which should be parsed into protocol, hostname, path and paramters
	 */
	URL(const char *url);
	
	/** Get the protocol.
	* @return The protocol, e.g. "http" for an url like "http://www.crosswire.org/index.jsp?page=help"
	*/
	const char *getProtocol() const;
	/** Get the hostname
	* @return The hostname, e.g. "www.crosswire.org" for an url like "http://www.crosswire.org/index.jsp?page=help"
	*/
	const char *getHostName() const;
	/** Get the path
	* @return The path, e.g. "/index.jsp" for an url like "http://www.crosswire.org/index.jsp?page=help"
	*/
	const char *getPath() const;
	
	/** All available paramters
	* @return The map which contains the parameters and their values
	*/
	const ParameterMap &getParameters() const;
	
	/**
	 * Returns the value of an URL parameter. For the URL "http://www.crosswire.org/index.jsp?page=test&amp;user=nobody" the value of the parameter "page" would be "test".
	 * If the parameter is not set an empty string is returned.
	 * @param name The name of the paramter.
	 * @return The value of the given paramter of an empty string if the name could not be found in the list of available paramters
	 */
	const char *getParameterValue(const char *name) const;
	
	/** Encodes and URL
	* Encodes a string into a valid URL, e.g. changes http://www.crosswire.org/test.jsp?force=1&help=1 into
	* http://www.crosswire.org/test.jsp?force=1&amp;help=1
	* This function works on the data of the buf parameter.
	*
	* WARNING: It doesn't check if the URL is encoded already, so http://www.crosswire.org/test.jsp?force=1&amp;help=1 becomes http://www.crosswire.org/test.jsp?force=1&amp;amp;help=1
	*/
	static const SWBuf encode(const char *urlText);	
	static const SWBuf decode(const char *encodedText);
	
private:
	/** Parse
	 * Parse the URL into protocol, hostname, path, page and paramters
	 */
	void parse();
		
	SWBuf url;
	SWBuf protocol;
	SWBuf hostname;
	SWBuf path;
	ParameterMap parameterMap;
};

SWORD_NAMESPACE_END

#endif //URL_H


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordInstallSource.h<|end_filename|>
//
//  SwordInstallSource.h
//  Eloquent
//
//  Created by <NAME> on 13.08.07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SwordModule.h"

#ifdef __cplusplus
#include <swmgr.h>
#include <installmgr.h>
#endif

@class SwordManager;
@class SwordInstallSourceManager;

#define INSTALLSOURCE_TYPE_FTP  @"FTP"

@interface SwordInstallSource : NSObject

- (id)init;
#ifdef __cplusplus
- (id)initWithSource:(sword::InstallSource *)is;
#endif
- (id)initWithType:(NSString *)aType;

@property (retain, readwrite) NSString *caption;
@property (retain, readwrite) NSString *type;
@property (retain, readwrite) NSString *source;
@property (retain, readwrite) NSString *directory;
@property (readwrite) BOOL deleteOnDealloc;

- (BOOL)isLocalSource;

// get config entry
- (NSString *)configEntry;

// install module
- (void)installModuleWithName:(NSString *)mName 
                 usingManager:(SwordManager *)swManager 
        withInstallController:(SwordInstallSourceManager *)sim;

/** List of available InstallSources */
- (NSDictionary *)allModules;

/** List of modules for given type */
- (NSArray *)listModulesForType:(ModuleType)aType;

/** list module types */
- (NSArray *)listModuleTypes;

/** Returns the SwordManager attached to this SwordInstallSource */
- (SwordManager *)swordManager;

#ifdef __cplusplus
- (sword::InstallSource *)installSource;
#endif

@end


<|start_filename|>src/UserInterface/RightSideBarViewController.h<|end_filename|>
//
//  RightSideBarViewController.h
//  Eloquent
//
//  Created by <NAME> on 18.12.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "SideBarViewController.h"

#define RIGHTSIDEBARVIEW_NIBNAME   @"RightSideBarView"


@interface RightSideBarViewController : SideBarViewController {
    IBOutlet NSBox *placeholderView;
}

- (id)initWithDelegate:(id)aDelegate;

- (void)setContentView:(NSView *)aView;
- (NSView *)contentView;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordModuleTextEntry.h<|end_filename|>
//
//  SwordModuleTextEntry.h
//  MacSword2
//
//  Created by <NAME> on 03.10.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>

@class SwordKey;

@interface SwordModuleTextEntry : NSObject

@property (retain, readonly) NSString *key;
@property (retain, readonly) NSString *text;

+ (id)textEntryForKey:(NSString *)aKey andText:(NSString *)aText;
- (id)initWithKey:(NSString *)aKey andText:(NSString *)aText;

@end


<|start_filename|>src/UserInterface/SearchTextFieldOptions.h<|end_filename|>
//
//  SearchTextFieldOptions.h
//  Eloquent
//
//  Created by <NAME> on 22.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface SearchTextFieldOptions : NSObject {
    BOOL continuous;
    BOOL sendsSearchStringImmediately;
    BOOL sendsWholeSearchString;
}

@property (readwrite) BOOL continuous;
@property (readwrite) BOOL sendsSearchStringImmediately;
@property (readwrite) BOOL sendsWholeSearchString;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/cipherfil.h<|end_filename|>
/***************************************************************************
 *
 *  cipherfil.h -	
 *
 * $Id: cipherfil.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef CIPHERFIL_H
#define CIPHERFIL_H

#include <swfilter.h>

SWORD_NAMESPACE_START

class SWCipher;

class SWDLLEXPORT CipherFilter:public SWFilter {
	SWCipher *cipher;
public:
	CipherFilter(const char *key);
	virtual ~CipherFilter();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule * = 0);
	virtual SWCipher *getCipher();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawld.h<|end_filename|>
/******************************************************************************
 *
 *  rawld.cpp -	code for class 'RawLD'- a module that reads raw lexicon and
 *		dictionary files: *.dat *.idx
 *
 * $Id: rawld.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWLD_H
#define RAWLD_H

#include <rawstr.h>
#include <swld.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT RawLD : public RawStr, public SWLD {
	char getEntry(long away = 0) const;

public:


	RawLD(const char *ipath, const char *iname = 0, const char *idesc = 0,
			SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, bool caseSensitive = false, bool strongsPadding = true);

	virtual ~RawLD();
	virtual SWBuf &getRawEntryBuf() const;

	virtual void increment(int steps = 1);
	virtual void decrement(int steps = 1) { increment(-steps); }
	// write interface ----------------------------
	virtual bool isWritable() const;
	static char createModule(const char *path) { return RawStr::createModule (path); }

	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
	virtual void linkEntry(const SWKey *linkKey);	// Link current module entry to other module entry
	virtual void deleteEntry();	// Delete current module entry
	// end write interface ------------------------
	virtual long getEntryCount() const;
	virtual long getEntryForKey(const char *key) const;
	virtual char *getKeyForEntry(long entry) const;


	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/BibleCombiViewController.h<|end_filename|>
//
//  BibleCombiViewController.h
//  Eloquent
//
//  Created by <NAME> on 15.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ProtocolHelper.h"
#import "ModuleCommonsViewController.h"

#define BIBLECOMBIVIEW_NIBNAME   @"BibleCombiView"

@class SwordModule, SwordBible, SwordCommentary, ScrollSynchronizableView;

@interface BibleCombiViewController : ModuleCommonsViewController <NSCoding, ModuleProviding, SubviewHosting> {
    IBOutlet NSTextField *lookupTF;
    IBOutlet NSButton *okBtn;
    
    IBOutlet NSSplitView *horiSplitView;
    IBOutlet NSSplitView *parBibleSplitView;
    IBOutlet NSSplitView *parMiscSplitView;
        
    NSMutableArray *parBibleViewControllers;
    NSMutableArray *parMiscViewControllers;
    
    // default width parMiscSplitView
    float defaultMiscViewHeight;
    
    // the current right ScrollSynchronizableView
    ScrollSynchronizableView *currentSyncView;
    
    // progressAction
    BOOL progressControl;
    int progressStartedCounter;
}

// initializers
- (id)initWithDelegate:(id)aDelegate;
- (id)initWithModule:(SwordBible *)aBible delegate:(id)aDelegate;

// methods
- (void)addNewBibleViewWithModule:(SwordModule *)aModule;
- (void)addNewCommentViewWithModule:(SwordCommentary *)aModule;
- (NSArray *)openBibleModules;
- (NSArray *)openMiscModules;
- (NSNumber *)bibleViewCount;

// ModuleProviding
- (SwordModule *)module;

// SubviewHosting
- (void)addContentViewController:(ContentDisplayingViewController *)aViewController;
- (void)contentViewInitFinished:(HostableViewController *)aViewController;
- (void)removeSubview:(HostableViewController *)aViewController;

@end


<|start_filename|>src/UserInterface/HUDPreviewController.h<|end_filename|>
//
//  HUDPreviewController.h
//  Eloquent
//
//  Created by <NAME> on 10.12.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import <ObjCSword/SwordModule.h>

#define PreviewDisplayTypeKey   @"PreviewDisplayTypeKey"
#define PreviewDisplayTextKey   @"PreviewDisplayTextKey"

@interface HUDPreviewController : NSWindowController <NSWindowDelegate> {
    
    IBOutlet NSBox *placeholderView;
    IBOutlet NSTextField *previewType;
    IBOutlet NSTextView *previewText;
    
    IBOutlet id __strong delegate;
}

@property (strong, readwrite) id delegate;

+ (NSDictionary *)previewDataFromDict:(NSDictionary *)previewData;
+ (NSDictionary *)previewDataFromDict:(NSDictionary *)previewData forRenderType:(RenderType)textType;

- (id)initWithDelegate:(id)aDelegate;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swcomprs.h<|end_filename|>
/******************************************************************************
 *
 *  swcomprs.h -	definition of Class SWCompress used for data
 *			compression
 *
 * $Id: swcomprs.h 3122 2014-03-14 08:08:28Z chrislit $
 *
 * Copyright 1996-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWCOMPRS_H
#define SWCOMPRS_H

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT SWCompress
{
  void Init ();
  void cycleStream ();
protected:
  char *buf, *zbuf, direct;	// 0 - encode; 1 - decode
  unsigned long zlen, zpos, pos, slen;
  int level;
public:
  SWCompress ();
  virtual ~ SWCompress ();
  virtual char *Buf (const char *buf = 0, unsigned long *len = 0);
  virtual char *zBuf (unsigned long *len, char *buf = 0);
  virtual unsigned long GetChars (char *buf, unsigned long len);	// override for other than buffer compression
  virtual unsigned long SendChars (char *buf, unsigned long len);	// override for other than buffer compression
  virtual void Encode (void);	// override to provide compression algorythm
  virtual void Decode (void);	// override to provide compression algorythm
  virtual void setLevel(int l) {level = l;};
  virtual int getLevel() {return level;};
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/BibleCombiViewController+ViewSynchronisation.h<|end_filename|>
//
//  BibleCombiViewController+ViewSynchronisation.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "BibleCombiViewController.h"


@interface BibleCombiViewController (ViewSynchronisation)

- (void)stopScrollSynchronizationForView:(NSScrollView *)aView;
- (void)establishScrollSynchronization:(NSScrollView *)scrollView;
- (void)synchronizedViewContentBoundsDidChange:(NSNotification *)aNotification;

- (NSRange)rangeFromViewableFirstLineInTextView:(NSTextView *)theTextView lineRect:(NSRect *)lineRect;
- (NSString *)verseMarkerInTextLine:(NSAttributedString *)text;
- (NSRect)rectForTextRange:(NSRange)range inTextView:(NSTextView *)textView;
- (NSRect)rectForAttributeName:(NSString *)attrName attributeValue:(id)attrValue inTextView:(NSTextView *)textView;
- (NSString *)verseMarkerOfFirstLineOfTextView:(ScrollSynchronizableView *)syncView;

@end


<|start_filename|>externals/PSMTabBarControl/source/PSMDarkTabStyle.h<|end_filename|>
//
//  PSMDarkTabStyle.h
//  iTerm
//
//  Created by <NAME> on 10/28/14.
//
//

#import <Cocoa/Cocoa.h>
#import "PSMTabStyle.h"
#import "PSMYosemiteTabStyle.h"

@interface PSMDarkTabStyle : PSMYosemiteTabStyle<PSMTabStyle>
@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swgenbook.h<|end_filename|>
/******************************************************************************
 *
 *  swgenbook.h -	Implementation of SWGenBook
 *
 * $Id: swgenbook.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWGENBOOK_H
#define SWGENBOOK_H

#include <defs.h>

#include <swmodule.h>
#include <treekey.h>


SWORD_NAMESPACE_START

/** The basis for all Book modules.
*/
class SWDLLEXPORT SWGenBook : public SWModule {

protected:
	mutable char *entkeytxt;
	mutable TreeKey *tmpTreeKey;
	TreeKey &getTreeKey(const SWKey *k = 0) const;

public:
	/** Initializes data for instance of SWGenBook
	*/
	SWGenBook(const char *imodname = 0, const char *imoddesc = 0,
			SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);

	virtual ~SWGenBook();
	virtual SWKey *createKey() const = 0;


	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/CommentaryViewController.h<|end_filename|>
//
//  CommentaryViewController.h
//  Eloquent
//
//  Created by <NAME> on 18.08.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "BibleViewController.h"

@class BibleViewController, SwordCommentary, ExtTextViewController;

#define COMMENTARYVIEW_NIBNAME   @"CommentaryView"

/** the view of this view controller is a ScrollSynchronizableView */
@interface CommentaryViewController : BibleViewController <NSCoding> {
    IBOutlet NSButton *editButton;
    BOOL editEnabled;
}

// ---------- initializers ---------
- (id)initWithModule:(SwordCommentary *)aModule;
- (id)initWithModule:(SwordCommentary *)aModule delegate:(id)aDelegate;

// ---------- methods --------------
// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

// actions
- (IBAction)toggleEdit:(id)sender;
/** we are overriding this method so user can just press <Command>S to save */
- (IBAction)saveDocument:(id)sender;

@end


<|start_filename|>src/Preferences/NSMutableDictionary+ModuleDisplaySettings.h<|end_filename|>
//
//  NSMutableDictionary+ModuleDisplaySettings.h
//  Eloquent
//
//  Created by <NAME> on 15.12.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface NSMutableDictionary (ModuleDisplaySettings)

- (void)setDisplayFont:(NSFont *)aFont;
- (void)setDisplayFontBold:(NSFont *)aFont;
- (void)setDisplayDefaultFonts;

@end


<|start_filename|>src/UserInterface/SingleViewHostController.h<|end_filename|>
//
//  SingleViewHostController.h
//  Eloquent
//
//  Created by <NAME> on 16.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import <ObjCSword/SwordModule.h>

#define SINGLEVIEWHOST_NIBNAME   @"SingleViewHost"

@class HostableViewController;
@class SwordModule;
@class SearchTextObject;
@class FileRepresentation;

@interface SingleViewHostController : WindowHostController <NSCoding> {
}

// methods
- (NSView *)contentView;
- (void)setContentView:(NSView *)aView;

// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swcacher.h<|end_filename|>
/******************************************************************************
 *
 *  swcacher.h -	definition of class SWCacher used to provide an
 *			interface for objects that cache and want a standard
 *			interface for cleaning up.
 *
 * $Id: swcacher.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWCACHER_H
#define SWCACHER_H

#include <defs.h>

SWORD_NAMESPACE_START

/** used to provide an interface for objects that cache and want
 *	a standard interface for cleaning up.
 */
class SWDLLEXPORT  SWCacher {
public:
	SWCacher();
	virtual ~SWCacher();
	virtual void flush();
	virtual long resourceConsumption();
	virtual long lastAccess();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>externals/PSMTabBarControl/source/PSMTabDragWindow.h<|end_filename|>
//
//  PSMTabDragWindow.h
//  PSMTabBarControl
//
//  Created by <NAME> on 6/1/06.
//  Copyright 2006 <NAME>. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class PSMTabBarCell;

@interface PSMTabDragWindow : NSWindow {
	PSMTabBarCell *_cell;
	NSImageView *_imageView;
}
+ (PSMTabDragWindow *)dragWindowWithTabBarCell:(PSMTabBarCell *)cell image:(NSImage *)image styleMask:(unsigned int)styleMask;

- (id)initWithTabBarCell:(PSMTabBarCell *)cell image:(NSImage *)image styleMask:(unsigned int)styleMask;
- (NSImage *)image;
@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/multimapwdef.h<|end_filename|>
/******************************************************************************
 *
 *  multimapwdef.h -	Implementation of multimapwithdefault
 *
 * $Id: multimapwdef.h 2935 2013-08-02 11:06:30Z scribe $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef MULTIMAPWDEF_H
#define MULTIMAPWDEF_H

#include <map>

SWORD_NAMESPACE_START

// multmap that still lets you use [] to reference FIRST
// entry of a key if multiples exist
template <class Key, class T, class Compare>
class multimapwithdefault : public std::multimap<Key, T, Compare> {
public:
	typedef std::pair<const Key, T> value_type;
	T& getWithDefault(const Key& k, const T& defaultValue) {
		if (find(k) == this->end()) {
			insert(value_type(k, defaultValue));
		}
		return (*(find(k))).second;
	}

	T& operator[](const Key& k) {
		if (this->find(k) == this->end()) {
			this->insert(value_type(k, T()));
		}
		return (*(this->find(k))).second;
	}
	bool has(const Key& k, const T &val) const {
		typename std::multimap<Key, T, Compare>::const_iterator start = this->lower_bound(k);
		typename std::multimap<Key, T, Compare>::const_iterator end = this->upper_bound(k);
		for (; start!=end; start++) {
			if (start->second == val)
				return true;
		}
		return false;
	}
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/utilstr.h<|end_filename|>
/******************************************************************************
 *
 *  utilstr.h -	prototypes for string utility functions
 *
 * $Id: utilstr.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef UTILSTR_H
#define UTILSTR_H

#include <defs.h>
#include <sysdata.h>
#include <swbuf.h>

SWORD_NAMESPACE_START


/******************************************************************************
 * stdstr - clones a string
 *
 * ENT:	ipstr	- pointer to a string pointer to set if necessary
 *	istr	- string to set to *ipstr
 *			0 - only get
 *
 * RET:	*ipstr
 */

inline char *stdstr(char **ipstr, const char *istr, unsigned int memPadFactor = 1) {
	if (*ipstr)
		delete [] *ipstr;
	if (istr) {
		int len = (int)strlen(istr) + 1;
		*ipstr = new char [ len * memPadFactor ];
		memcpy(*ipstr, istr, len);
	}
	else *ipstr = 0;
	return *ipstr;
}

SWDLLEXPORT char *strstrip (char *istr);
SWDLLEXPORT const char *stristr (const char *s1, const char *s2);
SWDLLEXPORT int strnicmp(const char *s1, const char *s2, int len);
SWDLLEXPORT int stricmp(const char *s1, const char *s2);

/******************************************************************************
 * SW_toupper - array of uppercase values for any given Latin-1 value
 *
 * use this instead of toupper() for fast lookups on accented characters
 */
extern const unsigned char SW_toupper_array[256];
#define SW_toupper(c) SW_toupper_array[(unsigned char)c]

/******************************************************************************
 * getUniCharFromUTF8 - retrieves the next Unicode codepoint from a UTF8 string
 * 					and increments buf to start of next codepoint
 *
 * ENT:	buf - address of a utf8 buffer
 *
 * RET:	buf - incremented past last byte used in computing the current codepoint
 * 		unicode codepoint value (0 with buf incremented is invalid UTF8 byte
 */


/******************************************************************************
 * getUniCharFromUTF8 - retrieves the next Unicode codepoint from a UTF8 string
 * 					and increments buf to start of next codepoint
 *
 * ENT:	buf - address of a utf8 buffer
 *
 * RET:	buf - incremented past last byte used in computing the current codepoint
 * 		unicode codepoint value (0 with buf incremented is invalid UTF8 byte
 */

inline __u32 getUniCharFromUTF8(const unsigned char **buf, bool skipValidation = false) {
	__u32 ch = 0;

	//case: We're at the end
	if (!(**buf)) {
		return ch;
	}

	//case: ANSI
	if (!(**buf & 128)) {
		ch = **buf;
		(*buf)++;
		return ch;
	}

	//case: Invalid UTF-8 (illegal continuing byte in initial position)
	if ((**buf >> 6) == 2) {
		(*buf)++;
		return ch;
	}


	//case: 2+ byte codepoint
	int subsequent = 1;
	if ((**buf & 32) == 0) { subsequent = 1; }
	else if ((**buf & 16) == 0) { subsequent = 2; }
	else if ((**buf &  8) == 0) { subsequent = 3; }
	else if ((**buf &  4) == 0) { subsequent = 4; }
	else if ((**buf &  2) == 0) { subsequent = 5; }
	else if ((**buf &  1) == 0) { subsequent = 6; }
	else subsequent = 7; // is this legal?

	ch = **buf & (0xFF>>(subsequent + 1));

	for (int i = 1; i <= subsequent; ++i) {
		// subsequent byte did not begin with 10XXXXXX
		// move our buffer to here and error out
		// this also catches our null if we hit the string terminator
		if (((*buf)[i] >> 6) != 2) {
			*buf += i;
			return 0;
		}
		ch <<= 6;
		ch |= (*buf)[i] & 63;
	}
	*buf += (subsequent+1);

	if (!skipValidation) {
		// I THINK THIS IS STUPID BUT THE SPEC SAYS NO MORE THAN 4 BYTES
		if (subsequent > 3) ch = 0;
		// AGAIN stupid, but spec says UTF-8 can't use more than 21 bits
		if (ch > 0x1FFFFF) ch = 0;
		// This would be out of Unicode bounds
		if (ch > 0x10FFFF) ch = 0;
		// these would be values which could be represented in less bytes
		if (ch < 0x80 && subsequent > 0) ch = 0;
		if (ch < 0x800 && subsequent > 1) ch = 0;
		if (ch < 0x10000 && subsequent > 2) ch = 0;
		if (ch < 0x200000 && subsequent > 3) ch = 0;
	}

	return ch;
}


/******************************************************************************
 * getUTF8FromUniChar - retrieves us UTF8 string from a
 * 					Unicode codepoint
 *
 * ENT:	uchar - unicode codepoint value
 *
 * RET:	buf - a UTF8 string which consists of the proper UTF8 sequence of
 * 				bytes for the given Unicode codepoint
 * NOTE: for speed and thread safety, this method now requires a buffer
 * 		to work with
 */

inline SWBuf *getUTF8FromUniChar(__u32 uchar, SWBuf *appendTo) {
	unsigned long base = appendTo->size();

	// This would be out of Unicode bounds
	if (uchar > 0x10FFFF) uchar = 0xFFFD;
	char bytes = uchar < 0x80 ? 1 : uchar < 0x800 ? 2 : uchar < 0x10000 ? 3 : 4;
	appendTo->setSize(base+bytes);
	switch (bytes) {
	case 1:
		(*appendTo)[base  ] = (unsigned char)uchar;
		break;
	case 2:
		(*appendTo)[base+1] = (unsigned char)(0x80 | (uchar & 0x3f));
		uchar >>= 6;
		(*appendTo)[base  ] = (unsigned char)(0xc0 | (uchar & 0x1f));
		break;
	case 3:
		(*appendTo)[base+2] = (unsigned char)(0x80 | (uchar & 0x3f));
		uchar >>= 6;
		(*appendTo)[base+1] = (unsigned char)(0x80 | (uchar & 0x3f));
		uchar >>= 6;
		(*appendTo)[base  ] = (unsigned char)(0xe0 | (uchar & 0x0f));
		break;
	case 4:
		(*appendTo)[base+3] = (unsigned char)(0x80 | (uchar & 0x3f));
		uchar >>= 6;
		(*appendTo)[base+2] = (unsigned char)(0x80 | (uchar & 0x3f));
		uchar >>= 6;
		(*appendTo)[base+1] = (unsigned char)(0x80 | (uchar & 0x3f));
		uchar >>= 6;
		(*appendTo)[base  ] = (unsigned char)(0xf0 | (uchar & 0x07));
		break;
	}
/*
	else if (uchar < 0x4000000) {
		appendTo->setSize(base+5);
		i = uchar & 0x3f;
		(*appendTo)[base+4] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+3] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+2] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+1] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x03;
		(*appendTo)[base] = (unsigned char)(0xf8 | i);
	}
	else if (uchar < 0x80000000) {
		appendTo->setSize(base+6);
		i = uchar & 0x3f;
		(*appendTo)[base+5] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+4] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+3] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+2] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x3f;
		(*appendTo)[base+1] = (unsigned char)(0x80 | i);
		uchar >>= 6;

		i = uchar & 0x01;
		(*appendTo)[base] = (unsigned char)(0xfc | i);
	}
*/
	return appendTo;
}


/******************************************************************************
 * assureValidUTF8 - iterates the supplied UTF-8 buffer and checks for validity
 * 					replacing invalid bytes if necessary and returning a
 *					verified UTF8 buffer, leaving the original input
 *					unchanged.
 *
 * ENT:	buf - a utf8 buffer
 *
 * RET:	input buffer validated and any problems fixed by substituting a
 * 		replacement character for bytes not valid.
 */
SWBuf assureValidUTF8(const char *buf);

/****
 * This can be called to convert a UTF8 stream to an SWBuf which manages
 *	a wchar_t[]
 *	access buffer with (wchar_t *)SWBuf::getRawData();
 * 
 */
SWBuf utf8ToWChar(const char *buf);

/****
 * This can be called to convert a wchar_t[] to a UTF-8 SWBuf
 * 
 */
SWBuf wcharToUTF8(const wchar_t *buf);



SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swoptfilter.h<|end_filename|>
/***************************************************************************
 *
 *  swoptfilter.h -	Implenetation of SWOptionFilter
 *
 * $Id: swoptfilter.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWOPTFILTER_H
#define SWOPTFILTER_H

#include <swfilter.h>
#include <swbuf.h>
#include <list>

SWORD_NAMESPACE_START

/**
* The type definitoin for option types
*/
typedef std::list < SWBuf > StringList;


  /** Base class for all option filters.
  */
class SWDLLEXPORT SWOptionFilter : public virtual SWFilter {
protected:
	SWBuf optionValue;
	const char *optName;
	const char *optTip;
	const StringList *optValues;
	bool option;
	bool isBooleanVal;
public:

	SWOptionFilter();
	SWOptionFilter(const char *oName, const char *oTip, const StringList *oValues);
	virtual ~SWOptionFilter();


	/** many options are simple Off/On boolean type, and frontends may wish to show these
	 * with checkmarks or the like to the end user.  This is a convenience method
	 * to allow a frontend to check if this filter has only Off/On values
	 */
	bool isBoolean() { return isBooleanVal; }

	/** gets the name of the option of this filter
	 * @return option name
	 */
	virtual const char *getOptionName() { return optName; }

	/** gets a short explanation of the option of this filter;
	 * it could be presented to the user in frontend programs
	 * @return option tip/explanation
	 */
	virtual const char *getOptionTip() { return optTip; }

	/** returns a list of the possible option values
	 * 
	 * @return list of option values
	 */
	virtual StringList getOptionValues() { return *optValues; }

	/** @return The value of the current option.
	*/
	virtual const char *getOptionValue();

	/** sets the value of the option of this filter,
	 * e.g maybe a strong's filter might be set to "On" / "Off" -
	 * that would mean to show or not to show the strongs in the text,
	 * see also getOptionValues()
	 * @param ival the new option value
	 */
	virtual void setOptionValue(const char *ival);

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/GradientCell.h<|end_filename|>
//
//  GradientCell.h
//  Eloquent
//
//  Created by <NAME> on 06.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface GradientCell : NSCell {
}

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swobject.h<|end_filename|>
/******************************************************************************
 *
 *  swobject.h -	definition for SWObject used as lowest base class for
 *			many SWORD objects
 *
 * $Id: swobject.h 3433 2016-08-17 13:25:41Z scribe $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWOBJECT_H
#define SWOBJECT_H

#include <defs.h>

SWORD_NAMESPACE_START
#define SWDYNAMIC_CAST(className, object) (className *)((object)?((object->getClass()->isAssignableFrom(#className))?object:0):0)

/**
* Class used for SWDYNAMIC_CAST to save the inheritance order.
*/
class SWDLLEXPORT SWClass {
private:
	const char **descends;

public:
	SWClass(const char **descends) {
		this->descends = descends;
	}

	bool isAssignableFrom(const char *className) const;
};

/** Base class for major Sword classes.
* SWObject is the base class for major Sword classes like SWKey.
* It is used because dynamic_cast is not available on all plattforms supported
* by Sword. Use SWDYNAMIC_CAST(classname, object) instead of dynamic_cast<classname>(object).
*/
class SWDLLEXPORT SWObject {
protected:
	SWClass * myclass;
     
public:
	/** Use this to get the class definition and inheritance order.
	* @return The class definition of this object
	*/
	const SWClass *getClass () const {
		return myclass;
	}
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/encfiltmgr.h<|end_filename|>
/******************************************************************************
 *
 *  encfiltmgr.h -	definition of class SWEncodingMgr, subclass of
 *			used to transcode all module text to a requested
 *			markup
 *
 * $Id: encfiltmgr.h 3076 2014-03-05 04:49:08Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ENCFILTERMGR_H
#define ENCFILTERMGR_H

#include <swfiltermgr.h>

SWORD_NAMESPACE_START

class SWFilter;

/** This class is like a normal SWMgr,
  * but you can additonally specify which encoding
  * you want to use.
  */

class SWDLLEXPORT EncodingFilterMgr : public SWFilterMgr {

protected:
	SWFilter *latin1utf8;
	SWFilter *scsuutf8;
	SWFilter *utf16utf8;
	SWFilter *targetenc;


	/*
	 * current encoding value
	 */        
	char encoding;

public:


	/** Constructor of SWEncodingMgr.
	 *
	 * @param encoding The desired encoding.
	 */
	EncodingFilterMgr (char encoding = ENC_UTF8);

	/**
	 * The destructor of SWEncodingMgr.
	 */
	~EncodingFilterMgr();

	/** Markup sets/gets the encoding after initialization
	 * 
	 * @param enc The new encoding or ENC_UNKNOWN if you just want to get the current markup.
	 * @return The current (possibly changed) encoding format.
	 */
	char Encoding(char enc);

	/**
	 * Adds the raw filters which are defined in "section" to the SWModule object "module".
	 * @param module To this module the raw filter(s) are added
	 * @param section We use this section to get a list of filters we should apply to the module
	 */
	virtual void AddRawFilters(SWModule *module, ConfigEntMap &section);

	/**
	 * Adds the encoding filters which are defined in "section" to the SWModule object "module".
	 * @param module To this module the encoding filter(s) are added
	 * @param section We use this section to get a list of filters we should apply to the module
	 */
	virtual void AddEncodingFilters(SWModule *module, ConfigEntMap &section);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordInstallSourceManager.h<|end_filename|>
//
//  SwordInstallManager.h
//  Eloquent
//
//  Created by <NAME> on 13.08.07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#include <swmgr.h>
#include <installmgr.h>
#include <swconfig.h>
#include <multimapwdef.h>
using sword::SWModule;
using sword::InstallMgr;
#endif

@class SwordInstallSource;
@class SwordModule;
@class SwordManager;

typedef enum _ModuleStatusConst {
    ModStatOlder = 0x001,
    ModStatSameVersion = 0x002,
    ModStatUpdated = 0x004,
    ModStatNew = 0x008,
    ModStatCiphered = 0x010,
    ModStatCipheredKeyPresent = 0x020
}ModuleStatusConst;

@interface SwordInstallSourceManager : NSObject

// ------------------- properties -------------------
/** Dictionary of InstallSources. Key: Caption */
@property (retain, readwrite) NSString *ftpUser;
@property (retain, readwrite) NSString *ftpPassword;
@property (retain, readonly) NSString *configPath;

// -------------------- methods --------------------

// initialization
+ (SwordInstallSourceManager *)defaultManager;

/**
    base path of the module installation
 */
- (id)initWithPath:(NSString *)aPath createPath:(BOOL)create;

/** marks this manager as the default one / singleton */
- (void)useAsDefaultManager;

/** init after adding or removing new modules */
- (void)initManager;

/** dictionary of all available install sources: <is.caption>:<is> */
- (NSDictionary *)allInstallSources;

// installation/unInstallation
- (int)installModule:(SwordModule *)aModule fromSource:(SwordInstallSource *)is withManager:(SwordManager *)manager;
- (int)uninstallModule:(SwordModule *)aModule fromManager:(SwordManager *)swManager;

// add/remove install sources
- (void)addInstallSource:(SwordInstallSource *)is reload:(BOOL)doReload;
- (void)removeInstallSource:(SwordInstallSource *)is reload:(BOOL)doReload;
- (void)updateInstallSource:(SwordInstallSource *)is;
- (int)refreshMasterRemoteInstallSourceList;

/** after adding or removing sources */
- (void)saveConfig;

// disclaimer
- (BOOL)userDisclaimerConfirmed;
- (void)setUserDisclaimerConfirmed:(BOOL)flag;

// list modules in sources
- (NSDictionary *)listModulesForSource:(SwordInstallSource *)is;

// remote source list
- (int)refreshInstallSource:(SwordInstallSource *)is;

// get module status
- (NSArray *)moduleStatusInInstallSource:(SwordInstallSource *)is baseManager:(SwordManager *)baseMgr;

// low level access
#ifdef __cplusplus
- (sword::InstallMgr *)installMgr;
#endif

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/curlftpt.h<|end_filename|>
/******************************************************************************
 *
 *  curlftpt.h  -	code for CURL impl of FTP Transport
 *
 * $Id: curlftpt.h 2980 2013-09-14 21:51:47Z scribe $
 *
 * Copyright 2004-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef CURLFTPT_H
#define CURLFTPT_H

#include <defs.h>
#include <remotetrans.h>

SWORD_NAMESPACE_START

class CURL;


class SWDLLEXPORT CURLFTPTransport : public RemoteTransport {
	CURL *session;

public:
	CURLFTPTransport(const char *host, StatusReporter *statusReporter = 0);
	~CURLFTPTransport();
	
	virtual char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0);
};


SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/utf8bidireorder.h<|end_filename|>
/******************************************************************************
 *
 *  utf8bidireorder.h -	Implementation of UTF8BiDiReorder
 *
 * $Id: utf8bidireorder.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef UTF8BIDIREORDER_H
#define UTF8BIDIREORDER_H

#include <swfilter.h>

#include <unicode/utypes.h>
#include <unicode/ucnv.h>
#include <unicode/uchar.h>
#include <unicode/ubidi.h>

SWORD_NAMESPACE_START

/** This Filter reorders UTF-8 text according to Unicode BiDi
 */
class SWDLLEXPORT UTF8BiDiReorder : public SWFilter {
private:
	UConverter* conv;
	UErrorCode err;
public:
	UTF8BiDiReorder();
	~UTF8BiDiReorder();  
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif



<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/thmlhtmlhref.h<|end_filename|>
/******************************************************************************
 *
 *  thmlhtmlhref.h -	Implementation of ThMLHTMLHREF
 *
 * $Id: thmlhtmlhref.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef _THMLHTMLHREF_H
#define _THMLHTMLHREF_H

#include <swbasicfilter.h>
#include <utilxml.h>

SWORD_NAMESPACE_START

/** this filter converts ThML text to HTML text with hrefs
 */
class SWDLLEXPORT ThMLHTMLHREF : public SWBasicFilter {
	SWBuf imgPrefix;
	bool renderNoteNumbers;
protected:
	class MyUserData : public BasicFilterUserData {
	public:
		MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {}
		bool inscriptRef;
		bool inSecHead;
		bool isBiblicalText;
		SWBuf version;
		XMLTag startTag;
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	ThMLHTMLHREF();
	virtual const char *getImagePrefix() { return imgPrefix.c_str(); }
	virtual void setImagePrefix(const char *newImgPrefix) { imgPrefix = newImgPrefix; }
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};
SWORD_NAMESPACE_END
#endif /* _THMLHTMLHREF_H */


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawfiles.h<|end_filename|>
/******************************************************************************
 *
 *  rawfiles.h -	code for class 'RawFiles'- a module that produces HTML
 *			HREFs pointing to actual text desired.  Uses standard
 *			files:	ot and nt using indexs ??.bks ??.cps ??.vss
 *
 * $Id: rawfiles.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1998-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWFILES_H
#define RAWFILES_H

#include <rawverse.h>
#include <swcom.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT RawFiles : public RawVerse, public SWCom {

	const char *getNextFilename();

public:


	RawFiles(const char *ipath, const char *iname = 0, const char *idesc = 0,
			SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
			const char *ilang = 0);
	virtual ~RawFiles();
	virtual SWBuf &getRawEntryBuf() const;

	// write interface ----------------------------
	/** Is the module writable? :)
	* @return yes or no
	*/
	virtual bool isWritable() const;

	/** Creates a new module
	* @param path The first parameter is path of the new module
	* @return error
	*/
	static char createModule(const char *);

	/** Modify the current module entry text
	* - only if module @ref isWritable
	* @return *this
	*/
	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry

	/** Link the current module entry to another module entry
	* - only if module @ref isWritable
	* @return *this
	*/
	virtual void linkEntry(const SWKey *linkKey);	// Link current module entry to other module entry

	/** Delete current module entry - only if module @ref isWritable
	*
	*/
	virtual void deleteEntry();
	// end write interface ------------------------


	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/canon_orthodox.h<|end_filename|>
/******************************************************************************
 *
 *  canon_orthodox.h -	Versification data for the Orthodox system
 *
 * $Id: canon_orthodox.h 2936 2013-08-02 18:00:19Z chrislit $
 *
 * Copyright 2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 */

#ifndef CANON_ORTHODOX_H
#define CANON_ORTHODOX_H

SWORD_NAMESPACE_START


// Versification system: Orthodox
// Book order: Gen Exod Lev Num Deut Josh Judg Ruth 1Sam 2Sam 1Kgs 2Kgs 1Chr 2Chr 1Esd Ezra Neh Tob Jdt Esth 1Macc 2Macc 3Macc Ps PrMan Job Prov Eccl Song Wis Sir Hos Amos Mic Joel Obad Jonah Nah Hab Zeph Hag Zech Mal Isa Jer Bar Lam EpJer Ezek Sus Dan Bel 4Macc Matt Mark Luke John Acts Rom 1Cor 2Cor Gal Eph Phil Col 1Thess 2Thess 1Tim 2Tim Titus Phlm Heb Jas 1Pet 2Pet 1John 2John 3John Jude Rev

// This versification system is based on the LXX versification system, q.v. for more information on the method of its compilation.
// However, this versification system differs from the LXX system in that the book order follows that seen in modern Orthodox Bibles and books seen in some editions of the LXX but absent from modern Orthodox Bibles have been omitted.


/******************************************************************************
 * [on]tbooks_orthodox - initialize static instance for all canonical
 *		 text names and chapmax
 */
struct sbook otbooks_orthodox[] = {
  {"Genesis", "Gen", "Gen", 50},
  {"Exodus", "Exod", "Exod", 40},
  {"Leviticus", "Lev", "Lev", 27},
  {"Numbers", "Num", "Num", 36},
  {"Deuteronomy", "Deut", "Deut", 34},
  {"Joshua", "Josh", "Josh", 24},
  {"Judges", "Judg", "Judg", 21},
  {"Ruth", "Ruth", "Ruth", 4},
  {"I Samuel", "1Sam", "1Sam", 31},
  {"II Samuel", "2Sam", "2Sam", 24},
  {"I Kings", "1Kgs", "1Kgs", 22},
  {"II Kings", "2Kgs", "2Kgs", 25},
  {"I Chronicles", "1Chr", "1Chr", 29},
  {"II Chronicles", "2Chr", "2Chr", 36},
  {"I Esdras", "1Esd", "1Esd", 9},
  {"Ezra", "Ezra", "Ezra", 10},
  {"Nehemiah", "Neh", "Neh", 13},
  {"Tobit", "Tob", "Tob", 14},
  {"Judith", "Jdt", "Jdt", 16},
  {"Esther", "Esth", "Esth", 16},
  {"I Maccabees", "1Macc", "1Macc", 16},
  {"II Maccabees", "2Macc", "2Macc", 15},
  {"III Maccabees", "3Macc", "3Macc", 7},
  {"Psalms", "Ps", "Ps", 151},
  {"Prayer of Manasses", "PrMan", "PrMan", 1},
  {"Job", "Job", "Job", 42},
  {"Proverbs", "Prov", "Prov", 31},
  {"Ecclesiastes", "Eccl", "Eccl", 12},
  {"Song of Solomon", "Song", "Song", 8},
  {"Wisdom", "Wis", "Wis", 19},
  {"Sirach", "Sir", "Sir", 51},
  {"Hosea", "Hos", "Hos", 14},
  {"Amos", "Amos", "Amos", 9},
  {"Micah", "Mic", "Mic", 7},
  {"Joel", "Joel", "Joel", 4},
  {"Obadiah", "Obad", "Obad", 1},
  {"Jonah", "Jonah", "Jonah", 4},
  {"Nahum", "Nah", "Nah", 3},
  {"Habakkuk", "Hab", "Hab", 3},
  {"Zephaniah", "Zeph", "Zeph", 3},
  {"Haggai", "Hag", "Hag", 2},
  {"Zechariah", "Zech", "Zech", 14},
  {"Malachi", "Mal", "Mal", 4},
  {"Isaiah", "Isa", "Isa", 66},
  {"Jeremiah", "Jer", "Jer", 52},
  {"Baruch", "Bar", "Bar", 5},
  {"Lamentations", "Lam", "Lam", 5},
  {"<NAME>", "EpJer", "EpJer", 1},
  {"Ezekiel", "Ezek", "Ezek", 48},
  {"Susanna", "Sus", "Sus", 1},
  {"Daniel", "Dan", "Dan", 12},
  {"Bel and the Dragon", "Bel", "Bel", 1},
  {"IV Maccabees", "4Macc", "4Macc", 18},
  {"", "", "", 0}
};

// for ntbooks_orthodox, use ntbooks

/******************************************************************************
 *	Maximum verses per chapter
 */
int vm_orthodox[] = {
  // Genesis
  31, 25, 25, 26, 32, 23, 24, 22, 29, 32,
  32, 20, 18, 24, 21, 16, 27, 33, 39, 18,
  34, 24, 20, 67, 34, 35, 46, 22, 35, 43,
  55, 33, 20, 31, 29, 44, 36, 30, 23, 23,
  57, 39, 34, 34, 28, 34, 31, 22, 33, 26,
  // Exodus
  22, 25, 22, 31, 23, 30, 29, 32, 35, 29,
  10, 51, 22, 31, 27, 36, 16, 27, 25, 26,
  37, 31, 33, 18, 40, 37, 21, 43, 46, 38,
  18, 35, 23, 35, 35, 40, 21, 29, 23, 38,
  // Leviticus
  17, 16, 17, 35, 26, 40, 38, 36, 24, 20,
  47, 8, 59, 57, 33, 34, 16, 30, 37, 27,
  24, 33, 44, 23, 55, 46, 34,
  // Numbers
  54, 34, 51, 49, 31, 27, 89, 26, 23, 36,
  35, 16, 34, 45, 41, 50, 28, 32, 22, 29,
  35, 41, 30, 25, 18, 65, 23, 31, 40, 17,
  54, 42, 56, 29, 34, 13,
  // Deuteronomy
  46, 37, 29, 49, 33, 25, 26, 20, 29, 22,
  32, 32, 19, 29, 23, 22, 20, 22, 21, 20,
  23, 30, 26, 24, 19, 19, 27, 69, 29, 20,
  30, 52, 29, 12,
  // Joshua
  18, 24, 17, 24, 16, 27, 26, 35, 33, 43,
  23, 24, 33, 15, 64, 10, 18, 28, 54, 9,
  49, 34, 16, 36,
  // Judges
  36, 23, 31, 24, 32, 40, 25, 35, 57, 18,
  40, 15, 25, 20, 20, 31, 13, 32, 30, 48,
  25,
  // Ruth
  22, 23, 18, 22,
  // I Samuel
  28, 36, 21, 22, 12, 21, 17, 22, 27, 27,
  15, 25, 23, 52, 35, 23, 58, 30, 24, 43,
  16, 23, 29, 23, 44, 25, 12, 25, 11, 32,
  13,
  // II Samuel
  27, 32, 39, 12, 26, 23, 29, 18, 13, 19,
  27, 31, 39, 33, 37, 23, 29, 33, 44, 26,
  22, 51, 41, 25,
  // I Kings
  53, 71, 39, 34, 32, 38, 51, 66, 28, 33,
  44, 54, 34, 31, 34, 42, 24, 46, 21, 43,
  43, 54,
  // II Kings
  22, 25, 27, 44, 27, 35, 20, 29, 37, 36,
  21, 22, 25, 29, 38, 20, 41, 37, 37, 21,
  26, 20, 37, 20, 30,
  // I Chronicles
  54, 55, 24, 43, 41, 81, 40, 40, 44, 14,
  47, 41, 14, 17, 29, 43, 27, 17, 19, 8,
  30, 19, 32, 31, 31, 32, 34, 21, 30,
  // II Chronicles
  18, 18, 17, 23, 14, 42, 22, 18, 31, 19,
  23, 16, 23, 15, 19, 14, 19, 34, 11, 37,
  20, 12, 21, 27, 28, 23, 9, 27, 36, 27,
  21, 33, 25, 33, 31, 31,
  // I Esdras
  58, 30, 24, 63, 73, 34, 15, 96, 55,
  // Ezra
  11, 70, 13, 24, 17, 22, 28, 36, 15, 44,
  // Nehemiah
  11, 20, 37, 23, 19, 19, 73, 18, 38, 40,
  36, 47, 31,
  // Tobit
  22, 14, 17, 21, 23, 19, 18, 21, 6, 14,
  19, 22, 19, 15,
  // Judith
  16, 28, 10, 15, 24, 21, 32, 36, 14, 23,
  23, 20, 20, 19, 14, 25,
  // Esther
  22, 23, 15, 17, 22, 14, 10, 17, 35, 13,
  17, 7, 30, 19, 24, 24,
  // I Maccabees
  64, 70, 60, 61, 68, 63, 50, 32, 73, 89,
  74, 53, 54, 49, 41, 24,
  // II Maccabees
  36, 32, 40, 50, 27, 31, 42, 36, 29, 38,
  38, 46, 26, 46, 39,
  // III Maccabees
  29, 33, 30, 21, 51, 41, 23,
  // Psalms
  6, 13, 9, 9, 13, 11, 18, 10, 40, 8,
  9, 6, 7, 6, 11, 15, 51, 15, 10, 14,
  32, 6, 10, 22, 12, 14, 9, 11, 13, 25,
  11, 22, 23, 28, 13, 40, 23, 14, 18, 14,
  12, 6, 27, 18, 12, 10, 15, 21, 23, 21,
  11, 7, 9, 24, 14, 12, 12, 19, 14, 9,
  13, 12, 11, 14, 20, 8, 36, 37, 7, 24,
  20, 28, 23, 11, 13, 21, 72, 13, 20, 17,
  8, 19, 13, 14, 17, 7, 19, 53, 17, 16,
  16, 5, 23, 11, 13, 12, 9, 9, 5, 8,
  29, 22, 36, 45, 48, 43, 14, 31, 7, 10,
  10, 9, 26, 18, 19, 2, 29, 176, 7, 8,
  9, 4, 8, 5, 7, 5, 6, 8, 8, 3,
  18, 3, 3, 21, 26, 9, 8, 24, 15, 10,
  8, 12, 15, 22, 10, 11, 20, 14, 9, 6,
  7,
  // Prayer of Manasses
  15,
  // Job
  22, 18, 26, 21, 27, 30, 22, 22, 35, 22,
  20, 25, 28, 22, 35, 23, 16, 21, 29, 29,
  34, 30, 17, 25, 6, 14, 23, 28, 25, 31,
  40, 22, 33, 37, 16, 34, 24, 41, 35, 32,
  34, 22,
  // Proverbs
  35, 23, 38, 28, 23, 40, 28, 37, 25, 33,
  31, 31, 27, 36, 38, 33, 30, 24, 29, 30,
  31, 31, 36, 77, 31, 29, 29, 30, 49, 35,
  31,
  // Ecclesiastes
  18, 26, 22, 17, 20, 12, 30, 17, 18, 20,
  10, 14,
  // Song of Solomon
  17, 17, 11, 16, 17, 13, 14, 15,
  // Wisdom
  16, 25, 19, 20, 24, 27, 30, 21, 19, 21,
  27, 27, 19, 31, 19, 29, 21, 25, 22,
  // Sirach
  30, 18, 31, 31, 15, 37, 36, 19, 18, 31,
  34, 18, 26, 27, 20, 30, 32, 33, 31, 32,
  28, 27, 28, 34, 26, 29, 30, 26, 28, 40,
  31, 26, 33, 31, 26, 31, 31, 35, 35, 30,
  27, 27, 33, 24, 26, 20, 25, 25, 16, 29,
  30,
  // Hosea
  11, 25, 5, 19, 15, 12, 16, 14, 17, 15,
  12, 15, 16, 10,
  // Amos
  15, 16, 15, 13, 27, 15, 17, 14, 15,
  // Micah
  16, 13, 12, 14, 15, 16, 20,
  // Joel
  20, 32, 21, 21,
  // Obadiah
  21,
  // Jonah
  17, 11, 10, 11,
  // Nahum
  15, 14, 19,
  // Habakkuk
  17, 20, 19,
  // Zephaniah
  18, 15, 21,
  // Haggai
  15, 24,
  // Zechariah
  21, 17, 11, 14, 11, 15, 14, 23, 17, 12,
  17, 14, 9, 21,
  // Malachi
  14, 17, 24, 6,
  // Isaiah
  31, 22, 26, 6, 30, 13, 25, 23, 21, 34,
  16, 6, 22, 32, 9, 14, 14, 7, 25, 6,
  17, 25, 18, 23, 12, 21, 13, 29, 24, 33,
  9, 20, 24, 17, 10, 22, 38, 22, 8, 31,
  29, 25, 28, 28, 26, 13, 15, 22, 26, 11,
  23, 15, 12, 17, 13, 12, 21, 14, 21, 22,
  11, 12, 20, 12, 25, 24,
  // Jeremiah
  19, 37, 25, 31, 31, 30, 34, 23, 26, 25,
  23, 17, 27, 22, 21, 21, 27, 23, 15, 18,
  14, 30, 42, 10, 39, 28, 46, 64, 31, 33,
  47, 44, 24, 22, 19, 32, 24, 40, 44, 26,
  22, 22, 32, 30, 28, 28, 16, 44, 38, 46,
  63, 34,
  // Baruch
  22, 35, 38, 37, 9,
  // Lamentations
  22, 22, 66, 22, 22,
  // Epistle of Jeremiah
  73,
  // Ezekiel
  28, 13, 27, 17, 17, 14, 27, 18, 11, 22,
  25, 28, 23, 23, 8, 63, 24, 32, 14, 49,
  37, 31, 49, 27, 17, 21, 36, 26, 21, 26,
  18, 32, 33, 31, 15, 38, 28, 23, 29, 49,
  26, 20, 27, 31, 25, 24, 23, 35,
  // Susanna
  64,
  // Daniel
  21, 49, 100, 37, 31, 29, 28, 27, 27, 21,
  45, 13,
  // Bel and the Dragon
  42,
  // IV Maccabees
  35, 24, 21, 26, 38, 35, 25, 29, 32, 21,
  27, 20, 27, 20, 32, 25, 24, 24,
  // Matthew
  25, 23, 17, 25, 48, 34, 29, 34, 38, 42,
  30, 50, 58, 36, 39, 28, 27, 35, 30, 34,
  46, 46, 39, 51, 46, 75, 66, 20,
  // Mark
  45, 28, 35, 41, 43, 56, 37, 38, 50, 52,
  33, 44, 37, 72, 47, 20,
  // Luke
  80, 52, 38, 44, 39, 49, 50, 56, 62, 42,
  54, 59, 35, 35, 32, 31, 37, 43, 48, 47,
  38, 71, 56, 53,
  // John
  52, 25, 36, 54, 47, 71, 53, 59, 41, 42,
  57, 50, 38, 31, 27, 33, 26, 40, 42, 31,
  25,
  // Acts
  26, 47, 26, 37, 42, 15, 60, 40, 43, 48,
  30, 25, 52, 28, 41, 40, 34, 28, 41, 38,
  40, 30, 35, 27, 27, 32, 44, 31,
  // Romans
  32, 29, 31, 25, 21, 23, 25, 39, 33, 21,
  36, 21, 14, 26, 33, 27,
  // I Corinthians
  31, 16, 23, 21, 13, 20, 40, 13, 27, 33,
  34, 31, 13, 40, 58, 24,
  // II Corinthians
  24, 17, 18, 18, 21, 18, 16, 24, 15, 18,
  33, 21, 14,
  // Galatians
  24, 21, 29, 31, 26, 18,
  // Ephesians
  23, 22, 21, 32, 33, 24,
  // Philippians
  30, 30, 21, 23,
  // Colossians
  29, 23, 25, 18,
  // I Thessalonians
  10, 20, 13, 18, 28,
  // II Thessalonians
  12, 17, 18,
  // I Timothy
  20, 15, 16, 16, 25, 21,
  // II Timothy
  18, 26, 17, 22,
  // Titus
  16, 15, 15,
  // Philemon
  25,
  // Hebrews
  14, 18, 19, 16, 14, 20, 28, 13, 28, 39,
  40, 29, 25,
  // James
  27, 26, 18, 17, 20,
  // I Peter
  25, 25, 22, 19, 14,
  // II Peter
  21, 22, 18,
  // I John
  10, 29, 24, 21, 21,
  // II John
  13,
  // III John
  15,
  // Jude
  25,
  // Revelation of John
  20, 29, 22, 11, 14, 17, 17, 13, 21, 11,
  19, 18, 18, 20, 9, 21, 18, 24, 21, 15,
  27, 21
};


SWORD_NAMESPACE_END


#endif


<|start_filename|>src/UserInterface/ToolbarController.h<|end_filename|>
//
//  ToolbarController.h
//  Eloquent
//
//  Created by <NAME> on 08.03.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "HostableViewController.h"

// toolbar identifiers
#define TB_ADD_BIBLE_ITEM           @"IdAddBible"
#define TB_MODULEINSTALLER_ITEM     @"IdModuleInstaller"
#define TB_SEARCH_TYPE_ITEM         @"IdSearchType"
#define TB_SEARCH_TEXT_ITEM         @"IdSearchText"
#define TB_ADDBOOKMARK_TYPE_ITEM    @"IdAddBookmark"
#define TB_FORCERELOAD_TYPE_ITEM    @"IdForceReload"
#define TB_NAVIGATION_TYPE_ITEM     @"IdNavigation"

@class WindowHostController;
@class SearchTextFieldOptions;

@interface ToolbarController : HostableViewController {
    IBOutlet NSButton *leftSideBarToggleBtn;
    IBOutlet NSButton *rightSideBarToggleBtn;
    IBOutlet NSButton *addBookmarkBtn;
    IBOutlet NSButton *forceReloadBtn;
    IBOutlet NSSearchField *searchTextField;
    IBOutlet NSSegmentedControl *searchTypeSegControl;

    IBOutlet NSToolbar *toolbar;
    IBOutlet NSToolbarItem *toolbarViewItem;
    IBOutlet NSToolbarItem *searchTextFieldItem;
    
    IBOutlet NSBox *scopebarPlaceholder;
    
    NSMutableDictionary *tbIdentifiers;
}

- (id)initWithDelegate:(WindowHostController *)aDelegate;

- (NSToolbar *)toolbar;

- (void)setScopebarView:(NSView *)aView;

- (void)setSearchTextFieldRecents:(NSArray *)recents;
- (void)setSearchTextFieldRecentsMenu:(NSMenu *)aMenu;
- (void)setSearchTextFieldString:(NSString *)aString;
- (void)setSearchTextFieldOptions:(SearchTextFieldOptions *)options;
- (void)focusSearchTextField;

- (void)setActiveSearchTypeSegElement:(SearchType)aType;
- (void)setEnabled:(BOOL)flag searchTypeSegElement:(SearchType)aType;

- (void)setBookmarkButtonEnabled:(BOOL)flag;
- (void)setForceReloadButtonEnabled:(BOOL)flag;

- (void)setLSBToggleButtonImage:(NSImage *)anImage;
- (void)setRSBToggleButtonImage:(NSImage *)anImage;

- (IBAction)clearRecents:(id)sender;
- (IBAction)addBookmark:(id)sender;
- (IBAction)searchInput:(id)sender;
- (IBAction)searchType:(id)sender;
- (IBAction)forceReload:(id)sender;
- (IBAction)leftSideBarHideShow:(id)sender;
- (IBAction)rightSideBarHideShow:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/stringmgr.h<|end_filename|>
/******************************************************************************
 *
 *  stringmgr.h -	A class which provides string handling functions which
 *			can be reimplemented by frontends
 *
 * $Id: stringmgr.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2004-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ	85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef STRINGMGR_H
#define STRINGMGR_H

#include <defs.h>
#include <swbuf.h>
#include <utilstr.h>

SWORD_NAMESPACE_START

/** StringMgr is a way to provide UTf8 handling by the Sword frontend
 * Each platform, if it's up-to-date, should provide functions to handle unicode and utf8. This class makes it possible to implement Unicode support on the user-side and not in Sword itself.
 */
class SWDLLEXPORT StringMgr {
public:

	/** Sets the global StringMgr handle
	* @param newStringMgr The new global StringMgr. This pointer will be deleted by this StringMgr
	*/	
	static void setSystemStringMgr(StringMgr *newStringMgr);
   
	/** Returns the global StringMgr handle
	* @return The global string handle
	*/
	static StringMgr *getSystemStringMgr();

	/** Checks whether Utf8 support is available.
	* Override the function supportsUnicode() to tell whether your implementation has utf8 support.
	* @return True if this implementation provides support for Utf8 handling or false if just latin1 handling is available
	*/
	static inline bool hasUTF8Support() {
		return getSystemStringMgr()->supportsUnicode();
	};
	
	/** Converts the param to an upper case Utf8 string
	* @param text The text encoded in utf8 which should be turned into an upper case string
	* @param max Max buffer size
	* @return text buffer (only for convenience)
	*/	
	virtual char *upperUTF8(char *text, unsigned int max = 0) const;
   
	/** Converts the param to an uppercase latin1 string
	* @param text The text encoded in latin1 which should be turned into an upper case string
	* @param max Max buffer size
	* @return text buffer (only for convenience)
	*/	
	virtual char *upperLatin1(char *text, unsigned int max = 0) const;
	

protected:
	friend class __staticsystemStringMgr;
	
	/** Default constructor. Protected to make instances on user side impossible, because this is a Singleton
	*/		
	StringMgr();
   
	/** Copy constructor
	*/	
	StringMgr(const StringMgr &);
   
	/** Destructor
	*/	
	virtual ~StringMgr();
	
	virtual bool supportsUnicode() const;

private:
	static StringMgr *systemStringMgr;
};

inline char *toupperstr(char *t, unsigned int max = 0) {
	return StringMgr::getSystemStringMgr()->upperUTF8(t, max);
}
	
inline char *toupperstr_utf8(char *t, unsigned int max = 0) {
	return StringMgr::getSystemStringMgr()->upperUTF8(t, max);
}
	
/**
 * Converts an SWBuf filled with UTF-8 to upper case
 *
 * @param b SWBuf to change to upper case
 * 
 * @return b for convenience
 */
inline SWBuf &toupperstr(SWBuf &b) {
	char *utf8 = 0;
	stdstr(&utf8, b.c_str(), 2);
	toupperstr(utf8, (unsigned int)strlen(utf8)*2);
	b = utf8;
	delete [] utf8;
	return b;
}

SWORD_NAMESPACE_END


#endif //STRINGMGR_H


<|start_filename|>src/UserInterface/BibleViewController+RightSidebar.h<|end_filename|>
//
//  BibleViewController+RightSidebar.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "BibleViewController.h"

@interface BibleViewController (RightSidebar)

- (NSDictionary *)buildOutlineItemsCache;

@end


<|start_filename|>src/UserInterface/NSButton+Color.h<|end_filename|>
//
//  NSButton+Color.h
//  Eloquent
//
//  Created by <NAME> on 12.01.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSButton (TextColor)

- (NSColor *)textColor;
- (void)setTextColor:(NSColor *)textColor;

@end


<|start_filename|>test/ImageModuleTest.h<|end_filename|>
//
//  ImageModuleTest.h
//  ObjCSword
//
//  Created by <NAME> on 03.08.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <SenTestingKit/SenTestingKit.h>


@interface ImageModuleTest : SenTestCase {

}

@end


<|start_filename|>test/BookmarkManagerTest.h<|end_filename|>
//
//  BookmarkManagerTest.h
//  Eloquent
//
//  Created by <NAME> on 22.10.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <XCTest/XCTest.h>

@interface BookmarkManagerTest : XCTestCase {
}

@end


<|start_filename|>externals/PSMTabBarControl/source/NSWindow+PSM.h<|end_filename|>
#import <Cocoa/Cocoa.h>

@interface NSWindow (PSM)
- (NSPoint)pointFromScreenCoords:(NSPoint)point;
- (NSPoint)pointToScreenCoords:(NSPoint)point;
@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/zld.h<|end_filename|>
/******************************************************************************
 *
 *  zld.cpp -	code for class 'zLD'- a module that reads compressed lexicon
 *		and dictionary files
 *
 * $Id: zld.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ZLD_H
#define ZLD_H

#include <zstr.h>
#include <swld.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT zLD : public zStr, public SWLD {
	char getEntry(long away = 0) const;

public:


	zLD(const char *ipath, const char *iname = 0, const char *idesc = 0, long blockCount = 200, SWCompress *icomp = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, bool caseSensitive = false, bool strongsPadding = true);
	virtual ~zLD();
	virtual SWBuf &getRawEntryBuf() const;

	virtual void increment(int steps = 1);
	virtual void decrement(int steps = 1) { increment(-steps); }

	// write interface ----------------------------
	virtual bool isWritable() const;
	static char createModule(const char *path) {
		return zStr::createModule(path);
	}

	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
	virtual void linkEntry(const SWKey *linkKey);	// Link current module entry to other module entry
	virtual void deleteEntry();	// Delete current module entry
	// end write interface ------------------------

	virtual void rawZFilter(SWBuf &buf, char direction = 0) const { rawFilter(buf, (SWKey *)(long)direction); }// hack, use key as direction for enciphering
  
	// swcacher interface ----------------------
	virtual void flush() { flushCache(); }
	// end swcacher interface ----------------------

	virtual long getEntryCount() const;
	virtual long getEntryForKey(const char *key) const;
	virtual char *getKeyForEntry(long entry) const;


	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/strkey.h<|end_filename|>
/******************************************************************************
 *
 *  strkey.h -	code for class 'strkey'- a standard Biblical verse key
 *
 * $Id: strkey.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef STRKEY_H
#define STRKEY_H

#include <swkey.h>

#include <defs.h>

SWORD_NAMESPACE_START

  /** a standard string key class (used
  * for modules that index on single strings (eg. cities,
  * names, words, etc.)
  */
class SWDLLEXPORT StrKey:public SWKey
{
  static SWClass classdef;
  void init ();
public:
  /** initializes instance of StrKey
  *
  * @param ikey text key (word, city, name, etc.)
  */
  StrKey (const char *ikey = 0);
  /** cleans up instance of StrKey
  */
  virtual ~ StrKey ();

  SWKEY_OPERATORS

};
SWORD_NAMESPACE_END

#endif


<|start_filename|>externals/PSMTabBarControl/source/PSMTabBarCell.h<|end_filename|>
//
//  PSMTabBarCell.h
//  PSMTabBarControl
//
//  Created by <NAME> on 10/13/05.
//  Copyright 2005 Positive Spin Media. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "PSMTabBarControl.h"
//#import "PSMProgressIndicator.h"

@class PSMTabBarControl;
@protocol PSMTabStyle;

@protocol PSMTabBarControlProtocol <NSObject>
- (void)tabClick:(id)sender;
- (id<PSMTabStyle>)style;
- (void)update:(BOOL)animate;
- (BOOL)automaticallyAnimates;
- (PSMTabBarOrientation)orientation;
- (id<PSMTabBarControlDelegate>)delegate;
- (NSTabView *)tabView;
@end

@interface PSMTabBarCell : NSActionCell <NSCoding>
// Is this the last cell? Only valid while drawing.
@property(nonatomic, assign) BOOL isLast;
@property(nonatomic, assign) BOOL isCloseButtonSuppressed;
@property(nonatomic, readonly) BOOL closeButtonVisible;
@property(nonatomic, assign) int tabState;
@property(nonatomic, assign) NSRect frame;
@property(nonatomic, assign) NSTrackingRectTag cellTrackingTag;  // right side tracking, if dragging
@property(nonatomic, assign) NSTrackingRectTag closeButtonTrackingTag;  // left side tracking, if dragging
@property(nonatomic, assign) BOOL isInOverflowMenu;
@property(nonatomic, assign) BOOL closeButtonPressed;
@property(nonatomic, assign) BOOL closeButtonOver;
@property(nonatomic, assign) BOOL hasCloseButton;
@property(nonatomic, assign) BOOL hasIcon;
@property(nonatomic, assign) int count;
@property(nonatomic, assign) BOOL isPlaceholder;
@property(nonatomic, assign) int currentStep;
@property(nonatomic, copy) NSString *modifierString;
@property(nonatomic, strong) NSColor *tabColor;
//@property(nonatomic, readonly) PSMProgressIndicator *indicator;
@property(nonatomic, readonly) NSAttributedString *attributedStringValue;
@property(nonatomic, readonly) NSSize stringSize;
@property(nonatomic, readonly) float width;
@property(nonatomic, readonly) float minimumWidthOfCell;
@property(nonatomic, readonly) float desiredWidthOfCell;
@property(nonatomic, readonly) id<PSMTabStyle> style;
@property(nonatomic, assign) NSLineBreakMode truncationStyle;  // How to truncate title.

// creation/destruction
- (id)initWithControlView:(PSMTabBarControl *)controlView;
- (id)initPlaceholderWithFrame:(NSRect)frame expanded:(BOOL)value inControlView:(PSMTabBarControl *)controlView;

// accessors
- (void)setStringValue:(NSString *)aString;

// component attributes
- (NSRect)indicatorRectForFrame:(NSRect)cellFrame;
- (NSRect)closeButtonRectForFrame:(NSRect)cellFrame;

// drawing
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;

// drag support
- (NSImage *)dragImage;

// iTerm additions
- (void)updateForStyle;
- (void)updateHighlight;

@end


<|start_filename|>Resources/FooLogger.framework/Versions/A/Headers/Logger.h<|end_filename|>
//
//  CocoLogger.h
//  CocoLogger
//
//  Created by <NAME> on 02.06.05.
//  Copyright 2005 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>

// define for logging
#define CocoLog(LEVEL,...) [CocoLogger log:[NSString stringWithFormat:@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]] level:LEVEL]

@interface CocoLogger : NSObject {
}

// init or close the logger
+ (int)initLogger:(NSString *)logPath
		logPrefix:(NSString *)aPrefix
   logFilterLevel:(int)aLevel
	 appendToFile:(BOOL)fileAppend
	 logToConsole:(BOOL)consoleLogging;

+ (int)closeLogger;

// set or get the logfilter level
+ (void)setLogFilterLevel:(int)aLevel;
+ (int)logFilterLevel;

// set or get logPrefix
+ (void)setLogPrefix:(NSString *)aPrefix;
+ (NSString *)logPrefix;

// make logoutput
+ (int)log:(NSString *)message level:(int)aLevel;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordCommentary.h<|end_filename|>
/*	SwordCommentary.h - Sword API wrapper for Commentaries.

    Copyright 2008 <NAME>
    Based on code by <NAME>

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation version 2.

	This program 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
	General Public License for more details. (http://www.gnu.org/licenses/gpl.html)
*/

#import <Foundation/Foundation.h>
#import <ObjCSword/ObjCSword.h>

#ifdef __cplusplus
#include <rawfiles.h>
#endif



@interface SwordCommentary : SwordBible

/** 
 creates a new empty editable commentary module 
 caller has to make sure the module doesn't exist yet
 @return path of the created module
 */
+ (NSString *)createCommentaryWithName:(NSString *)aName;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/utilxml.h<|end_filename|>
/******************************************************************************
 *
 *  utilxml.h -	definition of class that deal with xml constructs 
 *
 * $Id: utilxml.h 2980 2013-09-14 21:51:47Z scribe $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef UTILXML_H
#define UTILXML_H

#include <defs.h>
#include <swbuf.h>
#include <list>
#include <map>

SWORD_NAMESPACE_START

typedef std::map<SWBuf, SWBuf> StringPairMap;
typedef std::list<SWBuf> StringList;

/** Simple XML helper class.
*/
class SWDLLEXPORT XMLTag {
private:
	mutable char *buf;
	char *name;
	mutable bool parsed;
	mutable bool empty;
	mutable bool endTag;
	mutable StringPairMap attributes;
	mutable SWBuf junkBuf;
	
	void parse() const;
	const char *getPart(const char *buf, int partNum = 0, char partSplit = '|') const;
	
public:
	XMLTag(const char *tagString = 0);
	XMLTag(const XMLTag& tag);
	~XMLTag();

	void setText(const char *tagString);
	inline const char *getName() const { return (name) ? name : SWBuf::nullStr; }

	inline bool isEmpty() const {
		if (!parsed)
			parse();

		return empty;
	}
	inline void setEmpty(bool value) {
		if (!parsed)
			parse();
		empty = value;
		if (value)
			endTag = false;
	}

	/***
	 * if an eID is provided, then we check to be sure we have an attribute <tag eID="xxx"/> value xxx equiv to what is given us
	 * otherwise, we return if we're a simple XML end </tag>.
	 */
	bool isEndTag(const char *eID = 0) const;

	const StringList getAttributeNames() const;
	int getAttributePartCount(const char *attribName, char partSplit = '|') const;

	// return values should not be considered to persist beyond the return of the function.
	const char *getAttribute(const char *attribName, int partNum = -1, char partSplit = '|') const;
	const char *setAttribute(const char *attribName, const char *attribValue, int partNum = -1, char partSplit = '|');
	const char *toString() const;
	inline operator const char *() const { return toString(); }
	inline XMLTag & operator =(const char *tagString) { setText(tagString); return *this; }
	inline XMLTag & operator =(const XMLTag &other) { setText(other.toString()); return *this; }
};

SWORD_NAMESPACE_END
#endif



<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swld.h<|end_filename|>
/******************************************************************************
 *
 *  swld.h -	code for base class 'SWLD'.  SWLD is the basis for all
 *		types of Lexicon and Dictionary modules (hence the 'LD').
 *
 * $Id: swld.h 3215 2014-05-01 05:13:22Z scribe $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWLD_H
#define SWLD_H

#include <swmodule.h>

#include <defs.h>

SWORD_NAMESPACE_START

  /** the basis for all types of Lexicon and
  * Dictionary modules (hence the 'LD').
  */
class SWDLLEXPORT SWLD : public SWModule {
protected:
	mutable char *entkeytxt;
	static void strongsPad(char *buf);
	bool strongsPadding;
public:
	/** Initializes data for instance of SWLD
	*/
	SWLD(const char *imodname = 0, const char *imoddesc = 0,
			SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, bool strongsPadding = true);
	
	virtual ~SWLD();
	virtual SWKey *createKey() const;

	/** Sets/gets module KeyText, getting from saved text if key is persistent
	*
	* @param ikeytext value which to set keytext;
	*  [0] - only get
	* @return pointer to keytext
	*/
	virtual const char *getKeyText() const;
	virtual void setPosition(SW_POSITION pos);


	virtual long getEntryCount() const = 0;
	virtual long getEntryForKey(const char *key) const = 0;
	virtual char *getKeyForEntry(long entry) const = 0;
	
	virtual bool hasEntry(const SWKey *k) const;

	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordBibleTextEntry.h<|end_filename|>
//
//  SwordBibleTextEntry.h
//  MacSword2
//
//  Created by <NAME> on 01.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SwordModuleTextEntry.h"

@interface SwordBibleTextEntry : SwordModuleTextEntry

@property (retain, readwrite) NSString *preVerseHeading;

+ (id)textEntryForKey:(NSString *)aKey andText:(NSString *)aText;
- (id)initWithKey:(NSString *)aKey andText:(NSString *)aText;

@end


<|start_filename|>src/UserInterface/ThreeCellsCell.h<|end_filename|>
//
//  ThreeCellsCell.h
//  ThreeCellsCell
//
//  Created by <NAME> on 16.12.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface ThreeCellsCell : NSTextFieldCell {
    NSImage *image;
    NSImage *rightImage;
    NSFont *countFont;
    int rightCounter;
    int leftCounter;
}

@property (strong, readwrite) NSImage *image;
@property (strong, readwrite) NSImage *rightImage;
@property (readwrite) int rightCounter;
@property (readwrite) int leftCounter;

@end


<|start_filename|>src/ModuleManager/ModuleManageViewController+OutlineView.h<|end_filename|>
//
//  ModuleManageViewController+OutlineView.h
//  Eloquent
//
//  Created by <NAME> on 27.05.16.
//  Copyright © 2016 Crosswire. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ModuleManageViewController.h"

@interface ModuleManageViewController (OutlineView )

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/treekey.h<|end_filename|>
/******************************************************************************
 *
 *  treekey.h -	code for class 'TreeKey'
 *
 * $Id: treekey.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef TREEKEY_H
#define TREEKEY_H

#include <swkey.h>
#include <swbuf.h>

#include <defs.h>

SWORD_NAMESPACE_START

/**
 * Class TreeKey
 * The base class for all tree-based key implementations in Sword.
 */
class SWDLLEXPORT TreeKey : public SWKey {
	static SWClass classdef;
	void init();

protected:
	// hold on to setText until we've done a snap action: getText or navigation
	// if we set, and then write out userData, we want to assure the path exists.
	// This better conforms to the SWORD write methodology: mod.setKey, mod.setEntry
	mutable SWBuf unsnappedKeyText;

	// called whenever position of this key is changed.  Should we move this
	// to a more base class?
	void positionChanged() { if (posChangeListener) posChangeListener->positionChanged(); }

public:

	class PositionChangeListener {
		TreeKey *treeKey;
	public:
		PositionChangeListener() {}
		virtual ~PositionChangeListener() {}
		virtual void positionChanged() = 0;
		TreeKey *getTreeKey() { return treeKey; }
		void setTreeKey(TreeKey *tk) { treeKey = tk; }
	} *posChangeListener;

	void setPositionChangeListener(PositionChangeListener *pcl) { posChangeListener = pcl; posChangeListener->setTreeKey(this); }

//	TreeKey (const char *ikey = 0);
//	TreeKey (const SWKey * ikey);
//	TreeKey (TreeKey const &k);
	TreeKey () { init(); };
	~TreeKey () {};


	virtual const char *getLocalName() = 0;
	virtual const char *setLocalName(const char *) = 0;

	virtual int getLevel() { long bm = getOffset(); int level = 0; do { level++; } while (parent()); setOffset(bm); return level; }

	virtual const char *getUserData(int *size = 0) const = 0;
	virtual void setUserData(const char *userData, int size = 0) = 0;

	/** Go to the root node
	*/
	virtual void root() = 0;

	/** Go to the parent of the current node
	* @return success or failure
	*/
	virtual bool parent() = 0;

	/** Go to the first child of the current node
	* @return success or failure
	*/
	virtual bool firstChild() = 0;

	/** Go to the next sibling of the current node
	* @return success or failure
	*/
	virtual bool nextSibling() = 0;

	/** Go to the previous sibling of the current node
	* @return success or failure
	*/
	virtual bool previousSibling() = 0;

	/** Does the current node have children?
	* @return whether or not it does
	*/
	virtual bool hasChildren() = 0;

	virtual void append() = 0;
	virtual void appendChild() = 0;
	virtual void insertBefore() = 0;

	virtual void remove() = 0;


	virtual void setOffset(unsigned long offset) = 0;
	virtual unsigned long getOffset() const = 0;

	virtual void setText(const char *ikey) = 0;
	virtual void setPosition(SW_POSITION p) = 0;
	virtual const char *getText() const = 0;
	virtual int compare(const SWKey &ikey) = 0;
	virtual void decrement(int steps = 1) = 0;
	virtual void increment(int steps = 1) = 0;
	virtual bool isTraversable() const { return true; }
	virtual long getIndex() const { return getOffset(); }
	virtual void setIndex(long iindex) { setOffset(iindex); }

	/** Set the key to this path.  If the path doesn't exist, then
	 *	nodes are created as necessary
	 * @param keyPath path to set/create; if unsupplied, then use any unsnapped setText value.
	 */
	virtual void assureKeyPath(const char *keyPath = 0);
	virtual void save() {}

	SWKEY_OPERATORS

	};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/remotetrans.h<|end_filename|>
/******************************************************************************
 *
 *  remotetrans.h -	code for Remote Transport
 *
 * $Id: remotetrans.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 2004-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef REMOTETRANS_H
#define REMOTETRANS_H

#include <vector>
#include <defs.h>
#include <swbuf.h>


SWORD_NAMESPACE_START

/** Class for reporting status
*/
class SWDLLEXPORT StatusReporter {
public:
	virtual ~StatusReporter() {};
	/** Messages before stages of a batch download */
	virtual void preStatus(long totalBytes, long completedBytes, const char *message);

	/** frequently called throughout a download, to report status */
	SWDEPRECATED virtual void statusUpdate(double dtTotal, double dlNow);
	virtual void update(unsigned long totalBytes, unsigned long completedBytes);
};


/**
* A base class to be used for reimplementation of network services.
*/
class SWDLLEXPORT RemoteTransport {

protected:
	StatusReporter *statusReporter;
	bool passive;
	bool term;
	bool unverifiedPeerAllowed;
	SWBuf host;
	SWBuf u;
	SWBuf p;

public:
	RemoteTransport(const char *host, StatusReporter *statusReporter = 0);
	virtual ~RemoteTransport();

	/***********
	 * override this method in your real impl
	 *
	 * if destBuf then write to buffer instead of file
	 */
	virtual char getURL(const char *destPath, const char *sourceURL, SWBuf *destBuf = 0);

	/***********
	 * override this method in your real impl
	 *
	 * if sourceBuf then read from buffer instead of file
	 */
	virtual char putURL(const char *destURL, const char *sourcePath, SWBuf *sourceBuf = 0);


	int copyDirectory(const char *urlPrefix, const char *dir, const char *dest, const char *suffix);

	virtual std::vector<struct DirEntry> getDirList(const char *dirURL);
	void setPassive(bool passive) { this->passive = passive; }
	bool isPassive() { return passive; }
	void setUser(const char *user) { u = user; }
	void setPasswd(const char *passwd) { p = passwd; }
	void setUnverifiedPeerAllowed(bool val) { this->unverifiedPeerAllowed = val; }
	bool isUnverifiedPeerAllowed() { return unverifiedPeerAllowed; }
	void terminate() { term = true; }
};


SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordBook.h<|end_filename|>
/*	SwordBook.h - Sword API wrapper for GenBooks.

    Copyright 2008 <NAME>
    Based on code by <NAME>

	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation version 2.

	This program 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
	General Public License for more details. (http://www.gnu.org/licenses/gpl.html)
*/

#import <Foundation/Foundation.h>
#import "SwordModule.h"

#ifdef __cplusplus
#include <treekeyidx.h>
#endif

@class SwordModule, SwordManager, SwordModuleTreeEntry;

@interface SwordBook : SwordModule

/**
 return the tree content for the given treeKey
 the treeKey has to be already loaded
 @param[in]: treeKey that we should look for, nil for root
 @return: SwordTreeEntry
 */
- (SwordModuleTreeEntry *)treeEntryForKey:(NSString *)treeKey;

/**
 * All tree keys
 * @return
 */
- (NSDictionary *)allContent;

@end


<|start_filename|>src/UserInterface/OptionsHeaderView.h<|end_filename|>
//
//  OptionsHeaderView.h
//  Eloquent
//
//  Created by <NAME> on 28.08.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface OptionsHeaderView : NSView {
    // the image
    NSImage *bgImage;
}

@property (strong, readwrite) NSImage *bgImage;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordUtil.h<|end_filename|>
//
// Created by mbergmann on 18.12.12.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>


@interface SwordUtil : NSObject

/**
 Rendered Module texts may have hyperlinks. Those links may have key/value pairs to target data.
 This method will return a dictionary with attribute/value pairs from parameters of the link.
 See ATTRTYPE_* for key types.
 */
+ (NSDictionary *)dictionaryFromUrl:(NSURL *)aURL;

/**
 Pads an array of unpadded Strong's numbers to 5 digits.
 I.e. H0430 => H00430, G11 => G00011
 */
+ (NSArray *)padStrongsNumbers:(NSArray *)unpaddedNumbers;

/**
 Pads a single unpadded Strong's numbers to 5 digits.
 I.e. H0430 => H00430, G11 => G00011
 Since an unpadded number can be combined with multiple numbers concatenated by space we'll return an array here.
 */
+ (NSArray *)padStrongsNumber:(NSString *)unpaddedNumber;

/**
 * Pads a string on the left until 5 digits is reached
 */
+ (NSString *)leftPadStrongsFormat:(NSString *)unpadded;


@end


<|start_filename|>src/SessionManagement/Session.h<|end_filename|>
//
// Created by mbergmann on 28.07.12.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>


@interface Session : NSObject

@property (strong, nonatomic) NSURL *url;
@property (strong, nonatomic) NSArray *windows;

- (id)initWithURL:(NSURL *)anUrl;
- (id)initWithURL:(NSURL *)anUrl andWindows:(NSArray *)aWindows;

@end


<|start_filename|>src/NotesTaking/NotesUIController.h<|end_filename|>
//
//  NotesUIController.h
//  Eloquent
//
//  Created by <NAME> on 17.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@class NotesManager;

@interface NotesUIController : LeftSideBarAccessoryUIController {
    IBOutlet NSMenu *notesMenu;
    NotesManager *notesManager;
}

@property (readonly) NSMenu *notesMenu;

// actions
- (IBAction)notesMenuClicked:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swlocale.h<|end_filename|>
/******************************************************************************
 *
 *  swlocale.h -	definition of Class SWLocale used for retrieval
 *		       	of locale lookups
 *
 * $Id: swlocale.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWLOCALE_H
#define SWLOCALE_H

#include <defs.h>

SWORD_NAMESPACE_START

class SWConfig;
static const int ENDOFABBREVS = -2;

/** SWLocale is used for the localisation of the booknames
* The SWLocale is a class which holds the information of one language.
* Every language supported by SWORD has one SWLocale object, 
* get the name of the Language using @see getname of this class.
* Another functions useful for frontend developers is @see getDescription.
*/
class SWDLLEXPORT SWLocale {

class Private;

	Private *p;

	SWConfig *localeSource;

	char *name;
	char *description;
	char *encoding;
	struct abbrev *bookAbbrevs;
	int abbrevsCnt;
	const char **bookLongNames;
	const char **bookPrefAbbrev;

public:
	SWLocale(const char *ifilename);
	virtual ~SWLocale();

	/**
	* This function is used to get the name of the languages which this object is handling.
	* @return The name of the managed language. A possible example is "de".
	*/
	virtual const char *getName();
	/**
	* @return The description. A possible example is "German".
	*/
	virtual const char *getDescription();
	virtual const char *getEncoding();
	virtual const char *translate(const char *text);
	virtual void augment(SWLocale &addFrom);
	virtual SWLocale & operator +=(SWLocale &addFrom) { augment(addFrom); return *this; }
	virtual const struct abbrev *getBookAbbrevs(int *retSize);
	static const char *DEFAULT_LOCALE_NAME;
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordModule+Index.h<|end_filename|>
//
//  SwordModuleIndex.h
//  ObjCSword
//
//  Created by <NAME> on 13.06.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SwordModule.h"

@interface SwordModule(Index)

- (BOOL)hasSearchIndex;
- (void)createSearchIndex;
- (void)deleteSearchIndex;
- (NSArray *)performIndexSearch:(NSString *)searchString;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/lzsscomprs.h<|end_filename|>
/******************************************************************************
 *
 *  lzsscomprs.h -	definition of Class SWCompress used for data
 *			compression
 *
 * $Id: lzsscomprs.h 2935 2013-08-02 11:06:30Z scribe $
 *
 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef LZSSCOMPRS_H
#define LZSSCOMPRS_H

#include <swcomprs.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT LZSSCompress : public SWCompress
{
class Private;
	Private *p;
public:
	LZSSCompress ();
	virtual ~LZSSCompress();
	virtual void Encode(void);
	virtual void Decode(void);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordModule.h<|end_filename|>
/*	SwordModule.h - Sword API wrapper for Modules.

    Copyright 2008 <NAME>
    Based on code by <NAME>
  
	This program is free software; you can redistribute it and/or modify it under the terms of the
	GNU General Public License as published by the Free Software Foundation version 2.

	This program 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
	General Public License for more details. (http://www.gnu.org/licenses/gpl.html)
*/

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#import "swmodule.h"
#endif

// defines for dictionary entries for passage study
#define ATTRTYPE_TYPE       @"type"
#define ATTRTYPE_PASSAGE    @"passage"
#define ATTRTYPE_MODULE     @"modulename"
#define ATTRTYPE_NOTENUMBER @"notenumber"
#define ATTRTYPE_ACTION     @"action"
#define ATTRTYPE_VALUE      @"value"

// positions
#define SWPOS_BOTTOM   2
#define SWPOS_TOP      1


@class SwordManager, SwordModuleTextEntry, SwordKey, SwordFilter;

typedef enum {
    RenderTypeStripped = 1,
    RenderTypeRendered
}RenderType;

/** These are the main module types as returned in -typeString */
typedef enum {
    All         = 0x0000,
	Bible       = 0x0001, 
    Commentary  = 0x0002, 
    Dictionary  = 0x0004,
    Genbook     = 0x0008
}ModuleType;

/**
 These are the main module categories as returned in -categoryString
 Remember that modules type bible, commentary, dictionary and genbook not necessarily have a category
 */
typedef enum {
    Unset           = -1,
    NoCategory      = 0,
	DailyDevotion   = 0x0001, 
    Maps            = 0x0002, 
    Glossary        = 0x0004,
    Images          = 0x0008,
    Essays          = 0x0010,
    Cults           = 0x0011    
}ModuleCategory;


@interface SwordModule : NSObject {
	ModuleCategory category;

    /** yes, we have a delegate to report any action to */
    id delegate;

    NSLock *indexLock;
    NSRecursiveLock *moduleLock;
}

@property (retain, readwrite) SwordManager *swManager;
@property (readwrite) int status;
@property (readonly) ModuleType type;

#ifdef __cplusplus
/**
 Convenience initializer
 */
+ (id)moduleForSWModule:(sword::SWModule *)aModule;

/**
 Factory method that creates the correct module type instance for the given type
 */
+ (id)moduleForType:(ModuleType)aType swModule:(sword::SWModule *)swModule;

/**
 Initialize this module with an the SWModule.
 This initializer should normally not need to be used.
 */
- (id)initWithSWModule:(sword::SWModule *)aModule;

/**
 Retrieve the underlying SWModule instance
 */
- (sword::SWModule *)swModule;
#endif

/**
 maps type string to ModuleType enum
 @param[in] typeStr type String as in -typeString(SwordModule)
 @return type according to ModuleType enum
 */
+ (ModuleType)moduleTypeForModuleTypeString:(NSString *)typeStr;

/**
 maps type string to ModuleType enum
 @param[in] categoryStr category String as in -categoryString(SwordModule)
 @return type according to ModuleCategory enum
 */
+ (ModuleCategory)moduleCategoryForModuleCategoryString:(NSString *)categoryStr;

// ------------- instance methods ---------------

/** Sets a render filter to this module */
- (void)setRenderFilter:(SwordFilter *)aFilter;

/** Sets a strip filter to this module */
- (void)setStripFilter:(SwordFilter *)aFilter;

/**
 Any error while processing the module?
 */
- (NSInteger)error;

/** module name */
- (NSString *)name;
/** module description */
- (NSString *)descr;
/** module language */
- (NSString *)lang;
/** module type string */
- (NSString *)typeString;

// --------------- Conf entries --------------
/**
 Module category as string
 */
- (NSString *)categoryString;
/**
 Module category
 */
- (ModuleCategory)category;
/**
 Module version
 */
- (NSString *)version;
/**
 Module Promo string (ShortPromo)
 */
- (NSString *)shortPromo;
/**
 Module distribution license
 */
- (NSString *)distributionLicense;
/**
 Module minimum Sword version
 */
- (NSString *)minVersion;
/**
 Module about text
 */
- (NSString *)aboutText;
/**
 Override to get custom behaviour.
 */
- (NSAttributedString *)fullAboutText;
/**
 Module versification type
 */
- (NSString *)versification;
/**
 Is module Unicode UTF-8?
 */
- (BOOL)isUnicode;
/**
 Is module encrypted
 */
- (BOOL)isEncrypted;
/**
 Is module locked, that is encrypted but not unlocked?
 */
- (BOOL)isLocked;
/**
 Is module editable, i.e. is it's a personal commentary?
 */
- (BOOL)isEditable;
/**
 Is module writing direction Right to Left?
 */
- (BOOL)isRTL;
/**
 Has module this feature?
 See SWMOD_FEATURE_* in SwordManager
 */
- (BOOL)hasFeature:(NSString *)feature;
/**
 Returns a config entry for a given config key
 */
- (NSString *)configFileEntryForConfigKey:(NSString *)entryKey;

// ------------------ module access semaphores -----------------

- (void)lockIndexAccess;

- (void)unlockIndexAccess;

/**
 Aquires a module access lock so that no other thread may access this module.
 */
- (void)lockModuleAccess;
/**
 Unlock module access. Make it accessible to other threads.
 */
- (void)unlockModuleAccess;

// ----------------- module positioning ------------------------

/**
 Increment module key position
 */
- (void)incKeyPosition;
/**
 Decrement module key position
 */
- (void)decKeyPosition;
/**
 Set position key from a string
 */
- (SwordKey *)setKeyString:(NSString *)aKeyString;
/**
 Set position from a key
 */
- (SwordKey *)setSwordKey:(SwordKey *)aKey;

/**
 Module key. New instance created by module.
 */
- (SwordKey *)createKey;
/**
 Module key. Reference only.
 */
- (SwordKey *)getKey;

// ------------------- module metadata processing ------------------

/**
 Process metadata attributes of module entry.
 */
- (void)setProcessEntryAttributes:(BOOL)flag;
/**
 Are metadata attributes of module entry processed?
 */
- (BOOL)processEntryAttributes;

/**
 returns attribute values from the engine for notes, cross-refs and such for the given link type
 @return NSArray for references
 @return NSString for text data
 */
- (id)attributeValueForParsedLinkData:(NSDictionary *)data;
- (id)attributeValueForParsedLinkData:(NSDictionary *)data withTextRenderType:(RenderType)textType;

/** returns the pre-verse entry value */
- (NSString *)entryAttributeValuePreverse;
- (NSString *)entryAttributeValuePreverseForKey:(SwordKey *)aKey;

- (NSString *)entryAttributeValueFootnoteOfType:(NSString *)fnType indexValue:(NSString *)index;
- (NSString *)entryAttributeValueFootnoteOfType:(NSString *)fnType indexValue:(NSString *)index forKey:(SwordKey *)aKey;

- (NSArray *)entryAttributeValuesLemma;
- (NSArray *)entryAttributeValuesLemmaNormalized;

// ----------------- Module text access ----------------------

/**
 Returns a rendered text for the text at the current module position
 */
- (NSString *)renderedText;
/**
 Renders the given string with the modules render filters
 */
- (NSString *)renderedTextFromString:(NSString *)aString;
/**
 Returns a stripped text for the text at the current module position
 */
- (NSString *)strippedText;
/**
 Strips the given string with the modules strip filters
 */
- (NSString *)strippedTextFromString:(NSString *)aString;

/**
 Convenience method, delegates to textEntriesForReference:textType:
 This method generates stripped text string for a given reference.
 @param aReference bible reference
 @return Array of SwordModuleTextEntry instances
 */
- (NSArray *)strippedTextEntriesForReference:(NSString *)aReference;
/**
 * Convenience method, delegates to textEntryForReference:textType:
 * @param aReference the reference key. i.e. 'Gen 1'
 * @return a single text entry, or null if not found
 */
- (SwordModuleTextEntry *)strippedTextEntryForReference:(NSString *)aReference;

/**
 Convenience method, delegates to textEntriesForReference:textType:
 This method generates HTML string for a given reference.
 @param aReference bible reference
 @return Array of SwordModuleTextEntry instances
 */
- (NSArray *)renderedTextEntriesForReference:(NSString *)aReference;
/**
 * Convenience method, delegates to textEntryForReference:textType:
 * @param aReference the reference key. i.e. 'Gen 1'
 * @return a single text entry, or null if not found
 */
- (SwordModuleTextEntry *)renderedTextEntryForReference:(NSString *)aReference;

/**
 This contains real logic.
 Returns an array of text entries, either rendered or stripped.

 the block is called with each search result for custom activity.

 !!! attention, is SwordModule this only returns one entry because we don't know if we are a bible or what.
 Subclasses should extend or override the functionality !!!

 It locks and unlock the module.

 @return Array of SwordModuleTextEntry
 */
- (NSArray *)textEntriesForReference:(NSString *)aReference
                          renderType:(RenderType)aType
                           withBlock:(void(^)(SwordModuleTextEntry *))entryResult;

/**
 * Retrieves a text entry for the given reference.
 * @param aReference a reference as 'Gen 1' for bibles
 * @param aType
 * @return
 */
- (SwordModuleTextEntry *)textEntryForReference:(NSString *)aReference renderType:(RenderType)aType;

/**
 number of entries
 abstract method, should be overridden by subclasses
 */
- (long)entryCount;

/**
 Write text to module position
 */
- (void)writeEntry:(SwordModuleTextEntry *)anEntry;

@end


<|start_filename|>src/Sword/NSArray+TextEntryDuplicateRemove.h<|end_filename|>
//
//  NSArray+TextEntryDuplicateRemove.h
//  Eloquent
//
//  Created by <NAME> on 15.08.10.
//  Copyright 2010 CrossWire. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSArray (TextEntryDuplicateRemove)

- (NSArray *)arrayWithRemovedDuplicates;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/teihtmlhref.h<|end_filename|>
/******************************************************************************
 *
 *  teihtmlhref.h -	Implementation of TEIHTMLHREF
 *
 * $Id: teihtmlhref.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2008-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef TEIHTMLHREF_H
#define TEIHTMLHREF_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts TEI text to HTMLHREF text
 */
class SWDLLEXPORT TEIHTMLHREF : public SWBasicFilter {
private:
	bool renderNoteNumbers;

protected:
	class MyUserData : public BasicFilterUserData {
	public:
		bool isBiblicalText;
		SWBuf lastHi;
		
		SWBuf version;
		MyUserData(const SWModule *module, const SWKey *key);
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	TEIHTMLHREF();
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordKey.h<|end_filename|>
//
//  SwordKey.h
//  MacSword2
//
//  Created by <NAME> on 17.12.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#include <swkey.h>
#endif

@interface SwordKey : NSObject {
#ifdef __cplusplus
    sword::SWKey *sk;
#endif
}

#ifdef __cplusplus
+ (SwordKey *)swordKeyWithSWKey:(sword::SWKey *)aSk;
+ (SwordKey *)swordKeyWithNewSWKey:(sword::SWKey *)aSk;

/**
    This is only an assigned key. The module will handle deleting it.
*/
- (SwordKey *)initWithSWKey:(sword::SWKey *)aSk;

/**
    We have to handle deletion of this.
*/
- (SwordKey *)initWithNewSWKey:(sword::SWKey *)aSk;
- (sword::SWKey *)swKey;
#endif

@property (assign, readwrite) NSString *keyText;

- (int)error;

- (void)decrement;
- (void)increment;

- (void)setPosition:(int)pos;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/versificationmgr.h<|end_filename|>
/******************************************************************************
 *
 *  versification.h -	definition of class VersificationMgr used for managing
 *			versification systems
 *
 * $Id: versificationmgr.h 3240 2014-07-12 16:27:35Z scribe $
 *
 * Copyright 2008-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#include <list>
#include <defs.h>
#include <swcacher.h>
#include <swbuf.h>


#ifndef VERSIFICATIONMGR_H
#define VERSIFICATIONMGR_H


SWORD_NAMESPACE_START

typedef std::list <SWBuf>StringList;

struct sbook;
class TreeKey;


struct abbrev
{
	const char *ab;
	const char *osis;
};

struct sbook {
	/**Name of book
	*/
	const char *name;

	/**OSIS name
	*/
	const char *osis;

	/**Preferred Abbreviation
	*/
	const char *prefAbbrev;

	/**Maximum chapters in book
	*/
	unsigned char chapmax;
	/** Array[chapmax] of maximum verses in chapters
	*/
	int *versemax;
};


class SWDLLEXPORT VersificationMgr : public SWCacher {


public:
	class System;

private:
	friend class __staticsystemVersificationMgr;

	class Private;
	Private *p;

	void init();

protected:
	static VersificationMgr *systemVersificationMgr;

public:
	class SWDLLEXPORT Book {
		friend class System;
		friend struct BookOffsetLess;
		class Private;
		Private *p;

		/** book name */
		SWBuf longName;

		/** OSIS Abbreviation */
		SWBuf osisName;

		/** Preferred Abbreviation */
		SWBuf prefAbbrev;

		/** Maximum chapters in book */
		unsigned int chapMax;

		void init();

	public:
		Book() { init(); }
		Book(const Book &other);
		Book &operator =(const Book &other);
		Book(const char *longName, const char *osisName, const char *prefAbbrev, int chapMax) {
			this->longName = longName;
			this->osisName = osisName;
			this->prefAbbrev = prefAbbrev;
			this->chapMax = chapMax;
			init();
		}
		~Book();
		const char *getLongName() const { return longName.c_str(); }
		const char *getOSISName() const { return osisName.c_str(); }
		const char *getPreferredAbbreviation() const { return prefAbbrev.c_str(); }
		int getChapterMax() const { return chapMax; }
		int getVerseMax(int chapter) const;
	};

	class SWDLLEXPORT System {
		class Private;
		Private *p;
		SWBuf name;
		int BMAX[2];
		long ntStartOffset;
		void init();
	public:
		System() { this->name = ""; init(); }
		System(const System &other);
		System &operator =(const System &other);
		System(const char *name) { this->name = name; init(); }
		~System();
		const char *getName() const { return name.c_str(); }
		const Book *getBookByName(const char *bookName) const;
		int getBookNumberByOSISName(const char *bookName) const;
		const Book *getBook(int number) const;
		int getBookCount() const;
		void loadFromSBook(const sbook *ot, const sbook *nt, int *chMax, const unsigned char *mappings=NULL);
		long getOffsetFromVerse(int book, int chapter, int verse) const;
		char getVerseFromOffset(long offset, int *book, int *chapter, int *verse) const;
		const int *getBMAX() const { return BMAX; };
		long getNTStartOffset() const { return ntStartOffset; }
		void translateVerse(const System *dstSys, const char **book, int *chapter, int *verse, int *verse_end) const;
	};
	VersificationMgr() { init(); }
	~VersificationMgr();
	static VersificationMgr *getSystemVersificationMgr();
	static void setSystemVersificationMgr(VersificationMgr *newVersificationMgr);
	const StringList getVersificationSystems() const;
	const System *getVersificationSystem(const char *name) const;
	void registerVersificationSystem(const char *name, const sbook *ot, const sbook *nt, int *chMax, const unsigned char *mappings=NULL);
	void registerVersificationSystem(const char *name, const TreeKey *);
};

SWDLLEXPORT extern const struct abbrev builtin_abbrevs[];

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordLocaleManager.h<|end_filename|>
//
//  SwordLocaleManager.h
//  ObjCSword
//
//  Created by <NAME> on 01.08.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SwordLocaleManager : NSObject {
}

+ (SwordLocaleManager *)defaultManager;

/**
 Initializes the global locale system.
 Any created instance that needs localized information will use it.
 */
- (void)initLocale;

/**
 Initializes global locale system.
 Loads the locale (locale.d) folder from the specified path.
 */
- (void)initLocaleWithLocaledPath:(NSString *)aPath;

/**
 Retrieves the configured default locale name
 */
- (NSString *)getDefaultLocaleName;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osisheadings.h<|end_filename|>
/******************************************************************************
 *
 *  osisheadings.h -	Implementation of OSISHeadings
 *
 * $Id: osisheadings.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISHEADINGS_H
#define OSISHEADINGS_H

#include <swoptfilter.h>
#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** This Filter shows/hides headings in a OSIS text
 */
class SWDLLEXPORT OSISHeadings : public SWOptionFilter, public SWBasicFilter {
public:
	OSISHeadings();
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/ftpparse.h<|end_filename|>
#ifndef FTPPARSE_H
#define FTPPARSE_H

#include <time.h>

/*
ftpparse(&fp,buf,len) tries to parse one line of LIST output.

The line is an array of len characters stored in buf.
It should not include the terminating CR LF; so buf[len] is typically CR.

If ftpparse() can't find a filename, it returns 0.

If ftpparse() can find a filename, it fills in fp and returns 1.
fp is a struct ftpparse, defined below.
The name is an array of fp.namelen characters stored in fp.name;
fp.name points somewhere within buf.
*/

struct ftpparse {
  char *name; /* not necessarily 0-terminated */
  int namelen;
  int flagtrycwd; /* 0 if cwd is definitely pointless, 1 otherwise */
  int flagtryretr; /* 0 if retr is definitely pointless, 1 otherwise */
  int sizetype;
  long size; /* number of octets */
  int mtimetype;
  time_t mtime; /* modification time */
  int idtype;
  char *id; /* not necessarily 0-terminated */
  int idlen;
} ;

#define FTPPARSE_SIZE_UNKNOWN 0
#define FTPPARSE_SIZE_BINARY 1 /* size is the number of octets in TYPE I */
#define FTPPARSE_SIZE_ASCII 2 /* size is the number of octets in TYPE A */

#define FTPPARSE_MTIME_UNKNOWN 0
#define FTPPARSE_MTIME_LOCAL 1 /* time is correct */
#define FTPPARSE_MTIME_REMOTEMINUTE 2 /* time zone and secs are unknown */
#define FTPPARSE_MTIME_REMOTEDAY 3 /* time zone and time of day are unknown */
/*
When a time zone is unknown, it is assumed to be GMT. You may want
to use localtime() for LOCAL times, along with an indication that the
time is correct in the local time zone, and gmtime() for REMOTE* times.
*/

#define FTPPARSE_ID_UNKNOWN 0
#define FTPPARSE_ID_FULL 1 /* unique identifier for files on this FTP server */

extern int ftpparse(struct ftpparse *,char *,int);

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/thmlxhtml.h<|end_filename|>
/******************************************************************************
 *
 *  thmlxhtml.h -	Implementation of ThMLXHTML
 *
 * $Id: thmlxhtml.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2011-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef _THMLXHTML_H
#define _THMLXHTML_H

#include <swbasicfilter.h>
#include <utilxml.h>

SWORD_NAMESPACE_START

/** this filter converts ThML text to classed XHTML
 */
class SWDLLEXPORT ThMLXHTML : public SWBasicFilter {
	SWBuf imgPrefix;
	bool renderNoteNumbers;
protected:
	class MyUserData : public BasicFilterUserData {
	public:
		MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {}
		bool inscriptRef;
		char secHeadLevel;
		bool isBiblicalText;
		SWBuf version;
		XMLTag startTag;
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	ThMLXHTML();
	virtual const char *getImagePrefix() { return imgPrefix.c_str(); }
	virtual void setImagePrefix(const char *newImgPrefix) { imgPrefix = newImgPrefix; }
	virtual const char *getHeader() const;
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};

SWORD_NAMESPACE_END

#endif


<|start_filename|>src/UserInterface/HUDToolbarView.h<|end_filename|>
//
//  HUDToolbarView.h
//  Eloquent
//
//  Created by <NAME> on 15.03.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface HUDToolbarView : NSView {

}

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/utf8transliterator.h<|end_filename|>
/******************************************************************************
 *
 *  utf8transliterator.h -	Implementation of UTF8Transliterator
 *
 * $Id: utf8transliterator.h 2906 2013-07-17 22:34:43Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef UTF8TRANSLITERATOR_H
#define UTF8TRANSLITERATOR_H

enum scriptEnum {SE_OFF, SE_LATIN, 
/*one-way (to) transliterators*/ 
SE_IPA, SE_BASICLATIN, SE_SBL, SE_TC, SE_BETA, SE_BGREEK, SE_SERA, SE_HUGOYE, SE_UNGEGN, SE_ISO, SE_ALALC, SE_BGN, 
/*two-way transliterators*/ 
SE_GREEK, SE_HEBREW, SE_CYRILLIC, SE_ARABIC, SE_SYRIAC, SE_KATAKANA, SE_HIRAGANA, SE_HANGUL, SE_DEVANAGARI, SE_TAMIL, SE_BENGALI, SE_GURMUKHI, SE_GUJARATI, SE_ORIYA, SE_TELUGU, SE_KANNADA, SE_MALAYALAM, SE_THAI, SE_GEORGIAN, SE_ARMENIAN, SE_ETHIOPIC, SE_GOTHIC, SE_UGARITIC, SE_COPTIC, SE_MEROITIC, SE_LINEARB, SE_CYPRIOT, SE_RUNIC, SE_OGHAM, SE_THAANA, SE_GLAGOLITIC, SE_CHEROKEE,
/*SE_TENGWAR, SE_CIRTH,*/
/*one-way (from) transliterators*/
SE_JAMO, SE_HAN, SE_KANJI
};

#define NUMSCRIPTS 49
#define NUMTARGETSCRIPTS 2 //NUMSCRIPTS-3//6

#include <swoptfilter.h>

#include <unicode/unistr.h>

#include <unicode/translit.h>

#include <defs.h>
#include <map>

SWORD_NAMESPACE_START

class SWModule;

struct SWTransData {
	UnicodeString resource;
	UTransDirection dir;
};
typedef std::map<const UnicodeString, SWTransData> SWTransMap;
typedef std::pair<UnicodeString, SWTransData> SWTransPair;

/** This Filter uses ICU for transliteration
*/
class SWDLLEXPORT UTF8Transliterator : public SWOptionFilter {
private:

	unsigned char option;

	static const char optionstring[NUMTARGETSCRIPTS][16];

	static const char optName[];
	static const char optTip[];
	StringList options;

#ifdef ICU_CUSTOM_RESOURCE_BUILDING
	static const char SW_RB_RULE_BASED_IDS[];
	static const char SW_RB_RULE[];
	static const char SW_RESDATA[];
	static SWTransMap transMap;
	UErrorCode utf8status;

	void Load(UErrorCode &status);
	void registerTrans(const UnicodeString& ID, const UnicodeString& resource, UTransDirection dir, UErrorCode &status);	
	bool checkTrans(const UnicodeString& ID, UErrorCode &status);
#endif
	bool addTrans(const char* newTrans, SWBuf* transList);
	Transliterator *createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status);

public:
	UTF8Transliterator();
	~UTF8Transliterator();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
	virtual const char *getOptionName() { return optName; }
	virtual const char *getOptionTip() { return optTip; }
	virtual void setOptionValue(const char *ival);
	virtual const char *getOptionValue();
	virtual StringList getOptionValues() { return options; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/scsuutf8.h<|end_filename|>
/******************************************************************************
 *
 *  scsuutf8.h - SWFilter descendant to convert a SCSU character to UTF-8
 *
 * $Id: scsuutf8.h 3083 2014-03-06 08:13:10Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SCSUUTF8_H
#define SCSUUTF8_H

#include <swfilter.h>

#ifdef _ICU_
#include <unicode/utypes.h>
#include <unicode/ucnv.h>
#include <unicode/uchar.h>
#endif

SWORD_NAMESPACE_START

/** This filter converts SCSU compressed (encoded) text to UTF-8
 */
class SWDLLEXPORT SCSUUTF8 : public SWFilter {
private:
#ifdef _ICU_
	UConverter* scsuConv;
	UConverter* utf8Conv;
	UErrorCode err;
#else
	// without ICU, we'll attempt to use Roman Czyborra's SCSU decoder code
	unsigned char active;
	bool mode;
	unsigned long c, d;

	static unsigned short start[8];
	static unsigned short slide[8];
	static unsigned short win[256];

	int UTF8Output(unsigned long, SWBuf* utf8Buf);
#endif
  
public:
	SCSUUTF8();
	~SCSUUTF8();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>externals/PSMTabBarControl/source/PSMTabBarControl.h<|end_filename|>
//
//  PSMTabBarControl.h
//  PSMTabBarControl
//
//  Created by <NAME> on 10/13/05.
//  Copyright 2005 Positive Spin Media. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "PSMProgressIndicator.h"

extern NSString *const kPSMModifierChangedNotification;
extern NSString *const kPSMTabModifierKey;  // Key for user info dict in modifier changed notification

extern NSString *const PSMTabDragDidEndNotification;
extern NSString *const PSMTabDragDidBeginNotification;

extern const CGFloat kPSMTabBarControlHeight;

// internal cell border
extern const CGFloat kSPMTabBarCellInternalXMargin;
extern const CGFloat kSPMTabBarCellInternalYMargin;

// padding between objects
extern const CGFloat kPSMTabBarCellPadding;
extern const CGFloat kPSMTabBarCellIconPadding;
// fixed size objects
extern const CGFloat kPSMMinimumTitleWidth;
extern const CGFloat kPSMTabBarIndicatorWidth;
extern const CGFloat kPSMTabBarIconWidth;
extern const CGFloat kPSMHideAnimationSteps;

// Value used in _currentStep to indicate that resizing operation is not in progress
extern const NSInteger kPSMIsNotBeingResized;

// Value used in _currentStep when a resizing operation has just been started
extern const NSInteger kPSMStartResizeAnimation;

@class PSMOverflowPopUpButton;
@class PSMRolloverButton;
@class PSMTabBarCell;
@class PSMTabBarControl;
@protocol PSMTabStyle;

// Tab views controlled by the tab bar may expect this protocol to be conformed to by their delegate.
@protocol PSMTabViewDelegate<NSTabViewDelegate>
- (void)tabView:(NSTabView *)tabView willRemoveTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView willAddTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView willInsertTabViewItem:(NSTabViewItem *)tabViewItem atIndex:(int)index;
- (void)tabView:(NSTabView *)tabView doubleClickTabViewItem:(NSTabViewItem *)tabViewItem;
- (NSDragOperation)tabView:(NSTabView *)tabView draggingEnteredTabBarForSender:(id<NSDraggingInfo>)sender;
- (BOOL)tabView:(NSTabView *)tabView shouldAcceptDragFromSender:(id<NSDraggingInfo>)sender;
- (NSTabViewItem *)tabView:(NSTabView *)tabView unknownObjectWasDropped:(id <NSDraggingInfo>)sender;
@end

// These methods are KVO-observed.
@protocol PSMTabBarControlRepresentedObjectIdentifierProtocol<NSObject>
@optional
- (BOOL)isProcessing;
- (void)setIsProcessing:(BOOL)processing;
- (NSImage *)icon;
- (void)setIcon:(NSImage *)icon;
- (int)objectCount;
- (void)setObjectCount:(int)objectCount;
@end

@protocol PSMTabBarControlDelegate<NSTabViewDelegate>
// Set object count, icon, etc.
- (void)tabView:(NSTabView *)tabView updateStateForTabViewItem:(NSTabViewItem *)tabViewItem;
@optional
- (NSDragOperation)tabView:(NSTabView *)aTabView
    draggingEnteredTabBarForSender:(id<NSDraggingInfo>)tabView;
- (BOOL)tabView:(NSTabView *)tabView shouldAcceptDragFromSender:(id<NSDraggingInfo>)sender;

//Standard NSTabView methods
- (BOOL)tabView:(NSTabView *)aTabView shouldCloseTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem;

//"Spring-loaded" tabs methods
- (NSArray *)allowedDraggedTypesForTabView:(NSTabView *)aTabView;
- (void)tabView:(NSTabView *)aTabView acceptedDraggingInfo:(id <NSDraggingInfo>)draggingInfo onTabViewItem:(NSTabViewItem *)tabViewItem;

//Contextual menu method
- (NSMenu *)tabView:(NSTabView *)aTabView menuForTabViewItem:(NSTabViewItem *)tabViewItem;

//Drag and drop methods
- (BOOL)tabView:(NSTabView *)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl;
- (BOOL)tabView:(NSTabView *)aTabView shouldDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl;
- (void)tabView:(NSTabView*)aTabView willDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl;
- (void)tabView:(NSTabView*)aTabView didDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl;

//Tear-off tabs methods
- (NSImage *)tabView:(NSTabView *)aTabView imageForTabViewItem:(NSTabViewItem *)tabViewItem offset:(NSSize *)offset styleMask:(unsigned int *)styleMask;
- (PSMTabBarControl *)tabView:(NSTabView *)aTabView newTabBarForDraggedTabViewItem:(NSTabViewItem *)tabViewItem atPoint:(NSPoint)point;
- (void)tabView:(NSTabView *)aTabView closeWindowForLastTabViewItem:(NSTabViewItem *)tabViewItem;

//Overflow menu validation
- (BOOL)tabView:(NSTabView *)aTabView validateOverflowMenuItem:(NSMenuItem *)menuItem forTabViewItem:(NSTabViewItem *)tabViewItem;

//tab bar hiding methods
- (void)tabView:(NSTabView *)aTabView tabBarDidHide:(PSMTabBarControl *)tabBarControl;
- (void)tabView:(NSTabView *)aTabView tabBarDidUnhide:(PSMTabBarControl *)tabBarControl;

//tooltips
- (NSString *)tabView:(NSTabView *)aTabView toolTipForTabViewItem:(NSTabViewItem *)tabViewItem;

//accessibility
- (NSString *)accessibilityStringForTabView:(NSTabView *)aTabView objectCount:(int)objectCount;

- (void)tabView:(NSTabView *)tabView willRemoveTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView willAddTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)tabView willInsertTabViewItem:(NSTabViewItem *)tabViewItem atIndex:(int) index;
- (void)tabViewDidChangeNumberOfTabViewItems:(NSTabView *)tabView;

// iTerm add-on
- (void)setTabColor:(NSColor *)aColor forTabViewItem:(NSTabViewItem *) tabViewItem;
- (NSColor*)tabColorForTabViewItem:(NSTabViewItem*)tabViewItem;
- (void)tabView:(NSTabView *)tabView doubleClickTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabViewDoubleClickTabBar:(NSTabView *)tabView;
- (void)setModifier:(int)mask;
- (void)fillPath:(NSBezierPath*)path;
- (void)closeTab:(id)identifier;
- (NSTabViewItem *)tabView:(NSTabView *)tabView unknownObjectWasDropped:(id <NSDraggingInfo>)sender;

@end

typedef enum {
    PSMTabBarHorizontalOrientation,
    PSMTabBarVerticalOrientation
} PSMTabBarOrientation;

enum {
    PSMTab_SelectedMask = 1 << 1,
    PSMTab_LeftIsSelectedMask = 1 << 2,
    PSMTab_RightIsSelectedMask = 1 << 3,
    PSMTab_PositionLeftMask = 1 << 4,
    PSMTab_PositionMiddleMask = 1 << 5,
    PSMTab_PositionRightMask = 1 << 6,
    PSMTab_PositionSingleMask = 1 << 7
};

enum {
    PSMTab_TopTab = 0,
    PSMTab_BottomTab = 1,
    PSMTab_LeftTab = 2,
};

// This view provides a control interface to manage a regular NSTabView.  It looks and works like
// the tabbed browsing interface of many popular browsers.
@interface PSMTabBarControl : NSControl<
  NSDraggingSource,
  PSMProgressIndicatorDelegate,
  PSMTabViewDelegate>

// control configuration
@property(nonatomic, assign) BOOL disableTabClose;
@property(nonatomic, assign) PSMTabBarOrientation orientation;
@property(nonatomic, strong) id<PSMTabStyle> style;
@property(nonatomic, assign) BOOL hideForSingleTab;
@property(nonatomic, assign) BOOL showAddTabButton;
@property(nonatomic, assign) int cellMinWidth;
@property(nonatomic, assign) int cellMaxWidth;
@property(nonatomic, assign) int cellOptimumWidth;
@property(nonatomic, assign) BOOL sizeCellsToFit;
@property(nonatomic, assign) BOOL useOverflowMenu;
@property(nonatomic, assign) BOOL allowsBackgroundTabClosing;
@property(nonatomic, assign) BOOL allowsResizing;
@property(nonatomic, assign) BOOL selectsTabsOnMouseDown;
@property(nonatomic, assign) BOOL automaticallyAnimates;
@property(nonatomic, assign) int tabLocation;

// If off (the default) always ellipsize the ends of tab titles that don't fit.
// Of on, ellipsize the start if more tabs share a prefix than a suffix.
@property(nonatomic, assign) BOOL smartTruncation;

@property(nonatomic, strong) IBOutlet NSTabView *tabView;
@property(nonatomic, assign) id<PSMTabBarControlDelegate> delegate;
@property(nonatomic, strong) id partnerView;
@property(nonatomic, readonly) PSMOverflowPopUpButton *overflowPopUpButton;

// control characteristics
+ (NSBundle *)bundle;

- (void)changeIdentifier:(id)newIdentifier atIndex:(int)theIndex;
- (void)moveTabAtIndex:(NSInteger)i1 toIndex:(NSInteger)i2;

// the buttons
- (PSMRolloverButton *)addTabButton;

// tab information
- (NSMutableArray *)representedTabViewItems;
- (int)numberOfVisibleTabs;

// special effects
- (void)hideTabBar:(BOOL)hide animate:(BOOL)animate;
- (BOOL)isTabBarHidden;

// internal bindings methods also used by the tab drag assistant
- (void)bindPropertiesForCell:(PSMTabBarCell *)cell andTabViewItem:(NSTabViewItem *)item;
- (void)removeTabForCell:(PSMTabBarCell *)cell;

// iTerm add-ons
- (void)setTabColor:(NSColor *)aColor forTabViewItem:(NSTabViewItem *) tabViewItem;
- (NSColor*)tabColorForTabViewItem:(NSTabViewItem*)tabViewItem;
- (void)setModifier:(int)mask;
- (NSString*)_modifierString;
- (void)fillPath:(NSBezierPath*)path;
- (NSTabViewItem *)tabView:(NSTabView *)tabView unknownObjectWasDropped:(id <NSDraggingInfo>)sender;

- (NSColor *)accessoryTextColor;

- (void)initializeStateForCell:(PSMTabBarCell *)cell;

- (void)setIsProcessing:(BOOL)isProcessing forTabWithIdentifier:(id)identifier;
- (void)setIcon:(NSImage *)icon forTabWithIdentifier:(id)identifier;
- (void)setObjectCount:(NSInteger)objectCount forTabWithIdentifier:(id)identifier;

- (void)setTabsHaveCloseButtons:(BOOL)tabsHaveCloseButtons;

@end


<|start_filename|>src/Indexing/Indexer.h<|end_filename|>
//
//  Indexer.h
//  Eloquent
//
//  Created by <NAME> on 28.05.07.
//  Copyright 2007 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>
#import <FooLogger/CocoLogger.h>
#import <ObjCSword/SwordModule.h>
#import <AppKit/NSApplication.h>
#import <CoreServices/CoreServices.h>

@protocol IndexCreationProgressing;

#define kMaxSearchResults 1000

typedef enum {
    ReferenceSearchType,
    IndexSearchType,
    ViewSearchType
}SearchType;

typedef enum {
	VerseKeyIndexTextType,
	ContentTextType,
	StrongTextType
}IndexTextType;

@interface Indexer : NSObject  {
    SKIndexRef contentIndexRef;
	ModuleType modType;
    NSString *modTypeStr;
	NSString *modName;
    
    NSLock *accessLock;
    NSInteger accessCounter;
    
    id<IndexCreationProgressing> __strong progressIndicator;
}

@property (readwrite) ModuleType modType;
@property (strong, readwrite) NSString *modTypeStr;
@property (strong, readwrite) NSString *modName;
@property (strong, readwrite) NSLock *accessLock;
@property (readwrite) NSInteger accessCounter;
@property (strong, readwrite) id<IndexCreationProgressing> progressIndicator;

/**
 \brief convenient allocator for this class cluster
 */
+ (id)indexerWithModuleName:(NSString *)aModName moduleType:(ModuleType)aModType;

/**
 \brief init Indexer with the given parameters
 if there is no existing index available a new one is created
 */
- (id)initWithModuleName:(NSString *)aModName moduleType:(ModuleType)aModType;

/**
\brief add a text to be indexed to this indexer
 @param[in] aKey the document key (ID)
 @param[in] aText the text to be indexed
 @param[in] type the type of text (see IndexTextType enum values)
 @param[in] aDict a dictionary to be stored in the document
 @return success YES/NO
 */
- (BOOL)addDocument:(NSString *)aKey text:(NSString *)aText textType:(IndexTextType)type storeDict:(NSDictionary *)aDict;

/**
 \brief search in an this index for the given query and in the given range
 @param[in] query this query to search in
 @param[in] constrains, search constrains
 @param[in] maxResults the maximum number of results
 @return array of NSDictionaries with search results. 
 the array is autoreleased, the caller has to make sure to retain it if needed.
 */
- (NSArray *)performSearchOperation:(NSString *)query constrains:(id)constrains maxResults:(long)maxResults;

/**
 creates a new thread for searching and returnes immediately.
 @param[in] query this query to search in
 @param[in] constrains, search constrains
 @param[in] maxResults the maximum number of results
 @param[in] delegate report to delegate. @selector(searchOperationFinished:) is called with a NSArray of search results
*/
- (void)performThreadedSearchOperation:(NSString *)query constrains:(id)constrains maxResults:(long)maxResults delegate:(id)delegate;

/**
 \brief flush the data to file
 */
- (BOOL)flushIndex;

/**
 \brief closes all indexes
 */
- (void)close;

@end


<|start_filename|>src/UserInterface/ModuleViewController.h<|end_filename|>
//
//  ModuleViewController.h
//  Eloquent
//
//  Created by <NAME> on 15.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

#define TEXT_VERSE_MARKER   @"VerseMarkerAttributeName"

@class SwordModule, CacheObject;

@interface ModuleViewController : ModuleCommonsViewController <NSCoding, TextContentProviding, TextDisplayable, TextDisplayableExt> {
    IBOutlet NSBox *placeHolderView;
    IBOutlet NSTextField *statusLine;
    
    CacheObject *searchContentCache;

    SwordModule *module;
    BOOL performProgressCalculation;
    Indexer *indexer;
}

// --------- properties ---------
@property (strong, readwrite) SwordModule *module;
@property (readwrite) BOOL performProgressCalculation;
@property (strong, readwrite) CacheObject *searchContentCache;

// ---------- methods ---------
- (NSAttributedString *)displayableHTMLForIndexedSearchResults:(NSArray *)results;
- (NSAttributedString *)displayableHTMLForReferenceLookup;

// helper methods for text display/index creation/search result display
// methods maybe overridden to customize handling for subclasses
- (BOOL)hasValidCacheObject;
- (void)handleDisplayForReference;
- (void)handleDisplayIndexedNoHasIndex;
- (void)handleDisplayIndexedPerformSearch;
- (void)handleDisplayCached;
- (void)handleDisplayStatusText;

/**
 populates the modules menu
 to be overriden by subclasses
 */
- (void)populateModulesMenu;

/** abstract method to be overriden by subclasses */
- (void)setStatusText:(NSString *)aText;

// Indexer delegate method
- (void)searchOperationFinished:(NSArray *)results;
// Index creation delegate
- (void)indexCreationFinished:(SwordModule *)mod;
// selector called by menuitems
- (void)moduleSelectionChanged:(id)sender;
/* called then the modules was changed */
- (void)moduleChanged;
// the text view
- (NSTextView *)textView;

// context menu actions
- (IBAction)displayModuleAbout:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/zverse4.h<|end_filename|>
/******************************************************************************
 *
 *  zverse4.h -		code for class 'zVerse4'- a module that reads raw text
 *			files:  ot and nt using indexs ??.bks ??.cps ??.vss
 *			and provides lookup and parsing functions based on
 *			class VerseKey
 *
 * $Id: zverse4.h 3141 2014-03-19 01:24:04Z chrislit $
 *
 * Copyright 2000-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef ZVERSE4_H
#define ZVERSE4_H

#include <defs.h>

SWORD_NAMESPACE_START

class FileDesc;
class SWCompress;
class SWBuf;

class SWDLLEXPORT zVerse4 {
	SWCompress *compressor;

protected:
	static int instance;		// number of instantiated zVerse4 objects or derivitives

	FileDesc *idxfp[2];
	FileDesc *textfp[2];
	FileDesc *compfp[2];
	char *path;
	void doSetText(char testmt, long idxoff, const char *buf, long len = 0);
	void doLinkEntry(char testmt, long destidxoff, long srcidxoff);
	void flushCache() const;
	mutable char *cacheBuf;
	mutable unsigned int cacheBufSize;
	mutable char cacheTestament;
	mutable long cacheBufIdx;
	mutable bool dirtyCache;

public:

#define	VERSEBLOCKS 2
#define	CHAPTERBLOCKS 3
#define	BOOKBLOCKS 4

	static const char uniqueIndexID[];


	// fileMode default = RDONLY
	zVerse4(const char *ipath, int fileMode = -1, int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0);
	virtual ~zVerse4();

	void findOffset(char testmt, long idxoff, long *start, unsigned long *size, unsigned long *buffnum) const;
	void zReadText(char testmt, long start, unsigned long size, unsigned long buffnum, SWBuf &buf) const;
	virtual void rawZFilter(SWBuf &buf, char direction = 0) const { (void) buf; (void) direction; }
	static char createModule(const char *path, int blockBound, const char *v11n = "KJV");
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/Bookmarks/Bookmark.h<|end_filename|>
//
//  Bookmark.h
//  Eloquent
//
//  Created by <NAME> on 21.10.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface Bookmark : NSObject <NSCoding> {
	NSString *name;
	NSString *reference;
    NSColor *foregroundColor;
    NSColor *backgroundColor;
    NSString *comment;
	NSMutableArray *subGroups;
    BOOL highlight;
}

@property (strong, readwrite) NSString *name;
@property (strong, readwrite) NSString *reference;
@property (strong, readwrite) NSString *comment;
@property (strong, readwrite) NSColor *foregroundColor;
@property (strong, readwrite) NSColor *backgroundColor;
@property (strong, readwrite) NSMutableArray *subGroups;
@property (readwrite) BOOL highlight;

- (id)initWithName:(NSString *)aName;
- (id)initWithName:(NSString *)aName ref:(NSString *)aReference;

- (NSInteger)childCount;
- (BOOL)isLeaf;

@end


<|start_filename|>src/UserInterface/PrintAccessoryViewController.h<|end_filename|>
//
//  PrintAccessoryViewController.h
//  Eloquent
//
//  Created by <NAME> on 17.03.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@interface PrintAccessoryViewController : NSViewController <NSPrintPanelAccessorizing> {
    NSPrintInfo *printInfo;    
}

- (id)initWithPrintInfo:(NSPrintInfo *)aPrintInfo;

@property (strong, readwrite) NSPrintInfo *printInfo;

- (NSSet *)keyPathsForValuesAffectingPreview;
- (NSArray *)localizedSummaryItems;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawgenbook.h<|end_filename|>
/******************************************************************************
 *
 *  rawgenbook.h -	code for class 'RawGenBook'- a module that reads raw
 *			text files:
 *			ot and nt using indexs ??.bks ??.cps ??.vss
 *
 * $Id: rawgenbook.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWGENBOOK_H
#define RAWGENBOOK_H

#include <swgenbook.h>

#include <defs.h>

SWORD_NAMESPACE_START

class FileDesc;

class SWDLLEXPORT RawGenBook : public SWGenBook {
	char *path;
	FileDesc *bdtfd;
	bool verseKey;

public:
  
    
	RawGenBook(const char *ipath, const char *iname = 0, const char *idesc = 0,
			SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, const char *keyType = "TreeKey");
	virtual ~RawGenBook();
	virtual SWBuf &getRawEntryBuf() const;
	// write interface ----------------------------
	virtual bool isWritable() const;
	static char createModule(const char *ipath);
	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
	virtual void linkEntry(const SWKey * linkKey);	// Link current module entry to other module entry
	virtual void deleteEntry();	// Delete current module entry
	virtual SWKey *createKey() const;
	// end write interface ------------------------

	virtual bool hasEntry(const SWKey *k) const;

	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/installmgr.h<|end_filename|>
/******************************************************************************
 *
 *  installmgr.h -	Implementation of InstallMgr
 *
 * $Id: installmgr.h 3515 2017-11-01 11:38:09Z scribe $
 *
 * Copyright 2002-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef INSTALLMGR_H
#define INSTALLMGR_H

#include <defs.h>
#include <swbuf.h>
#include <map>
#include <set>

SWORD_NAMESPACE_START

class SWMgr;
class SWModule;
class SWConfig;
class RemoteTransport;
class StatusReporter;

/** A remote installation source configuration
*/
class SWDLLEXPORT InstallSource {
	SWMgr *mgr;
public:
	InstallSource(const char *type, const char *confEnt = 0);
	virtual ~InstallSource();
	SWBuf getConfEnt() {
		return caption +"|" + source + "|" + directory + "|" + u + "|" + p + "|" + uid;
	}
	SWBuf caption;
	SWBuf source;
	SWBuf directory;
	SWBuf u;
	SWBuf p;
	SWBuf uid;

	SWBuf type;
	SWBuf localShadow;
	void *userData;
	SWMgr *getMgr();
	void flush();
};

/** A standard map of remote install sources.
 */
typedef std::map<SWBuf, InstallSource *> InstallSourceMap;

/** Class to handle installation and maintenance of a SWORD library of books.
 */
class SWDLLEXPORT InstallMgr {

protected:
	bool userDisclaimerConfirmed;
	std::set<SWBuf> defaultMods;
	char *privatePath;
	SWBuf confPath;
	StatusReporter *statusReporter;
	bool passive;
	SWBuf u, p;
	bool unverifiedPeerAllowed;

	/** override this method and provide your own custom RemoteTransport subclass
         */
	virtual RemoteTransport *createFTPTransport(const char *host, StatusReporter *statusReporter);

	/** override this method and provide your own custom HTTP RemoteTransport
         */
	virtual RemoteTransport *createHTTPTransport(const char *host, StatusReporter *statusReporter);


	/** we have a transport member to set as current running transport so we
	 *  can ask it to terminate below, if user requests
         */
	RemoteTransport *transport;

public:

	static const int MODSTAT_OLDER;
	static const int MODSTAT_SAMEVERSION;
	static const int MODSTAT_UPDATED;
	static const int MODSTAT_NEW;
	static const int MODSTAT_CIPHERED;
	static const int MODSTAT_CIPHERKEYPRESENT;

	SWConfig *installConf;

        /** all remote sources configured for this installmgr.  Use this to gain access
         *  to individual remote sources.
         */
	InstallSourceMap sources;

	/** Username and Password supplied here can be used to identify your frontend
	 *  by supplying a valid anon password like <EMAIL>
	 *  This will get overridden if a password is required and provided in an indivual
	 *  source configuration.
         */
	InstallMgr(const char *privatePath = "./", StatusReporter *statusReporter = 0, SWBuf u="ftp", SWBuf p="<EMAIL>");
	virtual ~InstallMgr();

	/** Call to re-read InstallMgr.conf
         */
	void readInstallConf();

	/** Call to dump sources and other settings to InstallMgr.conf
         */
	void saveInstallConf();

	/** Removes all configured sources from memory.  Call saveInstallConf() to persist
         */
	void clearSources();

        /** call to delete all files of a locally installed module.
         */
	virtual int removeModule(SWMgr *manager, const char *modName);

        /** mostly an internally used method to remote download from a remote source to a local destination
         */
	virtual int remoteCopy(InstallSource *is, const char *src, const char *dest, bool dirTransfer = false, const char *suffix = "");

        /** call to install a module from a local path (fromLocation) or remote InstallSource (is) (leave the other 0)
         */
	virtual int installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is = 0);

        /** call to obtain and locally cache the available content list of the remote source
         */
	virtual int refreshRemoteSource(InstallSource *is);

        /** call to populate installmgr configuration with all known
         *  remote sources from the master list at CrossWire
         */
	virtual int refreshRemoteSourceConfiguration();

	/** Override this and provide an input mechanism to allow your users
	 *  to confirm that they understand this important disclaimer.
	 *  This method will be called immediately before attempting to perform
	 *  any network function.
	 *  If you would like your confirmation to always show at a predefined
	 *  time before attempting network operations, then you can call this
	 *  method yourself at the desired time.
	 *
	 *  Return true if your user confirms.
         *
	 *  User disclaimer should ask user for confirmation of 2 critical items:
	 *  and the default answer should be NO
	 *  (possibly the wrong language for the disclaimer)
	 *

A sample impl:

	static bool confirmed = false;
        if (!confirmed) {
		cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
		cout << "                -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
		cout << "Although Install Manager provides a convenient way for installing\n";
		cout << "and upgrading SWORD components, it also uses a systematic method\n";
		cout << "for accessing sites which gives packet sniffers a target to lock\n";
		cout << "into for singling out users. \n\n\n";
		cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
		cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
		cout << "Also, Remote Sources other than CrossWire may contain less than\n";
		cout << "quality modules, modules with unorthodox content, or even modules\n";
		cout << "which are not legitimately distributable.  Many repositories\n";
		cout << "contain wonderfully useful content.  These repositories simply\n";
		cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
		cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
		cout << "If you understand this and are willing to enable remote source features\n";
		cout << "then type yes at the prompt\n\n";
		cout << "enable? [no] ";

		char prompt[10];
		fgets(prompt, 9, stdin);
		confirmed = (!strcmp(prompt, "yes\n"));
        }
        return confirmed;

         */
	virtual bool isUserDisclaimerConfirmed() const { return userDisclaimerConfirmed; }

	/** Preferred method of reporting user disclaimer confirmation is to override the above method
	 * instead of using the setter below. This is provided for clients who don't wish to inherit
	 * InstallMgr and override method.
	 */
	void setUserDisclaimerConfirmed(bool val) { userDisclaimerConfirmed = val; }


	/** override this and provide an input mechanism to allow your users
	 * to enter the decipher code for a module.
	 * return true you added the cipher code to the config.
	 * default to return 'aborted'

A sample implementation, roughly taken from the windows installmgr:

	SectionMap::iterator section;
	ConfigEntMap::iterator entry;
	SWBuf tmpBuf;
	section = config->Sections.find(modName);
	if (section != config->Sections.end()) {
		entry = section->second.find("CipherKey");
		if (entry != section->second.end()) {
			entry->second = GET_USER_INPUT();
			config->Save();

			// LET'S SHOW THE USER SOME SAMPLE TEXT FROM THE MODULE
			SWMgr *mgr = new SWMgr();
			SWModule *mod = mgr->getModule(modName);
			mod->setKey("Ipet 2:12");
			tmpBuf = mod->StripText();
			mod->setKey("gen 1:10");
			tmpBuf += "\n\n";
			tmpBuf += mod->StripText();
			SOME_DIALOG_CONTROL->SETTEXT(tmpBuf.c_str());
			delete mgr;

			// if USER CLICKS OK means we should return true
			return true;
		}
	}
	return false;
}
	*/

	virtual bool getCipherCode(const char *modName, SWConfig *config) { (void) modName; (void) config; return false; }



	/** whether or not to use passive mode when doing ftp transfers
         */
	void setFTPPassive(bool passive) { this->passive = passive; }
	bool isFTPPassive() { return passive; }

	void setUnverifiedPeerAllowed(bool allowed) { this->unverifiedPeerAllowed = allowed; }
	bool isUnverifiedPeerAllowed() { return unverifiedPeerAllowed; }

        /** call from another thread to terminate the installation process
         */
	void terminate();

	/************************************************************************
	 * getModuleStatus - compare the modules of two SWMgrs and return a
	 * 	vector describing the status of each.  See MODSTAT_*
	 */
	static std::map<SWModule *, int> getModuleStatus(const SWMgr &base, const SWMgr &other);

	/************************************************************************
	 * isDefaultModule - allows an installation to provide a set of modules
	 *   in installMgr.conf like:
	 *     [General]
	 *     DefaultMod=KJV
	 *     DefaultMod=StrongsGreek
	 *     DefaultMod=Personal
	 *   This method allows a user interface to ask if a module is specified
	 *   as a default in the above way.  The logic is, if no modules are
	 *   installed then all default modules should be automatically selected for install
	 *   to help the user select a basic foundation of useful modules
	 */
	bool isDefaultModule(const char *modName);
};


SWORD_NAMESPACE_END

#endif


<|start_filename|>src/UserInterface/ModuleCommonsViewController.h<|end_filename|>
//
//  ModuleCommonsViewController.h
//  Eloquent
//
//  Created by <NAME> on 16.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "ContentDisplayingViewController.h"

enum GeneralMenuItemAdditions {
    ShowModuleAbout = 100000
};

@class ModulesUIController;
@class BookmarksUIController;

@interface ModuleCommonsViewController : ContentDisplayingViewController <NSCoding, NSTextViewDelegate> {
    IBOutlet NSView *referenceOptionsView;

    IBOutlet NSPopUpButton *fontSizePopUpButton;
    IBOutlet NSPopUpButton *textContextPopUpButton;
    
    IBOutlet NSMenu *displayOptionsMenu;
    IBOutlet NSPopUpButton *displayOptionsPopUpButton;

    IBOutlet NSMenu *modDisplayOptionsMenu;
    IBOutlet NSPopUpButton *modDisplayOptionsPopUpButton;

    IBOutlet NSSegmentedControl *bookPager;
    IBOutlet NSSegmentedControl *chapterPager;

    NSMutableDictionary *modDisplayOptions;
    NSMutableDictionary *displayOptions;
    
    NSMenu *verseNumberingMenu;
    
    NSInteger customFontSize;
    NSInteger textContext;
}

@property (readwrite) NSInteger customFontSize;
@property (readwrite) NSInteger textContext;
@property (strong, readwrite) NSMutableDictionary *modDisplayOptions;
@property (strong, readwrite) NSMutableDictionary *displayOptions;
@property (readonly) NSPopUpButton *fontSizePopUpButton;
@property (readonly) NSPopUpButton *textContextPopUpButton;
@property (readonly) NSPopUpButton *displayOptionsPopUpButton;
@property (readonly) NSPopUpButton *modDisplayOptionsPopUpButton;

- (void)setGlobalOptionsFromModOptions;

- (BookmarksUIController *)bookmarksUIController;

/** 
 default module display options dictionary 
 can be overriden by subclasses
 */
- (void)initDefaultModDisplayOptions;

/** 
 default display options dictionary 
 can be overriden by subclasses
 */
- (void)initDefaultDisplayOptions;

/**
 default text context options
 */
- (void)initTextContextOptions;

/**
 font size options
 */
- (void)initFontSizeOptions;

/** add menu item for custom font size */
- (void)checkAndAddFontSizeMenuItemIfNotExists;
/** enable/disable popup buttons depending on search type */
- (void)setupPopupButtonsForSearchType;

// Actions to be overriden by subclasses
- (IBAction)fontSizeChange:(id)sender;
- (IBAction)displayOptionShowStrongs:(id)sender;
- (IBAction)displayOptionShowMorphs:(id)sender;
- (IBAction)displayOptionShowFootnotes:(id)sender;
- (IBAction)displayOptionShowCrossRefs:(id)sender;
- (IBAction)displayOptionShowRedLetterWords:(id)sender;
- (IBAction)displayOptionShowHeadings:(id)sender;
- (IBAction)displayOptionShowHebrewPoints:(id)sender;
- (IBAction)displayOptionShowHebrewCantillation:(id)sender;
- (IBAction)displayOptionShowGreekAccents:(id)sender;

- (IBAction)displayOptionVersesOnOneLine:(id)sender;
- (IBAction)displayOptionShowFullVerseNumbering:(id)sender;
- (IBAction)displayOptionShowVerseNumberOnly:(id)sender;
- (IBAction)displayOptionHideVerseNumbering:(id)sender;
- (IBAction)displayOptionHighlightBookmarks:(id)sender;

- (IBAction)textContextChange:(id)sender;

- (IBAction)bookPagerAction:(id)sender;
- (IBAction)chapterPagerAction:(id)sender;

// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

@end


<|start_filename|>src/NotesTaking/NotesViewController.h<|end_filename|>
//
//  NotesViewController.h
//  Eloquent
//
//  Created by <NAME> on 17.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "ProtocolHelper.h"
#import "Indexer.h"

@class FileRepresentation;

@interface NotesViewController : ContentDisplayingViewController <NSTextViewDelegate, TextDisplayable, TextContentProviding> {
    IBOutlet NSTextView *textView;
    IBOutlet NSButton *saveButton;
    FileRepresentation *fileRep;
    NSRange lastFoundRange;
}

@property (readwrite, strong) FileRepresentation *fileRep;

- (id)initWithFileRepresentation:(FileRepresentation *)aFileRep;
- (id)initWithDelegate:(id)aDelegate;
- (id)initWithDelegate:(id)aDelegate hostingDelegate:(id)aHostingDelegate;
- (id)initWithDelegate:(id)aDelegate hostingDelegate:(id)aHostingDelegate fileRep:(FileRepresentation *)aFileRep;

// TextDisplayable
- (void)displayText;
- (void)displayTextForReference:(NSString *)aReference;
- (void)displayTextForReference:(NSString *)aReference searchType:(SearchType)aType;

// TextContentProviding
- (NSTextView *)textView;
- (NSScrollView *)scrollView;
- (void)setAttributedString:(NSAttributedString *)aString;
- (void)textChanged:(NSNotification *)aNotification;

// actions
- (IBAction)saveDocument:(id)sender;
- (IBAction)createSwordLinkFromTextSelection:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/utf8nfc.h<|end_filename|>
/******************************************************************************
 *
 *  utf8nfc.h -	Implementation of UTF8NFC
 *
 * $Id: utf8nfc.h 3081 2014-03-05 19:52:08Z chrislit $
 *
 * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef UTF8NFC_H
#define UTF8NFC_H

#include <swfilter.h>

#include <unicode/utypes.h>
#include <unicode/ucnv.h>
#include <unicode/uchar.h>
#include <unicode/unorm.h>

SWORD_NAMESPACE_START

/** This filter normalizes UTF-8 encoded text
 */
class SWDLLEXPORT UTF8NFC : public SWFilter {
private:
	UConverter* conv;
	UErrorCode err;
public:
	UTF8NFC();
	~UTF8NFC();  
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osiswebif.h<|end_filename|>
/******************************************************************************
 *
 *  osiswebif.h -	Implementation of OSISWEBIF
 *
 * $Id: osiswebif.h 3257 2014-09-23 01:08:24Z scribe $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISWEBIF_H
#define OSISWEBIF_H

#include <osisxhtml.h>

SWORD_NAMESPACE_START

/** this filter converts OSIS  text to HTML text with hrefs
 */
class SWDLLEXPORT OSISWEBIF : public OSISXHTML {
	const SWBuf baseURL;
	const SWBuf passageStudyURL;
	bool javascript;

protected:
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	OSISWEBIF();
	void setJavascript(bool mode) { javascript = mode; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>externals/PSMTabBarControl/source/PSMProgressIndicator.h<|end_filename|>
//
//  PSMProgressIndicator.h
//  PSMTabBarControl
//
//  Created by <NAME> on 2/23/06.
//  Copyright 2006 Positive Spin Media. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@protocol PSMProgressIndicatorDelegate
- (void)progressIndicatorNeedsUpdate;
@end

// This is a wrapper around an NSProgressIndicator. The main difference between this and
// NSProgressIndicator is that setting the |light| property changes the appearance of the progress
// indicator so it looks good against a dark background.
@interface PSMProgressIndicator : NSView

// Should the progress indicator render in a "light" style, suitable for use over a dark background?
@property(nonatomic, assign) BOOL light;
@property(nonatomic, assign) id<PSMProgressIndicatorDelegate> delegate;
@property(nonatomic, assign) BOOL animate;

@end


<|start_filename|>src/UserInterface/HostableViewController.h<|end_filename|>
//
//  HostableViewController.h
//  Eloquent
//
//  Created by <NAME> on 17.06.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "Indexer.h"
#import "ProtocolHelper.h"

@class SearchTextFieldOptions;
@class WindowHostController;

@protocol HostViewDelegate

- (NSString *)title;
- (void)prepareContentForHost:(WindowHostController *)aHostController;

- (NSView *)topAccessoryView;
- (NSView *)rightAccessoryView;
- (BOOL)showsRightSideBar;
- (void)setShowingRSBPreferred:(BOOL)preferred;
- (void)searchTypeChanged:(SearchType)aSearchType withSearchString:(NSString *)aSearchString;
- (void)searchStringChanged:(NSString *)aSearchString;
- (void)forceReload;
- (SearchTextFieldOptions *)searchFieldOptions;
- (SearchType)preferredSearchType;
- (BOOL)enableReferenceSearch;
- (BOOL)enableIndexedSearch;
- (BOOL)enableAddBookmarks;
- (BOOL)enableForceReload;

@end

@interface HostableViewController : NSViewController <MouseTracking, HostViewDelegate, ContentSaving> {
    IBOutlet id delegate;
    IBOutlet WindowHostController *__strong hostingDelegate;
    
    BOOL myIsViewLoaded;
    BOOL isLoadingCompleteReported;
    BOOL showingRSBPreferred;
    
    SearchType searchType;
    NSString *searchString;
}

@property (strong, readwrite) id delegate;
@property (strong, readwrite) WindowHostController *hostingDelegate;
@property (readwrite) BOOL myIsViewLoaded;
@property (readwrite) SearchType searchType;
@property (strong, readwrite) NSString *searchString;
@property (readwrite) BOOL showingRSBPreferred;

- (void)reportLoadingComplete;
- (void)removeFromSuperview;
- (void)adaptUIToHost;

// ContentSaving
- (BOOL)hasUnsavedContent;
- (void)saveContent;

// MouseTracking
- (void)mouseEnteredView:(NSView *)theView;
- (void)mouseExitedView:(NSView *)theView;

// HostViewDelegate
- (NSString *)title;
- (void)prepareContentForHost:(WindowHostController *)aHostController;
- (NSView *)topAccessoryView;
- (NSView *)rightAccessoryView;
- (BOOL)showsRightSideBar;
- (void)setShowingRSBPreferred:(BOOL)preferred;
- (void)searchTypeChanged:(SearchType)aSearchType withSearchString:(NSString *)aSearchString;
- (void)searchStringChanged:(NSString *)aSearchString;
- (void)forceReload;
- (SearchTextFieldOptions *)searchFieldOptions;
- (SearchType)preferredSearchType;
- (BOOL)enableReferenceSearch;
- (BOOL)enableIndexedSearch;
- (BOOL)enableAddBookmarks;
- (BOOL)enableForceReload;

@end


<|start_filename|>src/UserInterface/WebViewController.h<|end_filename|>
//
//  WebViewController.h
//  Eloquent
//
//  Created by <NAME> on 18.09.11.
//  Copyright 2011 Crosswire. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import <FooLogger/CocoLogger.h>
#import "HostableViewController.h"

#define WEBVIEW_NIBNAME   @"WebView"

@class MouseTrackingScrollView;
@class MBTextView;

@interface WebViewController : HostableViewController <MouseTracking, TextContentProviding> {
    IBOutlet WebView *webView;
    IBOutlet MouseTrackingScrollView *scrollView;
}

- (id)initWithDelegate:(id)aDelegate;
- (NSMenu *)menuForEvent:(NSEvent *)event;

// TextContentProviding
- (NSTextView *)textView;
- (MouseTrackingScrollView *)scrollView;
- (void)setAttributedString:(NSAttributedString *)aString;
- (void)setString:(NSString *)aString;

// MouseTracking
- (void)mouseEnteredView:(NSView *)theView;
- (void)mouseExitedView:(NSView *)theView;

@end


<|start_filename|>src/Sword/SwordModCategory.h<|end_filename|>
//
//  SwordModCategory.h
//  Eloquent
//
//  Created by <NAME> on 23.10.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "ObjCSword/SwordModule.h"

@interface SwordModCategory : NSObject

@property (readwrite) ModuleType modType;

+ (NSArray *)moduleCategories;
- (id)initWithType:(ModuleType)aType;
- (NSString *)name;

@end


<|start_filename|>src/UserInterface/ModulesUIController.h<|end_filename|>
//
//  ModuleListUIController.h
//  Eloquent
//
//  Created by <NAME> on 16.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import <ObjCSword/SwordModule.h>
#import "LeftSideBarAccessoryUIController.h"

@class SwordManager;
@class SwordModule;
@class WindowHostController;
@class ConfirmationSheetController;

@interface ModulesUIController : LeftSideBarAccessoryUIController {
    // module about
    IBOutlet NSWindow *moduleAboutWindow;
    IBOutlet NSTextView *moduleAboutTextView;
    // unlock window
    IBOutlet NSWindow *moduleUnlockWindow;
    IBOutlet NSTextField *moduleUnlockTextField;
    IBOutlet NSButton *moduleUnlockOKButton;
    IBOutlet NSMenu *moduleMenu;
    
    ConfirmationSheetController *confirmSheet;
    
    SwordManager *swordManager;
    SwordModule *clickedMod;
}

@property (readonly) NSMenu *moduleMenu;

/**
 generate a menu structure
 
 @params[in|out] subMenuItem is the start of the menustructure.
 @params[in] type, create menu for module types. ModuleType enum values can be ORed, -1 for all
 @params[in] aTarget the target object of the created menuitem
 @params[in] aSelector the selector of the target that should be called
 */
- (void)generateModuleMenu:(NSMenu *)itemMenu 
             forModuletype:(ModuleType)type 
            withMenuTarget:(id)aTarget 
            withMenuAction:(SEL)aSelector;
    
- (void)displayModuleAboutSheetForModule:(SwordModule *)aMod;

- (IBAction)moduleMenuClicked:(id)sender;
- (IBAction)moduleAboutClose:(id)sender;
- (IBAction)moduleUnlockOk:(id)sender;
- (IBAction)moduleUnlockCancel:(id)sender;

@end


<|start_filename|>src/UserInterface/NSUserDefaults+Additions.h<|end_filename|>
//
//  NSUserDefaults+Additions.h
//  Eloquent
//
//  Created by <NAME> on 18.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface NSUserDefaults (Additions)

- (void)setColor:(NSColor *)aColor forKey:(NSString *)aKey;
- (NSColor *)colorForKey:(NSString *)aKey;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/utf8arabicpoints.h<|end_filename|>
/******************************************************************************
 *
 *  utf8arabicpoints.h -	SWFilter descendant to remove UTF-8 Arabic
 *				vowel points
 *
 * $Id: utf8arabicpoints.h 2865 2013-07-08 13:44:37Z scribe $
 *
 * Copyright 2009-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef UTF8ARABICPOINTS_H
#define UTF8ARABICPOINTS_H

#include <swoptfilter.h>

SWORD_NAMESPACE_START

/** This Filter shows/hides Arabic vowel points in UTF8 text
 */
class SWDLLEXPORT UTF8ArabicPoints : public SWOptionFilter {
public:
	UTF8ArabicPoints();
	virtual ~UTF8ArabicPoints();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/BibleViewController+TextDisplayGeneration.h<|end_filename|>
//
//  BibleViewController+TextDisplayGeneration.h
//  Eloquent
//
//  Created by <NAME> on 19.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "BibleViewController.h"

@class SwordBibleTextEntry;

@interface BibleViewController (TextDisplayGeneration)

- (void)handleTextEntry:(SwordBibleTextEntry *)entry duplicateDict:(NSMutableDictionary *)duplicateDict htmlString:htmlString;
- (NSString *)createHTMLStringWithMarkers;
- (SwordBibleTextEntry *)applyBookmarkHighlightingOnTextEntry:(SwordBibleTextEntry *)anEntry;
- (void)appendHTMLFromTextEntry:(SwordBibleTextEntry *)anEntry atHTMLString:(NSMutableString *)aString;
- (NSMutableAttributedString *)generateAttributedString:(NSString *)aString;
- (void)applyLinkCursorToLinks:(NSMutableAttributedString *)attrString;
- (void)replaceVerseMarkers:(NSMutableAttributedString *)attrString;
- (void)applyWritingDirection:(NSMutableAttributedString *)attrString;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/listkey.h<|end_filename|>
/******************************************************************************
 *
 *  listkey.h -	code for base class 'listkey'.  listkey is the basis for all
 *		types of keys for indexing into modules
 *		(e.g. verse, word, place, etc.)
 *
 * $Id: listkey.h 3541 2017-12-03 18:40:33Z scribe $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWLSTKEY_H
#define SWLSTKEY_H

#include <swkey.h>

#include <defs.h>

SWORD_NAMESPACE_START

  /** ListKey is the basis for all
  * types of keys that have lists of specified indexes
  * (e.g. a list of verses, place, etc.)
  */
class SWDLLEXPORT ListKey : public SWKey {

	static SWClass classdef;
	void init();

protected:
	int arraypos;
	int arraymax;
	int arraycnt;
	SWKey **array;

public:

	/** initializes instance of ListKey
	 *
	 * @param ikey text key
	 */
	ListKey(const char *ikey = 0);
	ListKey(ListKey const &k);

	/** cleans up instance of ListKey
	 */
	virtual ~ListKey();

	virtual SWKey *clone() const;
	
	/** Clears out elements of list
	 */
	virtual void clear();
	// deprecated, use clear(), instead
	SWDEPRECATED virtual void ClearList() { clear(); }


	/** Returns number of key elements in list
	 * @return number of key elements in list
	 */
	virtual int getCount() const;
	//deprecated, use getCount
	SWDEPRECATED virtual int Count() { return getCount(); }
	
	/** Removes current element from list
	 */
	virtual void remove();
	// deprecated use remove
	SWDEPRECATED virtual void Remove() { remove(); }

	
	/** Sets container to subkey element number and repositions that subkey to either top or bottom
	 *
	 * @param ielement - element number to set to
	 * @param pos - set the subkey element to position (TOP) or BOTTOM
	 * @return error status
	 * deprecated use setToElement
	 */
	virtual char setToElement(int ielement, SW_POSITION pos = TOP);
	// deprecated use setToElement
	SWDEPRECATED virtual char SetToElement(int ielement, SW_POSITION pos = TOP) { return setToElement(ielement, pos); }


	
	/** Gets a key element number
	 *
	 * @param pos element number to get (or default current)
	 * @return Key or null on error
	 */
	virtual SWKey *getElement(int pos = -1);
	virtual const SWKey *getElement(int pos = -1) const;
	
	// deprecated, use above function
	SWDEPRECATED virtual SWKey *GetElement(int pos = -1) { return getElement(pos); }

	/** Adds an element to the list
	 * @param ikey the element to add
	 */
	ListKey & operator <<(const SWKey &ikey) { add(ikey); return *this; }
	virtual void add(const SWKey &ikey);

	/** Equates this ListKey to another ListKey object
	 *
	 * @param ikey other ListKey object
	 */
	virtual void copyFrom(const ListKey & ikey);
	virtual void copyFrom(const SWKey & ikey) { SWKey::copyFrom(ikey); }

	/** Positions this key
	 *
	 * @param pos position
	 */
	virtual void setPosition(SW_POSITION pos);
	
	/** Decrements a number of elements
	 */
	virtual void decrement(int step = 1);
	
	/** Increments a number of elements
	 */
	virtual void increment(int step = 1);

	virtual bool isTraversable() const { return true; }
	virtual long getIndex() const { return arraypos; }
	virtual const char *getRangeText() const;
	virtual const char *getOSISRefRangeText() const;
	virtual const char *getShortText() const;

	/**
	 * Returns the index for the new one given as as parameter.
	 * The first parameter is the new index.
	 */
	virtual void setIndex(long index) { setToElement((int)index); }
	virtual const char *getText() const;
	virtual void setText(const char *ikey);
	virtual void sort();

	SWKEY_OPERATORS
	ListKey & operator =(const ListKey &key) { copyFrom(key); return *this; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/CocoPCRE.framework/Versions/A/Headers/MatchResult.h<|end_filename|>
//
//  MatchResult.h
//  CocoPCRE
//
//  Created by <NAME> on 17.05.06.
//  Copyright 2006 mabe. All rights reserved.
//

#import <Cocoa/Cocoa.h>

/**
 \brief MatchResult is a class that stores match results of a pattern matches as an array of substrings.
 If the array of substrings is empty, there is no match.
*/
@interface MatchResult : NSObject  {
	NSMutableArray *listOfMatches;
}

+ (id)matchResult;
+ (id)matchResultWithMatches:(NSArray *)list;

- (id)initWithMatches:(NSArray *)list;

- (void)addMatch:(NSString *)substring;

- (void)setMatches:(NSArray *)list;
- (NSArray *)matches;
- (NSString *)matchAtIndex:(int)index;
- (int)numberOfMatches;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swmodule.h<|end_filename|>
/******************************************************************************
 *
 *  swmodule.h -	code for base class 'module'.  Module is the basis for
 *		  	all types of modules (e.g. texts, commentaries, maps,
 *		  	lexicons, etc.)
 *
 * $Id: swmodule.h 3541 2017-12-03 18:40:33Z scribe $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWMODULE_H
#define SWMODULE_H

#include <swdisp.h>
#include <listkey.h>
#include <swconfig.h>

#include <swcacher.h>
#include <swsearchable.h>
#ifndef	_WIN32_WCE
#include <iostream>
#endif

#include <list>

#include <defs.h>

SWORD_NAMESPACE_START

class SWOptionFilter;
class SWFilter;

#define SEARCHFLAG_MATCHWHOLEENTRY 4096

#define SWMODULE_OPERATORS \
	operator SWBuf() { return renderText(); } \
	operator SWKey &() { return *getKey(); } \
	operator SWKey *() { return getKey(); } \
	SWModule &operator <<(const char *inbuf) { setEntry(inbuf); return *this; } \
	SWModule &operator <<(const SWKey *sourceKey) { linkEntry(sourceKey); return *this; } \
	SWModule &operator -=(int steps) { decrement(steps); return *this; } \
	SWModule &operator +=(int steps) { increment(steps); return *this; } \
	SWModule &operator ++(int) { return *this += 1; } \
	SWModule &operator --(int) { return *this -= 1; } \
	SWModule &operator =(SW_POSITION p) { setPosition(p); return *this; } \
	SWDEPRECATED operator const char *() { static SWBuf unsafeTmp = renderText(); return unsafeTmp.c_str(); }


typedef std::list < SWFilter * >FilterList;
typedef std::list < SWOptionFilter * >OptionFilterList;
typedef std::map < SWBuf, SWBuf, std::less < SWBuf > > AttributeValue;
typedef std::map < SWBuf, AttributeValue, std::less < SWBuf > > AttributeList;
typedef std::map < SWBuf, AttributeList, std::less < SWBuf > > AttributeTypeList;

#define SWTextDirection char
#define SWTextEncoding char
#define SWTextMarkup char

/**
 * The class SWModule is the base class for all modules used in Sword.
 * It provides functions to look up a text passage, to search in the module,
 * to switch on/off the state of optional things like Strong's numbers or
 * footnotes.
 *
 * SWModule has also functions to write to the data files.
 */

// TODO: should all SWModule decendents be SWCachers?  Only some really
// cache data.  But if we don't do this, then we need another mechanism to
// check if we are an SWCacher.  Maybe make SWModule extend SWObject (which
// it probably should anyway.  But then we need to add all the cheezy
// heirarchy info to all the decendent classes for our SWDYNAMIC_CAST and
// then we can see if we implement SWCacher so we know whether or not to add
// to the yet to be developed cachemgr.
// Just leave for now.  This lets us always able to call module->flush()
// to manually flush a cache, and doesn't hurt if there is no work done.


class SWDLLEXPORT SWModule : public SWCacher, public SWSearchable {

class StdOutDisplay : public SWDisplay {
     char display(SWModule &imodule)
     {
     #ifndef	_WIN32_WCE
          std::cout << imodule.renderText();
     #endif
          return 0;
     }
};

protected:

	ConfigEntMap ownConfig;
	ConfigEntMap *config;
	mutable AttributeTypeList entryAttributes;
	mutable bool procEntAttr;

	mutable char error;
	bool skipConsecutiveLinks;

	/** the current key */
	SWKey *key;

	ListKey listKey;
	char *modname;
	char *moddesc;
	char *modtype;
	char *modlang;

	char direction;
	char markup;
	char encoding;

	/** this module's display object */
	SWDisplay *disp;

	static StdOutDisplay rawdisp;
	mutable SWBuf entryBuf;

	/** filters to be executed to remove all markup (for searches) */
	FilterList *stripFilters;

	/** filters to be executed immediately upon fileread */
	FilterList *rawFilters;

	/** filters to be executed to format for display */
	FilterList *renderFilters;

	/** filters to be executed to change markup to user prefs */
	OptionFilterList *optionFilters;

	/** filters to be executed to decode text for display */
	FilterList *encodingFilters;

	mutable int entrySize;
	mutable long entryIndex;	 // internal common storage for index

	static void prepText(SWBuf &buf);


public:

	/**
	 * Set this bool to false to terminate the search which is executed by this module (search()).
	 * This is useful for threaded applications to terminate the search from another thread.
	 */
	bool terminateSearch;

	/** SWModule c-tor
	 *
	 * @param imodname Internal name for module; see also getName()
	 * @param imoddesc Name to display to user for module; see also getDescription()
	 * @param idisp Display object to use for displaying; see also getDisplay()
	 * @param imodtype Type of module (e.g. Biblical Text, Commentary, etc.); see also getType()
	 * @param encoding Encoding of the module (e.g. UTF-8)
	 * @param dir Direction of text flow (e.g. Right to Left for Hebrew)
	 * @param markup Source Markup of the module (e.g. OSIS)
	 * @param modlang Language of the module (e.g. en)
	 */
	SWModule(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, const char *imodtype = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char *modlang = 0);

	/** SWModule d-tor
	 */
	virtual ~SWModule();

	/** Gets and clears error status
	 *
	 * @return error status
	 */
	virtual char popError();
	SWDEPRECATED virtual char Error() { return popError(); }

	/**
	 * @return  True if this module is encoded in Unicode, otherwise returns false.
	 */
	virtual bool isUnicode() const { return (encoding == (char)ENC_UTF8 || encoding == (char)ENC_SCSU); }

	// These methods are useful for modules that come from a standard SWORD install (most do).
	// SWMgr will call setConfig.  The user may use getConfig and getConfigEntry (if they
	// are not comfortable with, or don't wish to use  stl maps).
	virtual void setConfig(ConfigEntMap *config);
	virtual const ConfigEntMap &getConfig() const { return *config; }

	/**
	 * Gets a configuration property about a module.  These entries are primarily
	 * pulled from the module's .conf file, but also includes some virtual entries
	 * such as:
	 * 	PrefixPath - the absolute filesystem path to the sword module repository
	 *	location where this module is located.
	 *	AbsoluteDataPath - the full path to the root folder where the module
	 *	data is stored.
	 */
	virtual const char *getConfigEntry(const char *key) const;

	/**
	 * Returns bibliographic data for a module in the requested format
	 *
	 * @param bibFormat format of the bibliographic data
	 * @return bibliographic data in the requested format as a string (BibTeX by default)
	 */
	virtual SWBuf getBibliography(unsigned char bibFormat = BIB_BIBTEX) const;

	/**
	 * @return The size of the text entry for the module's current key position.
	 */
	virtual int getEntrySize() const { return entrySize; }

	/**
	 * Sets a key to this module for position to a particular record
	 *
	 * @param ikey key with which to set this module
	 * @return error status
	 */
	virtual char setKey(const SWKey *ikey);

	/**
	 * Sets a key to this module for position to a particular record
	 * @param ikey The SWKey which should be used as new key.
	 * @return Error status
	 */
	char setKey(const SWKey &ikey) { return setKey(&ikey); }
	/**
	 * @deprecated Use setKey() instead.
	 */
	SWDEPRECATED char SetKey(const SWKey *ikey) { return setKey(ikey); }
	/**
	 * @deprecated Use setKey() instead.
	 */
	SWDEPRECATED char SetKey(const SWKey &ikey) { return setKey(ikey); }
	/**
	 * @deprecated Use setKey() instead.
	 */
	SWDEPRECATED char Key(const SWKey & ikey) { return setKey(ikey); }

	/** Gets the current module key
	 * @return the current key of this module
	 */
	virtual SWKey *getKey() const;
	/**
	 * @deprecated Use getKey() instead.
	 */
	SWDEPRECATED SWKey &Key() const { return *getKey(); }

	/**
	 * Sets/gets module KeyText
	 * @deprecated Use getKeyText/setKey
	 * @param ikeytext Value which to set keytext; [0]-only get
	 * @return pointer to keytext
	 */
	SWDEPRECATED const char *KeyText(const char *ikeytext = 0) { if (ikeytext) setKey(ikeytext); return *getKey(); }

	/**
	 * gets the key text for the module.
	 * do we really need this?
	 */

	virtual const char *getKeyText() const {
		return *getKey();
	}


	virtual long getIndex() const { return entryIndex; }
	virtual void setIndex(long iindex) { entryIndex = iindex; }
	// deprecated, use getIndex()
	SWDEPRECATED long Index() const { return getIndex(); }
	// deprecated, use setIndex(...)
	SWDEPRECATED long Index(long iindex) { setIndex(iindex); return getIndex(); }

	/** Calls this module's display object and passes itself
	 *
	 * @return error status
	 */
	virtual char display();
	SWDEPRECATED char Display() { return display(); }

	/** Gets display driver
	 *
	 * @return pointer to SWDisplay class for this module
	 */
	virtual SWDisplay *getDisplay() const;

	/** Sets display driver
	 *
	 * @param idisp pointer to SWDisplay class to assign to this module
	 */
	virtual void setDisplay(SWDisplay * idisp);

	/**
	 * @deprecated Use get/setDisplay() instead.
	 */
	SWDEPRECATED SWDisplay *Disp(SWDisplay * idisp = 0) { if (idisp)	setDisplay(idisp); return getDisplay();	}

	/** Gets module name
	 *
	 * @return pointer to modname
	 */
	const char *getName() const;
	SWDEPRECATED const char *Name() const { return getName(); }

	/** Sets module name
	 *
	 * @param imodname Value which to set modname; [0]-only get
	 * @return pointer to modname
	 */
	SWDEPRECATED const char *Name(const char *imodname) { stdstr(&modname, imodname); return getName(); }

	/** Gets module description
	 *
	 * @return pointer to moddesc
	 */
	const char *getDescription() const;
	SWDEPRECATED const char *Description() const { return getDescription(); }

	/** Sets module description
	 *
	 * @param imoddesc Value which to set moddesc; [0]-only get
	 * @return pointer to moddesc
	 */
	SWDEPRECATED const char *Description(const char *imoddesc) { stdstr(&moddesc, imoddesc); return getDescription(); }

	/** Gets module type
	 *
	 * @return pointer to modtype
	 */
	const char *getType() const;
	SWDEPRECATED const char *Type() const { return getType(); }

	/** Sets module type
	 *
	 * @param imodtype Value which to set modtype; [0]-only get
	 * @return pointer to modtype
	 */
	SWDEPRECATED const char *Type(const char *imodtype) { setType(imodtype); return getType(); }
	void setType(const char *imodtype) { stdstr(&modtype, imodtype); }

	/** Sets/gets module direction
	 *
	 * @return new direction
	 */
	virtual char getDirection() const;
	SWDEPRECATED char Direction(signed char newdir = -1) { char retVal = getDirection(); if (newdir != -1) return direction = newdir; return retVal; }

	/** Gets module encoding
	 *
	 * @return Encoding
	 */
	char getEncoding() const { return encoding; }
	SWDEPRECATED char Encoding(signed char enc = -1) { char retVal = getEncoding(); if (enc != -1) encoding = enc; return retVal; }

	/** Gets module markup
	 *
	 * @return Markup
	 */
	char getMarkup() const { return markup; }
	SWDEPRECATED char Markup(signed char imarkup = -1) { char retVal = getMarkup(); if (imarkup != -1) markup = imarkup; return retVal; }

	/** Gets module language
	 *
	 * @return pointer to modlang
	 */
	const char *getLanguage() const { return modlang; }
	SWDEPRECATED const char *Lang(char *imodlang = 0) { if (imodlang != 0) stdstr(&modlang, imodlang); return getLanguage(); }


	// search interface -------------------------------------------------

	/** Searches a module for a string
	 *
	 * @param istr string for which to search
	 * @param searchType type of search to perform
	 *			>=0 - regex; (for backward compat, if > 0 then used as additional REGEX FLAGS)
	 *			-1  - phrase
	 *			-2  - multiword
	 *			-3  - entryAttrib (eg. Word//Lemma./G1234/)	 (Lemma with dot means check components (Lemma.[1-9]) also)
	 *			-4  - Lucene
	 *			-5  - multilemma window; set 'flags' param to window size (NOT DONE)
	 * @param flags options flags for search
	 * @param scope Key containing the scope. VerseKey or ListKey are useful here.
	 * @param justCheckIfSupported If set, don't search but instead set this variable to true/false if the requested search is supported,
	 * @param percent Callback function to get the current search status in %.
	 * @param percentUserData Anything that you might want to send to the precent callback function.
	 *
	 * @return ListKey set to verses that contain istr
	 */
	virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0,
			SWKey *scope = 0,
			bool *justCheckIfSupported = 0,
			void (*percent) (char, void *) = &nullPercent,
			void *percentUserData = 0);

	// for backward compat-- deprecated
	SWDEPRECATED ListKey &Search(const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent) (char, void *) = &nullPercent, void *percentUserData = 0) {	return search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData);	}


	/** Allocates a key of specific type for module
	 * The different reimplementations of SWModule (e.g. SWText) support SWKey implementations,
	 * which support special.  This functions returns a SWKey object which works with the current
	 * implementation of SWModule. For example for the SWText class it returns a VerseKey object.
	 * @see VerseKey, ListKey, SWText, SWLD, SWCom
	 * @return pointer to allocated key. Caller is responsible for deleting the object
	 */
	virtual SWKey *createKey() const;
	SWDEPRECATED SWKey *CreateKey() const { return createKey(); }

	/** This function is reimplemented by the different kinds
	 * of module objects
	 * @return the raw module text of the current entry
	 */
	virtual SWBuf &getRawEntryBuf() const = 0;

	const char *getRawEntry() const { return getRawEntryBuf().c_str(); }

	// write interface ----------------------------
	/** Is the module writable? :)
	 * @return yes or no
	 */
	virtual bool isWritable() const { return false; }

	/** Creates a new, empty module
	 * @param path path where to create the new module
	 * @return error
	 */
	static signed char createModule(const char *path);

	/** Modify the current module entry text - only if module isWritable()
	 */
	virtual void setEntry(const char *inbuf, long len= -1);

	/** Link the current module entry to another module entry - only if
	 *	module isWritable()
	 */
	virtual void linkEntry(const SWKey *sourceKey);

	/** Delete current module entry - only if module isWritable()
	 */
	virtual void deleteEntry() {}

	// end write interface ------------------------

	/** Decrements module key a number of entries
	 * @param steps Number of entries to jump backward
	 */
	virtual void decrement(int steps = 1);

	/** Increments module key a number of entries
	 * @param steps Number of entries to jump forward
	 */
	virtual void increment(int steps = 1);

	/** Positions this modules to a logical position entry
	 * @param pos position (e.g. TOP, BOTTOM)
	 */
	virtual void setPosition(SW_POSITION pos);

	/** OptionFilterBuffer a text buffer
	 * @param filters the FilterList of filters to iterate
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void filterBuffer(OptionFilterList *filters, SWBuf &buf, const SWKey *key) const;

	/** FilterBuffer a text buffer
	 * @param filters the FilterList of filters to iterate
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void filterBuffer(FilterList *filters, SWBuf &buf, const SWKey *key) const;

	/** Adds a RenderFilter to this module's renderFilters queue.
	 *	Render Filters are called when the module is asked to produce
	 *	renderable text.
	 * @param newFilter the filter to add
	 * @return *this
	 */
	virtual SWModule &addRenderFilter(SWFilter *newFilter) {
		renderFilters->push_back(newFilter);
		return *this;
	}
	SWDEPRECATED SWModule &AddRenderFilter(SWFilter *newFilter) { return addRenderFilter(newFilter); }

	/** Retrieves a container of render filters associated with this
	 *	module.
	 * @return container of render filters
	 */
	virtual const FilterList &getRenderFilters() const {
		return *renderFilters;
	}

	/** Removes a RenderFilter from this module's renderFilters queue
	 * @param oldFilter the filter to remove
	 * @return *this
	 */
	virtual SWModule &removeRenderFilter(SWFilter *oldFilter) {
		renderFilters->remove(oldFilter);
		return *this;
	}
	SWDEPRECATED SWModule &RemoveRenderFilter(SWFilter *oldFilter) {	return removeRenderFilter(oldFilter); }

	/** Replaces a RenderFilter in this module's renderfilters queue
	 * @param oldFilter the filter to remove
	 * @param newFilter the filter to add in its place
	 * @return *this
	 */
	virtual SWModule &replaceRenderFilter(SWFilter *oldFilter, SWFilter *newFilter) {
		FilterList::iterator iter;
		for (iter = renderFilters->begin(); iter != renderFilters->end(); iter++) {
			if (*iter == oldFilter)
				*iter = newFilter;
		}
		return *this;
	}
	SWDEPRECATED SWModule &ReplaceRenderFilter(SWFilter *oldFilter, SWFilter *newFilter) { return replaceRenderFilter(oldFilter, newFilter); }

	/** RenderFilter run a buf through this module's Render Filters
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void renderFilter(SWBuf &buf, const SWKey *key) const {
		filterBuffer(renderFilters, buf, key);
	}

	/** Adds an EncodingFilter to this module's @see encodingFilters queue.
	 *	Encoding Filters are called immediately when the module is read
	 *	from data source, to assure we have desired internal data stream
	 *	(e.g. UTF-8 for text modules)
	 * @param newFilter the filter to add
	 * @return *this
	 */
	virtual SWModule &addEncodingFilter(SWFilter *newFilter) {
		encodingFilters->push_back(newFilter);
		return *this;
	}
	SWDEPRECATED SWModule &AddEncodingFilter(SWFilter *newFilter) { return addEncodingFilter(newFilter); }

	/** Removes an EncodingFilter from this module's encodingFilters queue
	 * @param oldFilter the filter to remove
	 * @return *this
	 */
	virtual SWModule &removeEncodingFilter(SWFilter *oldFilter) {
		encodingFilters->remove(oldFilter);
		return *this;
	}
	SWDEPRECATED SWModule &RemoveEncodingFilter(SWFilter *oldFilter) { return removeEncodingFilter(oldFilter); }

	/** Replaces an EncodingFilter in this module's encodingfilters queue
	 * @param oldFilter the filter to remove
	 * @param newFilter the filter to add in its place
	 * @return *this
	 */
	virtual SWModule &replaceEncodingFilter(SWFilter *oldFilter, SWFilter *newFilter) {
		FilterList::iterator iter;
		for (iter = encodingFilters->begin(); iter != encodingFilters->end(); iter++) {
			if (*iter == oldFilter)
				*iter = newFilter;
		}
		return *this;
	}
	SWDEPRECATED SWModule &ReplaceEncodingFilter(SWFilter *oldFilter, SWFilter *newFilter) { return replaceEncodingFilter(oldFilter, newFilter); }

	/** encodingFilter run a buf through this module's Encoding Filters
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void encodingFilter(SWBuf &buf, const SWKey *key) const {
		filterBuffer(encodingFilters, buf, key);
	}

	/** Adds a StripFilter to this module's stripFilters queue.
	 *	Strip filters are called when a module is asked to render
	 *	an entry without any markup (like when searching).
	 * @param newFilter the filter to add
	 * @return *this
	 */
	virtual SWModule &addStripFilter(SWFilter *newFilter) {
		stripFilters->push_back(newFilter);
		return *this;
	}
	SWDEPRECATED SWModule &AddStripFilter(SWFilter *newFilter) { return addStripFilter(newFilter);	}

	/** Adds a RawFilter to this module's rawFilters queue
	 * @param newFilter the filter to add
	 * @return *this
	 */
	virtual SWModule &addRawFilter(SWFilter *newFilter) {
		rawFilters->push_back(newFilter);
		return *this;
	}
	SWDEPRECATED SWModule &AddRawFilter(SWFilter *newFilter) { return addRawFilter(newFilter); }

	/** StripFilter run a buf through this module's Strip Filters
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void stripFilter(SWBuf &buf, const SWKey *key) const {
		filterBuffer(stripFilters, buf, key);
	}


	/** RawFilter a text buffer
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void rawFilter(SWBuf &buf, const SWKey *key) const {
		filterBuffer(rawFilters, buf, key);
	}

	/** Adds an OptionFilter to this module's optionFilters queue.
	 *	Option Filters are used to turn options in the text on
	 *	or off, or so some other state (e.g. Strong's Number,
	 *	Footnotes, Cross References, etc.)
	 * @param newFilter the filter to add
	 * @return *this
	 */
	virtual SWModule &addOptionFilter(SWOptionFilter *newFilter) {
		optionFilters->push_back(newFilter);
		return *this;
	}
	SWDEPRECATED SWModule &AddOptionFilter(SWOptionFilter *newFilter) { return addOptionFilter(newFilter); }

	/** OptionFilter a text buffer
	 * @param buf the buffer to filter
	 * @param key key location from where this buffer was extracted
	 */
	virtual void optionFilter(SWBuf &buf, const SWKey *key) const {
		filterBuffer(optionFilters, buf, key);
	}

	/** Produces plain text, without markup, of the current module entry,
	 *	or supplied text
	 *
	 * @param buf buf to massage instead of current module entry;
	 *	if buf is 0, the current text will be used
	 * @param len max len to process
	 * @return result buffer
	 */
	virtual const char *stripText(const char *buf = 0, int len = -1);
	SWDEPRECATED const char *StripText(const char *buf = 0, int len = -1) { return stripText(buf, len); }

	/** Produces renderable text of the current module entry or supplied text
	 *
	 * @param buf buffer to massage instead of current module entry;
	 *	if buf is 0, the current module position text will be used
	 * @param len max len to process
	 * @param render for internal use
	 * @return result buffer
	 */
	SWBuf renderText(const char *buf, int len = -1, bool render = true) const;
    SWBuf renderText();
	SWDEPRECATED const char *RenderText(const char *buf = 0, int len = -1, bool render = true) { return renderText(buf, len, render); }

	/** Produces any header data which might be useful which is associated with the
	 *	processing done with this filter.  A typical example is a suggested
	 *	CSS style block for classed containers.
	 */
	virtual const char *getRenderHeader() const;

	/** Produces plain text, without markup, of the module entry at the supplied key
	 * @param tmpKey desired module entry
	 * @return result buffer
	 */
	virtual const char *stripText(const SWKey *tmpKey);

	/** Produces renderable text of the module entry at the supplied key
	 * @param tmpKey key to use to grab text
	 * @return this module's text at specified key location massaged by Render filters
	 */
	SWBuf renderText(const SWKey *tmpKey);

	/** Whether or not to only hit one entry when iterating encounters
	 *	consecutive links when iterating
	 * @param val = true means only include entry once in iteration
	 */
	virtual void setSkipConsecutiveLinks(bool val) { skipConsecutiveLinks = val; }

	/** Whether or not to only hit one entry when iterating encounters
	 *	consecutive links when iterating
	 */
	virtual bool isSkipConsecutiveLinks() { return skipConsecutiveLinks; }
	SWDEPRECATED bool getSkipConsecutiveLinks() { return isSkipConsecutiveLinks(); }
	
	virtual bool isLinked(const SWKey *, const SWKey *) const { return false; }
	virtual bool hasEntry(const SWKey *) const { return false; }

	/** Entry Attributes are special data pertaining to the current entry.
	 *	To see what Entry Attributes exists for a specific entry of a module,
	 *	the example examples/cmdline/lookup.cpp is a good utility which
	 *	displays this information.  It is also useful as an example of how
	 *	to access such.
	 */
	virtual AttributeTypeList &getEntryAttributes() const { return entryAttributes; }

	/** Processing Entry Attributes can be expensive.  This method allows
	 * turning the processing off if they are not desired.  Some internal
	 * engine processing turns them off (like searching) temporarily for
	 * optimization.
	 */
	virtual void setProcessEntryAttributes(bool val) const { procEntAttr = val; }
	SWDEPRECATED void processEntryAttributes(bool val) const { setProcessEntryAttributes(val); }

	/** Whether or not we're processing Entry Attributes
	 */
	virtual bool isProcessEntryAttributes() const { return procEntAttr; }


	// SWSearchable Interface Impl -----------------------------------------------
	virtual signed char createSearchFramework(
			void (*percent) (char, void *) = &nullPercent,
			void *percentUserData = 0);
	virtual void deleteSearchFramework();
	virtual bool hasSearchFramework();

	// OPERATORS -----------------------------------------------------------------
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/Configuration.h<|end_filename|>
//
//  Configuration.h
//  ObjCSword
//
//  Created by <NAME> on 12.06.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>

/*
 To define your own configuration:
 Create a subclass of Configuration and override the methods there (as done in OSXConfiguration).
 To globally apply your configuration do:
 [[Configuration config] setImpl:[<YourConfigSubclass> class]];
 */

@protocol Configuration

- (NSString *)osVersion;
- (NSString *)bundleVersion;
- (NSString *)defaultModulePath;
- (NSString *)defaultAppSupportPath;
- (NSString *)tempFolder;
- (NSString *)logFile;

@end

@interface Configuration : NSObject <Configuration>

+ (Configuration *)config;
+ (Configuration *)configWithImpl:(id<Configuration>)configImpl;

- (NSString *)osVersion;
- (NSString *)bundleVersion;
- (NSString *)defaultModulePath;
- (NSString *)defaultAppSupportPath;
- (NSString *)tempFolder;
- (NSString *)logFile;

@end


<|start_filename|>src/SessionManagement/SessionManager.h<|end_filename|>
//
// Created by mbergmann on 28.07.12.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>

@class Session;
@class WindowHostController;


@interface SessionManager : NSObject

+ (SessionManager *)defaultManager;

- (bool)hasWindows;
- (bool)hasUnsavedContent;

- (NSArray *)retrieveWindows;

- (void)saveSession;
- (void)saveSessionAs;
- (void)saveAsDefaultSession;

- (void)loadSession;
- (void)loadSessionFrom;
- (void)loadDefaultSession;

- (void)addDelegateToHosts:(id)aDelegate;
- (void)showAllWindows;

- (void)addWindow:(WindowHostController *)aWindow;
- (void)removeWindow:(WindowHostController *)aWindow;

- (void)saveContent;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osisstrongs.h<|end_filename|>
/***************************************************************************
 *
 *  osisstrongs.h -	Implementation of OSISStrongs
 *
 * $Id: osisstrongs.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISSTRONGS_H
#define OSISSTRONGS_H

#include <swoptfilter.h>

SWORD_NAMESPACE_START

  /** This Filter shows/hides strong's numbers in a OSIS text
  */
class SWDLLEXPORT OSISStrongs : public SWOptionFilter {
public:
	OSISStrongs();
	virtual ~OSISStrongs();
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/rawstr.h<|end_filename|>
/*****************************************************************************
 *
 *  rawstr.h -	code for class 'RawStr'- a module that reads raw text
 *		files:  ot and nt using indexs ??.bks ??.cps ??.vss
 *		and provides lookup and parsing functions based on
 *		class StrKey
 *
 * $Id: rawstr.h 3134 2014-03-17 09:30:15Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef RAWSTR_H
#define RAWSTR_H

#include <defs.h>
#include <sysdata.h>

SWORD_NAMESPACE_START

class SWBuf;
class FileDesc;

class SWDLLEXPORT RawStr {
	static int instance;		// number of instantiated RawStr objects or derivitives
	char *path;
	bool caseSensitive;
	mutable long lastoff;	 // for caching and optimizing
	

protected:
	FileDesc *idxfd;
	FileDesc *datfd;
	void doSetText(const char *key, const char *buf, long len = -1);
	void doLinkEntry(const char *destkey, const char *srckey);
	static const int IDXENTRYSIZE;

public:
	static const char nl;
	RawStr(const char *ipath, int fileMode = -1, bool caseSensitive = false);
	virtual ~RawStr();
	void getIDXBuf(long ioffset, char **buf) const;
	void getIDXBufDat(long ioffset, char **buf) const;
	signed char findOffset(const char *key, __u32 *start, __u16 *size, long away = 0, __u32 *idxoff = 0) const;
	void readText(__u32 start, __u16 *size, char **idxbuf, SWBuf &buf) const;
	static signed char createModule(const char *path);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/thmlrtf.h<|end_filename|>
/******************************************************************************
 *
 *  thmlrtf.h -	Implementation of ThMLRTF
 *
 * $Id: thmlrtf.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef THMLRTF_H
#define THMLRTF_H

#include <swbasicfilter.h>
#include <utilxml.h>

SWORD_NAMESPACE_START

/** this filter converts ThML text to RTF text
 */
class SWDLLEXPORT ThMLRTF : public SWBasicFilter {
protected:
	class MyUserData : public BasicFilterUserData {
	public:
		MyUserData(const SWModule *module, const SWKey *key);
		bool inSecHead;
		SWBuf version;
		bool isBiblicalText;
		XMLTag startTag;
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
public:
	ThMLRTF();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/ModuleManager/ModuleManager.h<|end_filename|>
//
//  ModuleManager.h
//  Eloquent
//
//  Created by <NAME> on 26.12.07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <ObjCSword/ObjCSword.h>

@class ModuleManageViewController;

@interface ModuleManager : NSWindowController <NSToolbarDelegate> {
    // the module view controller
    ModuleManageViewController *moduleViewController;
    
	// we need a dictionary for all our toolbar identifiers
	NSMutableDictionary *tbIdentifiers;
}

@property (strong, readwrite) id delegate;

- (id)initWithDelegate:(id)aDelegate;

- (void)setupToolbar;

@end


<|start_filename|>src/NotesTaking/NotesManager.h<|end_filename|>
//
//  NotesManager.h
//  Eloquent
//
//  Created by <NAME> on 15.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class FileRepresentation;

@interface NotesManager : NSObject {
    NSString *rootPath;
    FileRepresentation *rootPathRep;
}

+ (NotesManager *)defaultManager;
- (id)initWithRootPath:(NSString *)aPath;

- (FileRepresentation *)notesFileRep;
- (FileRepresentation *)fileRepForPath:(NSString *)aFilePath;

@end


<|start_filename|>src/UserInterface/SearchBookSetEditorController.h<|end_filename|>
//
//  SearchBookSetEditorController.h
//  Eloquent
//
//  Created by <NAME> on 18.03.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>

@class SearchBookSet;

@interface SearchBookSetEditorController : NSViewController {
    IBOutlet NSPopUpButton *searchBookSetsPopUpButton;
    IBOutlet NSTableView *booksTableView;
    IBOutlet NSTextField *nameTextField;
    IBOutlet NSButton *addButton;
    IBOutlet NSButton *removeButton;
    IBOutlet NSButton *allButton;
    IBOutlet NSButton *noneButton;
    IBOutlet NSButton *invertButton;
    
    SearchBookSet *selectedBookSet;
    
    id __strong delegate;
}

@property (strong, readwrite) SearchBookSet *selectedBookSet;
@property (strong, readwrite) id delegate;

- (NSMenu *)bookSetsMenu;

// actions
- (IBAction)bookEnabled:(id)sender;
- (IBAction)bookSetChanged:(id)sender;
- (IBAction)addBookSet:(id)sender;
- (IBAction)removeBookSet:(id)sender;
- (IBAction)selectAll:(id)sender;
- (IBAction)selectNone:(id)sender;
- (IBAction)selectInverse:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/sapphire.h<|end_filename|>
/******************************************************************************
 *
 *  sapphire.h -	the Saphire II stream cipher class
 *
 * $Id: sapphire.h 2833 2013-06-29 06:40:28Z chrislit $
 * 
 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

/******************************************************************************
 *
 * Original license notice & credits:
 * Dedicated to the Public Domain the author and inventor
 * (<NAME>).  This code comes with no warranty.
 * Use it at your own risk.
 * Ported from the Pascal implementation of the Sapphire Stream
 * Cipher 9 December 1994.
 * Added hash-specific functions 27 December 1994.
 * Made index variable initialization key-dependent,
 * made the output function more resistant to cryptanalysis,
 * and renamed to Sapphire II Stream Cipher 2 January 1995.
 *
 * unsigned char is assumed to be 8 bits.  If it is not, the
 * results of assignments need to be reduced to 8 bits with
 * & 0xFF or % 0x100, whichever is faster.
 */  
  
#ifndef NULL
#define NULL 0
#endif	/*  */

#include <defs.h>

SWORD_NAMESPACE_START

  class sapphire 
{
  
    // These variables comprise the state of the state machine.
  unsigned char cards[256];	// A permutation of 0-255.
  unsigned char rotor,		// Index that rotates smoothly
    ratchet,			// Index that moves erratically
    avalanche,			// Index heavily data dependent
    last_plain,			// Last plain text byte
    last_cipher;		// Last cipher text byte
  
    // This function is used by initialize(), which is called by the
    // constructor.
  unsigned char keyrand (int limit, unsigned char *user_key,
			  unsigned char keysize, unsigned char *rsum,
unsigned *keypos); public:sapphire (unsigned char
				      *key = NULL,	// Calls initialize if a real
				      unsigned char keysize = 0);	// key is provided.  If none
  // is provided, call initialize
  // before encrypt or decrypt.
  ~sapphire ();			// Destroy cipher state information.
  void initialize (unsigned char *key,	// User key is used to set
		   unsigned char keysize);	// up state information.
  void hash_init (void);	// Set up default hash.
  unsigned char encrypt (unsigned char b = 0);	// Encrypt byte
  // or get a random byte.
  unsigned char decrypt (unsigned char b);	// Decrypt byte.
  void hash_final (unsigned char *hash,	// Copy hash value to hash
		   unsigned char hashlength = 20);	// Hash length (16-32)
  void burn (void);		// Destroy cipher state information.
};


SWORD_NAMESPACE_END


<|start_filename|>src/UserInterface/ProtocolHelper.h<|end_filename|>
/*
 *  SubviewHosting.h
 *  Eloquent
 *
 *  Created by <NAME> on 21.06.08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#import <ObjCSword/SwordModule.h>
#import "Indexer.h"

@class HostableViewController;
@class ContentDisplayingViewController;

@protocol SubviewHosting
- (void)addContentViewController:(ContentDisplayingViewController *)aViewController;
- (void)contentViewInitFinished:(HostableViewController *)aViewController;
- (void)removeSubview:(HostableViewController *)aViewController;
@end

@protocol ContentSaving
- (BOOL)hasUnsavedContent;
- (void)saveContent;
@end

@protocol MouseTracking
- (void)mouseEnteredView:(NSView *)theView;
- (void)mouseExitedView:(NSView *)theView;
@end

@protocol FullScreenCapability
- (BOOL)isFullScreenMode;
@end

@protocol TextContentProviding
- (NSTextView *)textView;
- (NSScrollView *)scrollView;
- (void)setAttributedString:(NSAttributedString *)aString;
- (void)setString:(NSString *)aString;
- (void)textChanged:(NSNotification *)aNotification;
- (NSString *)textView:(NSTextView *)textView willDisplayToolTip:(NSString *)tooltip forCharacterAtIndex:(NSUInteger)characterIndex;
- (BOOL)textView:(NSTextView *)textView clickedOnLink:(id)link atIndex:(NSUInteger)charIndex;
@end

@protocol TextDisplayable
- (void)displayText;
- (void)displayTextForReference:(NSString *)aReference;
- (void)displayTextForReference:(NSString *)aReference searchType:(SearchType)aType;
- (void)scrollToTop;
@end

@protocol TextDisplayableExt
- (BOOL)hasValidCacheObject;
- (void)handleDisplayForReference;
- (void)handleDisplayIndexedNoHasIndex;
- (void)handleDisplayIndexedPerformSearch;
- (void)handleDisplayCached;
- (void)handleDisplayStatusText;
@end

@protocol ModuleProviding
- (SwordModule *)module;
@end

@protocol ProgressIndicating
- (void)beginIndicateProgress;
- (void)endIndicateProgress;
@end

@protocol ContextMenuProviding
- (NSMenu *)textContextMenu;
- (NSMenu *)linkContextMenu;
- (NSMenu *)imageContextMenu;
@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/teiplain.h<|end_filename|>
/******************************************************************************
 *
 *  teiplain.h -	Implementation of TEIPlain
 *
 * $Id: teiplain.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2006-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef TEIPLAIN_H
#define TEIPLAIN_H

#include <swbasicfilter.h>
#include <utilxml.h>

SWORD_NAMESPACE_START

/** this filter converts TEI text to plain text
 */
class SWDLLEXPORT TEIPlain : public SWBasicFilter {
public:
protected:
	class MyUserData : public BasicFilterUserData {
	public:
		SWBuf w;
		XMLTag tag;
		MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {}
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	TEIPlain();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>src/UserInterface/BookmarkCell.h<|end_filename|>
//
//  BookmarkCell.h
//  Eloquent
//
//  Created by <NAME> on 27.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class Bookmark;

@interface BookmarkCell : NSCell {
    NSImage *image;
    Bookmark *bookmark;
    NSFont *bmRefFont;
}

@property (strong, readwrite) NSImage *image;
@property (strong, readwrite) Bookmark *bookmark;

@end


<|start_filename|>src/Bookmarks/BookmarksUIController.h<|end_filename|>
//
//  BookmarksUIController.h
//  Eloquent
//
//  Created by <NAME> on 16.11.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <FooLogger/CocoLogger.h>
#import "LeftSideBarAccessoryUIController.h"

@class BookmarkManager;

@interface BookmarksUIController : LeftSideBarAccessoryUIController {
    // bookmark folder window    
    IBOutlet NSWindow *bookmarkFolderWindow;
    IBOutlet NSTextField *bookmarkFolderNameTextField;
    IBOutlet NSButton *bookmarkFolderOkButton;
    
    // bookmarks
    IBOutlet NSMenu *bookmarkMenu;
    IBOutlet NSWindow *bookmarkDetailPanel;
    IBOutlet NSTextField *bookmarkNameTextField;    
    IBOutlet NSObjectController *bmObjectController;
    IBOutlet NSButton *bookmarkOkButton;
    NSInteger bookmarkAction;
    NSMutableArray *bookmarkSelection;
    
    BookmarkManager *bookmarkManager;
}

@property (readonly) NSMenu *bookmarkMenu;

- (void)generateBookmarkMenu:(NSMenu **)itemMenu 
              withMenuTarget:(id)aTarget 
              withMenuAction:(SEL)aSelector;

// methods
- (void)bookmarkDialog:(id)sender;
- (void)bookmarkDialogForVerseList:(NSArray *)aVerseList;

// actions
- (IBAction)bookmarkMenuClicked:(id)sender;
- (IBAction)bmWindowCancel:(id)sender;
- (IBAction)bmWindowOk:(id)sender;
- (IBAction)bmFolderWindowCancel:(id)sender;
- (IBAction)bmFolderWindowOk:(id)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osisplain.h<|end_filename|>
/******************************************************************************
 *
 *  osisplain.h -	Implementation of OSISPlain
 *
 * $Id: osisplain.h 3524 2017-11-07 03:08:49Z scribe $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISPLAIN_H
#define OSISPLAIN_H

#include <swbasicfilter.h>
#include <utilxml.h>

SWORD_NAMESPACE_START

/** this filter converts OSIS text to plain text
 */
class SWDLLEXPORT OSISPlain : public SWBasicFilter {
public:
protected:
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key);
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
	virtual bool processStage(char stage, SWBuf &text, char *&from, BasicFilterUserData *userData);
public:
	OSISPlain();
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/osishtmlhref.h<|end_filename|>
/******************************************************************************
 *
 *  osishtmlhref.h -	Implementation of OSISHTMLHREF
 *
 * $Id: osishtmlhref.h 3548 2017-12-10 05:11:38Z scribe $
 *
 * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef OSISHTMLHREF_H
#define OSISHTMLHREF_H

#include <swbasicfilter.h>

SWORD_NAMESPACE_START

/** this filter converts OSIS text to HTML text with hrefs
 */
class SWDLLEXPORT OSISHTMLHREF : public SWBasicFilter {
private:
	bool morphFirst;
	bool renderNoteNumbers;
protected:
	// used by derived classes so we have it in the header
	class TagStacks;
	class SWDLLEXPORT MyUserData : public BasicFilterUserData {
	public:
		bool osisQToTick;
		bool inBold;	// TODO: obsolete. left for binary compat for 1.6.x
		bool inXRefNote;
		bool isBiblicalText;
		int suspendLevel;
		SWBuf wordsOfChristStart;
		SWBuf wordsOfChristEnd;
                TagStacks *tagStacks;	// TODO: modified to wrap all TagStacks necessary for this filter until 1.7.x
//                TagStack *hiStack;	// TODO: commented out for binary compat for 1.6.x	 wrapped in tagStacks until 1.7.x
		SWBuf lastTransChange;
		SWBuf w;
		SWBuf fn;
		SWBuf version;
		MyUserData(const SWModule *module, const SWKey *key);
		~MyUserData();
	};
	virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
		return new MyUserData(module, key);
	}
	virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
public:
	OSISHTMLHREF();
	void setMorphFirst(bool val = true) { morphFirst = val; }
	void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/echomod.h<|end_filename|>
/******************************************************************************
 *
 *  echomod.h -	code for class 'EchoMod' - a test module that just echo back
 *		text of key.
 *
 * $Id: echomod.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1996-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ECHOMOD_H
#define ECHOMOD_H

#include <swtext.h>
#include <defs.h>


SWORD_NAMESPACE_START

class SWDLLEXPORT EchoMod : public SWText
{
public:
	EchoMod();
	virtual ~EchoMod();
	virtual SWBuf &getRawEntryBuf() const;
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>SessionManagerTest.h<|end_filename|>
//
//  SessionManagerTest.h
//  Eloquent
//
//  Created by <NAME> on 08/19/12.
//Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <XCTest/XCTest.h>

@interface SessionManagerTest : XCTestCase

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/versekey.h<|end_filename|>
/******************************************************************************
 *
 *  versekey.h -	code for class 'VerseKey'- a standard Biblical verse
 *			key
 *
 * $Id: versekey.h 3541 2017-12-03 18:40:33Z scribe $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ	85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */


#ifndef VERSEKEY_H
#define VERSEKEY_H

#include <swkey.h>
#include <swmacs.h>
#include <listkey.h>
#include <versificationmgr.h>

#include <defs.h>

SWORD_NAMESPACE_START

#define POS_MAXVERSE ((char)3)
#define POS_MAXCHAPTER ((char)4)
#define POS_MAXBOOK ((char)5)

#define MAXVERSE SW_POSITION(POS_MAXVERSE)
#define MAXCHAPTER SW_POSITION(POS_MAXCHAPTER)
#define MAXBOOK SW_POSITION(POS_MAXBOOK)



/**
 * Class VerseKey
 * The SWKey implementation used for verse based modules like Bibles or commentaries.
 */
class SWDLLEXPORT VerseKey : public SWKey {

	static SWClass classdef;

	/** number of instantiated VerseKey objects or derivitives
	*/
	static int instance;
	ListKey internalListKey;

	const VersificationMgr::System *refSys;

	/** flag for auto normalization
	*/
	char autonorm;

	/** flag for intros on/off
	*/
	char intros;

	/** initializes this VerseKey()
	*/
	void init(const char *v11n = "KJV");

	// bounds caching is mutable, thus const
	void initBounds() const;

	// private with no bounds check
	void setFromOther(const VerseKey &vk);

	void checkBounds();

	// internal upper/lower bounds optimizations
	mutable long lowerBound, upperBound;	// if autonorms is on
	mutable VerseKey *tmpClone;

	typedef struct { int test; int book; int chap; int verse; char suffix; } VerseComponents;

	mutable VerseComponents lowerBoundComponents, upperBoundComponents;	// if autonorms is off, we can't optimize with index

protected:

	/** The Testament: 0 - Module Heading; 1 - Old; 2 - New
	*/
	signed char testament;
	signed char book;
	signed int chapter;
	signed int verse;
	signed char suffix;

	/************************************************************************
	 * VerseKey::getBookFromAbbrev - Attempts to find a book no from a name or
	 *                           abbreviation
	 *
	 * ENT:	@param abbr - key for which to search;
	 * RET:	@return book number or < 0 = not valid
	 */
	virtual int getBookFromAbbrev(const char *abbr) const;

	/** Refresh keytext based on testament|book|chapter|verse
	* default auto normalization to true
	* default display headings option is false
	*/
	void freshtext() const;
	/**	Parse a character array into testament|book|chapter|verse
	*
	*/
	virtual char parse(bool checkNormalize = true);
public:
#if 0
	static long otbks[];
	static long otcps[];
	static long ntbks[];
	static long ntcps[];
#endif
	int BMAX[2];

	/**
	* VerseKey Constructor - initializes Instance of VerseKey
	*
	* @param ikey text key (will take various forms of 'BOOK CH:VS'.
	* See parse() for more detailed information)
	*/
	VerseKey(const char *ikey = 0);

	/**
	* VerseKey Constructor - initializes instance of VerseKey
	*
	* @param ikey base key (will take various forms of 'BOOK CH:VS'.
	*	See parse() for more detailed information)
	*/
	VerseKey(const SWKey *ikey);

	/** VerseKey Constructor - initializes instance of VerseKey
	* with boundariess - see also LowerBound()
	* and UpperBound()
	* @param min the lower boundary of the new	VerseKey
	* @param max the upper boundary of the new	VerseKey
	*/
	VerseKey(const char *min, const char *max, const char *v11n = "KJV");

	/**	VerseKey Copy Constructor - will create a new VerseKey
	* based on an existing SWKey
	*
	* @param k the	VerseKey to copy from
	*/
	VerseKey(const SWKey &k);

	/**	VerseKey Copy Constructor - will create a new VerseKey
	* based on an existing one
	*
	* @param k the	VerseKey to copy from
	*/
	VerseKey(const VerseKey &k);

	/**	VerseKey Destructor
	* Cleans up an instance of VerseKey
	*/
	virtual ~VerseKey();

	/** sets the lower boundary for this VerseKey
	*
	* @param lb the new lower boundary for this VerseKey
	*/
	void setLowerBound(const VerseKey &lb);
	SWDEPRECATED VerseKey &LowerBound(const VerseKey &lb) { setLowerBound(lb); return getLowerBound(); }

	/** sets the upper boundary for this VerseKey
	* @param ub the new upper boundary for this VerseKey
	*/
	void setUpperBound(const VerseKey &ub);
	SWDEPRECATED VerseKey &UpperBound(const VerseKey &ub) { setUpperBound(ub); return getUpperBound(); }

	/** gets the lower boundary of this VerseKey
	* @return the lower boundary of this VerseKey
	*/
	VerseKey &getLowerBound() const;
	SWDEPRECATED VerseKey &LowerBound() const { return getLowerBound(); }

	/** gets the upper boundary of this VerseKey
	* @return the upper boundary of this VerseKey
	*/
	VerseKey &getUpperBound() const;
	SWDEPRECATED VerseKey &UpperBound() const { return getUpperBound(); }

	/** clears the boundaries of this VerseKey
	*/
	void clearBounds();
	SWDEPRECATED void ClearBounds() { clearBounds(); }

	/** Creates a new SWKey based on the current VerseKey
	* see also the Copy Constructor
	*/
	virtual SWKey *clone() const;

	/** refreshes keytext before returning if cast to
	* a (char *) is requested
	*/
	virtual const char *getText() const;
	virtual const char *getShortText() const;
	virtual void setText(const char *ikey, bool checkNormalize) { SWKey::setText(ikey); parse(checkNormalize); }
	virtual void setText(const char *ikey) { SWKey::setText(ikey); parse(); }
	virtual void copyFrom(const SWKey &ikey);

	/** Equates this VerseKey to another VerseKey
	*/
	virtual void copyFrom(const VerseKey &ikey);

	/** Only repositions this VerseKey to another VerseKey
	*/
	virtual void positionFrom(const SWKey &ikey);

	/** Positions this key
	*
	* @param newpos Position to set to.
	*/
	virtual void setPosition(SW_POSITION newpos);

	/** Decrements key a number of verses
	*
	* @param steps Number of verses to jump backward
	*/
	virtual void decrement(int steps = 1);

	/** Increments key a number of verses
	*
	* @param steps Number of verses to jump forward
	*/
	virtual void increment(int steps = 1);
	virtual bool isTraversable() const { return true; }

	/** Get/Set position of this key by Book Name
	 */
	virtual const char *getBookName() const;
	virtual void setBookName(const char *bname);

	virtual const char *getBookAbbrev() const;
	/** Gets testament
	*
	* @return value of testament
	*/
	virtual char getTestament() const;
	/**
	* @deprecated Use getTestament() instead.
	*/
	SWDEPRECATED char Testament() const { return getTestament(); }	// deprecated
	virtual int getTestamentMax() const { return 2; }

	/** Gets book
	*
	* @return value of book
	*/
	virtual char getBook() const;
	/**
	* @deprecated Use getBook() instead.
	*/
	SWDEPRECATED char Book() const { return getBook(); }	// deprecated
	virtual int getBookMax() const { return BMAX[testament-1]; }

	/** Gets chapter
	*
	* @return value of chapter
	*/
	virtual int getChapter() const;
	/**
	* @deprecated Use getChapter() instead.
	*/
	SWDEPRECATED int Chapter() const { return getChapter(); }	// deprecated
	virtual int getChapterMax() const;

	/** Gets verse
	*
	* @return value of verse
	*/
	virtual int getVerse() const;
	/**
	* @deprecated Use getVerse() instead.
	*/
	SWDEPRECATED int Verse() const { return getVerse(); }		// deprecated
	virtual int getVerseMax() const;

	/** Gets verse suffix
	*
	* @return value of verse suffix
	*/
	virtual char getSuffix() const;

	/** Sets testament
	*
	* @param itestament value which to set testament
	*/
	virtual void setTestament(char itestament);
	/**
	* @deprecated Use setTestament() instead.
	*/
	SWDEPRECATED char Testament(char itestament) { char retVal = getTestament(); setTestament(itestament); return retVal; } // deprecated

	/** Sets book
	*
	* @param ibook value which to set book
	*/
	virtual void setBook(char ibook);
	/**
	* @deprecated Use setBook() instead.
	*/
	SWDEPRECATED char Book(char ibook) { char retVal = getBook(); setBook(ibook); return retVal; } // deprecated

	/** Sets chapter
	*
	* @param ichapter value which to set chapter
	*/
	virtual void setChapter(int ichapter);
	/**
	* @deprecated Use setChapter() instead.
	*/
	SWDEPRECATED int Chapter(int ichapter) { char retVal = getChapter(); setChapter(ichapter); return retVal; } // deprecated

	/** Sets verse
	*
	* @param iverse value which to set verse
	*/
	virtual void setVerse(int iverse);
	/**
	* @deprecated Use setVerse() instead.
	*/
	SWDEPRECATED int Verse(int iverse) { char retVal = getVerse(); setVerse(iverse); return retVal; } // deprecated;

	/** Sets/gets verse suffix
	*
	* @param isuffix value which to set verse suffix
	*/
	virtual void setSuffix(char isuffix);

	/** checks limits and normalizes if necessary (e.g.
	* Matthew 29:47 = Mark 2:2).	If last verse is
	* exceeded, key is set to last Book CH:VS
	*
	*/
	virtual void normalize(bool autocheck = false);
	SWDEPRECATED void Normalize(char autocheck = 0) { normalize(autocheck!=0); }

	/** Sets flag that tells VerseKey to
	* automatically normalize itself when modified
	*
	* @param iautonorm value which to set autonorm
	*/
	virtual void setAutoNormalize(bool iautonorm);
	virtual bool isAutoNormalize() const;

	/**
	* @deprecated Use setAutoNormalize() instead.
	*/
	SWDEPRECATED char AutoNormalize(char iautonorm) { char retVal = isAutoNormalize()?1:0; setAutoNormalize(iautonorm!=0); return retVal; }	// deprecated
	/**
	* @deprecated Use isAutoNormalize() instead.
	*/
	SWDEPRECATED char AutoNormalize() const { return isAutoNormalize()?1:0; }	// deprecated


	/** Sets/gets flag that tells VerseKey to include
	* chapter/book/testament/module intros
	*
	* @deprecated Use setIntros() and isIntros() instead.
	* @param iheadings value which to set intros
	* [MAXPOS(char)] - only get
	* @return if unchanged -> value of intros,
	* if changed -> previous value of intros
	*/
	SWDEPRECATED char Headings(char iheadings = MAXPOS(char)) { char retVal = isIntros(); if (iheadings != MAXPOS(char)) setIntros(iheadings!=0); return retVal; }

	/** The Intros property determine whether or not to include
	* chapter/book/testament/module intros
	*/
	virtual void setIntros(bool val);
	virtual bool isIntros() const;


	/** Gets index based upon current verse
	*
	* @return offset
	*/
	virtual long getIndex() const;


	/** Sets index based upon current verse
	*
	* @param iindex value to set index to
	*/
	virtual void setIndex(long iindex);


	/** Gets index into current testament based upon current verse
	*
	* @return offset
	*/
	virtual long getTestamentIndex() const;

	/**
	* @deprecated Use getTestamentIndex()
	*/
	SWDEPRECATED long TestamentIndex() const { return getTestamentIndex(); }	// deprecated, use getTestamentIndex()

	virtual const char *getOSISRef() const;
	virtual const char *getOSISBookName() const;

	/** Tries to parse a string and convert it into an OSIS reference
	 * @param inRef reference string to try to parse
	 * @param defaultKey for details @see ParseVerseList(..., defaultKey, ...)
	 */
	static const char *convertToOSIS(const char *inRef, const SWKey *defaultKey);

	/******************************************************************************
	 * VerseKey::parseVerseList - Attempts to parse a buffer into separate
	 *				verse entries returned in a ListKey
	 *
	 * ENT:	buf		- buffer to parse;
	 *	defaultKey	- if verse, chap, book, or testament is left off,
	 *				pull info from this key (ie. Gen 2:3; 4:5;
	 *				Gen would be used when parsing the 4:5 section)
	 *	expandRange	- whether or not to expand eg. John 1:10-12 or just
	 *				save John 1:10
	 *
	 * RET:	ListKey reference filled with verse entries contained in buf
	 *
	 * COMMENT: This code works but wreaks.  Rewrite to make more maintainable.
	 */
	virtual ListKey parseVerseList(const char *buf, const char *defaultKey = 0, bool expandRange = false, bool useChapterAsVerse = false);
	SWDEPRECATED ListKey ParseVerseList(const char *buf, const char *defaultKey = 0, bool expandRange = false, bool useChapterAsVerse = false) { return parseVerseList(buf, defaultKey, expandRange, useChapterAsVerse); }
	virtual const char *getRangeText() const;
	virtual const char *getOSISRefRangeText() const;
	/** Compares another	SWKey object
	*
	* @param ikey key to compare with this one
	* @return >0 if this	VerseKey is greater than compare	SWKey,
	* <0 if this	VerseKey is smaller than compare	SWKey,
	* 0 if the keys are the same
	*/
	virtual int compare(const SWKey &ikey);

	/** Compares another	VerseKey object
	*
	* @param ikey key to compare with this one
	* @return >0 if this	VerseKey is greater than compare	VerseKey,
	* <0 if this	VerseKey is smaller than compare	VerseKey,
	* 0 if the keys are the same
	*/
	virtual int _compare(const VerseKey &ikey);

	virtual void setVersificationSystem(const char *name);
	virtual const char *getVersificationSystem() const;

	// DEBUG
	void validateCurrentLocale() const;


	// OPERATORS --------------------------------------------------------------------


	SWKEY_OPERATORS

	virtual SWKey &operator =(const VerseKey &ikey) { positionFrom(ikey); return *this; }
};

SWORD_NAMESPACE_END

#endif //VERSEKEY_H


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/canon_null.h<|end_filename|>
/******************************************************************************
 *
 *  canon_null.h -	Versification data for the null system
 *
 * $Id: canon_null.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 2009-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 */

#ifndef CANON_NULL_H
#define CANON_NULL_H

SWORD_NAMESPACE_START


// Versification system: null
// Book order:
// This is not a real versification system. Rather, use these [on]tbooks values for other versifications that are missing entire testaments.

/******************************************************************************
 * [on]tbooks_null - initialize static instance for all canonical
 *		 text names and chapmax
 */
struct sbook otbooks_null[] = {
  {"", "", "", 0}
};

struct sbook ntbooks_null[] = {
  {"", "", "", 0}
};

SWORD_NAMESPACE_END


#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/Headers/SwordBibleBook.h<|end_filename|>
//
//  SwordBibleBook.h
//  MacSword2
//
//  Created by <NAME> on 18.02.09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class SwordBibleChapter;

#ifdef __cplusplus
#include <versificationmgr.h>
#include <versekey.h>
#include <localemgr.h>
#endif

@interface SwordBibleBook : NSObject {
#ifdef __cplusplus
    sword::VersificationMgr::Book *swBook;
#endif
}

@property (readwrite) int number;
@property (readonly) int numberInTestament;
@property (readonly) int testament;
@property (retain, readonly) NSString *localizedName;
@property (retain, readonly) NSArray *chapters;

#ifdef __cplusplus
- (id)initWithBook:(sword::VersificationMgr::Book *)aBook;
- (sword::VersificationMgr::Book *)book;
#endif

- (NSString *)name;
- (NSString *)osisName;
- (int)numberOfChapters;
- (int)numberOfVersesForChapter:(int)chapter;
/**
 get book index for verseKey
 that is: book number + testament * 100
 */
- (int)generatedIndex;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/zipcomprs.h<|end_filename|>
/******************************************************************************
 *
 *  zipcomprs.h -	definition of Class ZipCompress used for data
 *			compression
 *
 * $Id: zipcomprs.h 2850 2013-07-02 09:57:20Z chrislit $
 *
 * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ZIPCOMPRS_H
#define ZIPCOMPRS_H

#include <swcomprs.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT ZipCompress : public SWCompress {

protected:
public:
	ZipCompress();
	virtual ~ZipCompress();

	virtual void Encode(void);
	virtual void Decode(void);
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/canon_abbrevs.h<|end_filename|>
/******************************************************************************
 *
 *  canon_abbrevs.h -	Canonical text information to be included by
 *			 VerseKey.cpp
 *
 * $Id: canon_abbrevs.h 2970 2013-08-22 07:03:11Z chrislit $
 *
 * Copyright 2009-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef CANON_ABBREVS_H
#define CANON_ABBREVS_H

SWORD_NAMESPACE_START


/******************************************************************************
 *	Abbreviations - MUST be in alphabetical order & by PRIORITY
 *		RULE: first match of entire key
 *			(e.g. key: "1CH"; match: "1CHRONICLES")
 */

const struct abbrev builtin_abbrevs[] = {
  {"1 BARUCH", "Bar"},		// Baruch
  {"1 C", "1Cor"},		// I Corinthians
  {"1 CHRONICLES", "1Chr"},		// I Chronicles
  {"1 CORINTHIANS", "1Cor"},		// I Corinthians
  {"1 E", "1Esd"},		// I Esdras
  {"1 ENOCH", "1En"},		// I Enoch
  {"1 ESDRAS", "1Esd"},		// I Esdras
  {"1 JN", "1John"},		// I John
  {"1 JOHN", "1John"},		// I John
  {"1 K", "1Kgs"},		// I Kings
  {"1 KGDMS", "1Sam"},		// I Samuel
  {"1 KGS", "1Kgs"},		// I Kings
  {"1 KING", "1Kgs"},		// I Kings
  {"1 KINGDOMS", "1Sam"},		// I Samuel
  {"1 KINGS", "1Kgs"},		// I Kings
  {"<NAME>", "1Macc"},		// I Maccabees
  {"1 MAKABIAN", "1Meq"},		// I Meqabyan
  {"1 MEQABYAN", "1Meq"},		// I Meqabyan
  {"1 P", "1Pet"},		// I Peter
  {"<NAME>", "1Chr"},		// I Chronicles
  {"<NAME>", "1Pet"},		// I Peter
  {"1 PTR", "1Pet"},		// I Peter
  {"1 SAMUEL", "1Sam"},		// I Samuel
  {"<NAME>", "1Thess"},		// I Thessalonians
  {"1 TIMOTHY", "1Tim"},		// I Timothy
  {"1BARUCH", "Bar"},		// Baruch
  {"1C", "1Cor"},		// I Corinthians
  {"1CHR", "1Chr"},		// I Chronicles
  {"1CHRONICLES", "1Chr"},		// I Chronicles
  {"1COR", "1Cor"},		// I Corinthians
  {"1CORINTHIANS", "1Cor"},		// I Corinthians
  {"1E", "1Esd"},		// I Esdras
  {"1EN", "1En"},		// I Enoch
  {"1ENOCH", "1En"},		// I Enoch
  {"1ESD", "1Esd"},		// I Esdras
  {"1ESDRAS", "1Esd"},		// I Esdras
  {"1JN", "1John"},		// I John
  {"1JOHN", "1John"},		// I John
  {"1K", "1Kgs"},		// I Kings
  {"1KGDMS", "1Sam"},		// I Samuel
  {"1KGS", "1Kgs"},		// I Kings
  {"1KING", "1Kgs"},		// I Kings
  {"1KINGDOMS", "1Sam"},		// I Samuel
  {"1KINGS", "1Kgs"},		// I Kings
  {"1MACC", "1Macc"},		// I Maccabees
  {"1MACCABEES", "1Macc"},		// I Maccabees
  {"1MAKABIAN", "1Meq"},		// I Meqabyan
  {"1MEQ", "1Meq"},		// I Meqabyan
  {"1MEQABYAN", "1Meq"},		// I Meqabyan
  {"1P", "1Pet"},		// I Peter
  {"1PARALIPOMENON", "1Chr"},		// I Chronicles
  {"1PET", "1Pet"},		// I Peter
  {"1PETER", "1Pet"},		// I Peter
  {"1PTR", "1Pet"},		// I Peter
  {"1SAM", "1Sam"},		// I Samuel
  {"1SAMUEL", "1Sam"},		// I Samuel
  {"1THESS", "1Thess"},		// I Thessalonians
  {"1THESSALONIANS", "1Thess"},		// I Thessalonians
  {"1TIM", "1Tim"},		// I Timothy
  {"1TIMOTHY", "1Tim"},		// I Timothy
  {"2 BARUCH", "2Bar"},		// 2Baruch
  {"2 C", "2Cor"},		// II Corinthians
  {"2 CHRONICLES", "2Chr"},		// II Chronicles
  {"2 CORINTHIANS", "2Cor"},		// II Corinthians
  {"2 E", "2Esd"},		// II Esdras
  {"2 ESDRAS", "2Esd"},		// II Esdras
  {"2 JN", "2John"},		// II John
  {"2 JOHN", "2John"},		// II John
  {"2 K", "2Kgs"},		// II Kings
  {"2 KGDMS", "2Sam"},		// II Samuel
  {"2 KGS", "2Kgs"},		// II Kings
  {"2 KING", "2Kgs"},		// II Kings
  {"2 KINGDOMS", "2Sam"},		// II Samuel
  {"2 KINGS", "2Kgs"},		// II Kings
  {"2 MACCABEES", "2Macc"},		// II Maccabees
  {"2 MAKABIAN", "2Meq"},		// II Meqabyan
  {"2 MEQABYAN", "2Meq"},		// II Meqabyan
  {"2 P", "2Pet"},		// II Peter
  {"2 PARALIPOMENON", "2Chr"},		// II Chronicles
  {"2 PETER", "2Pet"},		// II Peter
  {"2 PTR", "2Pet"},		// II Peter
  {"2 SAMUEL", "2Sam"},		// II Samuel
  {"2 THESSALONIANS", "2Thess"},		// II Thessalonians
  {"2 TIMOTHY", "2Tim"},		// II Timothy
  {"2BAR", "2Bar"},		// 2Baruch
  {"2BARUCH", "2Bar"},		// 2Baruch
  {"2C", "2Cor"},		// II Corinthians
  {"2CHR", "2Chr"},		// II Chronicles
  {"2CHRONICLES", "2Chr"},		// II Chronicles
  {"2COR", "2Cor"},		// II Corinthians
  {"2CORINTHIANS", "2Cor"},		// II Corinthians
  {"2E", "2Esd"},		// II Esdras
  {"2ESD", "2Esd"},		// II Esdras
  {"2ESDRAS", "2Esd"},		// II Esdras
  {"2JN", "2John"},		// II John
  {"2JOHN", "2John"},		// II John
  {"2K", "2Kgs"},		// II Kings
  {"2KGDMS", "2Sam"},		// II Samuel
  {"2KGS", "2Kgs"},		// II Kings
  {"2KING", "2Kgs"},		// II Kings
  {"2KINGDOMS", "2Sam"},		// II Samuel
  {"2KINGS", "2Kgs"},		// II Kings
  {"2MACC", "2Macc"},		// II Maccabees
  {"2MACCABEES", "2Macc"},		// II Maccabees
  {"2MAKABIAN", "2Meq"},		// II Meqabyan
  {"2MEQ", "2Meq"},		// II Meqabyan
  {"2MEQABYAN", "2Meq"},		// II Meqabyan
  {"2P", "2Pet"},		// II Peter
  {"2PARALIPOMENON", "2Chr"},		// II Chronicles
  {"2PET", "2Pet"},		// II Peter
  {"2PETER", "2Pet"},		// II Peter
  {"2PTR", "2Pet"},		// II Peter
  {"2SAM", "2Sam"},		// II Samuel
  {"2SAMUEL", "2Sam"},		// II Samuel
  {"2THESS", "2Thess"},		// II Thessalonians
  {"2THESSALONIANS", "2Thess"},		// II Thessalonians
  {"2TIM", "2Tim"},		// II Timothy
  {"2TIMOTHY", "2Tim"},		// II Timothy
  {"3 EZRA", "1Esd"},		// I Esdras
  {"3 JN", "3John"},		// III John
  {"3 JOHN", "3John"},		// III John
  {"3 KGDMS", "1Kgs"},		// I Kings
  {"3 KGS", "1Kgs"},		// I Kings
  {"3 KINGDOMS", "1Kgs"},		// I Kings
  {"3 KINGS", "1Kgs"},		// I Kings
  {"3 MACCABEES", "3Macc"},		// III Maccabees
  {"3 MAKABIAN", "3Meq"},		// III Meqabyan
  {"3 MEQABYAN", "3Meq"},		// III Meqabyan
  {"3EZRA", "1Esd"},		// I Esdras
  {"3JN", "3John"},		// III John
  {"3JOHN", "3John"},		// III John
  {"3KGDMS", "1Kgs"},		// I Kings
  {"3KGS", "1Kgs"},		// I Kings
  {"3KINGDOMS", "1Kgs"},		// I Kings
  {"3KINGS", "1Kgs"},		// I Kings
  {"3MACC", "3Macc"},		// III Maccabees
  {"3MACCABEES", "3Macc"},		// III Maccabees
  {"3MAKABIAN", "3Meq"},		// III Meqabyan
  {"3MEQ", "3Meq"},		// III Meqabyan
  {"3MEQABYAN", "3Meq"},		// III Meqabyan
  {"4 BARUCH", "4Bar"},		// IV Baruch
  {"4 KGDMS", "2Kgs"},		// II Kings
  {"4 KGS", "2Kgs"},		// II Kings
  {"4 KINGDOMS", "2Kgs"},		// II Kings
  {"4 KINGS", "2Kgs"},		// II Kings
  {"4 MACCABEES", "4Macc"},		// IV Maccabees
  {"4BAR", "4Bar"},		// IV Baruch
  {"4BARUCH", "4Bar"},		// IV Baruch
  {"4KGDMS", "2Kgs"},		// II Kings
  {"4KGS", "2Kgs"},		// II Kings
  {"4KINGDOMS", "2Kgs"},		// II Kings
  {"4KINGS", "2Kgs"},		// II Kings
  {"4MACC", "4Macc"},		// IV Maccabees
  {"4MACCABEES", "4Macc"},		// IV Maccabees
  {"5APOCSYRPSS", "AddPs"},		// Additional Psalm
  {"ACTS", "Acts"},		// Acts
  {"ADDDAN", "AddDan"},		// Additions to Daniel
  {"ADDESTH", "AddEsth"},		// Additions to Esther
  {"ADDITIONAL PSALM", "AddPs"},		// Additional Psalm
  {"ADDITIONS TO DANIEL", "AddDan"},		// Additions to Daniel
  {"ADDITIONS TO ESTHER", "AddEsth"},		// Additions to Esther
  {"ADDPS", "AddPs"},		// Additional Psalm
  {"AMOS", "Amos"},		// Amos
  {"<NAME>", "Rev"},		// Revelation of John
  {"AZA", "PrAzar"},		// Prayer of Azariah
  {"AZAR", "PrAzar"},		// Prayer of Azariah
  {"AZARIAH", "PrAzar"},		// Prayer of Azariah
  {"BAR", "Bar"},		// Baruch
  {"BARUCH", "Bar"},		// Baruch
  {"BEL", "Bel"},		// Bel and the Dragon
  {"BEL AND THE DRAGON", "Bel"},		// Bel and the Dragon
  {"C", "Col"},		// Colossians
  {"CANTICLE OF CANTICLES", "Song"},		// Song of Solomon
  {"COL", "Col"},		// Colossians
  {"COLOSSIANS", "Col"},		// Colossians
  {"D", "Deut"},		// Deuteronomy
  {"DAN", "Dan"},		// Daniel
  {"DANGR", "DanGr"},		// Daniel (Greek)
  {"DANIEL", "Dan"},		// Daniel
  {"DANIEL (ADDITIONS)", "AddDan"},		// Additions to Daniel
  {"DANIEL (GREEK)", "DanGr"},		// Daniel (Greek)
  {"DEUT", "Deut"},		// Deuteronomy
  {"DEUTERONOMY", "Deut"},		// Deuteronomy
  {"DT", "Deut"},		// Deuteronomy
  {"E", "Exod"},		// Exodus
  {"ECCL", "Eccl"},		// Ecclesiastes
  {"ECCLESIASTES", "Eccl"},		// Ecclesiastes
  {"ECCLESIASTICUS", "Sir"},		// Sirach
  {"ECCLUS", "Sir"},		// Sirach
  {"EK", "Ezek"},		// Ezekiel
  {"ENOCH", "1En"},		// I Enoch
  {"EPH", "Eph"},		// Ephesians
  {"EPHESIANS", "Eph"},		// Ephesians
  {"EPISTLE OF JEREMIAH", "EpJer"},		// Epistle of Jeremiah
  {"EPJ", "EpJer"},		// Epistle of Jeremiah
  {"EPJER", "EpJer"},		// Epistle of Jeremiah
  {"EPLAO", "EpLao"},		// Laodiceans
  {"ES", "Esth"},		// Esther
  {"ESDRAS A", "1Esd"},		// I Esdras
  {"ESDRAS B", "Ezra"},		// II Esdras
  {"ESDRASA", "1Esd"},		// I Esdras
  {"ESDRASB", "Ezra"},		// II Esdras
  {"ESG", "EsthGr"},		// Esther (Greek)
  {"ESTER", "Esth"},		// Esther
  {"ESTH", "Esth"},		// Esther
  {"ESTHER", "Esth"},		// Esther
  {"ESTHER (ADDITIONS)", "AddEsth"},		// Additions to Esther
  {"ESTHER (GREEK)", "EsthGr"},		// Esther (Greek)
  {"ESTHGR", "EsthGr"},		// Esther (Greek)
  {"ETHIOPIC APOCALYPSE OF ENOCH", "1En"},		// I Enoch
  {"EXOD", "Exod"},		// Exodus
  {"EXODUS", "Exod"},		// Exodus
  {"EZEK", "Ezek"},		// Ezekiel
  {"EZEKIEL", "Ezek"},		// Ezekiel
  {"EZK", "Ezek"},		// Ezekiel
  {"EZRA", "Ezra"},		// Ezra
  {"FIVE APOCRYPHAL SYRIAC PSALMS", "AddPs"},		// Additional Psalm
  {"G", "Gen"},		// Genesis
  {"GAL", "Gal"},		// Galatians
  {"GALATIANS", "Gal"},		// Galatians
  {"GEN", "Gen"},		// Genesis
  {"GENESIS", "Gen"},		// Genesis
  {"GN", "Gen"},		// Genesis
  {"GRDAN", "DanGr"},		// Daniel (Greek)
  {"<NAME>", "DanGr"},		// Daniel (Greek)
  {"<NAME>", "EsthGr"},		// Esther (Greek)
  {"GRESTH", "EsthGr"},		// Esther (Greek)
  {"H", "Heb"},		// Hebrews
  {"HAB", "Hab"},		// Habakkuk
  {"HABAKKUK", "Hab"},		// Habakkuk
  {"HAG", "Hag"},		// Haggai
  {"HAGGAI", "Hag"},		// Haggai
  {"HEB", "Heb"},		// Hebrews
  {"HEBREWS", "Heb"},		// Hebrews
  {"HOS", "Hos"},		// Hosea
  {"HOSEA", "Hos"},		// Hosea
  {"I", "Isa"},		// Isaiah
  {"I BARUCH", "Bar"},		// Baruch
  {"I C", "1Cor"},		// I Corinthians
  {"I CHRONICLES", "1Chr"},		// I Chronicles
  {"I CORINTHIANS", "1Cor"},		// I Corinthians
  {"I E", "1Esd"},		// I Esdras
  {"I ENOCH", "1En"},		// I Enoch
  {"I ESDRAS", "1Esd"},		// I Esdras
  {"I JN", "1John"},		// I John
  {"I JOHN", "1John"},		// I John
  {"I K", "1Kgs"},		// I Kings
  {"I KGDMS", "1Sam"},		// I Samuel
  {"I KGS", "1Kgs"},		// I Kings
  {"I KING", "1Kgs"},		// I Kings
  {"I KINGDOMS", "1Sam"},		// I Samuel
  {"I KINGS", "1Kgs"},		// I Kings
  {"I MACCABEES", "1Macc"},		// I Maccabees
  {"<NAME>", "1Meq"},		// I Meqabyan
  {"<NAME>", "1Meq"},		// I Meqabyan
  {"<NAME>", "1Pet"},		// I Peter
  {"<NAME>", "1Chr"},		// I Chronicles
  {"<NAME>", "1Pet"},		// I Peter
  {"I PTR", "1Pet"},		// I Peter
  {"I SAMUEL", "1Sam"},		// I Samuel
  {"<NAME>", "1Thess"},		// I Thessalonians
  {"<NAME>", "1Tim"},		// I Timothy
  {"IBARUCH", "Bar"},		// Baruch
  {"IC", "1Cor"},		// I Corinthians
  {"ICHRONICLES", "1Chr"},		// I Chronicles
  {"ICORINTHIANS", "1Cor"},		// I Corinthians
  {"IE", "1Esd"},		// I Esdras
  {"IENOCH", "1En"},		// I Enoch
  {"IESDRAS", "1Esd"},		// I Esdras
  {"II BARUCH", "2Bar"},		// 2Baruch
  {"II C", "2Cor"},		// II Corinthians
  {"II CHRONICLES", "2Chr"},		// II Chronicles
  {"II CORINTHIANS", "2Cor"},		// II Corinthians
  {"II E", "2Esd"},		// II Esdras
  {"II ESDRAS", "2Esd"},		// II Esdras
  {"II JN", "2John"},		// II John
  {"II JOHN", "2John"},		// II John
  {"II K", "2Kgs"},		// II Kings
  {"II KGDMS", "2Sam"},		// II Samuel
  {"II KGS", "2Kgs"},		// II Kings
  {"II KING", "2Kgs"},		// II Kings
  {"II KINGDOMS", "2Sam"},		// II Samuel
  {"II KINGS", "2Kgs"},		// II Kings
  {"II MACCABEES", "2Macc"},		// II Maccabees
  {"II MAKABIAN", "2Meq"},		// II Meqabyan
  {"II MEQABYAN", "2Meq"},		// II Meqabyan
  {"II P", "2Pet"},		// II Peter
  {"II PARALIPOMENON", "2Chr"},		// II Chronicles
  {"II PETER", "2Pet"},		// II Peter
  {"II PTR", "2Pet"},		// II Peter
  {"II SAMUEL", "2Sam"},		// II Samuel
  {"II THESSALONIANS", "2Thess"},		// II Thessalonians
  {"II TIMOTHY", "2Tim"},		// II Timothy
  {"IIBARUCH", "2Bar"},		// 2Baruch
  {"IIC", "2Cor"},		// II Corinthians
  {"IICHRONICLES", "2Chr"},		// II Chronicles
  {"IICORINTHIANS", "2Cor"},		// II Corinthians
  {"IIE", "2Esd"},		// II Esdras
  {"IIESDRAS", "2Esd"},		// II Esdras
  {"III EZRA", "1Esd"},		// I Esdras
  {"III JN", "3John"},		// III John
  {"III JOHN", "3John"},		// III John
  {"III KGDMS", "1Kgs"},		// I Kings
  {"III KGS", "1Kgs"},		// I Kings
  {"III KINGDOMS", "1Kgs"},		// I Kings
  {"III KINGS", "1Kgs"},		// I Kings
  {"III MACCABEES", "3Macc"},		// III Maccabees
  {"III MAKABIAN", "3Meq"},		// III Meqabyan
  {"III MEQABYAN", "3Meq"},		// III Meqabyan
  {"IIIEZRA", "1Esd"},		// I Esdras
  {"IIIJN", "3John"},		// III John
  {"IIIJOHN", "3John"},		// III John
  {"IIIKGDMS", "1Kgs"},		// I Kings
  {"IIIKGS", "1Kgs"},		// I Kings
  {"IIIKINGDOMS", "1Kgs"},		// I Kings
  {"IIIKINGS", "1Kgs"},		// I Kings
  {"IIIMACCABEES", "3Macc"},		// III Maccabees
  {"IIIMAKABIAN", "3Meq"},		// III Meqabyan
  {"IIIMEQABYAN", "3Meq"},		// III Meqabyan
  {"IIJN", "2John"},		// II John
  {"IIJOHN", "2John"},		// II John
  {"IIK", "2Kgs"},		// II Kings
  {"IIKGDMS", "2Sam"},		// II Samuel
  {"IIKGS", "2Kgs"},		// II Kings
  {"IIKING", "2Kgs"},		// II Kings
  {"IIKINGDOMS", "2Sam"},		// II Samuel
  {"IIKINGS", "2Kgs"},		// II Kings
  {"IIMACCABEES", "2Macc"},		// II Maccabees
  {"IIMAKABIAN", "2Meq"},		// II Meqabyan
  {"IIMEQABYAN", "2Meq"},		// II Meqabyan
  {"IIP", "2Pet"},		// II Peter
  {"IIPARALIPOMENON", "2Chr"},		// II Chronicles
  {"IIPETER", "2Pet"},		// II Peter
  {"IIPTR", "2Pet"},		// II Peter
  {"IISAMUEL", "2Sam"},		// II Samuel
  {"IITHESSALONIANS", "2Thess"},		// II Thessalonians
  {"IITIMOTHY", "2Tim"},		// II Timothy
  {"IJN", "1John"},		// I John
  {"IJOHN", "1John"},		// I John
  {"IK", "1Kgs"},		// I Kings
  {"IKGDMS", "1Sam"},		// I Samuel
  {"IKGS", "1Kgs"},		// I Kings
  {"IKING", "1Kgs"},		// I Kings
  {"IKINGDOMS", "1Sam"},		// I Samuel
  {"IKINGS", "1Kgs"},		// I Kings
  {"IMACCABEES", "1Macc"},		// I Maccabees
  {"IMAKABIAN", "1Meq"},		// I Meqabyan
  {"IMEQABYAN", "1Meq"},		// I Meqabyan
  {"IP", "1Pet"},		// I Peter
  {"IPARALIPOMENON", "1Chr"},		// I Chronicles
  {"IPETER", "1Pet"},		// I Peter
  {"IPTR", "1Pet"},		// I Peter
  {"ISA", "Isa"},		// Isaiah
  {"ISAIAH", "Isa"},		// Isaiah
  {"ISAMUEL", "1Sam"},		// I Samuel
  {"ITHESSALONIANS", "1Thess"},		// I Thessalonians
  {"ITIMOTHY", "1Tim"},		// I Timothy
  {"IV BARUCH", "4Bar"},		// IV Baruch
  {"IV KGDMS", "2Kgs"},		// II Kings
  {"IV KGS", "2Kgs"},		// II Kings
  {"IV KINGDOMS", "2Kgs"},		// II Kings
  {"IV KINGS", "2Kgs"},		// II Kings
  {"IV MACCABEES", "4Macc"},		// IV Maccabees
  {"IVBARUCH", "4Bar"},		// IV Baruch
  {"IVKGDMS", "2Kgs"},		// II Kings
  {"IVKGS", "2Kgs"},		// II Kings
  {"IVKINGDOMS", "2Kgs"},		// II Kings
  {"IVKINGS", "2Kgs"},		// II Kings
  {"IVMACCABEES", "4Macc"},		// IV Maccabees
  {"J", "Josh"},		// Joshua
  {"JAMES", "Jas"},		// James
  {"JAS", "Jas"},		// James
  {"JB", "Job"},		// Job
  {"JD", "Judg"},		// Judges
  {"JDGS", "Judg"},		// Judges
  {"JDT", "Jdt"},		// Judith
  {"JER", "Jer"},		// Jeremiah
  {"JEREMIAH", "Jer"},		// Jeremiah
  {"JHN", "John"},		// John
  {"JN", "John"},		// John
  {"JO", "John"},		// John
  {"JOB", "Job"},		// Job
  {"JOEL", "Joel"},		// Joel
  {"JOHN", "John"},		// John
  {"JOL", "Joel"},		// Joel
  {"JONAH", "Jonah"},		// Jonah
  {"JOSH", "Josh"},		// Joshua
  {"JOSHUA", "Josh"},		// Joshua
  {"JS", "Josh"},		// Joshua
  {"JU", "Jude"},		// Jude
  {"JUB", "Jub"},		// Jubilees
  {"JUBILEES", "Jub"},		// Jubilees
  {"JUDE", "Jude"},		// Jude
  {"JUDG", "Judg"},		// Judges
  {"JUDGES", "Judg"},		// Judges
  {"JUDITH", "Jdt"},		// Judith
  {"L", "Luke"},		// Luke
  {"LAM", "Lam"},		// Lamentations
  {"LAMENTATIONS", "Lam"},		// Lamentations
  {"LAO", "EpLao"},		// Laodiceans
  {"LAODICEANS", "EpLao"},		// Laodiceans
  {"LE", "Lev"},		// Leviticus
  {"LETJER", "EpJer"},		// Epistle of Jeremiah
  {"LETTER OF JEREMIAH", "EpJer"},		// Epistle of Jeremiah
  {"LEV", "Lev"},		// Leviticus
  {"LEVITICUS", "Lev"},		// Leviticus
  {"LK", "Luke"},		// Luke
  {"LUKE", "Luke"},		// Luke
  {"LV", "Lev"},		// Leviticus
  {"MA", "Matt"},		// Matthew
  {"MAL", "Mal"},		// Malachi
  {"MALACHI", "Mal"},		// Malachi
  {"MAN", "PrMan"},		// Prayer of Manasses
  {"MANASSEH", "PrMan"},		// Prayer of Manasses
  {"MANASSES", "PrMan"},		// Prayer of Manasses
  {"MARK", "Mark"},		// Mark
  {"MATT", "Matt"},		// Matthew
  {"MATTHEW", "Matt"},		// Matthew
  {"MIC", "Mic"},		// Micah
  {"MICAH", "Mic"},		// Micah
  {"MK", "Mark"},		// Mark
  {"MRK", "Mark"},		// Mark
  {"MT", "Matt"},		// Matthew
  {"N", "Num"},		// Numbers
  {"NAH", "Nah"},		// Nahum
  {"NAHUM", "Nah"},		// Nahum
  {"NAM", "Nah"},		// Nahum
  {"NEH", "Neh"},		// Nehemiah
  {"NEHEMIAH", "Neh"},		// Nehemiah
  {"NM", "Num"},		// Numbers
  {"NUM", "Num"},		// Numbers
  {"NUMBERS", "Num"},		// Numbers
  {"OBAD", "Obad"},		// Obadiah
  {"OBADIAH", "Obad"},		// Obadiah
  {"ODES", "Odes"},		// Odes
  {"P", "Ps"},		// Psalms
  {"<NAME>", "4Bar"},		// IV Baruch
  {"<NAME>", "4Bar"},		// IV Baruch
  {"PHIL", "Phil"},		// Philippians
  {"PHILEMON", "Phlm"},		// Philemon
  {"PHILIPPIANS", "Phil"},		// Philippians
  {"PHLM", "Phlm"},		// Philemon
  {"PHLP", "Phil"},		// Philippians
  {"PHM", "Phlm"},		// Philemon
  {"PHP", "Phil"},		// Philippians
  {"PR", "Prov"},		// Proverbs
  {"PRA", "PrAzar"},		// Prayer of Azariah
  {"PRAYER OF AZARIAH", "PrAzar"},		// Prayer of Azariah
  {"PRAYER OF MANASSEH", "PrMan"},		// Prayer of Manasses
  {"PRAYER OF MANASSES", "PrMan"},		// Prayer of Manasses
  {"PRAZAR", "PrAzar"},		// Prayer of Azariah
  {"PRM", "PrMan"},		// Prayer of Manasses
  {"PRMAN", "PrMan"},		// Prayer of Manasses
  {"PROV", "Prov"},		// Proverbs
  {"PROVERBS", "Prov"},		// Proverbs
  {"PS", "Ps"},		// Psalms
//  {"PS 151", "AddPs"},		// Additional Psalm
//  {"PS151", "AddPs"},		// Additional Psalm
  {"PSALM", "Ps"},		// Psalms
//  {"PSALM 151", "AddPs"},		// Additional Psalm
//  {"PSALM151", "AddPs"},		// Additional Psalm
  {"PSALMS", "Ps"},		// Psalms
  {"PSALMS OF SOLOMON", "PssSol"},		// Psalms of Solomon
  {"PSM", "Ps"},		// Psalms
  {"PSS", "Ps"},		// Psalms
  {"PSSSOL", "PssSol"},		// Psalms of Solomon
  {"QOHELET", "Eccl"},		// Ecclesiastes
  {"QOHELETH", "Eccl"},		// Ecclesiastes
  {"REV", "Rev"},		// Revelation of John
  {"REVELATION OF JOHN", "Rev"},		// Revelation of John
  {"ROM", "Rom"},		// Romans
  {"ROMANS", "Rom"},		// Romans
  {"RUTH", "Ruth"},		// Ruth
  {"S", "Song"},		// Song of Solomon
//  {"S3Y", "PrAzar"},		// Prayer of Azariah
  {"SI", "Sir"},		// Sirach
  {"SIP", "SirP"},		// Sirach (Prologue)
  {"SIR", "Sir"},		// Sirach
  {"SIRACH", "Sir"},		// Sirach
  {"SIRACH (PROLOGUE)", "SirP"},		// Sirach (Prologue)
  {"SIRP", "SirP"},		// Sirach (Prologue)
  {"SNG", "Song"},		// Song of Solomon
  {"SOLOMON", "Song"},		// Song of Solomon
  {"SONG", "Song"},		// Song of Solomon
  {"SONG OF SOLOMON", "Song"},		// Song of Solomon
  {"SONG OF SONGS", "Song"},		// Song of Solomon
  {"SONG OF THE THREE CHILDREN", "PrAzar"},		// Prayer of Azariah
  {"SUS", "Sus"},		// Susanna
  {"SUSANNA", "Sus"},		// Susanna
  {"SYRIAC APOCALYPSE OF BARUCH", "2Bar"},		// 2Baruch
  {"T", "Titus"},		// Titus
  {"TB", "Tob"},		// Tobit
  {"TBT", "Tob"},		// Tobit
  {"TITUS", "Titus"},		// Titus
  {"TOB", "Tob"},		// Tobit
  {"TOBIT", "Tob"},		// Tobit
  {"WIS", "Wis"},		// Wisdom
  {"WISDOM", "Wis"},		// Wisdom
  {"WISDOM OF BEN SIRA", "Sir"},		// Sirach
  {"WISDOM OF JESUS SON OF SIRACH", "Sir"},		// Sirach
  {"WISDOM OF SIRACH", "Sir"},		// Sirach
  {"WISDOM OF SOLOMON", "Wis"},		// Wisdom
  {"ZECH", "Zech"},		// Zechariah
  {"ZECHARIAH", "Zech"},		// Zechariah
  {"ZEPH", "Zeph"},		// Zephaniah
  {"ZEPHANIAH", "Zeph"},		// Zephaniah
  {"", ""}
};


SWORD_NAMESPACE_END


#endif


<|start_filename|>src/UserInterface/CacheObject.h<|end_filename|>
//
//  CacheObject.h
//  Eloquent
//
//  Created by <NAME> on 17.02.10.
//  Copyright 2010 Software by MABE. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface CacheObject : NSObject {
    NSString *reference;
    id content;
    NSInteger count;
}

@property (strong, readwrite) NSString *reference;
@property (strong, readwrite) id content;
@property (readwrite) NSInteger count;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/swtext.h<|end_filename|>
/******************************************************************************
 *
 *  swtext.h -	code for base class 'SWText'.  SWText is the basis for all
 *		types of text modules
 *
 * $Id: swtext.h 2833 2013-06-29 06:40:28Z chrislit $
 *
 * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef SWTEXT_H
#define SWTEXT_H

#include <swmodule.h>

#include <defs.h>

SWORD_NAMESPACE_START

class VerseKey;

/** The basis for all text modules
 */
class SWDLLEXPORT SWText : public SWModule {

	// for conversion if we have been set with a different internal key type
	mutable VerseKey *tmpVK1;
	mutable VerseKey *tmpVK2;
        mutable bool tmpSecond;
	char *versification;

protected:
	VerseKey &getVerseKey(const SWKey* key=0) const;
	
public:
	/** Initializes data for instance of SWText
	*/
	SWText(const char *imodname = 0, const char *imoddesc = 0,
			SWDisplay *idisp = 0,
			SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup markup = FMT_UNKNOWN, const char *ilang = 0,
			const char *versification = "KJV");

	virtual ~SWText();
	/** Create the correct key (VerseKey) for use with SWText
	*/
	virtual SWKey *createKey() const;

	virtual long getIndex() const;
	virtual void setIndex(long iindex);

	// OPERATORS -----------------------------------------------------------------
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END

#endif


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/xzcomprs.h<|end_filename|>
/******************************************************************************
 *
 *  xzcomprs.h -	XzCompress, a driver class that provides xz (LZMA2)
 *			compression
 *
 * $Id: xzcomprs.h 3249 2014-08-24 01:55:08Z scribe $
 *
 * Copyright 2000-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef XZCOMPRS_H
#define XZCOMPRS_H

#include <swcomprs.h>

#include <defs.h>
#include <sysdata.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT XzCompress : public SWCompress {

protected:
public:
	XzCompress();
	virtual ~XzCompress();

	virtual void Encode(void);
	virtual void Decode(void);
	virtual void setLevel(int l);
private:
	__u64 memlimit; // memory usage limit during decompression
};

SWORD_NAMESPACE_END
#endif


<|start_filename|>Resources/FooLogger.framework/Versions/A/Headers/CocoLogger.h<|end_filename|>
/*
 *  CocoLogger.h
 *  CocoLogger
 *
 *  Created by <NAME> on 10.06.05.
 *  Copyright 2005 mabe. All rights reserved.
 *
 */

#import <FooLogger/Logger.h>

typedef enum {
	LEVEL_OFF = 1,
	LEVEL_CRIT,
	LEVEL_ERR,
	LEVEL_WARN,
	LEVEL_INFO,
	LEVEL_DEBUG
}LoggingLevel;


<|start_filename|>src/UserInterface/DictionaryViewController.h<|end_filename|>
//
//  DictionaryViewController.h
//  Eloquent
//
//  Created by <NAME> on 25.08.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <CocoPCRE/CocoPCRE.h>
#import "ModuleViewController.h"

@class SwordDictionary, ExtTextViewController;

#define DICTIONARYVIEW_NIBNAME   @"DictionaryView"

/** the view of this view controller is a ScrollSynchronizableView */
@interface DictionaryViewController : ModuleViewController <NSCoding, NSTableViewDataSource, NSTableViewDelegate> {
    IBOutlet NSPopUpButton *modulePopBtn;

    IBOutlet NSView *sideBarView;
    IBOutlet NSTableView *entriesTableView;
    
    NSMutableArray *selection;
    NSArray *dictKeys;
}

// ---------- initializers ---------
- (id)initWithModule:(SwordDictionary *)aModule;
- (id)initWithModule:(SwordDictionary *)aModule delegate:(id)aDelegate;
- (id)initWithDelegate:(id)aDelegate;

// NSCoding
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;

- (void)moduleSelectionChanged:(NSMenuItem *)sender;

@end


<|start_filename|>Resources/ObjCSword.framework/Versions/A/PrivateHeaders/zcom4.h<|end_filename|>
/******************************************************************************
 *
 *  zcom4.h - 	code for class 'zCom4'- a module that reads compressed text
 *     	       	files: ot and nt using indexs ??.vss
 *
 * $Id: zcom4.h 3141 2014-03-19 01:24:04Z chrislit $
 *
 * Copyright 1996-2014 CrossWire Bible Society (http://www.crosswire.org)
 *	CrossWire Bible Society
 *	P. O. Box 2528
 *	Tempe, AZ  85280-2528
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation version 2.
 *
 * This program 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
 * General Public License for more details.
 *
 */

#ifndef ZCOM4_H
#define ZCOM4_H

#include <swcom.h>

#include <defs.h>

SWORD_NAMESPACE_START

class SWDLLEXPORT zCom4 : public zVerse4, public SWCom {

	VerseKey *lastWriteKey;
	bool sameBlock(VerseKey * lastWriteKey, VerseKey * key);
	int blockType;


public:

	zCom4(const char *ipath, const char *iname = 0, const char *idesc = 0,
			int blockType = CHAPTERBLOCKS, SWCompress *icomp = 0,
			SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
			SWTextDirection dir = DIRECTION_LTR,
			SWTextMarkup markup = FMT_UNKNOWN, const char *ilang = 0,
			const char *versification = "KJV");
	virtual ~zCom4();
	virtual SWBuf &getRawEntryBuf() const;
	virtual void increment(int steps = 1);
	virtual void decrement(int steps = 1) { increment(-steps); }

	// write interface ----------------------------
	virtual bool isWritable() const;
	static char createModule(const char *path, int blockBound, const char *v11n = "KJV") {
		return zVerse4::createModule(path, blockBound, v11n);
	}
	virtual void setEntry(const char *inbuf, long len = -1);	// Modify current module entry
	virtual void linkEntry(const SWKey * linkKey);	// Link current module entry to other module entry
	virtual void deleteEntry();	// Delete current module entry
	// end write interface ------------------------

	virtual void rawZFilter(SWBuf &buf, char direction = 0) const { rawFilter(buf, (SWKey *)(long)direction); }// hack, use key as direction for enciphering

	// swcacher interface ----------------------
	virtual void flush() { flushCache(); }
	// end swcacher interface ----------------------

	virtual bool isLinked(const SWKey *k1, const SWKey *k2) const;
	virtual bool hasEntry(const SWKey *k) const;
	
	SWMODULE_OPERATORS

};

SWORD_NAMESPACE_END

#endif
