C# Class SIL.FieldWorks.XWorks.DictionaryPublicationDecorator

Inheritance: SIL.FieldWorks.FDO.Application.DomainDataByFlidDecoratorBase
ファイルを表示 Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
BuildExcludedObjects void
BuildFieldsToFilter void
BuildHomographInfo void
ExcludeSense void
GetSenseNumber string
GetSenseNumberTss ITsString
HasMoreThanOneSense bool
IsPublishableLexEntryRef bool
IsPublishableLexRef bool
IsPublishablePicture bool

Public Methods

Method Description
AddNotification ( IVwNotifyChange nchng ) : void

We want to intercept notifications. So instead of registering the root box with the wrapped SDA, we register ourself.

DictionaryPublicationDecorator ( SIL.FieldWorks.FDO.FdoCache cache, ISilDataAccessManaged domainDataByFlid, int mainFlid ) : System

Make one. By default we filter to the main dictionary.

DictionaryPublicationDecorator ( SIL.FieldWorks.FDO.FdoCache cache, ISilDataAccessManaged domainDataByFlid, int mainFlid, ICmPossibility publication ) : System

Create one. The SDA passed MAY be the DomainDataByFlid of the cache, but it is usually another decorator.

GetObjIndex ( int hvoOwn, int flid, int hvo ) : int
OwnerOutlineNameForWs ( ILexSense sense, int wsVern, HomographConfiguration hv ) : ITsString

Returns a TsString with the entry headword and a sense number if there are more than one senses.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void

When we get a PropChanged, it is really meant for our m_notifiee. However, it may have invalid arguments for ivMin etc, because the item(s) inserted or deleted in the real property may be in a different (or no) place in the filtered property. Rather than trying to figure out what really changed, we issue a PropChanged which is interpreted as changing the whole property.

Refresh ( ) : void

Update whatever needs it.

RemoveNotification ( IVwNotifyChange nchng ) : void
VecProp ( int hvo, int tag ) : int[]
get_BooleanProp ( int hvo, int tag ) : bool
get_IntProp ( int hvo, int tag ) : int
get_MultiStringAlt ( int hvo, int tag, int ws ) : ITsString
get_StringProp ( int hvo, int tag ) : ITsString
get_VecItem ( int hvo, int tag, int index ) : int
get_VecSize ( int hvo, int tag ) : int

Private Methods

Method Description
BuildExcludedObjects ( ) : void

Build the set of objects we want to hide: all the ones that refer to the Publication. Perhaps strictly we should exclude the ones that refer to it in DoNotPublishIn, but those are the only properties that refer to this target.

BuildFieldsToFilter ( ) : void
BuildHomographInfo ( ) : void
ExcludeSense ( ILexSense sense ) : void
GetSenseNumber ( ILexSense sense ) : string
GetSenseNumberTss ( ILexSense sense ) : ITsString
HasMoreThanOneSense ( ILexEntry entry ) : bool
IsPublishableLexEntryRef ( int hvoSource, int hvoRef ) : bool
IsPublishableLexRef ( int hvoRef ) : bool

Enhance JohnT: there is some evidence (see LexReference.ExtractMinimalLexReferences) that LexReferences of the three sequence types should be allowed to show up if only ONE item is present. However, such a 'relation' doesn't seem very useful, and a longer one that is reduced to a single item by filtering is even less likely to be what the user wants.

IsPublishablePicture ( int hvo ) : bool

Method Details

AddNotification() public method

We want to intercept notifications. So instead of registering the root box with the wrapped SDA, we register ourself.
public AddNotification ( IVwNotifyChange nchng ) : void
nchng IVwNotifyChange
return void

DictionaryPublicationDecorator() public method

Make one. By default we filter to the main dictionary.
public DictionaryPublicationDecorator ( SIL.FieldWorks.FDO.FdoCache cache, ISilDataAccessManaged domainDataByFlid, int mainFlid ) : System
cache SIL.FieldWorks.FDO.FdoCache
domainDataByFlid ISilDataAccessManaged
mainFlid int
return System

DictionaryPublicationDecorator() public method

Create one. The SDA passed MAY be the DomainDataByFlid of the cache, but it is usually another decorator.
public DictionaryPublicationDecorator ( SIL.FieldWorks.FDO.FdoCache cache, ISilDataAccessManaged domainDataByFlid, int mainFlid, ICmPossibility publication ) : System
cache SIL.FieldWorks.FDO.FdoCache
domainDataByFlid ISilDataAccessManaged
mainFlid int
publication ICmPossibility
return System

GetObjIndex() public method

public GetObjIndex ( int hvoOwn, int flid, int hvo ) : int
hvoOwn int
flid int
hvo int
return int

OwnerOutlineNameForWs() public method

Returns a TsString with the entry headword and a sense number if there are more than one senses.
public OwnerOutlineNameForWs ( ILexSense sense, int wsVern, HomographConfiguration hv ) : ITsString
sense ILexSense
wsVern int
hv SIL.FieldWorks.FDO.DomainImpl.HomographConfiguration
return ITsString

PropChanged() public method

When we get a PropChanged, it is really meant for our m_notifiee. However, it may have invalid arguments for ivMin etc, because the item(s) inserted or deleted in the real property may be in a different (or no) place in the filtered property. Rather than trying to figure out what really changed, we issue a PropChanged which is interpreted as changing the whole property.
public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
return void

Refresh() public method

Update whatever needs it.
public Refresh ( ) : void
return void

RemoveNotification() public method

public RemoveNotification ( IVwNotifyChange nchng ) : void
nchng IVwNotifyChange
return void

VecProp() public method

public VecProp ( int hvo, int tag ) : int[]
hvo int
tag int
return int[]

get_BooleanProp() public method

public get_BooleanProp ( int hvo, int tag ) : bool
hvo int
tag int
return bool

get_IntProp() public method

public get_IntProp ( int hvo, int tag ) : int
hvo int
tag int
return int

get_MultiStringAlt() public method

public get_MultiStringAlt ( int hvo, int tag, int ws ) : ITsString
hvo int
tag int
ws int
return ITsString

get_StringProp() public method

public get_StringProp ( int hvo, int tag ) : ITsString
hvo int
tag int
return ITsString

get_VecItem() public method

public get_VecItem ( int hvo, int tag, int index ) : int
hvo int
tag int
index int
return int

get_VecSize() public method

public get_VecSize ( int hvo, int tag ) : int
hvo int
tag int
return int